1 #! /bin/sh 2 # Guess values for system-dependent variables and create Makefiles. 3 # Generated by GNU Autoconf 2.67 for OpenJDK jdk8. 4 # 5 # Report bugs to <build-dev@openjdk.java.net>. 6 # 7 # 8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software 10 # Foundation, Inc. 11 # 12 # 13 # This configure script is free software; the Free Software Foundation 14 # gives unlimited permission to copy, distribute and modify it. 15 ## -------------------- ## 16 ## M4sh Initialization. ## 17 ## -------------------- ## 18 19 # Be more Bourne compatible 20 DUALCASE=1; export DUALCASE # for MKS sh 21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 22 emulate sh 23 NULLCMD=: 24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 25 # is contrary to our usage. Disable this feature. 26 alias -g '${1+"$@"}'='"$@"' 27 setopt NO_GLOB_SUBST 28 else 29 case `(set -o) 2>/dev/null` in #( 30 *posix*) : 31 set -o posix ;; #( 32 *) : 33 ;; 34 esac 35 fi 36 37 38 as_nl=' 39 ' 40 export as_nl 41 # Printing a long string crashes Solaris 7 /usr/bin/printf. 42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 45 # Prefer a ksh shell builtin over an external printf program on Solaris, 46 # but without wasting forks for bash or zsh. 47 if test -z "$BASH_VERSION$ZSH_VERSION" \ 48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 49 as_echo='print -r --' 50 as_echo_n='print -rn --' 51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 52 as_echo='printf %s\n' 53 as_echo_n='printf %s' 54 else 55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 57 as_echo_n='/usr/ucb/echo -n' 58 else 59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 60 as_echo_n_body='eval 61 arg=$1; 62 case $arg in #( 63 *"$as_nl"*) 64 expr "X$arg" : "X\\(.*\\)$as_nl"; 65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 66 esac; 67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 68 ' 69 export as_echo_n_body 70 as_echo_n='sh -c $as_echo_n_body as_echo' 71 fi 72 export as_echo_body 73 as_echo='sh -c $as_echo_body as_echo' 74 fi 75 76 # The user is always right. 77 if test "${PATH_SEPARATOR+set}" != set; then 78 PATH_SEPARATOR=: 79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 81 PATH_SEPARATOR=';' 82 } 83 fi 84 85 86 # IFS 87 # We need space, tab and new line, in precisely that order. Quoting is 88 # there to prevent editors from complaining about space-tab. 89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word 90 # splitting by setting IFS to empty value.) 91 IFS=" "" $as_nl" 92 93 # Find who we are. Look in the path if we contain no directory separator. 94 case $0 in #(( 95 *[\\/]* ) as_myself=$0 ;; 96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 97 for as_dir in $PATH 98 do 99 IFS=$as_save_IFS 100 test -z "$as_dir" && as_dir=. 101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 102 done 103 IFS=$as_save_IFS 104 105 ;; 106 esac 107 # We did not find ourselves, most probably we were run as `sh COMMAND' 108 # in which case we are not to be found in the path. 109 if test "x$as_myself" = x; then 110 as_myself=$0 111 fi 112 if test ! -f "$as_myself"; then 113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 114 exit 1 115 fi 116 117 # Unset variables that we do not need and which cause bugs (e.g. in 118 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 119 # suppresses any "Segmentation fault" message there. '((' could 120 # trigger a bug in pdksh 5.2.14. 121 for as_var in BASH_ENV ENV MAIL MAILPATH 122 do eval test x\${$as_var+set} = xset \ 123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 124 done 125 PS1='$ ' 126 PS2='> ' 127 PS4='+ ' 128 129 # NLS nuisances. 130 LC_ALL=C 131 export LC_ALL 132 LANGUAGE=C 133 export LANGUAGE 134 135 # CDPATH. 136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 137 138 if test "x$CONFIG_SHELL" = x; then 139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 140 emulate sh 141 NULLCMD=: 142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 143 # is contrary to our usage. Disable this feature. 144 alias -g '\${1+\"\$@\"}'='\"\$@\"' 145 setopt NO_GLOB_SUBST 146 else 147 case \`(set -o) 2>/dev/null\` in #( 148 *posix*) : 149 set -o posix ;; #( 150 *) : 151 ;; 152 esac 153 fi 154 " 155 as_required="as_fn_return () { (exit \$1); } 156 as_fn_success () { as_fn_return 0; } 157 as_fn_failure () { as_fn_return 1; } 158 as_fn_ret_success () { return 0; } 159 as_fn_ret_failure () { return 1; } 160 161 exitcode=0 162 as_fn_success || { exitcode=1; echo as_fn_success failed.; } 163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 167 168 else 169 exitcode=1; echo positional parameters were not saved. 170 fi 171 test x\$exitcode = x0 || exit 1" 172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 176 test \$(( 1 + 1 )) = 2 || exit 1" 177 if (eval "$as_required") 2>/dev/null; then : 178 as_have_required=yes 179 else 180 as_have_required=no 181 fi 182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 183 184 else 185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 186 as_found=false 187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 188 do 189 IFS=$as_save_IFS 190 test -z "$as_dir" && as_dir=. 191 as_found=: 192 case $as_dir in #( 193 /*) 194 for as_base in sh bash ksh sh5; do 195 # Try only shells that exist, to save several forks. 196 as_shell=$as_dir/$as_base 197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 199 CONFIG_SHELL=$as_shell as_have_required=yes 200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 201 break 2 202 fi 203 fi 204 done;; 205 esac 206 as_found=false 207 done 208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 210 CONFIG_SHELL=$SHELL as_have_required=yes 211 fi; } 212 IFS=$as_save_IFS 213 214 215 if test "x$CONFIG_SHELL" != x; then : 216 # We cannot yet assume a decent shell, so we have to provide a 217 # neutralization value for shells without unset; and this also 218 # works around shells that cannot unset nonexistent variables. 219 BASH_ENV=/dev/null 220 ENV=/dev/null 221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 222 export CONFIG_SHELL 223 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} 224 fi 225 226 if test x$as_have_required = xno; then : 227 $as_echo "$0: This script requires a shell more modern than all" 228 $as_echo "$0: the shells that I found on your system." 229 if test x${ZSH_VERSION+set} = xset ; then 230 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 231 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 232 else 233 $as_echo "$0: Please tell bug-autoconf@gnu.org and 234 $0: build-dev@openjdk.java.net about your system, including 235 $0: any error possibly output before this message. Then 236 $0: install a modern shell, or manually run the script 237 $0: under such a shell if you do have one." 238 fi 239 exit 1 240 fi 241 fi 242 fi 243 SHELL=${CONFIG_SHELL-/bin/sh} 244 export SHELL 245 # Unset more variables known to interfere with behavior of common tools. 246 CLICOLOR_FORCE= GREP_OPTIONS= 247 unset CLICOLOR_FORCE GREP_OPTIONS 248 249 ## --------------------- ## 250 ## M4sh Shell Functions. ## 251 ## --------------------- ## 252 # as_fn_unset VAR 253 # --------------- 254 # Portably unset VAR. 255 as_fn_unset () 256 { 257 { eval $1=; unset $1;} 258 } 259 as_unset=as_fn_unset 260 261 # as_fn_set_status STATUS 262 # ----------------------- 263 # Set $? to STATUS, without forking. 264 as_fn_set_status () 265 { 266 return $1 267 } # as_fn_set_status 268 269 # as_fn_exit STATUS 270 # ----------------- 271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 272 as_fn_exit () 273 { 274 set +e 275 as_fn_set_status $1 276 exit $1 277 } # as_fn_exit 278 279 # as_fn_mkdir_p 280 # ------------- 281 # Create "$as_dir" as a directory, including parents if necessary. 282 as_fn_mkdir_p () 283 { 284 285 case $as_dir in #( 286 -*) as_dir=./$as_dir;; 287 esac 288 test -d "$as_dir" || eval $as_mkdir_p || { 289 as_dirs= 290 while :; do 291 case $as_dir in #( 292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 293 *) as_qdir=$as_dir;; 294 esac 295 as_dirs="'$as_qdir' $as_dirs" 296 as_dir=`$as_dirname -- "$as_dir" || 297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 298 X"$as_dir" : 'X\(//\)[^/]' \| \ 299 X"$as_dir" : 'X\(//\)$' \| \ 300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 301 $as_echo X"$as_dir" | 302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 303 s//\1/ 304 q 305 } 306 /^X\(\/\/\)[^/].*/{ 307 s//\1/ 308 q 309 } 310 /^X\(\/\/\)$/{ 311 s//\1/ 312 q 313 } 314 /^X\(\/\).*/{ 315 s//\1/ 316 q 317 } 318 s/.*/./; q'` 319 test -d "$as_dir" && break 320 done 321 test -z "$as_dirs" || eval "mkdir $as_dirs" 322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 323 324 325 } # as_fn_mkdir_p 326 # as_fn_append VAR VALUE 327 # ---------------------- 328 # Append the text in VALUE to the end of the definition contained in VAR. Take 329 # advantage of any shell optimizations that allow amortized linear growth over 330 # repeated appends, instead of the typical quadratic growth present in naive 331 # implementations. 332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 333 eval 'as_fn_append () 334 { 335 eval $1+=\$2 336 }' 337 else 338 as_fn_append () 339 { 340 eval $1=\$$1\$2 341 } 342 fi # as_fn_append 343 344 # as_fn_arith ARG... 345 # ------------------ 346 # Perform arithmetic evaluation on the ARGs, and store the result in the 347 # global $as_val. Take advantage of shells that can avoid forks. The arguments 348 # must be portable across $(()) and expr. 349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 350 eval 'as_fn_arith () 351 { 352 as_val=$(( $* )) 353 }' 354 else 355 as_fn_arith () 356 { 357 as_val=`expr "$@" || test $? -eq 1` 358 } 359 fi # as_fn_arith 360 361 362 # as_fn_error STATUS ERROR [LINENO LOG_FD] 363 # ---------------------------------------- 364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 366 # script with STATUS, using 1 if that was 0. 367 as_fn_error () 368 { 369 as_status=$1; test $as_status -eq 0 && as_status=1 370 if test "$4"; then 371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 373 fi 374 $as_echo "$as_me: error: $2" >&2 375 as_fn_exit $as_status 376 } # as_fn_error 377 378 if expr a : '\(a\)' >/dev/null 2>&1 && 379 test "X`expr 00001 : '.*\(...\)'`" = X001; then 380 as_expr=expr 381 else 382 as_expr=false 383 fi 384 385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 386 as_basename=basename 387 else 388 as_basename=false 389 fi 390 391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 392 as_dirname=dirname 393 else 394 as_dirname=false 395 fi 396 397 as_me=`$as_basename -- "$0" || 398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 399 X"$0" : 'X\(//\)$' \| \ 400 X"$0" : 'X\(/\)' \| . 2>/dev/null || 401 $as_echo X/"$0" | 402 sed '/^.*\/\([^/][^/]*\)\/*$/{ 403 s//\1/ 404 q 405 } 406 /^X\/\(\/\/\)$/{ 407 s//\1/ 408 q 409 } 410 /^X\/\(\/\).*/{ 411 s//\1/ 412 q 413 } 414 s/.*/./; q'` 415 416 # Avoid depending upon Character Ranges. 417 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 420 as_cr_digits='0123456789' 421 as_cr_alnum=$as_cr_Letters$as_cr_digits 422 423 424 as_lineno_1=$LINENO as_lineno_1a=$LINENO 425 as_lineno_2=$LINENO as_lineno_2a=$LINENO 426 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 427 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 428 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 429 sed -n ' 430 p 431 /[$]LINENO/= 432 ' <$as_myself | 433 sed ' 434 s/[$]LINENO.*/&-/ 435 t lineno 436 b 437 :lineno 438 N 439 :loop 440 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 441 t loop 442 s/-\n.*// 443 ' >$as_me.lineno && 444 chmod +x "$as_me.lineno" || 445 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 446 447 # Don't try to exec as it changes $[0], causing all sort of problems 448 # (the dirname of $[0] is not the place where we might find the 449 # original and so on. Autoconf is especially sensitive to this). 450 . "./$as_me.lineno" 451 # Exit status is that of the last command. 452 exit 453 } 454 455 ECHO_C= ECHO_N= ECHO_T= 456 case `echo -n x` in #((((( 457 -n*) 458 case `echo 'xy\c'` in 459 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 460 xy) ECHO_C='\c';; 461 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 462 ECHO_T=' ';; 463 esac;; 464 *) 465 ECHO_N='-n';; 466 esac 467 468 rm -f conf$$ conf$$.exe conf$$.file 469 if test -d conf$$.dir; then 470 rm -f conf$$.dir/conf$$.file 471 else 472 rm -f conf$$.dir 473 mkdir conf$$.dir 2>/dev/null 474 fi 475 if (echo >conf$$.file) 2>/dev/null; then 476 if ln -s conf$$.file conf$$ 2>/dev/null; then 477 as_ln_s='ln -s' 478 # ... but there are two gotchas: 479 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 480 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 481 # In both cases, we have to default to `cp -p'. 482 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 483 as_ln_s='cp -p' 484 elif ln conf$$.file conf$$ 2>/dev/null; then 485 as_ln_s=ln 486 else 487 as_ln_s='cp -p' 488 fi 489 else 490 as_ln_s='cp -p' 491 fi 492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 493 rmdir conf$$.dir 2>/dev/null 494 495 if mkdir -p . 2>/dev/null; then 496 as_mkdir_p='mkdir -p "$as_dir"' 497 else 498 test -d ./-p && rmdir ./-p 499 as_mkdir_p=false 500 fi 501 502 if test -x / >/dev/null 2>&1; then 503 as_test_x='test -x' 504 else 505 if ls -dL / >/dev/null 2>&1; then 506 as_ls_L_option=L 507 else 508 as_ls_L_option= 509 fi 510 as_test_x=' 511 eval sh -c '\'' 512 if test -d "$1"; then 513 test -d "$1/."; 514 else 515 case $1 in #( 516 -*)set "./$1";; 517 esac; 518 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 519 ???[sx]*):;;*)false;;esac;fi 520 '\'' sh 521 ' 522 fi 523 as_executable_p=$as_test_x 524 525 # Sed expression to map a string onto a valid CPP name. 526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 527 528 # Sed expression to map a string onto a valid variable name. 529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 530 531 532 test -n "$DJDIR" || exec 7<&0 </dev/null 533 exec 6>&1 534 535 # Name of the host. 536 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 537 # so uname gets run too. 538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 539 540 # 541 # Initializations. 542 # 543 ac_default_prefix=/usr/local 544 ac_clean_files= 545 ac_config_libobj_dir=. 546 LIBOBJS= 547 cross_compiling=no 548 subdirs= 549 MFLAGS= 550 MAKEFLAGS= 551 552 # Identity of this package. 553 PACKAGE_NAME='OpenJDK' 554 PACKAGE_TARNAME='openjdk' 555 PACKAGE_VERSION='jdk8' 556 PACKAGE_STRING='OpenJDK jdk8' 557 PACKAGE_BUGREPORT='build-dev@openjdk.java.net' 558 PACKAGE_URL='http://openjdk.java.net' 559 560 # Factoring default headers for most tests. 561 ac_includes_default="\ 562 #include <stdio.h> 563 #ifdef HAVE_SYS_TYPES_H 564 # include <sys/types.h> 565 #endif 566 #ifdef HAVE_SYS_STAT_H 567 # include <sys/stat.h> 568 #endif 569 #ifdef STDC_HEADERS 570 # include <stdlib.h> 571 # include <stddef.h> 572 #else 573 # ifdef HAVE_STDLIB_H 574 # include <stdlib.h> 575 # endif 576 #endif 577 #ifdef HAVE_STRING_H 578 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H 579 # include <memory.h> 580 # endif 581 # include <string.h> 582 #endif 583 #ifdef HAVE_STRINGS_H 584 # include <strings.h> 585 #endif 586 #ifdef HAVE_INTTYPES_H 587 # include <inttypes.h> 588 #endif 589 #ifdef HAVE_STDINT_H 590 # include <stdint.h> 591 #endif 592 #ifdef HAVE_UNISTD_H 593 # include <unistd.h> 594 #endif" 595 596 ac_subst_vars='LTLIBOBJS 597 LIBOBJS 598 CCACHE 599 USE_PRECOMPILED_HEADER 600 SJAVAC_SERVER_DIR 601 ENABLE_SJAVAC 602 SJAVAC_SERVER_CORES 603 SJAVAC_SERVER_JAVA 604 JOBS 605 MEMORY_SIZE 606 NUM_CORES 607 ENABLE_INTREE_EC 608 SALIB_NAME 609 HOTSPOT_MAKE_ARGS 610 FIXPATH 611 LIBCXX 612 LLVM_LIBS 613 LLVM_LDFLAGS 614 LLVM_CFLAGS 615 LLVM_CONFIG 616 LIBFFI_LIBS 617 LIBFFI_CFLAGS 618 STATIC_CXX_SETTING 619 LIBDL 620 LIBM 621 LIBZIP_CAN_USE_MMAP 622 USE_EXTERNAL_LIBZ 623 USE_EXTERNAL_LIBGIF 624 USE_EXTERNAL_LIBJPEG 625 ALSA_LIBS 626 ALSA_CFLAGS 627 FREETYPE2_LIB_PATH 628 USING_SYSTEM_FT_LIB 629 FREETYPE2_LIBS 630 FREETYPE2_CFLAGS 631 CUPS_CFLAGS 632 OPENWIN_HOME 633 X_EXTRA_LIBS 634 X_LIBS 635 X_PRE_LIBS 636 X_CFLAGS 637 XMKMF 638 CXXFLAGS_DEBUG_SYMBOLS 639 CFLAGS_DEBUG_SYMBOLS 640 ZIP_DEBUGINFO_FILES 641 ENABLE_DEBUG_SYMBOLS 642 COMPILER_SUPPORTS_TARGET_BITS_FLAG 643 ZERO_ARCHFLAG 644 LDFLAGS_CXX_JDK 645 LDFLAGS_JDKEXE_SUFFIX 646 LDFLAGS_JDKLIB_SUFFIX 647 LDFLAGS_JDKEXE 648 LDFLAGS_JDKLIB 649 CXXFLAGS_JDKEXE 650 CXXFLAGS_JDKLIB 651 CFLAGS_JDKEXE 652 CFLAGS_JDKLIB 653 MACOSX_VERSION_MIN 654 PACKAGE_PATH 655 LEGACY_EXTRA_LDFLAGS 656 LEGACY_EXTRA_CXXFLAGS 657 LEGACY_EXTRA_CFLAGS 658 CXX_FLAG_DEPS 659 C_FLAG_DEPS 660 CXX_O_FLAG_NONE 661 CXX_O_FLAG_NORM 662 CXX_O_FLAG_HI 663 CXX_O_FLAG_HIGHEST 664 C_O_FLAG_NONE 665 C_O_FLAG_NORM 666 C_O_FLAG_HI 667 C_O_FLAG_HIGHEST 668 POST_MCS_CMD 669 POST_STRIP_CMD 670 SET_EXECUTABLE_ORIGIN 671 SET_SHARED_LIBRARY_ORIGIN 672 CXX_FLAG_REORDER 673 C_FLAG_REORDER 674 SET_SHARED_LIBRARY_MAPFILE 675 SET_SHARED_LIBRARY_NAME 676 SHARED_LIBRARY_FLAGS 677 EXE_SUFFIX 678 STATIC_LIBRARY_SUFFIX 679 SHARED_LIBRARY_SUFFIX 680 LIBRARY_PREFIX 681 STATIC_LIBRARY 682 SHARED_LIBRARY 683 OBJ_SUFFIX 684 COMPILER_NAME 685 LIPO 686 ac_ct_OBJDUMP 687 OBJDUMP 688 ac_ct_OBJCOPY 689 OBJCOPY 690 MCS 691 STRIP 692 GNM 693 NM 694 AS 695 CXXCPP 696 CPP 697 COMPILER_TYPE 698 RC_FLAGS 699 DUMPBIN 700 WINAR 701 HOTSPOT_RC 702 HOTSPOT_MT 703 RC 704 MT 705 WINLD 706 HOTSPOT_LD 707 HOTSPOT_CXX 708 ARFLAGS 709 AR 710 LDEXECXX 711 LDCXX 712 LDEXE 713 LD 714 ac_ct_OBJC 715 OBJCFLAGS 716 OBJC 717 ac_ct_CXX 718 CXXFLAGS 719 CXX 720 ac_ct_PROPER_COMPILER_CXX 721 PROPER_COMPILER_CXX 722 POTENTIAL_CXX 723 TOOLS_DIR_CXX 724 OBJEXT 725 EXEEXT 726 ac_ct_CC 727 CPPFLAGS 728 LDFLAGS 729 CFLAGS 730 CC 731 ac_ct_PROPER_COMPILER_CC 732 PROPER_COMPILER_CC 733 POTENTIAL_CC 734 TOOLS_DIR_CC 735 BUILD_LD 736 BUILD_CXX 737 BUILD_CC 738 MSVCR_DLL 739 DXSDK_INCLUDE_PATH 740 DXSDK_LIB_PATH 741 VS_PATH 742 VS_LIB 743 VS_INCLUDE 744 CYGWIN_LINK 745 AR_OUT_OPTION 746 LD_OUT_OPTION 747 EXE_OUT_OPTION 748 CC_OUT_OPTION 749 BUILD_HOTSPOT 750 HOTSPOT_DIST 751 BUILD_OUTPUT 752 OVERRIDE_SRC_ROOT 753 ADD_SRC_ROOT 754 JDK_TOPDIR 755 NASHORN_TOPDIR 756 HOTSPOT_TOPDIR 757 JAXWS_TOPDIR 758 JAXP_TOPDIR 759 CORBA_TOPDIR 760 LANGTOOLS_TOPDIR 761 BOOT_JDK_JVMARGS 762 JAVAC_FLAGS 763 BOOT_JDK_SOURCETARGET 764 BOOT_JDK 765 BOOT_TOOLSJAR 766 BOOT_RTJAR 767 JAVA_CHECK 768 JAVAC_CHECK 769 COOKED_BUILD_NUMBER 770 JDK_VERSION 771 COPYRIGHT_YEAR 772 MACOSX_BUNDLE_ID_BASE 773 MACOSX_BUNDLE_NAME_BASE 774 COMPANY_NAME 775 JDK_RC_PLATFORM_NAME 776 PRODUCT_SUFFIX 777 PRODUCT_NAME 778 LAUNCHER_NAME 779 MILESTONE 780 JDK_BUILD_NUMBER 781 JDK_UPDATE_VERSION 782 JDK_MICRO_VERSION 783 JDK_MINOR_VERSION 784 JDK_MAJOR_VERSION 785 USER_RELEASE_SUFFIX 786 COMPRESS_JARS 787 UNLIMITED_CRYPTO 788 CACERTS_FILE 789 TEST_IN_BUILD 790 BUILD_HEADLESS 791 SUPPORT_HEADFUL 792 SUPPORT_HEADLESS 793 BDEPS_FTP 794 BDEPS_UNZIP 795 OS_VERSION_MICRO 796 OS_VERSION_MINOR 797 OS_VERSION_MAJOR 798 PKG_CONFIG 799 XATTR 800 TIME 801 STAT 802 HG 803 READELF 804 OTOOL 805 LDD 806 ZIP 807 UNZIP 808 FIND_DELETE 809 MAKE 810 CHECK_TOOLSDIR_MAKE 811 CHECK_TOOLSDIR_GMAKE 812 CHECK_MAKE 813 CHECK_GMAKE 814 PKGHANDLER 815 OUTPUT_ROOT 816 CONF_NAME 817 SPEC 818 BUILD_VARIANT_RELEASE 819 DEBUG_CLASSFILES 820 FASTDEBUG 821 VARIANT 822 DEBUG_LEVEL 823 MACOSX_UNIVERSAL 824 INCLUDE_SA 825 JVM_VARIANT_ZEROSHARK 826 JVM_VARIANT_ZERO 827 JVM_VARIANT_KERNEL 828 JVM_VARIANT_MINIMAL1 829 JVM_VARIANT_CLIENT 830 JVM_VARIANT_SERVER 831 JVM_VARIANTS 832 JDK_VARIANT 833 SET_OPENJDK 834 BUILD_LOG_WRAPPER 835 BUILD_LOG_PREVIOUS 836 BUILD_LOG 837 SYS_ROOT 838 PATH_SEP 839 SRC_ROOT 840 ZERO_ARCHDEF 841 DEFINE_CROSS_COMPILE_ARCH 842 LP64 843 OPENJDK_TARGET_OS_API_DIR 844 OPENJDK_TARGET_CPU_JLI_CFLAGS 845 OPENJDK_TARGET_CPU_OSARCH 846 OPENJDK_TARGET_CPU_ISADIR 847 OPENJDK_TARGET_CPU_LIBDIR 848 OPENJDK_TARGET_CPU_LEGACY_LIB 849 OPENJDK_TARGET_CPU_LEGACY 850 REQUIRED_OS_VERSION 851 REQUIRED_OS_NAME 852 COMPILE_TYPE 853 OPENJDK_TARGET_CPU_ENDIAN 854 OPENJDK_TARGET_CPU_BITS 855 OPENJDK_TARGET_CPU_ARCH 856 OPENJDK_TARGET_CPU 857 OPENJDK_TARGET_OS_API 858 OPENJDK_TARGET_OS 859 OPENJDK_BUILD_CPU_ENDIAN 860 OPENJDK_BUILD_CPU_BITS 861 OPENJDK_BUILD_CPU_ARCH 862 OPENJDK_BUILD_CPU 863 OPENJDK_BUILD_OS_API 864 OPENJDK_BUILD_OS 865 OPENJDK_BUILD_AUTOCONF_NAME 866 OPENJDK_TARGET_AUTOCONF_NAME 867 target_os 868 target_vendor 869 target_cpu 870 target 871 host_os 872 host_vendor 873 host_cpu 874 host 875 build_os 876 build_vendor 877 build_cpu 878 build 879 SETFILE 880 DF 881 READLINK 882 CYGPATH 883 NAWK 884 SED 885 FGREP 886 EGREP 887 GREP 888 AWK 889 XARGS 890 WHICH 891 WC 892 UNIQ 893 UNAME 894 TR 895 TOUCH 896 TEE 897 TAR 898 TAIL 899 SORT 900 SH 901 RM 902 THEPWDCMD 903 PRINTF 904 MV 905 MKTEMP 906 MKDIR 907 LS 908 LN 909 HEAD 910 FIND 911 FILE 912 EXPR 913 ECHO 914 DIRNAME 915 DIFF 916 DATE 917 CUT 918 CPIO 919 CP 920 COMM 921 CMP 922 CHMOD 923 CAT 924 BASH 925 BASENAME 926 DATE_WHEN_CONFIGURED 927 CONFIGURE_COMMAND_LINE 928 CUSTOM_MAKE_DIR 929 target_alias 930 host_alias 931 build_alias 932 LIBS 933 ECHO_T 934 ECHO_N 935 ECHO_C 936 DEFS 937 mandir 938 localedir 939 libdir 940 psdir 941 pdfdir 942 dvidir 943 htmldir 944 infodir 945 docdir 946 oldincludedir 947 includedir 948 localstatedir 949 sharedstatedir 950 sysconfdir 951 datadir 952 datarootdir 953 libexecdir 954 sbindir 955 bindir 956 program_transform_name 957 prefix 958 exec_prefix 959 PACKAGE_URL 960 PACKAGE_BUGREPORT 961 PACKAGE_STRING 962 PACKAGE_VERSION 963 PACKAGE_TARNAME 964 PACKAGE_NAME 965 PATH_SEPARATOR 966 SHELL' 967 ac_subst_files='' 968 ac_user_opts=' 969 enable_option_checking 970 with_custom_make_dir 971 with_target_bits 972 with_sys_root 973 with_tools_dir 974 with_devkit 975 enable_openjdk_only 976 with_jdk_variant 977 with_jvm_variants 978 enable_debug 979 with_debug_level 980 with_conf_name 981 with_builddeps_conf 982 with_builddeps_server 983 with_builddeps_dir 984 with_builddeps_group 985 enable_headful 986 enable_hotspot_test_in_build 987 with_cacerts_file 988 enable_unlimited_crypto 989 with_milestone 990 with_build_number 991 with_user_release_suffix 992 with_boot_jdk 993 with_boot_jdk_jvmargs 994 with_add_source_root 995 with_override_source_root 996 with_adds_and_overrides 997 with_override_langtools 998 with_override_corba 999 with_override_jaxp 1000 with_override_jaxws 1001 with_override_hotspot 1002 with_override_jdk 1003 with_import_hotspot 1004 with_msvcr_dll 1005 with_dxsdk 1006 with_dxsdk_lib 1007 with_dxsdk_include 1008 with_extra_cflags 1009 with_extra_cxxflags 1010 with_extra_ldflags 1011 enable_debug_symbols 1012 enable_zip_debug_info 1013 enable_macosx_runtime_support 1014 with_x 1015 with_cups 1016 with_cups_include 1017 with_freetype 1018 with_alsa 1019 with_alsa_include 1020 with_alsa_lib 1021 with_giflib 1022 with_zlib 1023 with_stdc__lib 1024 with_num_cores 1025 with_memory_size 1026 with_jobs 1027 with_sjavac_server_java 1028 with_sjavac_server_cores 1029 enable_sjavac 1030 enable_precompiled_headers 1031 enable_ccache 1032 with_ccache_dir 1033 ' 1034 ac_precious_vars='build_alias 1035 host_alias 1036 target_alias 1037 PKG_CONFIG 1038 CC 1039 CFLAGS 1040 LDFLAGS 1041 LIBS 1042 CPPFLAGS 1043 CXX 1044 CXXFLAGS 1045 CCC 1046 OBJC 1047 OBJCFLAGS 1048 CPP 1049 CXXCPP 1050 XMKMF 1051 FREETYPE2_CFLAGS 1052 FREETYPE2_LIBS 1053 ALSA_CFLAGS 1054 ALSA_LIBS 1055 LIBFFI_CFLAGS 1056 LIBFFI_LIBS' 1057 1058 1059 # Initialize some variables set by options. 1060 ac_init_help= 1061 ac_init_version=false 1062 ac_unrecognized_opts= 1063 ac_unrecognized_sep= 1064 # The variables have the same names as the options, with 1065 # dashes changed to underlines. 1066 cache_file=/dev/null 1067 exec_prefix=NONE 1068 no_create= 1069 no_recursion= 1070 prefix=NONE 1071 program_prefix=NONE 1072 program_suffix=NONE 1073 program_transform_name=s,x,x, 1074 silent= 1075 site= 1076 srcdir= 1077 verbose= 1078 x_includes=NONE 1079 x_libraries=NONE 1080 1081 # Installation directory options. 1082 # These are left unexpanded so users can "make install exec_prefix=/foo" 1083 # and all the variables that are supposed to be based on exec_prefix 1084 # by default will actually change. 1085 # Use braces instead of parens because sh, perl, etc. also accept them. 1086 # (The list follows the same order as the GNU Coding Standards.) 1087 bindir='${exec_prefix}/bin' 1088 sbindir='${exec_prefix}/sbin' 1089 libexecdir='${exec_prefix}/libexec' 1090 datarootdir='${prefix}/share' 1091 datadir='${datarootdir}' 1092 sysconfdir='${prefix}/etc' 1093 sharedstatedir='${prefix}/com' 1094 localstatedir='${prefix}/var' 1095 includedir='${prefix}/include' 1096 oldincludedir='/usr/include' 1097 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 1098 infodir='${datarootdir}/info' 1099 htmldir='${docdir}' 1100 dvidir='${docdir}' 1101 pdfdir='${docdir}' 1102 psdir='${docdir}' 1103 libdir='${exec_prefix}/lib' 1104 localedir='${datarootdir}/locale' 1105 mandir='${datarootdir}/man' 1106 1107 ac_prev= 1108 ac_dashdash= 1109 for ac_option 1110 do 1111 # If the previous option needs an argument, assign it. 1112 if test -n "$ac_prev"; then 1113 eval $ac_prev=\$ac_option 1114 ac_prev= 1115 continue 1116 fi 1117 1118 case $ac_option in 1119 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 1120 *=) ac_optarg= ;; 1121 *) ac_optarg=yes ;; 1122 esac 1123 1124 # Accept the important Cygnus configure options, so we can diagnose typos. 1125 1126 case $ac_dashdash$ac_option in 1127 --) 1128 ac_dashdash=yes ;; 1129 1130 -bindir | --bindir | --bindi | --bind | --bin | --bi) 1131 ac_prev=bindir ;; 1132 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 1133 bindir=$ac_optarg ;; 1134 1135 -build | --build | --buil | --bui | --bu) 1136 ac_prev=build_alias ;; 1137 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 1138 build_alias=$ac_optarg ;; 1139 1140 -cache-file | --cache-file | --cache-fil | --cache-fi \ 1141 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 1142 ac_prev=cache_file ;; 1143 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 1144 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 1145 cache_file=$ac_optarg ;; 1146 1147 --config-cache | -C) 1148 cache_file=config.cache ;; 1149 1150 -datadir | --datadir | --datadi | --datad) 1151 ac_prev=datadir ;; 1152 -datadir=* | --datadir=* | --datadi=* | --datad=*) 1153 datadir=$ac_optarg ;; 1154 1155 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 1156 | --dataroo | --dataro | --datar) 1157 ac_prev=datarootdir ;; 1158 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 1159 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 1160 datarootdir=$ac_optarg ;; 1161 1162 -disable-* | --disable-*) 1163 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 1164 # Reject names that are not valid shell variable names. 1165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1166 as_fn_error $? "invalid feature name: $ac_useropt" 1167 ac_useropt_orig=$ac_useropt 1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1169 case $ac_user_opts in 1170 *" 1171 "enable_$ac_useropt" 1172 "*) ;; 1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 1174 ac_unrecognized_sep=', ';; 1175 esac 1176 eval enable_$ac_useropt=no ;; 1177 1178 -docdir | --docdir | --docdi | --doc | --do) 1179 ac_prev=docdir ;; 1180 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 1181 docdir=$ac_optarg ;; 1182 1183 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 1184 ac_prev=dvidir ;; 1185 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 1186 dvidir=$ac_optarg ;; 1187 1188 -enable-* | --enable-*) 1189 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 1190 # Reject names that are not valid shell variable names. 1191 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1192 as_fn_error $? "invalid feature name: $ac_useropt" 1193 ac_useropt_orig=$ac_useropt 1194 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1195 case $ac_user_opts in 1196 *" 1197 "enable_$ac_useropt" 1198 "*) ;; 1199 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 1200 ac_unrecognized_sep=', ';; 1201 esac 1202 eval enable_$ac_useropt=\$ac_optarg ;; 1203 1204 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 1205 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 1206 | --exec | --exe | --ex) 1207 ac_prev=exec_prefix ;; 1208 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 1209 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 1210 | --exec=* | --exe=* | --ex=*) 1211 exec_prefix=$ac_optarg ;; 1212 1213 -gas | --gas | --ga | --g) 1214 # Obsolete; use --with-gas. 1215 with_gas=yes ;; 1216 1217 -help | --help | --hel | --he | -h) 1218 ac_init_help=long ;; 1219 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 1220 ac_init_help=recursive ;; 1221 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 1222 ac_init_help=short ;; 1223 1224 -host | --host | --hos | --ho) 1225 ac_prev=host_alias ;; 1226 -host=* | --host=* | --hos=* | --ho=*) 1227 host_alias=$ac_optarg ;; 1228 1229 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 1230 ac_prev=htmldir ;; 1231 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 1232 | --ht=*) 1233 htmldir=$ac_optarg ;; 1234 1235 -includedir | --includedir | --includedi | --included | --include \ 1236 | --includ | --inclu | --incl | --inc) 1237 ac_prev=includedir ;; 1238 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 1239 | --includ=* | --inclu=* | --incl=* | --inc=*) 1240 includedir=$ac_optarg ;; 1241 1242 -infodir | --infodir | --infodi | --infod | --info | --inf) 1243 ac_prev=infodir ;; 1244 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 1245 infodir=$ac_optarg ;; 1246 1247 -libdir | --libdir | --libdi | --libd) 1248 ac_prev=libdir ;; 1249 -libdir=* | --libdir=* | --libdi=* | --libd=*) 1250 libdir=$ac_optarg ;; 1251 1252 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 1253 | --libexe | --libex | --libe) 1254 ac_prev=libexecdir ;; 1255 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 1256 | --libexe=* | --libex=* | --libe=*) 1257 libexecdir=$ac_optarg ;; 1258 1259 -localedir | --localedir | --localedi | --localed | --locale) 1260 ac_prev=localedir ;; 1261 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 1262 localedir=$ac_optarg ;; 1263 1264 -localstatedir | --localstatedir | --localstatedi | --localstated \ 1265 | --localstate | --localstat | --localsta | --localst | --locals) 1266 ac_prev=localstatedir ;; 1267 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 1268 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 1269 localstatedir=$ac_optarg ;; 1270 1271 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 1272 ac_prev=mandir ;; 1273 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 1274 mandir=$ac_optarg ;; 1275 1276 -nfp | --nfp | --nf) 1277 # Obsolete; use --without-fp. 1278 with_fp=no ;; 1279 1280 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 1281 | --no-cr | --no-c | -n) 1282 no_create=yes ;; 1283 1284 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 1285 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 1286 no_recursion=yes ;; 1287 1288 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 1289 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 1290 | --oldin | --oldi | --old | --ol | --o) 1291 ac_prev=oldincludedir ;; 1292 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 1293 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 1294 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 1295 oldincludedir=$ac_optarg ;; 1296 1297 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 1298 ac_prev=prefix ;; 1299 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 1300 prefix=$ac_optarg ;; 1301 1302 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 1303 | --program-pre | --program-pr | --program-p) 1304 ac_prev=program_prefix ;; 1305 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 1306 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 1307 program_prefix=$ac_optarg ;; 1308 1309 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 1310 | --program-suf | --program-su | --program-s) 1311 ac_prev=program_suffix ;; 1312 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 1313 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 1314 program_suffix=$ac_optarg ;; 1315 1316 -program-transform-name | --program-transform-name \ 1317 | --program-transform-nam | --program-transform-na \ 1318 | --program-transform-n | --program-transform- \ 1319 | --program-transform | --program-transfor \ 1320 | --program-transfo | --program-transf \ 1321 | --program-trans | --program-tran \ 1322 | --progr-tra | --program-tr | --program-t) 1323 ac_prev=program_transform_name ;; 1324 -program-transform-name=* | --program-transform-name=* \ 1325 | --program-transform-nam=* | --program-transform-na=* \ 1326 | --program-transform-n=* | --program-transform-=* \ 1327 | --program-transform=* | --program-transfor=* \ 1328 | --program-transfo=* | --program-transf=* \ 1329 | --program-trans=* | --program-tran=* \ 1330 | --progr-tra=* | --program-tr=* | --program-t=*) 1331 program_transform_name=$ac_optarg ;; 1332 1333 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 1334 ac_prev=pdfdir ;; 1335 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 1336 pdfdir=$ac_optarg ;; 1337 1338 -psdir | --psdir | --psdi | --psd | --ps) 1339 ac_prev=psdir ;; 1340 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 1341 psdir=$ac_optarg ;; 1342 1343 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1344 | -silent | --silent | --silen | --sile | --sil) 1345 silent=yes ;; 1346 1347 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1348 ac_prev=sbindir ;; 1349 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 1350 | --sbi=* | --sb=*) 1351 sbindir=$ac_optarg ;; 1352 1353 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 1354 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 1355 | --sharedst | --shareds | --shared | --share | --shar \ 1356 | --sha | --sh) 1357 ac_prev=sharedstatedir ;; 1358 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 1359 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 1360 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 1361 | --sha=* | --sh=*) 1362 sharedstatedir=$ac_optarg ;; 1363 1364 -site | --site | --sit) 1365 ac_prev=site ;; 1366 -site=* | --site=* | --sit=*) 1367 site=$ac_optarg ;; 1368 1369 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 1370 ac_prev=srcdir ;; 1371 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 1372 srcdir=$ac_optarg ;; 1373 1374 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 1375 | --syscon | --sysco | --sysc | --sys | --sy) 1376 ac_prev=sysconfdir ;; 1377 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 1378 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 1379 sysconfdir=$ac_optarg ;; 1380 1381 -target | --target | --targe | --targ | --tar | --ta | --t) 1382 ac_prev=target_alias ;; 1383 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 1384 target_alias=$ac_optarg ;; 1385 1386 -v | -verbose | --verbose | --verbos | --verbo | --verb) 1387 verbose=yes ;; 1388 1389 -version | --version | --versio | --versi | --vers | -V) 1390 ac_init_version=: ;; 1391 1392 -with-* | --with-*) 1393 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1394 # Reject names that are not valid shell variable names. 1395 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1396 as_fn_error $? "invalid package name: $ac_useropt" 1397 ac_useropt_orig=$ac_useropt 1398 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1399 case $ac_user_opts in 1400 *" 1401 "with_$ac_useropt" 1402 "*) ;; 1403 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 1404 ac_unrecognized_sep=', ';; 1405 esac 1406 eval with_$ac_useropt=\$ac_optarg ;; 1407 1408 -without-* | --without-*) 1409 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1410 # Reject names that are not valid shell variable names. 1411 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1412 as_fn_error $? "invalid package name: $ac_useropt" 1413 ac_useropt_orig=$ac_useropt 1414 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1415 case $ac_user_opts in 1416 *" 1417 "with_$ac_useropt" 1418 "*) ;; 1419 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1420 ac_unrecognized_sep=', ';; 1421 esac 1422 eval with_$ac_useropt=no ;; 1423 1424 --x) 1425 # Obsolete; use --with-x. 1426 with_x=yes ;; 1427 1428 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1429 | --x-incl | --x-inc | --x-in | --x-i) 1430 ac_prev=x_includes ;; 1431 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1432 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1433 x_includes=$ac_optarg ;; 1434 1435 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1436 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1437 ac_prev=x_libraries ;; 1438 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1439 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1440 x_libraries=$ac_optarg ;; 1441 1442 -*) as_fn_error $? "unrecognized option: \`$ac_option' 1443 Try \`$0 --help' for more information" 1444 ;; 1445 1446 *=*) 1447 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1448 # Reject names that are not valid shell variable names. 1449 case $ac_envvar in #( 1450 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1451 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1452 esac 1453 eval $ac_envvar=\$ac_optarg 1454 export $ac_envvar ;; 1455 1456 *) 1457 # FIXME: should be removed in autoconf 3.0. 1458 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1459 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1460 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1461 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} 1462 ;; 1463 1464 esac 1465 done 1466 1467 if test -n "$ac_prev"; then 1468 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1469 as_fn_error $? "missing argument to $ac_option" 1470 fi 1471 1472 if test -n "$ac_unrecognized_opts"; then 1473 case $enable_option_checking in 1474 no) ;; 1475 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1476 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1477 esac 1478 fi 1479 1480 # Check all directory arguments for consistency. 1481 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1482 datadir sysconfdir sharedstatedir localstatedir includedir \ 1483 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1484 libdir localedir mandir 1485 do 1486 eval ac_val=\$$ac_var 1487 # Remove trailing slashes. 1488 case $ac_val in 1489 */ ) 1490 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1491 eval $ac_var=\$ac_val;; 1492 esac 1493 # Be sure to have absolute directory names. 1494 case $ac_val in 1495 [\\/$]* | ?:[\\/]* ) continue;; 1496 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1497 esac 1498 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1499 done 1500 1501 # There might be people who depend on the old broken behavior: `$host' 1502 # used to hold the argument of --host etc. 1503 # FIXME: To remove some day. 1504 build=$build_alias 1505 host=$host_alias 1506 target=$target_alias 1507 1508 # FIXME: To remove some day. 1509 if test "x$host_alias" != x; then 1510 if test "x$build_alias" = x; then 1511 cross_compiling=maybe 1512 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. 1513 If a cross compiler is detected then cross compile mode will be used" >&2 1514 elif test "x$build_alias" != "x$host_alias"; then 1515 cross_compiling=yes 1516 fi 1517 fi 1518 1519 ac_tool_prefix= 1520 test -n "$host_alias" && ac_tool_prefix=$host_alias- 1521 1522 test "$silent" = yes && exec 6>/dev/null 1523 1524 1525 ac_pwd=`pwd` && test -n "$ac_pwd" && 1526 ac_ls_di=`ls -di .` && 1527 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1528 as_fn_error $? "working directory cannot be determined" 1529 test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1530 as_fn_error $? "pwd does not report name of working directory" 1531 1532 1533 # Find the source files, if location was not specified. 1534 if test -z "$srcdir"; then 1535 ac_srcdir_defaulted=yes 1536 # Try the directory containing this script, then the parent directory. 1537 ac_confdir=`$as_dirname -- "$as_myself" || 1538 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1539 X"$as_myself" : 'X\(//\)[^/]' \| \ 1540 X"$as_myself" : 'X\(//\)$' \| \ 1541 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1542 $as_echo X"$as_myself" | 1543 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1544 s//\1/ 1545 q 1546 } 1547 /^X\(\/\/\)[^/].*/{ 1548 s//\1/ 1549 q 1550 } 1551 /^X\(\/\/\)$/{ 1552 s//\1/ 1553 q 1554 } 1555 /^X\(\/\).*/{ 1556 s//\1/ 1557 q 1558 } 1559 s/.*/./; q'` 1560 srcdir=$ac_confdir 1561 if test ! -r "$srcdir/$ac_unique_file"; then 1562 srcdir=.. 1563 fi 1564 else 1565 ac_srcdir_defaulted=no 1566 fi 1567 if test ! -r "$srcdir/$ac_unique_file"; then 1568 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1569 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1570 fi 1571 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1572 ac_abs_confdir=`( 1573 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1574 pwd)` 1575 # When building in place, set srcdir=. 1576 if test "$ac_abs_confdir" = "$ac_pwd"; then 1577 srcdir=. 1578 fi 1579 # Remove unnecessary trailing slashes from srcdir. 1580 # Double slashes in file names in object file debugging info 1581 # mess up M-x gdb in Emacs. 1582 case $srcdir in 1583 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1584 esac 1585 for ac_var in $ac_precious_vars; do 1586 eval ac_env_${ac_var}_set=\${${ac_var}+set} 1587 eval ac_env_${ac_var}_value=\$${ac_var} 1588 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1589 eval ac_cv_env_${ac_var}_value=\$${ac_var} 1590 done 1591 1592 # 1593 # Report the --help message. 1594 # 1595 if test "$ac_init_help" = "long"; then 1596 # Omit some internal or obsolete options to make the list less imposing. 1597 # This message is too long to be a string in the A/UX 3.1 sh. 1598 cat <<_ACEOF 1599 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems. 1600 1601 Usage: $0 [OPTION]... [VAR=VALUE]... 1602 1603 To assign environment variables (e.g., CC, CFLAGS...), specify them as 1604 VAR=VALUE. See below for descriptions of some of the useful variables. 1605 1606 Defaults for the options are specified in brackets. 1607 1608 Configuration: 1609 -h, --help display this help and exit 1610 --help=short display options specific to this package 1611 --help=recursive display the short help of all the included packages 1612 -V, --version display version information and exit 1613 -q, --quiet, --silent do not print \`checking ...' messages 1614 --cache-file=FILE cache test results in FILE [disabled] 1615 -C, --config-cache alias for \`--cache-file=config.cache' 1616 -n, --no-create do not create output files 1617 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1618 1619 Installation directories: 1620 --prefix=PREFIX install architecture-independent files in PREFIX 1621 [$ac_default_prefix] 1622 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1623 [PREFIX] 1624 1625 By default, \`make install' will install all the files in 1626 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1627 an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1628 for instance \`--prefix=\$HOME'. 1629 1630 For better control, use the options below. 1631 1632 Fine tuning of the installation directories: 1633 --bindir=DIR user executables [EPREFIX/bin] 1634 --sbindir=DIR system admin executables [EPREFIX/sbin] 1635 --libexecdir=DIR program executables [EPREFIX/libexec] 1636 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1637 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1638 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1639 --libdir=DIR object code libraries [EPREFIX/lib] 1640 --includedir=DIR C header files [PREFIX/include] 1641 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1642 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1643 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1644 --infodir=DIR info documentation [DATAROOTDIR/info] 1645 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1646 --mandir=DIR man documentation [DATAROOTDIR/man] 1647 --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk] 1648 --htmldir=DIR html documentation [DOCDIR] 1649 --dvidir=DIR dvi documentation [DOCDIR] 1650 --pdfdir=DIR pdf documentation [DOCDIR] 1651 --psdir=DIR ps documentation [DOCDIR] 1652 _ACEOF 1653 1654 cat <<\_ACEOF 1655 1656 X features: 1657 --x-includes=DIR X include files are in DIR 1658 --x-libraries=DIR X library files are in DIR 1659 1660 System types: 1661 --build=BUILD configure for building on BUILD [guessed] 1662 --host=HOST cross-compile to build programs to run on HOST [BUILD] 1663 --target=TARGET configure for building compilers for TARGET [HOST] 1664 _ACEOF 1665 fi 1666 1667 if test -n "$ac_init_help"; then 1668 case $ac_init_help in 1669 short | recursive ) echo "Configuration of OpenJDK jdk8:";; 1670 esac 1671 cat <<\_ACEOF 1672 1673 Optional Features: 1674 --disable-option-checking ignore unrecognized --enable/--with options 1675 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1676 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1677 --enable-openjdk-only suppress building custom source even if present 1678 [disabled] 1679 --enable-debug set the debug level to fastdebug (shorthand for 1680 --with-debug-level=fastdebug) [disabled] 1681 --disable-headful disable building headful support (graphical UI 1682 support) [enabled] 1683 --enable-hotspot-test-in-build 1684 run the Queens test after Hotspot build [disabled] 1685 --enable-unlimited-crypto 1686 Enable unlimited crypto policy [disabled] 1687 --disable-debug-symbols disable generation of debug symbols [enabled] 1688 --disable-zip-debug-info 1689 disable zipping of debug-info files [enabled] 1690 --disable-macosx-runtime-support 1691 disable the use of MacOSX Java runtime support 1692 framework [enabled] 1693 --enable-sjavac use sjavac to do fast incremental compiles 1694 [disabled] 1695 --disable-precompiled-headers 1696 disable using precompiled headers when compiling C++ 1697 [enabled] 1698 --disable-ccache disable using ccache to speed up recompilations 1699 [enabled] 1700 1701 Optional Packages: 1702 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1703 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1704 --with-custom-make-dir use this directory for custom build/make files 1705 --with-target-bits build 32-bit or 64-bit binaries (for platforms that 1706 support it), e.g. --with-target-bits=32 [guessed] 1707 --with-sys-root pass this sys-root to the compilers and tools (for 1708 cross-compiling) 1709 --with-tools-dir search this directory for compilers and tools (for 1710 cross-compiling) 1711 --with-devkit use this directory as base for tools-dir and 1712 sys-root (for cross-compiling) 1713 --with-jdk-variant JDK variant to build (normal) [normal] 1714 --with-jvm-variants JVM variants (separated by commas) to build (server, 1715 client, minimal1, kernel, zero, zeroshark) [server] 1716 --with-debug-level set the debug level (release, fastdebug, slowdebug) 1717 [release] 1718 --with-conf-name use this as the name of the configuration [generated 1719 from important configuration options] 1720 --with-builddeps-conf use this configuration file for the builddeps 1721 --with-builddeps-server download and use build dependencies from this server 1722 url 1723 --with-builddeps-dir store downloaded build dependencies here 1724 [/localhome/builddeps] 1725 --with-builddeps-group chgrp the downloaded build dependencies to this 1726 group 1727 --with-cacerts-file specify alternative cacerts file 1728 --with-milestone Set milestone value for build [internal] 1729 --with-build-number Set build number value for build [b00] 1730 --with-user-release-suffix 1731 Add a custom string to the version string if build 1732 number isn't set.[username_builddateb00] 1733 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed] 1734 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all 1735 invocations of the Boot JDK, overriding the default 1736 values, e.g --with-boot-jdk-jvmargs="-Xmx8G 1737 -enableassertions" 1738 --with-add-source-root for each and every source directory, look in this 1739 additional source root for the same directory; if it 1740 exists and have files in it, include it in the build 1741 --with-override-source-root 1742 for each and every source directory, look in this 1743 override source root for the same directory; if it 1744 exists, use that directory instead and ignore the 1745 directory in the original source root 1746 --with-adds-and-overrides 1747 use the subdirs 'adds' and 'overrides' in the 1748 specified directory as add-source-root and 1749 override-source-root 1750 --with-override-langtools 1751 use this langtools dir for the build 1752 --with-override-corba use this corba dir for the build 1753 --with-override-jaxp use this jaxp dir for the build 1754 --with-override-jaxws use this jaxws dir for the build 1755 --with-override-hotspot use this hotspot dir for the build 1756 --with-override-jdk use this jdk dir for the build 1757 --with-import-hotspot import hotspot binaries from this jdk image or 1758 hotspot build dist dir instead of building from 1759 source 1760 --with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows 1761 only) [probed] 1762 --with-dxsdk the DirectX SDK (Windows only) [probed] 1763 --with-dxsdk-lib the DirectX SDK lib directory (Windows only) 1764 [probed] 1765 --with-dxsdk-include the DirectX SDK include directory (Windows only) 1766 [probed] 1767 --with-extra-cflags extra flags to be used when compiling jdk c-files 1768 --with-extra-cxxflags extra flags to be used when compiling jdk c++-files 1769 --with-extra-ldflags extra flags to be used when linking jdk 1770 --with-x use the X Window System 1771 --with-cups specify prefix directory for the cups package 1772 (expecting the headers under PATH/include) 1773 --with-cups-include specify directory for the cups include files 1774 --with-freetype specify prefix directory for the freetype2 package 1775 (expecting the libraries under PATH/lib and the 1776 headers under PATH/include) 1777 --with-alsa specify prefix directory for the alsa package 1778 (expecting the libraries under PATH/lib and the 1779 headers under PATH/include) 1780 --with-alsa-include specify directory for the alsa include files 1781 --with-alsa-lib specify directory for the alsa library 1782 --with-giflib use giflib from build system or OpenJDK source 1783 (system, bundled) [bundled] 1784 --with-zlib use zlib from build system or OpenJDK source 1785 (system, bundled) [bundled] 1786 --with-stdc++lib=<static>,<dynamic>,<default> 1787 force linking of the C++ runtime on Linux to either 1788 static or dynamic, default is static with dynamic as 1789 fallback 1790 --with-num-cores number of cores in the build system, e.g. 1791 --with-num-cores=8 [probed] 1792 --with-memory-size memory (in MB) available in the build system, e.g. 1793 --with-memory-size=1024 [probed] 1794 --with-jobs number of parallel jobs to let make run [calculated 1795 based on cores and memory] 1796 --with-sjavac-server-java 1797 use this java binary for running the sjavac 1798 background server [Boot JDK java] 1799 --with-sjavac-server-cores 1800 use at most this number of concurrent threads on the 1801 sjavac server [probed] 1802 --with-ccache-dir where to store ccache files [~/.ccache] 1803 1804 Some influential environment variables: 1805 PKG_CONFIG path to pkg-config utility 1806 CC C compiler command 1807 CFLAGS C compiler flags 1808 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 1809 nonstandard directory <lib dir> 1810 LIBS libraries to pass to the linker, e.g. -l<library> 1811 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 1812 you have headers in a nonstandard directory <include dir> 1813 CXX C++ compiler command 1814 CXXFLAGS C++ compiler flags 1815 OBJC Objective C compiler command 1816 OBJCFLAGS Objective C compiler flags 1817 CPP C preprocessor 1818 CXXCPP C++ preprocessor 1819 XMKMF Path to xmkmf, Makefile generator for X Window System 1820 FREETYPE2_CFLAGS 1821 C compiler flags for FREETYPE2, overriding pkg-config 1822 FREETYPE2_LIBS 1823 linker flags for FREETYPE2, overriding pkg-config 1824 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config 1825 ALSA_LIBS linker flags for ALSA, overriding pkg-config 1826 LIBFFI_CFLAGS 1827 C compiler flags for LIBFFI, overriding pkg-config 1828 LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config 1829 1830 Use these variables to override the choices made by `configure' or to help 1831 it to find libraries and programs with nonstandard names/locations. 1832 1833 Report bugs to <build-dev@openjdk.java.net>. 1834 OpenJDK home page: <http://openjdk.java.net>. 1835 _ACEOF 1836 ac_status=$? 1837 fi 1838 1839 if test "$ac_init_help" = "recursive"; then 1840 # If there are subdirs, report their specific --help. 1841 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1842 test -d "$ac_dir" || 1843 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1844 continue 1845 ac_builddir=. 1846 1847 case "$ac_dir" in 1848 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1849 *) 1850 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1851 # A ".." for each directory in $ac_dir_suffix. 1852 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1853 case $ac_top_builddir_sub in 1854 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1855 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1856 esac ;; 1857 esac 1858 ac_abs_top_builddir=$ac_pwd 1859 ac_abs_builddir=$ac_pwd$ac_dir_suffix 1860 # for backward compatibility: 1861 ac_top_builddir=$ac_top_build_prefix 1862 1863 case $srcdir in 1864 .) # We are building in place. 1865 ac_srcdir=. 1866 ac_top_srcdir=$ac_top_builddir_sub 1867 ac_abs_top_srcdir=$ac_pwd ;; 1868 [\\/]* | ?:[\\/]* ) # Absolute name. 1869 ac_srcdir=$srcdir$ac_dir_suffix; 1870 ac_top_srcdir=$srcdir 1871 ac_abs_top_srcdir=$srcdir ;; 1872 *) # Relative name. 1873 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1874 ac_top_srcdir=$ac_top_build_prefix$srcdir 1875 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1876 esac 1877 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1878 1879 cd "$ac_dir" || { ac_status=$?; continue; } 1880 # Check for guested configure. 1881 if test -f "$ac_srcdir/configure.gnu"; then 1882 echo && 1883 $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1884 elif test -f "$ac_srcdir/configure"; then 1885 echo && 1886 $SHELL "$ac_srcdir/configure" --help=recursive 1887 else 1888 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1889 fi || ac_status=$? 1890 cd "$ac_pwd" || { ac_status=$?; break; } 1891 done 1892 fi 1893 1894 test -n "$ac_init_help" && exit $ac_status 1895 if $ac_init_version; then 1896 cat <<\_ACEOF 1897 OpenJDK configure jdk8 1898 generated by GNU Autoconf 2.67 1899 1900 Copyright (C) 2010 Free Software Foundation, Inc. 1901 This configure script is free software; the Free Software Foundation 1902 gives unlimited permission to copy, distribute and modify it. 1903 _ACEOF 1904 exit 1905 fi 1906 1907 ## ------------------------ ## 1908 ## Autoconf initialization. ## 1909 ## ------------------------ ## 1910 1911 # ac_fn_c_try_compile LINENO 1912 # -------------------------- 1913 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1914 ac_fn_c_try_compile () 1915 { 1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1917 rm -f conftest.$ac_objext 1918 if { { ac_try="$ac_compile" 1919 case "(($ac_try" in 1920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1921 *) ac_try_echo=$ac_try;; 1922 esac 1923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1924 $as_echo "$ac_try_echo"; } >&5 1925 (eval "$ac_compile") 2>conftest.err 1926 ac_status=$? 1927 if test -s conftest.err; then 1928 grep -v '^ *+' conftest.err >conftest.er1 1929 cat conftest.er1 >&5 1930 mv -f conftest.er1 conftest.err 1931 fi 1932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1933 test $ac_status = 0; } && { 1934 test -z "$ac_c_werror_flag" || 1935 test ! -s conftest.err 1936 } && test -s conftest.$ac_objext; then : 1937 ac_retval=0 1938 else 1939 $as_echo "$as_me: failed program was:" >&5 1940 sed 's/^/| /' conftest.$ac_ext >&5 1941 1942 ac_retval=1 1943 fi 1944 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 1945 as_fn_set_status $ac_retval 1946 1947 } # ac_fn_c_try_compile 1948 1949 # ac_fn_cxx_try_compile LINENO 1950 # ---------------------------- 1951 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1952 ac_fn_cxx_try_compile () 1953 { 1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1955 rm -f conftest.$ac_objext 1956 if { { ac_try="$ac_compile" 1957 case "(($ac_try" in 1958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1959 *) ac_try_echo=$ac_try;; 1960 esac 1961 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1962 $as_echo "$ac_try_echo"; } >&5 1963 (eval "$ac_compile") 2>conftest.err 1964 ac_status=$? 1965 if test -s conftest.err; then 1966 grep -v '^ *+' conftest.err >conftest.er1 1967 cat conftest.er1 >&5 1968 mv -f conftest.er1 conftest.err 1969 fi 1970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1971 test $ac_status = 0; } && { 1972 test -z "$ac_cxx_werror_flag" || 1973 test ! -s conftest.err 1974 } && test -s conftest.$ac_objext; then : 1975 ac_retval=0 1976 else 1977 $as_echo "$as_me: failed program was:" >&5 1978 sed 's/^/| /' conftest.$ac_ext >&5 1979 1980 ac_retval=1 1981 fi 1982 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 1983 as_fn_set_status $ac_retval 1984 1985 } # ac_fn_cxx_try_compile 1986 1987 # ac_fn_objc_try_compile LINENO 1988 # ----------------------------- 1989 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1990 ac_fn_objc_try_compile () 1991 { 1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1993 rm -f conftest.$ac_objext 1994 if { { ac_try="$ac_compile" 1995 case "(($ac_try" in 1996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1997 *) ac_try_echo=$ac_try;; 1998 esac 1999 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2000 $as_echo "$ac_try_echo"; } >&5 2001 (eval "$ac_compile") 2>conftest.err 2002 ac_status=$? 2003 if test -s conftest.err; then 2004 grep -v '^ *+' conftest.err >conftest.er1 2005 cat conftest.er1 >&5 2006 mv -f conftest.er1 conftest.err 2007 fi 2008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2009 test $ac_status = 0; } && { 2010 test -z "$ac_objc_werror_flag" || 2011 test ! -s conftest.err 2012 } && test -s conftest.$ac_objext; then : 2013 ac_retval=0 2014 else 2015 $as_echo "$as_me: failed program was:" >&5 2016 sed 's/^/| /' conftest.$ac_ext >&5 2017 2018 ac_retval=1 2019 fi 2020 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2021 as_fn_set_status $ac_retval 2022 2023 } # ac_fn_objc_try_compile 2024 2025 # ac_fn_c_try_cpp LINENO 2026 # ---------------------- 2027 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2028 ac_fn_c_try_cpp () 2029 { 2030 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2031 if { { ac_try="$ac_cpp conftest.$ac_ext" 2032 case "(($ac_try" in 2033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2034 *) ac_try_echo=$ac_try;; 2035 esac 2036 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2037 $as_echo "$ac_try_echo"; } >&5 2038 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2039 ac_status=$? 2040 if test -s conftest.err; then 2041 grep -v '^ *+' conftest.err >conftest.er1 2042 cat conftest.er1 >&5 2043 mv -f conftest.er1 conftest.err 2044 fi 2045 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2046 test $ac_status = 0; } > conftest.i && { 2047 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2048 test ! -s conftest.err 2049 }; then : 2050 ac_retval=0 2051 else 2052 $as_echo "$as_me: failed program was:" >&5 2053 sed 's/^/| /' conftest.$ac_ext >&5 2054 2055 ac_retval=1 2056 fi 2057 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2058 as_fn_set_status $ac_retval 2059 2060 } # ac_fn_c_try_cpp 2061 2062 # ac_fn_cxx_try_cpp LINENO 2063 # ------------------------ 2064 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2065 ac_fn_cxx_try_cpp () 2066 { 2067 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2068 if { { ac_try="$ac_cpp conftest.$ac_ext" 2069 case "(($ac_try" in 2070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2071 *) ac_try_echo=$ac_try;; 2072 esac 2073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2074 $as_echo "$ac_try_echo"; } >&5 2075 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2076 ac_status=$? 2077 if test -s conftest.err; then 2078 grep -v '^ *+' conftest.err >conftest.er1 2079 cat conftest.er1 >&5 2080 mv -f conftest.er1 conftest.err 2081 fi 2082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2083 test $ac_status = 0; } > conftest.i && { 2084 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || 2085 test ! -s conftest.err 2086 }; then : 2087 ac_retval=0 2088 else 2089 $as_echo "$as_me: failed program was:" >&5 2090 sed 's/^/| /' conftest.$ac_ext >&5 2091 2092 ac_retval=1 2093 fi 2094 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2095 as_fn_set_status $ac_retval 2096 2097 } # ac_fn_cxx_try_cpp 2098 2099 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES 2100 # --------------------------------------------------------- 2101 # Tests whether HEADER exists, giving a warning if it cannot be compiled using 2102 # the include files in INCLUDES and setting the cache variable VAR 2103 # accordingly. 2104 ac_fn_cxx_check_header_mongrel () 2105 { 2106 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2107 if eval "test \"\${$3+set}\"" = set; then : 2108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2109 $as_echo_n "checking for $2... " >&6; } 2110 if eval "test \"\${$3+set}\"" = set; then : 2111 $as_echo_n "(cached) " >&6 2112 fi 2113 eval ac_res=\$$3 2114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2115 $as_echo "$ac_res" >&6; } 2116 else 2117 # Is the header compilable? 2118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 2119 $as_echo_n "checking $2 usability... " >&6; } 2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2121 /* end confdefs.h. */ 2122 $4 2123 #include <$2> 2124 _ACEOF 2125 if ac_fn_cxx_try_compile "$LINENO"; then : 2126 ac_header_compiler=yes 2127 else 2128 ac_header_compiler=no 2129 fi 2130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 2132 $as_echo "$ac_header_compiler" >&6; } 2133 2134 # Is the header present? 2135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 2136 $as_echo_n "checking $2 presence... " >&6; } 2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2138 /* end confdefs.h. */ 2139 #include <$2> 2140 _ACEOF 2141 if ac_fn_cxx_try_cpp "$LINENO"; then : 2142 ac_header_preproc=yes 2143 else 2144 ac_header_preproc=no 2145 fi 2146 rm -f conftest.err conftest.i conftest.$ac_ext 2147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2148 $as_echo "$ac_header_preproc" >&6; } 2149 2150 # So? What about this header? 2151 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( 2152 yes:no: ) 2153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 2154 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} 2155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2156 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2157 ;; 2158 no:yes:* ) 2159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 2160 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} 2161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 2162 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} 2163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 2164 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} 2165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 2166 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} 2167 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2168 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2169 ( $as_echo "## ----------------------------------------- ## 2170 ## Report this to build-dev@openjdk.java.net ## 2171 ## ----------------------------------------- ##" 2172 ) | sed "s/^/$as_me: WARNING: /" >&2 2173 ;; 2174 esac 2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2176 $as_echo_n "checking for $2... " >&6; } 2177 if eval "test \"\${$3+set}\"" = set; then : 2178 $as_echo_n "(cached) " >&6 2179 else 2180 eval "$3=\$ac_header_compiler" 2181 fi 2182 eval ac_res=\$$3 2183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2184 $as_echo "$ac_res" >&6; } 2185 fi 2186 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2187 2188 } # ac_fn_cxx_check_header_mongrel 2189 2190 # ac_fn_cxx_try_run LINENO 2191 # ------------------------ 2192 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes 2193 # that executables *can* be run. 2194 ac_fn_cxx_try_run () 2195 { 2196 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2197 if { { ac_try="$ac_link" 2198 case "(($ac_try" in 2199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2200 *) ac_try_echo=$ac_try;; 2201 esac 2202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2203 $as_echo "$ac_try_echo"; } >&5 2204 (eval "$ac_link") 2>&5 2205 ac_status=$? 2206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2207 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 2208 { { case "(($ac_try" in 2209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2210 *) ac_try_echo=$ac_try;; 2211 esac 2212 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2213 $as_echo "$ac_try_echo"; } >&5 2214 (eval "$ac_try") 2>&5 2215 ac_status=$? 2216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2217 test $ac_status = 0; }; }; then : 2218 ac_retval=0 2219 else 2220 $as_echo "$as_me: program exited with status $ac_status" >&5 2221 $as_echo "$as_me: failed program was:" >&5 2222 sed 's/^/| /' conftest.$ac_ext >&5 2223 2224 ac_retval=$ac_status 2225 fi 2226 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2227 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2228 as_fn_set_status $ac_retval 2229 2230 } # ac_fn_cxx_try_run 2231 2232 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES 2233 # --------------------------------------------------------- 2234 # Tests whether HEADER exists and can be compiled using the include files in 2235 # INCLUDES, setting the cache variable VAR accordingly. 2236 ac_fn_cxx_check_header_compile () 2237 { 2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2240 $as_echo_n "checking for $2... " >&6; } 2241 if eval "test \"\${$3+set}\"" = set; then : 2242 $as_echo_n "(cached) " >&6 2243 else 2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2245 /* end confdefs.h. */ 2246 $4 2247 #include <$2> 2248 _ACEOF 2249 if ac_fn_cxx_try_compile "$LINENO"; then : 2250 eval "$3=yes" 2251 else 2252 eval "$3=no" 2253 fi 2254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2255 fi 2256 eval ac_res=\$$3 2257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2258 $as_echo "$ac_res" >&6; } 2259 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2260 2261 } # ac_fn_cxx_check_header_compile 2262 2263 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES 2264 # ---------------------------------------------- 2265 # Tries to find the compile-time value of EXPR in a program that includes 2266 # INCLUDES, setting VAR accordingly. Returns whether the value could be 2267 # computed 2268 ac_fn_cxx_compute_int () 2269 { 2270 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2271 if test "$cross_compiling" = yes; then 2272 # Depending upon the size, compute the lo and hi bounds. 2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2274 /* end confdefs.h. */ 2275 $4 2276 int 2277 main () 2278 { 2279 static int test_array [1 - 2 * !(($2) >= 0)]; 2280 test_array [0] = 0 2281 2282 ; 2283 return 0; 2284 } 2285 _ACEOF 2286 if ac_fn_cxx_try_compile "$LINENO"; then : 2287 ac_lo=0 ac_mid=0 2288 while :; do 2289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2290 /* end confdefs.h. */ 2291 $4 2292 int 2293 main () 2294 { 2295 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2296 test_array [0] = 0 2297 2298 ; 2299 return 0; 2300 } 2301 _ACEOF 2302 if ac_fn_cxx_try_compile "$LINENO"; then : 2303 ac_hi=$ac_mid; break 2304 else 2305 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 2306 if test $ac_lo -le $ac_mid; then 2307 ac_lo= ac_hi= 2308 break 2309 fi 2310 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 2311 fi 2312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2313 done 2314 else 2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2316 /* end confdefs.h. */ 2317 $4 2318 int 2319 main () 2320 { 2321 static int test_array [1 - 2 * !(($2) < 0)]; 2322 test_array [0] = 0 2323 2324 ; 2325 return 0; 2326 } 2327 _ACEOF 2328 if ac_fn_cxx_try_compile "$LINENO"; then : 2329 ac_hi=-1 ac_mid=-1 2330 while :; do 2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2332 /* end confdefs.h. */ 2333 $4 2334 int 2335 main () 2336 { 2337 static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 2338 test_array [0] = 0 2339 2340 ; 2341 return 0; 2342 } 2343 _ACEOF 2344 if ac_fn_cxx_try_compile "$LINENO"; then : 2345 ac_lo=$ac_mid; break 2346 else 2347 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 2348 if test $ac_mid -le $ac_hi; then 2349 ac_lo= ac_hi= 2350 break 2351 fi 2352 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 2353 fi 2354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2355 done 2356 else 2357 ac_lo= ac_hi= 2358 fi 2359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2360 fi 2361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2362 # Binary search between lo and hi bounds. 2363 while test "x$ac_lo" != "x$ac_hi"; do 2364 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 2365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2366 /* end confdefs.h. */ 2367 $4 2368 int 2369 main () 2370 { 2371 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2372 test_array [0] = 0 2373 2374 ; 2375 return 0; 2376 } 2377 _ACEOF 2378 if ac_fn_cxx_try_compile "$LINENO"; then : 2379 ac_hi=$ac_mid 2380 else 2381 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 2382 fi 2383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2384 done 2385 case $ac_lo in #(( 2386 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 2387 '') ac_retval=1 ;; 2388 esac 2389 else 2390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2391 /* end confdefs.h. */ 2392 $4 2393 static long int longval () { return $2; } 2394 static unsigned long int ulongval () { return $2; } 2395 #include <stdio.h> 2396 #include <stdlib.h> 2397 int 2398 main () 2399 { 2400 2401 FILE *f = fopen ("conftest.val", "w"); 2402 if (! f) 2403 return 1; 2404 if (($2) < 0) 2405 { 2406 long int i = longval (); 2407 if (i != ($2)) 2408 return 1; 2409 fprintf (f, "%ld", i); 2410 } 2411 else 2412 { 2413 unsigned long int i = ulongval (); 2414 if (i != ($2)) 2415 return 1; 2416 fprintf (f, "%lu", i); 2417 } 2418 /* Do not output a trailing newline, as this causes \r\n confusion 2419 on some platforms. */ 2420 return ferror (f) || fclose (f) != 0; 2421 2422 ; 2423 return 0; 2424 } 2425 _ACEOF 2426 if ac_fn_cxx_try_run "$LINENO"; then : 2427 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 2428 else 2429 ac_retval=1 2430 fi 2431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 2432 conftest.$ac_objext conftest.beam conftest.$ac_ext 2433 rm -f conftest.val 2434 2435 fi 2436 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2437 as_fn_set_status $ac_retval 2438 2439 } # ac_fn_cxx_compute_int 2440 2441 # ac_fn_cxx_try_link LINENO 2442 # ------------------------- 2443 # Try to link conftest.$ac_ext, and return whether this succeeded. 2444 ac_fn_cxx_try_link () 2445 { 2446 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2447 rm -f conftest.$ac_objext conftest$ac_exeext 2448 if { { ac_try="$ac_link" 2449 case "(($ac_try" in 2450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2451 *) ac_try_echo=$ac_try;; 2452 esac 2453 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2454 $as_echo "$ac_try_echo"; } >&5 2455 (eval "$ac_link") 2>conftest.err 2456 ac_status=$? 2457 if test -s conftest.err; then 2458 grep -v '^ *+' conftest.err >conftest.er1 2459 cat conftest.er1 >&5 2460 mv -f conftest.er1 conftest.err 2461 fi 2462 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2463 test $ac_status = 0; } && { 2464 test -z "$ac_cxx_werror_flag" || 2465 test ! -s conftest.err 2466 } && test -s conftest$ac_exeext && { 2467 test "$cross_compiling" = yes || 2468 $as_test_x conftest$ac_exeext 2469 }; then : 2470 ac_retval=0 2471 else 2472 $as_echo "$as_me: failed program was:" >&5 2473 sed 's/^/| /' conftest.$ac_ext >&5 2474 2475 ac_retval=1 2476 fi 2477 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 2478 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 2479 # interfere with the next link command; also delete a directory that is 2480 # left behind by Apple's compiler. We do this before executing the actions. 2481 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2482 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2483 as_fn_set_status $ac_retval 2484 2485 } # ac_fn_cxx_try_link 2486 2487 # ac_fn_cxx_check_func LINENO FUNC VAR 2488 # ------------------------------------ 2489 # Tests whether FUNC exists, setting the cache variable VAR accordingly 2490 ac_fn_cxx_check_func () 2491 { 2492 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2494 $as_echo_n "checking for $2... " >&6; } 2495 if eval "test \"\${$3+set}\"" = set; then : 2496 $as_echo_n "(cached) " >&6 2497 else 2498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2499 /* end confdefs.h. */ 2500 /* Define $2 to an innocuous variant, in case <limits.h> declares $2. 2501 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 2502 #define $2 innocuous_$2 2503 2504 /* System header to define __stub macros and hopefully few prototypes, 2505 which can conflict with char $2 (); below. 2506 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 2507 <limits.h> exists even on freestanding compilers. */ 2508 2509 #ifdef __STDC__ 2510 # include <limits.h> 2511 #else 2512 # include <assert.h> 2513 #endif 2514 2515 #undef $2 2516 2517 /* Override any GCC internal prototype to avoid an error. 2518 Use char because int might match the return type of a GCC 2519 builtin and then its argument prototype would still apply. */ 2520 #ifdef __cplusplus 2521 extern "C" 2522 #endif 2523 char $2 (); 2524 /* The GNU C library defines this for functions which it implements 2525 to always fail with ENOSYS. Some functions are actually named 2526 something starting with __ and the normal name is an alias. */ 2527 #if defined __stub_$2 || defined __stub___$2 2528 choke me 2529 #endif 2530 2531 int 2532 main () 2533 { 2534 return $2 (); 2535 ; 2536 return 0; 2537 } 2538 _ACEOF 2539 if ac_fn_cxx_try_link "$LINENO"; then : 2540 eval "$3=yes" 2541 else 2542 eval "$3=no" 2543 fi 2544 rm -f core conftest.err conftest.$ac_objext \ 2545 conftest$ac_exeext conftest.$ac_ext 2546 fi 2547 eval ac_res=\$$3 2548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2549 $as_echo "$ac_res" >&6; } 2550 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2551 2552 } # ac_fn_cxx_check_func 2553 2554 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 2555 # ------------------------------------------------------- 2556 # Tests whether HEADER exists and can be compiled using the include files in 2557 # INCLUDES, setting the cache variable VAR accordingly. 2558 ac_fn_c_check_header_compile () 2559 { 2560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2562 $as_echo_n "checking for $2... " >&6; } 2563 if eval "test \"\${$3+set}\"" = set; then : 2564 $as_echo_n "(cached) " >&6 2565 else 2566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2567 /* end confdefs.h. */ 2568 $4 2569 #include <$2> 2570 _ACEOF 2571 if ac_fn_c_try_compile "$LINENO"; then : 2572 eval "$3=yes" 2573 else 2574 eval "$3=no" 2575 fi 2576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2577 fi 2578 eval ac_res=\$$3 2579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2580 $as_echo "$ac_res" >&6; } 2581 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2582 2583 } # ac_fn_c_check_header_compile 2584 cat >config.log <<_ACEOF 2585 This file contains any messages produced by compilers while 2586 running configure, to aid debugging if configure makes a mistake. 2587 2588 It was created by OpenJDK $as_me jdk8, which was 2589 generated by GNU Autoconf 2.67. Invocation command line was 2590 2591 $ $0 $@ 2592 2593 _ACEOF 2594 exec 5>>config.log 2595 { 2596 cat <<_ASUNAME 2597 ## --------- ## 2598 ## Platform. ## 2599 ## --------- ## 2600 2601 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 2602 uname -m = `(uname -m) 2>/dev/null || echo unknown` 2603 uname -r = `(uname -r) 2>/dev/null || echo unknown` 2604 uname -s = `(uname -s) 2>/dev/null || echo unknown` 2605 uname -v = `(uname -v) 2>/dev/null || echo unknown` 2606 2607 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 2608 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 2609 2610 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 2611 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 2612 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 2613 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 2614 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 2615 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 2616 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 2617 2618 _ASUNAME 2619 2620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2621 for as_dir in $PATH 2622 do 2623 IFS=$as_save_IFS 2624 test -z "$as_dir" && as_dir=. 2625 $as_echo "PATH: $as_dir" 2626 done 2627 IFS=$as_save_IFS 2628 2629 } >&5 2630 2631 cat >&5 <<_ACEOF 2632 2633 2634 ## ----------- ## 2635 ## Core tests. ## 2636 ## ----------- ## 2637 2638 _ACEOF 2639 2640 2641 # Keep a trace of the command line. 2642 # Strip out --no-create and --no-recursion so they do not pile up. 2643 # Strip out --silent because we don't want to record it for future runs. 2644 # Also quote any args containing shell meta-characters. 2645 # Make two passes to allow for proper duplicate-argument suppression. 2646 ac_configure_args= 2647 ac_configure_args0= 2648 ac_configure_args1= 2649 ac_must_keep_next=false 2650 for ac_pass in 1 2 2651 do 2652 for ac_arg 2653 do 2654 case $ac_arg in 2655 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 2656 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2657 | -silent | --silent | --silen | --sile | --sil) 2658 continue ;; 2659 *\'*) 2660 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2661 esac 2662 case $ac_pass in 2663 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2664 2) 2665 as_fn_append ac_configure_args1 " '$ac_arg'" 2666 if test $ac_must_keep_next = true; then 2667 ac_must_keep_next=false # Got value, back to normal. 2668 else 2669 case $ac_arg in 2670 *=* | --config-cache | -C | -disable-* | --disable-* \ 2671 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 2672 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 2673 | -with-* | --with-* | -without-* | --without-* | --x) 2674 case "$ac_configure_args0 " in 2675 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 2676 esac 2677 ;; 2678 -* ) ac_must_keep_next=true ;; 2679 esac 2680 fi 2681 as_fn_append ac_configure_args " '$ac_arg'" 2682 ;; 2683 esac 2684 done 2685 done 2686 { ac_configure_args0=; unset ac_configure_args0;} 2687 { ac_configure_args1=; unset ac_configure_args1;} 2688 2689 # When interrupted or exit'd, cleanup temporary files, and complete 2690 # config.log. We remove comments because anyway the quotes in there 2691 # would cause problems or look ugly. 2692 # WARNING: Use '\'' to represent an apostrophe within the trap. 2693 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 2694 trap 'exit_status=$? 2695 # Save into config.log some information that might help in debugging. 2696 { 2697 echo 2698 2699 $as_echo "## ---------------- ## 2700 ## Cache variables. ## 2701 ## ---------------- ##" 2702 echo 2703 # The following way of writing the cache mishandles newlines in values, 2704 ( 2705 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 2706 eval ac_val=\$$ac_var 2707 case $ac_val in #( 2708 *${as_nl}*) 2709 case $ac_var in #( 2710 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2711 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2712 esac 2713 case $ac_var in #( 2714 _ | IFS | as_nl) ;; #( 2715 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2716 *) { eval $ac_var=; unset $ac_var;} ;; 2717 esac ;; 2718 esac 2719 done 2720 (set) 2>&1 | 2721 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 2722 *${as_nl}ac_space=\ *) 2723 sed -n \ 2724 "s/'\''/'\''\\\\'\'''\''/g; 2725 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 2726 ;; #( 2727 *) 2728 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2729 ;; 2730 esac | 2731 sort 2732 ) 2733 echo 2734 2735 $as_echo "## ----------------- ## 2736 ## Output variables. ## 2737 ## ----------------- ##" 2738 echo 2739 for ac_var in $ac_subst_vars 2740 do 2741 eval ac_val=\$$ac_var 2742 case $ac_val in 2743 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2744 esac 2745 $as_echo "$ac_var='\''$ac_val'\''" 2746 done | sort 2747 echo 2748 2749 if test -n "$ac_subst_files"; then 2750 $as_echo "## ------------------- ## 2751 ## File substitutions. ## 2752 ## ------------------- ##" 2753 echo 2754 for ac_var in $ac_subst_files 2755 do 2756 eval ac_val=\$$ac_var 2757 case $ac_val in 2758 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2759 esac 2760 $as_echo "$ac_var='\''$ac_val'\''" 2761 done | sort 2762 echo 2763 fi 2764 2765 if test -s confdefs.h; then 2766 $as_echo "## ----------- ## 2767 ## confdefs.h. ## 2768 ## ----------- ##" 2769 echo 2770 cat confdefs.h 2771 echo 2772 fi 2773 test "$ac_signal" != 0 && 2774 $as_echo "$as_me: caught signal $ac_signal" 2775 $as_echo "$as_me: exit $exit_status" 2776 } >&5 2777 rm -f core *.core core.conftest.* && 2778 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 2779 exit $exit_status 2780 ' 0 2781 for ac_signal in 1 2 13 15; do 2782 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 2783 done 2784 ac_signal=0 2785 2786 # confdefs.h avoids OS command line length limits that DEFS can exceed. 2787 rm -f -r conftest* confdefs.h 2788 2789 $as_echo "/* confdefs.h */" > confdefs.h 2790 2791 # Predefined preprocessor variables. 2792 2793 cat >>confdefs.h <<_ACEOF 2794 #define PACKAGE_NAME "$PACKAGE_NAME" 2795 _ACEOF 2796 2797 cat >>confdefs.h <<_ACEOF 2798 #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 2799 _ACEOF 2800 2801 cat >>confdefs.h <<_ACEOF 2802 #define PACKAGE_VERSION "$PACKAGE_VERSION" 2803 _ACEOF 2804 2805 cat >>confdefs.h <<_ACEOF 2806 #define PACKAGE_STRING "$PACKAGE_STRING" 2807 _ACEOF 2808 2809 cat >>confdefs.h <<_ACEOF 2810 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 2811 _ACEOF 2812 2813 cat >>confdefs.h <<_ACEOF 2814 #define PACKAGE_URL "$PACKAGE_URL" 2815 _ACEOF 2816 2817 2818 # Let the site file select an alternate cache file if it wants to. 2819 # Prefer an explicitly selected file to automatically selected ones. 2820 ac_site_file1=NONE 2821 ac_site_file2=NONE 2822 if test -n "$CONFIG_SITE"; then 2823 # We do not want a PATH search for config.site. 2824 case $CONFIG_SITE in #(( 2825 -*) ac_site_file1=./$CONFIG_SITE;; 2826 */*) ac_site_file1=$CONFIG_SITE;; 2827 *) ac_site_file1=./$CONFIG_SITE;; 2828 esac 2829 elif test "x$prefix" != xNONE; then 2830 ac_site_file1=$prefix/share/config.site 2831 ac_site_file2=$prefix/etc/config.site 2832 else 2833 ac_site_file1=$ac_default_prefix/share/config.site 2834 ac_site_file2=$ac_default_prefix/etc/config.site 2835 fi 2836 for ac_site_file in "$ac_site_file1" "$ac_site_file2" 2837 do 2838 test "x$ac_site_file" = xNONE && continue 2839 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 2840 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2841 $as_echo "$as_me: loading site script $ac_site_file" >&6;} 2842 sed 's/^/| /' "$ac_site_file" >&5 2843 . "$ac_site_file" \ 2844 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2846 as_fn_error $? "failed to load site script $ac_site_file 2847 See \`config.log' for more details" "$LINENO" 5 ; } 2848 fi 2849 done 2850 2851 if test -r "$cache_file"; then 2852 # Some versions of bash will fail to source /dev/null (special files 2853 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 2854 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 2855 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 2856 $as_echo "$as_me: loading cache $cache_file" >&6;} 2857 case $cache_file in 2858 [\\/]* | ?:[\\/]* ) . "$cache_file";; 2859 *) . "./$cache_file";; 2860 esac 2861 fi 2862 else 2863 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 2864 $as_echo "$as_me: creating cache $cache_file" >&6;} 2865 >$cache_file 2866 fi 2867 2868 # Check that the precious variables saved in the cache have kept the same 2869 # value. 2870 ac_cache_corrupted=false 2871 for ac_var in $ac_precious_vars; do 2872 eval ac_old_set=\$ac_cv_env_${ac_var}_set 2873 eval ac_new_set=\$ac_env_${ac_var}_set 2874 eval ac_old_val=\$ac_cv_env_${ac_var}_value 2875 eval ac_new_val=\$ac_env_${ac_var}_value 2876 case $ac_old_set,$ac_new_set in 2877 set,) 2878 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2879 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2880 ac_cache_corrupted=: ;; 2881 ,set) 2882 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 2883 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2884 ac_cache_corrupted=: ;; 2885 ,);; 2886 *) 2887 if test "x$ac_old_val" != "x$ac_new_val"; then 2888 # differences in whitespace do not lead to failure. 2889 ac_old_val_w=`echo x $ac_old_val` 2890 ac_new_val_w=`echo x $ac_new_val` 2891 if test "$ac_old_val_w" != "$ac_new_val_w"; then 2892 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 2893 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2894 ac_cache_corrupted=: 2895 else 2896 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 2897 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 2898 eval $ac_var=\$ac_old_val 2899 fi 2900 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 2901 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 2902 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 2903 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 2904 fi;; 2905 esac 2906 # Pass precious variables to config.status. 2907 if test "$ac_new_set" = set; then 2908 case $ac_new_val in 2909 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2910 *) ac_arg=$ac_var=$ac_new_val ;; 2911 esac 2912 case " $ac_configure_args " in 2913 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2914 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 2915 esac 2916 fi 2917 done 2918 if $ac_cache_corrupted; then 2919 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2920 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2921 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2922 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 2923 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 2924 fi 2925 ## -------------------- ## 2926 ## Main body of script. ## 2927 ## -------------------- ## 2928 2929 ac_ext=c 2930 ac_cpp='$CPP $CPPFLAGS' 2931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2933 ac_compiler_gnu=$ac_cv_c_compiler_gnu 2934 2935 2936 2937 ac_aux_dir= 2938 for ac_dir in build-aux "$srcdir"/build-aux; do 2939 if test -f "$ac_dir/install-sh"; then 2940 ac_aux_dir=$ac_dir 2941 ac_install_sh="$ac_aux_dir/install-sh -c" 2942 break 2943 elif test -f "$ac_dir/install.sh"; then 2944 ac_aux_dir=$ac_dir 2945 ac_install_sh="$ac_aux_dir/install.sh -c" 2946 break 2947 elif test -f "$ac_dir/shtool"; then 2948 ac_aux_dir=$ac_dir 2949 ac_install_sh="$ac_aux_dir/shtool install -c" 2950 break 2951 fi 2952 done 2953 if test -z "$ac_aux_dir"; then 2954 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 2955 fi 2956 2957 # These three variables are undocumented and unsupported, 2958 # and are intended to be withdrawn in a future Autoconf release. 2959 # They can cause serious problems if a builder's source tree is in a directory 2960 # whose full name contains unusual characters. 2961 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 2962 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 2963 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 2964 2965 2966 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2967 2968 # 2969 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 2970 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2971 # 2972 # This code is free software; you can redistribute it and/or modify it 2973 # under the terms of the GNU General Public License version 2 only, as 2974 # published by the Free Software Foundation. Oracle designates this 2975 # particular file as subject to the "Classpath" exception as provided 2976 # by Oracle in the LICENSE file that accompanied this code. 2977 # 2978 # This code is distributed in the hope that it will be useful, but WITHOUT 2979 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2980 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2981 # version 2 for more details (a copy is included in the LICENSE file that 2982 # accompanied this code). 2983 # 2984 # You should have received a copy of the GNU General Public License version 2985 # 2 along with this work; if not, write to the Free Software Foundation, 2986 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2987 # 2988 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2989 # or visit www.oracle.com if you need additional information or have any 2990 # questions. 2991 # 2992 2993 # 2994 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2995 # 2996 # This program is free software; you can redistribute it and/or modify 2997 # it under the terms of the GNU General Public License as published by 2998 # the Free Software Foundation; either version 2 of the License, or 2999 # (at your option) any later version. 3000 # 3001 # This program is distributed in the hope that it will be useful, but 3002 # WITHOUT ANY WARRANTY; without even the implied warranty of 3003 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3004 # General Public License for more details. 3005 # 3006 # You should have received a copy of the GNU General Public License 3007 # along with this program; if not, write to the Free Software 3008 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 3009 # 3010 # As a special exception to the GNU General Public License, if you 3011 # distribute this file as part of a program that contains a 3012 # configuration script generated by Autoconf, you may include it under 3013 # the same distribution terms that you use for the rest of that program. 3014 3015 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) 3016 # ---------------------------------- 3017 # PKG_PROG_PKG_CONFIG 3018 3019 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 3020 # 3021 # Check to see whether a particular set of modules exists. Similar 3022 # to PKG_CHECK_MODULES(), but does not set variables or print errors. 3023 # 3024 # 3025 # Similar to PKG_CHECK_MODULES, make sure that the first instance of 3026 # this or PKG_CHECK_MODULES is called, or make sure to call 3027 # PKG_CHECK_EXISTS manually 3028 # -------------------------------------------------------------- 3029 3030 3031 3032 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 3033 # --------------------------------------------- 3034 # _PKG_CONFIG 3035 3036 # _PKG_SHORT_ERRORS_SUPPORTED 3037 # ----------------------------- 3038 # _PKG_SHORT_ERRORS_SUPPORTED 3039 3040 3041 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 3042 # [ACTION-IF-NOT-FOUND]) 3043 # 3044 # 3045 # Note that if there is a possibility the first call to 3046 # PKG_CHECK_MODULES might not happen, you should be sure to include an 3047 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 3048 # 3049 # 3050 # -------------------------------------------------------------- 3051 # PKG_CHECK_MODULES 3052 3053 3054 # Include these first... 3055 # 3056 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3057 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3058 # 3059 # This code is free software; you can redistribute it and/or modify it 3060 # under the terms of the GNU General Public License version 2 only, as 3061 # published by the Free Software Foundation. Oracle designates this 3062 # particular file as subject to the "Classpath" exception as provided 3063 # by Oracle in the LICENSE file that accompanied this code. 3064 # 3065 # This code is distributed in the hope that it will be useful, but WITHOUT 3066 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3067 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3068 # version 2 for more details (a copy is included in the LICENSE file that 3069 # accompanied this code). 3070 # 3071 # You should have received a copy of the GNU General Public License version 3072 # 2 along with this work; if not, write to the Free Software Foundation, 3073 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3074 # 3075 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3076 # or visit www.oracle.com if you need additional information or have any 3077 # questions. 3078 # 3079 3080 3081 3082 # This will make sure the given variable points to a full and proper 3083 # path. This means: 3084 # 1) There will be no spaces in the path. On posix platforms, 3085 # spaces in the path will result in an error. On Windows, 3086 # the path will be rewritten using short-style to be space-free. 3087 # 2) The path will be absolute, and it will be in unix-style (on 3088 # cygwin). 3089 # $1: The name of the variable to fix 3090 3091 3092 # This will make sure the given variable points to a executable 3093 # with a full and proper path. This means: 3094 # 1) There will be no spaces in the path. On posix platforms, 3095 # spaces in the path will result in an error. On Windows, 3096 # the path will be rewritten using short-style to be space-free. 3097 # 2) The path will be absolute, and it will be in unix-style (on 3098 # cygwin). 3099 # Any arguments given to the executable is preserved. 3100 # If the input variable does not have a directory specification, then 3101 # it need to be in the PATH. 3102 # $1: The name of the variable to fix 3103 3104 3105 3106 3107 3108 3109 # Test that variable $1 denoting a program is not empty. If empty, exit with an error. 3110 # $1: variable to check 3111 # $2: executable name to print in warning (optional) 3112 3113 3114 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY. 3115 # Arguments as AC_PATH_PROG: 3116 # $1: variable to set 3117 # $2: executable name to look for 3118 3119 3120 # Setup the most fundamental tools that relies on not much else to set up, 3121 # but is used by much of the early bootstrap code. 3122 3123 3124 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3125 3126 3127 3128 3129 3130 3131 3132 #%%% Simple tools %%% 3133 3134 # Check if we have found a usable version of make 3135 # $1: the path to a potential make binary (or empty) 3136 # $2: the description on how we found this 3137 3138 3139 # Goes looking for a usable version of GNU make. 3140 3141 3142 3143 3144 3145 3146 # Check if build directory is on local disk. If not possible to determine, 3147 # we prefer to claim it's local. 3148 # Argument 1: directory to test 3149 # Argument 2: what to do if it is on local disk 3150 # Argument 3: what to do otherwise (remote disk or failure) 3151 3152 3153 # Check that source files have basic read permissions set. This might 3154 # not be the case in cygwin in certain conditions. 3155 3156 3157 3158 3159 # 3160 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3161 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3162 # 3163 # This code is free software; you can redistribute it and/or modify it 3164 # under the terms of the GNU General Public License version 2 only, as 3165 # published by the Free Software Foundation. Oracle designates this 3166 # particular file as subject to the "Classpath" exception as provided 3167 # by Oracle in the LICENSE file that accompanied this code. 3168 # 3169 # This code is distributed in the hope that it will be useful, but WITHOUT 3170 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3171 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3172 # version 2 for more details (a copy is included in the LICENSE file that 3173 # accompanied this code). 3174 # 3175 # You should have received a copy of the GNU General Public License version 3176 # 2 along with this work; if not, write to the Free Software Foundation, 3177 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3178 # 3179 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3180 # or visit www.oracle.com if you need additional information or have any 3181 # questions. 3182 # 3183 3184 3185 3186 3187 3188 # Helper function which possibly converts a path using DOS-style short mode. 3189 # If so, the updated path is stored in $new_path. 3190 # $1: The path to check 3191 3192 3193 # Helper function which possibly converts a path using DOS-style short mode. 3194 # If so, the updated path is stored in $new_path. 3195 # $1: The path to check 3196 3197 3198 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted 3199 # and could probably be heavily simplified. However, all changes in this 3200 # area tend to need lot of testing in different scenarios, and in lack of 3201 # proper unit testing, cleaning this up has not been deemed worth the effort 3202 # at the moment. 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3213 3214 3215 3216 3217 # 3218 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3219 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3220 # 3221 # This code is free software; you can redistribute it and/or modify it 3222 # under the terms of the GNU General Public License version 2 only, as 3223 # published by the Free Software Foundation. Oracle designates this 3224 # particular file as subject to the "Classpath" exception as provided 3225 # by Oracle in the LICENSE file that accompanied this code. 3226 # 3227 # This code is distributed in the hope that it will be useful, but WITHOUT 3228 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3229 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3230 # version 2 for more details (a copy is included in the LICENSE file that 3231 # accompanied this code). 3232 # 3233 # You should have received a copy of the GNU General Public License version 3234 # 2 along with this work; if not, write to the Free Software Foundation, 3235 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3236 # 3237 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3238 # or visit www.oracle.com if you need additional information or have any 3239 # questions. 3240 # 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 # ... then the rest 3253 # 3254 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3255 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3256 # 3257 # This code is free software; you can redistribute it and/or modify it 3258 # under the terms of the GNU General Public License version 2 only, as 3259 # published by the Free Software Foundation. Oracle designates this 3260 # particular file as subject to the "Classpath" exception as provided 3261 # by Oracle in the LICENSE file that accompanied this code. 3262 # 3263 # This code is distributed in the hope that it will be useful, but WITHOUT 3264 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3265 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3266 # version 2 for more details (a copy is included in the LICENSE file that 3267 # accompanied this code). 3268 # 3269 # You should have received a copy of the GNU General Public License version 3270 # 2 along with this work; if not, write to the Free Software Foundation, 3271 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3272 # 3273 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3274 # or visit www.oracle.com if you need additional information or have any 3275 # questions. 3276 # 3277 3278 # Execute the check given as argument, and verify the result 3279 # If the Boot JDK was previously found, do nothing 3280 # $1 A command line (typically autoconf macro) to execute 3281 3282 3283 # Test: Is bootjdk explicitely set by command line arguments? 3284 3285 3286 # Test: Is bootjdk available from builddeps? 3287 3288 3289 # Test: Is $JAVA_HOME set? 3290 3291 3292 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK? 3293 3294 3295 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) 3296 3297 3298 # Look for a jdk in the given path. If there are multiple, try to select the newest. 3299 # If found, set BOOT_JDK and BOOT_JDK_FOUND. 3300 # $1 = Path to directory containing jdk installations. 3301 # $2 = String to append to the found JDK directory to get the proper JDK home 3302 3303 3304 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given 3305 # environmental variable as base for where to look. 3306 # $1 Name of an environmal variable, assumed to point to the Program Files directory. 3307 3308 3309 # Test: Is there a JDK installed in default, well-known locations? 3310 3311 3312 # Check that a command-line tool in the Boot JDK is correct 3313 # $1 = name of variable to assign 3314 # $2 = name of binary 3315 3316 3317 ############################################################################### 3318 # 3319 # We need a Boot JDK to bootstrap the build. 3320 # 3321 3322 3323 3324 3325 3326 # 3327 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3328 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3329 # 3330 # This code is free software; you can redistribute it and/or modify it 3331 # under the terms of the GNU General Public License version 2 only, as 3332 # published by the Free Software Foundation. Oracle designates this 3333 # particular file as subject to the "Classpath" exception as provided 3334 # by Oracle in the LICENSE file that accompanied this code. 3335 # 3336 # This code is distributed in the hope that it will be useful, but WITHOUT 3337 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3338 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3339 # version 2 for more details (a copy is included in the LICENSE file that 3340 # accompanied this code). 3341 # 3342 # You should have received a copy of the GNU General Public License version 3343 # 2 along with this work; if not, write to the Free Software Foundation, 3344 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3345 # 3346 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3347 # or visit www.oracle.com if you need additional information or have any 3348 # questions. 3349 # 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 # 3371 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3372 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3373 # 3374 # This code is free software; you can redistribute it and/or modify it 3375 # under the terms of the GNU General Public License version 2 only, as 3376 # published by the Free Software Foundation. Oracle designates this 3377 # particular file as subject to the "Classpath" exception as provided 3378 # by Oracle in the LICENSE file that accompanied this code. 3379 # 3380 # This code is distributed in the hope that it will be useful, but WITHOUT 3381 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3382 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3383 # version 2 for more details (a copy is included in the LICENSE file that 3384 # accompanied this code). 3385 # 3386 # You should have received a copy of the GNU General Public License version 3387 # 2 along with this work; if not, write to the Free Software Foundation, 3388 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3389 # 3390 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3391 # or visit www.oracle.com if you need additional information or have any 3392 # questions. 3393 # 3394 3395 3396 3397 3398 3399 cygwin_help() { 3400 case $1 in 3401 unzip) 3402 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;; 3403 zip) 3404 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;; 3405 make) 3406 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;; 3407 * ) 3408 break ;; 3409 esac 3410 } 3411 3412 apt_help() { 3413 case $1 in 3414 devkit) 3415 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; 3416 openjdk) 3417 PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; 3418 alsa) 3419 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; 3420 cups) 3421 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; 3422 freetype2) 3423 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; 3424 pulse) 3425 PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; 3426 x11) 3427 PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;; 3428 ccache) 3429 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; 3430 * ) 3431 break ;; 3432 esac 3433 } 3434 3435 yum_help() { 3436 case $1 in 3437 devkit) 3438 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; 3439 openjdk) 3440 PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; 3441 alsa) 3442 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; 3443 cups) 3444 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; 3445 freetype2) 3446 PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;; 3447 pulse) 3448 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; 3449 x11) 3450 PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;; 3451 ccache) 3452 PKGHANDLER_COMMAND="sudo yum install ccache" ;; 3453 * ) 3454 break ;; 3455 esac 3456 } 3457 3458 port_help() { 3459 PKGHANDLER_COMMAND="" 3460 } 3461 3462 pkgutil_help() { 3463 PKGHANDLER_COMMAND="" 3464 } 3465 3466 pkgadd_help() { 3467 PKGHANDLER_COMMAND="" 3468 } 3469 3470 3471 3472 # 3473 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3474 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3475 # 3476 # This code is free software; you can redistribute it and/or modify it 3477 # under the terms of the GNU General Public License version 2 only, as 3478 # published by the Free Software Foundation. Oracle designates this 3479 # particular file as subject to the "Classpath" exception as provided 3480 # by Oracle in the LICENSE file that accompanied this code. 3481 # 3482 # This code is distributed in the hope that it will be useful, but WITHOUT 3483 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3484 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3485 # version 2 for more details (a copy is included in the LICENSE file that 3486 # accompanied this code). 3487 # 3488 # You should have received a copy of the GNU General Public License version 3489 # 2 along with this work; if not, write to the Free Software Foundation, 3490 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3491 # 3492 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3493 # or visit www.oracle.com if you need additional information or have any 3494 # questions. 3495 # 3496 3497 3498 3499 3500 3501 3502 3503 3504 ############################################################################### 3505 # 3506 # Should we build only OpenJDK even if closed sources are present? 3507 # 3508 3509 3510 3511 3512 ############################################################################### 3513 # 3514 # Setup version numbers 3515 # 3516 3517 3518 3519 3520 3521 3522 # Support for customization of the build process. Some build files 3523 # will include counterparts from this location, if they exist. This allows 3524 # for a degree of customization of the build targets and the rules/recipes 3525 # to create them 3526 3527 # Check whether --with-custom-make-dir was given. 3528 if test "${with_custom_make_dir+set}" = set; then : 3529 withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir 3530 fi 3531 3532 3533 3534 # 3535 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3536 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3537 # 3538 # This code is free software; you can redistribute it and/or modify it 3539 # under the terms of the GNU General Public License version 2 only, as 3540 # published by the Free Software Foundation. Oracle designates this 3541 # particular file as subject to the "Classpath" exception as provided 3542 # by Oracle in the LICENSE file that accompanied this code. 3543 # 3544 # This code is distributed in the hope that it will be useful, but WITHOUT 3545 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3546 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3547 # version 2 for more details (a copy is included in the LICENSE file that 3548 # accompanied this code). 3549 # 3550 # You should have received a copy of the GNU General Public License version 3551 # 2 along with this work; if not, write to the Free Software Foundation, 3552 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3553 # 3554 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3555 # or visit www.oracle.com if you need additional information or have any 3556 # questions. 3557 # 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 # 3574 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3575 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3576 # 3577 # This code is free software; you can redistribute it and/or modify it 3578 # under the terms of the GNU General Public License version 2 only, as 3579 # published by the Free Software Foundation. Oracle designates this 3580 # particular file as subject to the "Classpath" exception as provided 3581 # by Oracle in the LICENSE file that accompanied this code. 3582 # 3583 # This code is distributed in the hope that it will be useful, but WITHOUT 3584 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3585 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3586 # version 2 for more details (a copy is included in the LICENSE file that 3587 # accompanied this code). 3588 # 3589 # You should have received a copy of the GNU General Public License version 3590 # 2 along with this work; if not, write to the Free Software Foundation, 3591 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3592 # 3593 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3594 # or visit www.oracle.com if you need additional information or have any 3595 # questions. 3596 # 3597 3598 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3599 # Converts autoconf style CPU name to OpenJDK style, into 3600 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. 3601 3602 3603 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3604 # Converts autoconf style OS name to OpenJDK style, into 3605 # VAR_OS and VAR_OS_API. 3606 3607 3608 # Expects $host_os $host_cpu $build_os and $build_cpu 3609 # and $with_target_bits to have been setup! 3610 # 3611 # Translate the standard triplet(quadruplet) definition 3612 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU, 3613 # OPENJDK_BUILD_OS, etc. 3614 3615 3616 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour 3617 # accordingly. Must be done after setting up build and target system, but before 3618 # doing anything else with these values. 3619 3620 3621 # Setup the legacy variables, for controlling the old makefiles. 3622 # 3623 3624 3625 3626 3627 #%%% Build and target systems %%% 3628 3629 3630 3631 3632 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS. 3633 # Add -mX to various FLAGS variables. 3634 3635 3636 3637 3638 3639 3640 # 3641 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3642 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3643 # 3644 # This code is free software; you can redistribute it and/or modify it 3645 # under the terms of the GNU General Public License version 2 only, as 3646 # published by the Free Software Foundation. Oracle designates this 3647 # particular file as subject to the "Classpath" exception as provided 3648 # by Oracle in the LICENSE file that accompanied this code. 3649 # 3650 # This code is distributed in the hope that it will be useful, but WITHOUT 3651 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3652 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3653 # version 2 for more details (a copy is included in the LICENSE file that 3654 # accompanied this code). 3655 # 3656 # You should have received a copy of the GNU General Public License version 3657 # 2 along with this work; if not, write to the Free Software Foundation, 3658 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3659 # 3660 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3661 # or visit www.oracle.com if you need additional information or have any 3662 # questions. 3663 # 3664 3665 3666 3667 3668 3669 3670 3671 3672 # 3673 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3674 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3675 # 3676 # This code is free software; you can redistribute it and/or modify it 3677 # under the terms of the GNU General Public License version 2 only, as 3678 # published by the Free Software Foundation. Oracle designates this 3679 # particular file as subject to the "Classpath" exception as provided 3680 # by Oracle in the LICENSE file that accompanied this code. 3681 # 3682 # This code is distributed in the hope that it will be useful, but WITHOUT 3683 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3684 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3685 # version 2 for more details (a copy is included in the LICENSE file that 3686 # accompanied this code). 3687 # 3688 # You should have received a copy of the GNU General Public License version 3689 # 2 along with this work; if not, write to the Free Software Foundation, 3690 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3691 # 3692 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3693 # or visit www.oracle.com if you need additional information or have any 3694 # questions. 3695 # 3696 3697 # $1 = compiler to test (CC or CXX) 3698 # $2 = human readable name of compiler (C or C++) 3699 3700 3701 3702 3703 3704 # $1 = compiler to test (CC or CXX) 3705 # $2 = human readable name of compiler (C or C++) 3706 # $3 = list of compiler names to search for 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE], 3721 # [RUN-IF-FALSE]) 3722 # ------------------------------------------------------------ 3723 # Check that the c and c++ compilers support an argument 3724 3725 3726 3727 3728 # 3729 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3730 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3731 # 3732 # This code is free software; you can redistribute it and/or modify it 3733 # under the terms of the GNU General Public License version 2 only, as 3734 # published by the Free Software Foundation. Oracle designates this 3735 # particular file as subject to the "Classpath" exception as provided 3736 # by Oracle in the LICENSE file that accompanied this code. 3737 # 3738 # This code is distributed in the hope that it will be useful, but WITHOUT 3739 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3740 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3741 # version 2 for more details (a copy is included in the LICENSE file that 3742 # accompanied this code). 3743 # 3744 # You should have received a copy of the GNU General Public License version 3745 # 2 along with this work; if not, write to the Free Software Foundation, 3746 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3747 # 3748 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3749 # or visit www.oracle.com if you need additional information or have any 3750 # questions. 3751 # 3752 3753 3754 3755 3756 3757 3758 3759 # Check if the VS env variables were setup prior to running configure. 3760 # If not, then find vcvarsall.bat and run it automatically, and integrate 3761 # the set env variables into the spec file. 3762 3763 3764 3765 # Setup the DXSDK paths 3766 3767 3768 3769 3770 3771 3772 # This line needs to be here, verbatim, after all includes and the dummy hook 3773 # definitions. It is replaced with custom functionality when building 3774 # custom sources. 3775 #CUSTOM_AUTOCONF_INCLUDE 3776 3777 # Do not change or remove the following line, it is needed for consistency checks: 3778 DATE_WHEN_GENERATED=1367495180 3779 3780 ############################################################################### 3781 # 3782 # Initialization / Boot-strapping 3783 # 3784 # The bootstrapping process needs to solve the "chicken or the egg" problem, 3785 # thus it jumps back and forth, each time gaining something needed later on. 3786 # 3787 ############################################################################### 3788 3789 # Basic initialization that must happen first of all 3790 3791 # Save the original command line. This is passed to us by the wrapper configure script. 3792 3793 DATE_WHEN_CONFIGURED=`LANG=C date` 3794 3795 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5 3796 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;} 3797 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5 3798 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;} 3799 3800 3801 3802 # Start with tools that do not need have cross compilation support 3803 # and can be expected to be found in the default PATH. These tools are 3804 # used by configure. Nor are these tools expected to be found in the 3805 # devkit from the builddeps server either, since they are 3806 # needed to download the devkit. 3807 3808 # First are all the simple required tools. 3809 3810 for ac_prog in basename 3811 do 3812 # Extract the first word of "$ac_prog", so it can be a program name with args. 3813 set dummy $ac_prog; ac_word=$2 3814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3815 $as_echo_n "checking for $ac_word... " >&6; } 3816 if test "${ac_cv_path_BASENAME+set}" = set; then : 3817 $as_echo_n "(cached) " >&6 3818 else 3819 case $BASENAME in 3820 [\\/]* | ?:[\\/]*) 3821 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path. 3822 ;; 3823 *) 3824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3825 for as_dir in $PATH 3826 do 3827 IFS=$as_save_IFS 3828 test -z "$as_dir" && as_dir=. 3829 for ac_exec_ext in '' $ac_executable_extensions; do 3830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3831 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext" 3832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3833 break 2 3834 fi 3835 done 3836 done 3837 IFS=$as_save_IFS 3838 3839 ;; 3840 esac 3841 fi 3842 BASENAME=$ac_cv_path_BASENAME 3843 if test -n "$BASENAME"; then 3844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 3845 $as_echo "$BASENAME" >&6; } 3846 else 3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3848 $as_echo "no" >&6; } 3849 fi 3850 3851 3852 test -n "$BASENAME" && break 3853 done 3854 3855 3856 if test "x$BASENAME" = x; then 3857 if test "xbasename" = x; then 3858 PROG_NAME=basename 3859 else 3860 PROG_NAME=basename 3861 fi 3862 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3863 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3864 as_fn_error $? "Cannot continue" "$LINENO" 5 3865 fi 3866 3867 3868 3869 for ac_prog in bash 3870 do 3871 # Extract the first word of "$ac_prog", so it can be a program name with args. 3872 set dummy $ac_prog; ac_word=$2 3873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3874 $as_echo_n "checking for $ac_word... " >&6; } 3875 if test "${ac_cv_path_BASH+set}" = set; then : 3876 $as_echo_n "(cached) " >&6 3877 else 3878 case $BASH in 3879 [\\/]* | ?:[\\/]*) 3880 ac_cv_path_BASH="$BASH" # Let the user override the test with a path. 3881 ;; 3882 *) 3883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3884 for as_dir in $PATH 3885 do 3886 IFS=$as_save_IFS 3887 test -z "$as_dir" && as_dir=. 3888 for ac_exec_ext in '' $ac_executable_extensions; do 3889 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3890 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" 3891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3892 break 2 3893 fi 3894 done 3895 done 3896 IFS=$as_save_IFS 3897 3898 ;; 3899 esac 3900 fi 3901 BASH=$ac_cv_path_BASH 3902 if test -n "$BASH"; then 3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 3904 $as_echo "$BASH" >&6; } 3905 else 3906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3907 $as_echo "no" >&6; } 3908 fi 3909 3910 3911 test -n "$BASH" && break 3912 done 3913 3914 3915 if test "x$BASH" = x; then 3916 if test "xbash" = x; then 3917 PROG_NAME=bash 3918 else 3919 PROG_NAME=bash 3920 fi 3921 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3922 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3923 as_fn_error $? "Cannot continue" "$LINENO" 5 3924 fi 3925 3926 3927 3928 for ac_prog in cat 3929 do 3930 # Extract the first word of "$ac_prog", so it can be a program name with args. 3931 set dummy $ac_prog; ac_word=$2 3932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3933 $as_echo_n "checking for $ac_word... " >&6; } 3934 if test "${ac_cv_path_CAT+set}" = set; then : 3935 $as_echo_n "(cached) " >&6 3936 else 3937 case $CAT in 3938 [\\/]* | ?:[\\/]*) 3939 ac_cv_path_CAT="$CAT" # Let the user override the test with a path. 3940 ;; 3941 *) 3942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3943 for as_dir in $PATH 3944 do 3945 IFS=$as_save_IFS 3946 test -z "$as_dir" && as_dir=. 3947 for ac_exec_ext in '' $ac_executable_extensions; do 3948 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3949 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" 3950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3951 break 2 3952 fi 3953 done 3954 done 3955 IFS=$as_save_IFS 3956 3957 ;; 3958 esac 3959 fi 3960 CAT=$ac_cv_path_CAT 3961 if test -n "$CAT"; then 3962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5 3963 $as_echo "$CAT" >&6; } 3964 else 3965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3966 $as_echo "no" >&6; } 3967 fi 3968 3969 3970 test -n "$CAT" && break 3971 done 3972 3973 3974 if test "x$CAT" = x; then 3975 if test "xcat" = x; then 3976 PROG_NAME=cat 3977 else 3978 PROG_NAME=cat 3979 fi 3980 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3981 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3982 as_fn_error $? "Cannot continue" "$LINENO" 5 3983 fi 3984 3985 3986 3987 for ac_prog in chmod 3988 do 3989 # Extract the first word of "$ac_prog", so it can be a program name with args. 3990 set dummy $ac_prog; ac_word=$2 3991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3992 $as_echo_n "checking for $ac_word... " >&6; } 3993 if test "${ac_cv_path_CHMOD+set}" = set; then : 3994 $as_echo_n "(cached) " >&6 3995 else 3996 case $CHMOD in 3997 [\\/]* | ?:[\\/]*) 3998 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. 3999 ;; 4000 *) 4001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4002 for as_dir in $PATH 4003 do 4004 IFS=$as_save_IFS 4005 test -z "$as_dir" && as_dir=. 4006 for ac_exec_ext in '' $ac_executable_extensions; do 4007 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4008 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext" 4009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4010 break 2 4011 fi 4012 done 4013 done 4014 IFS=$as_save_IFS 4015 4016 ;; 4017 esac 4018 fi 4019 CHMOD=$ac_cv_path_CHMOD 4020 if test -n "$CHMOD"; then 4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5 4022 $as_echo "$CHMOD" >&6; } 4023 else 4024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4025 $as_echo "no" >&6; } 4026 fi 4027 4028 4029 test -n "$CHMOD" && break 4030 done 4031 4032 4033 if test "x$CHMOD" = x; then 4034 if test "xchmod" = x; then 4035 PROG_NAME=chmod 4036 else 4037 PROG_NAME=chmod 4038 fi 4039 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4040 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4041 as_fn_error $? "Cannot continue" "$LINENO" 5 4042 fi 4043 4044 4045 4046 for ac_prog in cmp 4047 do 4048 # Extract the first word of "$ac_prog", so it can be a program name with args. 4049 set dummy $ac_prog; ac_word=$2 4050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4051 $as_echo_n "checking for $ac_word... " >&6; } 4052 if test "${ac_cv_path_CMP+set}" = set; then : 4053 $as_echo_n "(cached) " >&6 4054 else 4055 case $CMP in 4056 [\\/]* | ?:[\\/]*) 4057 ac_cv_path_CMP="$CMP" # Let the user override the test with a path. 4058 ;; 4059 *) 4060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4061 for as_dir in $PATH 4062 do 4063 IFS=$as_save_IFS 4064 test -z "$as_dir" && as_dir=. 4065 for ac_exec_ext in '' $ac_executable_extensions; do 4066 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4067 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" 4068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4069 break 2 4070 fi 4071 done 4072 done 4073 IFS=$as_save_IFS 4074 4075 ;; 4076 esac 4077 fi 4078 CMP=$ac_cv_path_CMP 4079 if test -n "$CMP"; then 4080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5 4081 $as_echo "$CMP" >&6; } 4082 else 4083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4084 $as_echo "no" >&6; } 4085 fi 4086 4087 4088 test -n "$CMP" && break 4089 done 4090 4091 4092 if test "x$CMP" = x; then 4093 if test "xcmp" = x; then 4094 PROG_NAME=cmp 4095 else 4096 PROG_NAME=cmp 4097 fi 4098 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4099 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4100 as_fn_error $? "Cannot continue" "$LINENO" 5 4101 fi 4102 4103 4104 4105 for ac_prog in comm 4106 do 4107 # Extract the first word of "$ac_prog", so it can be a program name with args. 4108 set dummy $ac_prog; ac_word=$2 4109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4110 $as_echo_n "checking for $ac_word... " >&6; } 4111 if test "${ac_cv_path_COMM+set}" = set; then : 4112 $as_echo_n "(cached) " >&6 4113 else 4114 case $COMM in 4115 [\\/]* | ?:[\\/]*) 4116 ac_cv_path_COMM="$COMM" # Let the user override the test with a path. 4117 ;; 4118 *) 4119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4120 for as_dir in $PATH 4121 do 4122 IFS=$as_save_IFS 4123 test -z "$as_dir" && as_dir=. 4124 for ac_exec_ext in '' $ac_executable_extensions; do 4125 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4126 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext" 4127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4128 break 2 4129 fi 4130 done 4131 done 4132 IFS=$as_save_IFS 4133 4134 ;; 4135 esac 4136 fi 4137 COMM=$ac_cv_path_COMM 4138 if test -n "$COMM"; then 4139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5 4140 $as_echo "$COMM" >&6; } 4141 else 4142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4143 $as_echo "no" >&6; } 4144 fi 4145 4146 4147 test -n "$COMM" && break 4148 done 4149 4150 4151 if test "x$COMM" = x; then 4152 if test "xcomm" = x; then 4153 PROG_NAME=comm 4154 else 4155 PROG_NAME=comm 4156 fi 4157 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4158 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4159 as_fn_error $? "Cannot continue" "$LINENO" 5 4160 fi 4161 4162 4163 4164 for ac_prog in cp 4165 do 4166 # Extract the first word of "$ac_prog", so it can be a program name with args. 4167 set dummy $ac_prog; ac_word=$2 4168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4169 $as_echo_n "checking for $ac_word... " >&6; } 4170 if test "${ac_cv_path_CP+set}" = set; then : 4171 $as_echo_n "(cached) " >&6 4172 else 4173 case $CP in 4174 [\\/]* | ?:[\\/]*) 4175 ac_cv_path_CP="$CP" # Let the user override the test with a path. 4176 ;; 4177 *) 4178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4179 for as_dir in $PATH 4180 do 4181 IFS=$as_save_IFS 4182 test -z "$as_dir" && as_dir=. 4183 for ac_exec_ext in '' $ac_executable_extensions; do 4184 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4185 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" 4186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4187 break 2 4188 fi 4189 done 4190 done 4191 IFS=$as_save_IFS 4192 4193 ;; 4194 esac 4195 fi 4196 CP=$ac_cv_path_CP 4197 if test -n "$CP"; then 4198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 4199 $as_echo "$CP" >&6; } 4200 else 4201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4202 $as_echo "no" >&6; } 4203 fi 4204 4205 4206 test -n "$CP" && break 4207 done 4208 4209 4210 if test "x$CP" = x; then 4211 if test "xcp" = x; then 4212 PROG_NAME=cp 4213 else 4214 PROG_NAME=cp 4215 fi 4216 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4217 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4218 as_fn_error $? "Cannot continue" "$LINENO" 5 4219 fi 4220 4221 4222 4223 for ac_prog in cpio 4224 do 4225 # Extract the first word of "$ac_prog", so it can be a program name with args. 4226 set dummy $ac_prog; ac_word=$2 4227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4228 $as_echo_n "checking for $ac_word... " >&6; } 4229 if test "${ac_cv_path_CPIO+set}" = set; then : 4230 $as_echo_n "(cached) " >&6 4231 else 4232 case $CPIO in 4233 [\\/]* | ?:[\\/]*) 4234 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path. 4235 ;; 4236 *) 4237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4238 for as_dir in $PATH 4239 do 4240 IFS=$as_save_IFS 4241 test -z "$as_dir" && as_dir=. 4242 for ac_exec_ext in '' $ac_executable_extensions; do 4243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4244 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext" 4245 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4246 break 2 4247 fi 4248 done 4249 done 4250 IFS=$as_save_IFS 4251 4252 ;; 4253 esac 4254 fi 4255 CPIO=$ac_cv_path_CPIO 4256 if test -n "$CPIO"; then 4257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5 4258 $as_echo "$CPIO" >&6; } 4259 else 4260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4261 $as_echo "no" >&6; } 4262 fi 4263 4264 4265 test -n "$CPIO" && break 4266 done 4267 4268 4269 if test "x$CPIO" = x; then 4270 if test "xcpio" = x; then 4271 PROG_NAME=cpio 4272 else 4273 PROG_NAME=cpio 4274 fi 4275 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4276 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4277 as_fn_error $? "Cannot continue" "$LINENO" 5 4278 fi 4279 4280 4281 4282 for ac_prog in cut 4283 do 4284 # Extract the first word of "$ac_prog", so it can be a program name with args. 4285 set dummy $ac_prog; ac_word=$2 4286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4287 $as_echo_n "checking for $ac_word... " >&6; } 4288 if test "${ac_cv_path_CUT+set}" = set; then : 4289 $as_echo_n "(cached) " >&6 4290 else 4291 case $CUT in 4292 [\\/]* | ?:[\\/]*) 4293 ac_cv_path_CUT="$CUT" # Let the user override the test with a path. 4294 ;; 4295 *) 4296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4297 for as_dir in $PATH 4298 do 4299 IFS=$as_save_IFS 4300 test -z "$as_dir" && as_dir=. 4301 for ac_exec_ext in '' $ac_executable_extensions; do 4302 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4303 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext" 4304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4305 break 2 4306 fi 4307 done 4308 done 4309 IFS=$as_save_IFS 4310 4311 ;; 4312 esac 4313 fi 4314 CUT=$ac_cv_path_CUT 4315 if test -n "$CUT"; then 4316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5 4317 $as_echo "$CUT" >&6; } 4318 else 4319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4320 $as_echo "no" >&6; } 4321 fi 4322 4323 4324 test -n "$CUT" && break 4325 done 4326 4327 4328 if test "x$CUT" = x; then 4329 if test "xcut" = x; then 4330 PROG_NAME=cut 4331 else 4332 PROG_NAME=cut 4333 fi 4334 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4335 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4336 as_fn_error $? "Cannot continue" "$LINENO" 5 4337 fi 4338 4339 4340 4341 for ac_prog in date 4342 do 4343 # Extract the first word of "$ac_prog", so it can be a program name with args. 4344 set dummy $ac_prog; ac_word=$2 4345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4346 $as_echo_n "checking for $ac_word... " >&6; } 4347 if test "${ac_cv_path_DATE+set}" = set; then : 4348 $as_echo_n "(cached) " >&6 4349 else 4350 case $DATE in 4351 [\\/]* | ?:[\\/]*) 4352 ac_cv_path_DATE="$DATE" # Let the user override the test with a path. 4353 ;; 4354 *) 4355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4356 for as_dir in $PATH 4357 do 4358 IFS=$as_save_IFS 4359 test -z "$as_dir" && as_dir=. 4360 for ac_exec_ext in '' $ac_executable_extensions; do 4361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4362 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext" 4363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4364 break 2 4365 fi 4366 done 4367 done 4368 IFS=$as_save_IFS 4369 4370 ;; 4371 esac 4372 fi 4373 DATE=$ac_cv_path_DATE 4374 if test -n "$DATE"; then 4375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5 4376 $as_echo "$DATE" >&6; } 4377 else 4378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4379 $as_echo "no" >&6; } 4380 fi 4381 4382 4383 test -n "$DATE" && break 4384 done 4385 4386 4387 if test "x$DATE" = x; then 4388 if test "xdate" = x; then 4389 PROG_NAME=date 4390 else 4391 PROG_NAME=date 4392 fi 4393 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4394 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4395 as_fn_error $? "Cannot continue" "$LINENO" 5 4396 fi 4397 4398 4399 4400 for ac_prog in gdiff diff 4401 do 4402 # Extract the first word of "$ac_prog", so it can be a program name with args. 4403 set dummy $ac_prog; ac_word=$2 4404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4405 $as_echo_n "checking for $ac_word... " >&6; } 4406 if test "${ac_cv_path_DIFF+set}" = set; then : 4407 $as_echo_n "(cached) " >&6 4408 else 4409 case $DIFF in 4410 [\\/]* | ?:[\\/]*) 4411 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. 4412 ;; 4413 *) 4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4415 for as_dir in $PATH 4416 do 4417 IFS=$as_save_IFS 4418 test -z "$as_dir" && as_dir=. 4419 for ac_exec_ext in '' $ac_executable_extensions; do 4420 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4421 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" 4422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4423 break 2 4424 fi 4425 done 4426 done 4427 IFS=$as_save_IFS 4428 4429 ;; 4430 esac 4431 fi 4432 DIFF=$ac_cv_path_DIFF 4433 if test -n "$DIFF"; then 4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 4435 $as_echo "$DIFF" >&6; } 4436 else 4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4438 $as_echo "no" >&6; } 4439 fi 4440 4441 4442 test -n "$DIFF" && break 4443 done 4444 4445 4446 if test "x$DIFF" = x; then 4447 if test "xgdiff diff" = x; then 4448 PROG_NAME=diff 4449 else 4450 PROG_NAME=gdiff diff 4451 fi 4452 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4453 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4454 as_fn_error $? "Cannot continue" "$LINENO" 5 4455 fi 4456 4457 4458 4459 for ac_prog in dirname 4460 do 4461 # Extract the first word of "$ac_prog", so it can be a program name with args. 4462 set dummy $ac_prog; ac_word=$2 4463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4464 $as_echo_n "checking for $ac_word... " >&6; } 4465 if test "${ac_cv_path_DIRNAME+set}" = set; then : 4466 $as_echo_n "(cached) " >&6 4467 else 4468 case $DIRNAME in 4469 [\\/]* | ?:[\\/]*) 4470 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path. 4471 ;; 4472 *) 4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4474 for as_dir in $PATH 4475 do 4476 IFS=$as_save_IFS 4477 test -z "$as_dir" && as_dir=. 4478 for ac_exec_ext in '' $ac_executable_extensions; do 4479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4480 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext" 4481 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4482 break 2 4483 fi 4484 done 4485 done 4486 IFS=$as_save_IFS 4487 4488 ;; 4489 esac 4490 fi 4491 DIRNAME=$ac_cv_path_DIRNAME 4492 if test -n "$DIRNAME"; then 4493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5 4494 $as_echo "$DIRNAME" >&6; } 4495 else 4496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4497 $as_echo "no" >&6; } 4498 fi 4499 4500 4501 test -n "$DIRNAME" && break 4502 done 4503 4504 4505 if test "x$DIRNAME" = x; then 4506 if test "xdirname" = x; then 4507 PROG_NAME=dirname 4508 else 4509 PROG_NAME=dirname 4510 fi 4511 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4512 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4513 as_fn_error $? "Cannot continue" "$LINENO" 5 4514 fi 4515 4516 4517 4518 for ac_prog in echo 4519 do 4520 # Extract the first word of "$ac_prog", so it can be a program name with args. 4521 set dummy $ac_prog; ac_word=$2 4522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4523 $as_echo_n "checking for $ac_word... " >&6; } 4524 if test "${ac_cv_path_ECHO+set}" = set; then : 4525 $as_echo_n "(cached) " >&6 4526 else 4527 case $ECHO in 4528 [\\/]* | ?:[\\/]*) 4529 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path. 4530 ;; 4531 *) 4532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4533 for as_dir in $PATH 4534 do 4535 IFS=$as_save_IFS 4536 test -z "$as_dir" && as_dir=. 4537 for ac_exec_ext in '' $ac_executable_extensions; do 4538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4539 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" 4540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4541 break 2 4542 fi 4543 done 4544 done 4545 IFS=$as_save_IFS 4546 4547 ;; 4548 esac 4549 fi 4550 ECHO=$ac_cv_path_ECHO 4551 if test -n "$ECHO"; then 4552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5 4553 $as_echo "$ECHO" >&6; } 4554 else 4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4556 $as_echo "no" >&6; } 4557 fi 4558 4559 4560 test -n "$ECHO" && break 4561 done 4562 4563 4564 if test "x$ECHO" = x; then 4565 if test "xecho" = x; then 4566 PROG_NAME=echo 4567 else 4568 PROG_NAME=echo 4569 fi 4570 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4571 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4572 as_fn_error $? "Cannot continue" "$LINENO" 5 4573 fi 4574 4575 4576 4577 for ac_prog in expr 4578 do 4579 # Extract the first word of "$ac_prog", so it can be a program name with args. 4580 set dummy $ac_prog; ac_word=$2 4581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4582 $as_echo_n "checking for $ac_word... " >&6; } 4583 if test "${ac_cv_path_EXPR+set}" = set; then : 4584 $as_echo_n "(cached) " >&6 4585 else 4586 case $EXPR in 4587 [\\/]* | ?:[\\/]*) 4588 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path. 4589 ;; 4590 *) 4591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4592 for as_dir in $PATH 4593 do 4594 IFS=$as_save_IFS 4595 test -z "$as_dir" && as_dir=. 4596 for ac_exec_ext in '' $ac_executable_extensions; do 4597 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4598 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext" 4599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4600 break 2 4601 fi 4602 done 4603 done 4604 IFS=$as_save_IFS 4605 4606 ;; 4607 esac 4608 fi 4609 EXPR=$ac_cv_path_EXPR 4610 if test -n "$EXPR"; then 4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5 4612 $as_echo "$EXPR" >&6; } 4613 else 4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4615 $as_echo "no" >&6; } 4616 fi 4617 4618 4619 test -n "$EXPR" && break 4620 done 4621 4622 4623 if test "x$EXPR" = x; then 4624 if test "xexpr" = x; then 4625 PROG_NAME=expr 4626 else 4627 PROG_NAME=expr 4628 fi 4629 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4630 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4631 as_fn_error $? "Cannot continue" "$LINENO" 5 4632 fi 4633 4634 4635 4636 for ac_prog in file 4637 do 4638 # Extract the first word of "$ac_prog", so it can be a program name with args. 4639 set dummy $ac_prog; ac_word=$2 4640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4641 $as_echo_n "checking for $ac_word... " >&6; } 4642 if test "${ac_cv_path_FILE+set}" = set; then : 4643 $as_echo_n "(cached) " >&6 4644 else 4645 case $FILE in 4646 [\\/]* | ?:[\\/]*) 4647 ac_cv_path_FILE="$FILE" # Let the user override the test with a path. 4648 ;; 4649 *) 4650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4651 for as_dir in $PATH 4652 do 4653 IFS=$as_save_IFS 4654 test -z "$as_dir" && as_dir=. 4655 for ac_exec_ext in '' $ac_executable_extensions; do 4656 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4657 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext" 4658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4659 break 2 4660 fi 4661 done 4662 done 4663 IFS=$as_save_IFS 4664 4665 ;; 4666 esac 4667 fi 4668 FILE=$ac_cv_path_FILE 4669 if test -n "$FILE"; then 4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5 4671 $as_echo "$FILE" >&6; } 4672 else 4673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4674 $as_echo "no" >&6; } 4675 fi 4676 4677 4678 test -n "$FILE" && break 4679 done 4680 4681 4682 if test "x$FILE" = x; then 4683 if test "xfile" = x; then 4684 PROG_NAME=file 4685 else 4686 PROG_NAME=file 4687 fi 4688 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4689 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4690 as_fn_error $? "Cannot continue" "$LINENO" 5 4691 fi 4692 4693 4694 4695 for ac_prog in find 4696 do 4697 # Extract the first word of "$ac_prog", so it can be a program name with args. 4698 set dummy $ac_prog; ac_word=$2 4699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4700 $as_echo_n "checking for $ac_word... " >&6; } 4701 if test "${ac_cv_path_FIND+set}" = set; then : 4702 $as_echo_n "(cached) " >&6 4703 else 4704 case $FIND in 4705 [\\/]* | ?:[\\/]*) 4706 ac_cv_path_FIND="$FIND" # Let the user override the test with a path. 4707 ;; 4708 *) 4709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4710 for as_dir in $PATH 4711 do 4712 IFS=$as_save_IFS 4713 test -z "$as_dir" && as_dir=. 4714 for ac_exec_ext in '' $ac_executable_extensions; do 4715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4716 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" 4717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4718 break 2 4719 fi 4720 done 4721 done 4722 IFS=$as_save_IFS 4723 4724 ;; 4725 esac 4726 fi 4727 FIND=$ac_cv_path_FIND 4728 if test -n "$FIND"; then 4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 4730 $as_echo "$FIND" >&6; } 4731 else 4732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4733 $as_echo "no" >&6; } 4734 fi 4735 4736 4737 test -n "$FIND" && break 4738 done 4739 4740 4741 if test "x$FIND" = x; then 4742 if test "xfind" = x; then 4743 PROG_NAME=find 4744 else 4745 PROG_NAME=find 4746 fi 4747 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4748 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4749 as_fn_error $? "Cannot continue" "$LINENO" 5 4750 fi 4751 4752 4753 4754 for ac_prog in head 4755 do 4756 # Extract the first word of "$ac_prog", so it can be a program name with args. 4757 set dummy $ac_prog; ac_word=$2 4758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4759 $as_echo_n "checking for $ac_word... " >&6; } 4760 if test "${ac_cv_path_HEAD+set}" = set; then : 4761 $as_echo_n "(cached) " >&6 4762 else 4763 case $HEAD in 4764 [\\/]* | ?:[\\/]*) 4765 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path. 4766 ;; 4767 *) 4768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4769 for as_dir in $PATH 4770 do 4771 IFS=$as_save_IFS 4772 test -z "$as_dir" && as_dir=. 4773 for ac_exec_ext in '' $ac_executable_extensions; do 4774 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4775 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext" 4776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4777 break 2 4778 fi 4779 done 4780 done 4781 IFS=$as_save_IFS 4782 4783 ;; 4784 esac 4785 fi 4786 HEAD=$ac_cv_path_HEAD 4787 if test -n "$HEAD"; then 4788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5 4789 $as_echo "$HEAD" >&6; } 4790 else 4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4792 $as_echo "no" >&6; } 4793 fi 4794 4795 4796 test -n "$HEAD" && break 4797 done 4798 4799 4800 if test "x$HEAD" = x; then 4801 if test "xhead" = x; then 4802 PROG_NAME=head 4803 else 4804 PROG_NAME=head 4805 fi 4806 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4807 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4808 as_fn_error $? "Cannot continue" "$LINENO" 5 4809 fi 4810 4811 4812 4813 for ac_prog in ln 4814 do 4815 # Extract the first word of "$ac_prog", so it can be a program name with args. 4816 set dummy $ac_prog; ac_word=$2 4817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4818 $as_echo_n "checking for $ac_word... " >&6; } 4819 if test "${ac_cv_path_LN+set}" = set; then : 4820 $as_echo_n "(cached) " >&6 4821 else 4822 case $LN in 4823 [\\/]* | ?:[\\/]*) 4824 ac_cv_path_LN="$LN" # Let the user override the test with a path. 4825 ;; 4826 *) 4827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4828 for as_dir in $PATH 4829 do 4830 IFS=$as_save_IFS 4831 test -z "$as_dir" && as_dir=. 4832 for ac_exec_ext in '' $ac_executable_extensions; do 4833 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4834 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext" 4835 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4836 break 2 4837 fi 4838 done 4839 done 4840 IFS=$as_save_IFS 4841 4842 ;; 4843 esac 4844 fi 4845 LN=$ac_cv_path_LN 4846 if test -n "$LN"; then 4847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5 4848 $as_echo "$LN" >&6; } 4849 else 4850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4851 $as_echo "no" >&6; } 4852 fi 4853 4854 4855 test -n "$LN" && break 4856 done 4857 4858 4859 if test "x$LN" = x; then 4860 if test "xln" = x; then 4861 PROG_NAME=ln 4862 else 4863 PROG_NAME=ln 4864 fi 4865 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4866 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4867 as_fn_error $? "Cannot continue" "$LINENO" 5 4868 fi 4869 4870 4871 4872 for ac_prog in ls 4873 do 4874 # Extract the first word of "$ac_prog", so it can be a program name with args. 4875 set dummy $ac_prog; ac_word=$2 4876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4877 $as_echo_n "checking for $ac_word... " >&6; } 4878 if test "${ac_cv_path_LS+set}" = set; then : 4879 $as_echo_n "(cached) " >&6 4880 else 4881 case $LS in 4882 [\\/]* | ?:[\\/]*) 4883 ac_cv_path_LS="$LS" # Let the user override the test with a path. 4884 ;; 4885 *) 4886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4887 for as_dir in $PATH 4888 do 4889 IFS=$as_save_IFS 4890 test -z "$as_dir" && as_dir=. 4891 for ac_exec_ext in '' $ac_executable_extensions; do 4892 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4893 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext" 4894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4895 break 2 4896 fi 4897 done 4898 done 4899 IFS=$as_save_IFS 4900 4901 ;; 4902 esac 4903 fi 4904 LS=$ac_cv_path_LS 4905 if test -n "$LS"; then 4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5 4907 $as_echo "$LS" >&6; } 4908 else 4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4910 $as_echo "no" >&6; } 4911 fi 4912 4913 4914 test -n "$LS" && break 4915 done 4916 4917 4918 if test "x$LS" = x; then 4919 if test "xls" = x; then 4920 PROG_NAME=ls 4921 else 4922 PROG_NAME=ls 4923 fi 4924 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4925 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4926 as_fn_error $? "Cannot continue" "$LINENO" 5 4927 fi 4928 4929 4930 4931 for ac_prog in mkdir 4932 do 4933 # Extract the first word of "$ac_prog", so it can be a program name with args. 4934 set dummy $ac_prog; ac_word=$2 4935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4936 $as_echo_n "checking for $ac_word... " >&6; } 4937 if test "${ac_cv_path_MKDIR+set}" = set; then : 4938 $as_echo_n "(cached) " >&6 4939 else 4940 case $MKDIR in 4941 [\\/]* | ?:[\\/]*) 4942 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. 4943 ;; 4944 *) 4945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4946 for as_dir in $PATH 4947 do 4948 IFS=$as_save_IFS 4949 test -z "$as_dir" && as_dir=. 4950 for ac_exec_ext in '' $ac_executable_extensions; do 4951 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4952 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" 4953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4954 break 2 4955 fi 4956 done 4957 done 4958 IFS=$as_save_IFS 4959 4960 ;; 4961 esac 4962 fi 4963 MKDIR=$ac_cv_path_MKDIR 4964 if test -n "$MKDIR"; then 4965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 4966 $as_echo "$MKDIR" >&6; } 4967 else 4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4969 $as_echo "no" >&6; } 4970 fi 4971 4972 4973 test -n "$MKDIR" && break 4974 done 4975 4976 4977 if test "x$MKDIR" = x; then 4978 if test "xmkdir" = x; then 4979 PROG_NAME=mkdir 4980 else 4981 PROG_NAME=mkdir 4982 fi 4983 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4984 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4985 as_fn_error $? "Cannot continue" "$LINENO" 5 4986 fi 4987 4988 4989 4990 for ac_prog in mktemp 4991 do 4992 # Extract the first word of "$ac_prog", so it can be a program name with args. 4993 set dummy $ac_prog; ac_word=$2 4994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4995 $as_echo_n "checking for $ac_word... " >&6; } 4996 if test "${ac_cv_path_MKTEMP+set}" = set; then : 4997 $as_echo_n "(cached) " >&6 4998 else 4999 case $MKTEMP in 5000 [\\/]* | ?:[\\/]*) 5001 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path. 5002 ;; 5003 *) 5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5005 for as_dir in $PATH 5006 do 5007 IFS=$as_save_IFS 5008 test -z "$as_dir" && as_dir=. 5009 for ac_exec_ext in '' $ac_executable_extensions; do 5010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5011 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext" 5012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5013 break 2 5014 fi 5015 done 5016 done 5017 IFS=$as_save_IFS 5018 5019 ;; 5020 esac 5021 fi 5022 MKTEMP=$ac_cv_path_MKTEMP 5023 if test -n "$MKTEMP"; then 5024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5 5025 $as_echo "$MKTEMP" >&6; } 5026 else 5027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5028 $as_echo "no" >&6; } 5029 fi 5030 5031 5032 test -n "$MKTEMP" && break 5033 done 5034 5035 5036 if test "x$MKTEMP" = x; then 5037 if test "xmktemp" = x; then 5038 PROG_NAME=mktemp 5039 else 5040 PROG_NAME=mktemp 5041 fi 5042 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5043 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5044 as_fn_error $? "Cannot continue" "$LINENO" 5 5045 fi 5046 5047 5048 5049 for ac_prog in mv 5050 do 5051 # Extract the first word of "$ac_prog", so it can be a program name with args. 5052 set dummy $ac_prog; ac_word=$2 5053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5054 $as_echo_n "checking for $ac_word... " >&6; } 5055 if test "${ac_cv_path_MV+set}" = set; then : 5056 $as_echo_n "(cached) " >&6 5057 else 5058 case $MV in 5059 [\\/]* | ?:[\\/]*) 5060 ac_cv_path_MV="$MV" # Let the user override the test with a path. 5061 ;; 5062 *) 5063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5064 for as_dir in $PATH 5065 do 5066 IFS=$as_save_IFS 5067 test -z "$as_dir" && as_dir=. 5068 for ac_exec_ext in '' $ac_executable_extensions; do 5069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5070 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" 5071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5072 break 2 5073 fi 5074 done 5075 done 5076 IFS=$as_save_IFS 5077 5078 ;; 5079 esac 5080 fi 5081 MV=$ac_cv_path_MV 5082 if test -n "$MV"; then 5083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5 5084 $as_echo "$MV" >&6; } 5085 else 5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5087 $as_echo "no" >&6; } 5088 fi 5089 5090 5091 test -n "$MV" && break 5092 done 5093 5094 5095 if test "x$MV" = x; then 5096 if test "xmv" = x; then 5097 PROG_NAME=mv 5098 else 5099 PROG_NAME=mv 5100 fi 5101 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5102 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5103 as_fn_error $? "Cannot continue" "$LINENO" 5 5104 fi 5105 5106 5107 5108 for ac_prog in printf 5109 do 5110 # Extract the first word of "$ac_prog", so it can be a program name with args. 5111 set dummy $ac_prog; ac_word=$2 5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5113 $as_echo_n "checking for $ac_word... " >&6; } 5114 if test "${ac_cv_path_PRINTF+set}" = set; then : 5115 $as_echo_n "(cached) " >&6 5116 else 5117 case $PRINTF in 5118 [\\/]* | ?:[\\/]*) 5119 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path. 5120 ;; 5121 *) 5122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5123 for as_dir in $PATH 5124 do 5125 IFS=$as_save_IFS 5126 test -z "$as_dir" && as_dir=. 5127 for ac_exec_ext in '' $ac_executable_extensions; do 5128 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5129 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext" 5130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5131 break 2 5132 fi 5133 done 5134 done 5135 IFS=$as_save_IFS 5136 5137 ;; 5138 esac 5139 fi 5140 PRINTF=$ac_cv_path_PRINTF 5141 if test -n "$PRINTF"; then 5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5 5143 $as_echo "$PRINTF" >&6; } 5144 else 5145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5146 $as_echo "no" >&6; } 5147 fi 5148 5149 5150 test -n "$PRINTF" && break 5151 done 5152 5153 5154 if test "x$PRINTF" = x; then 5155 if test "xprintf" = x; then 5156 PROG_NAME=printf 5157 else 5158 PROG_NAME=printf 5159 fi 5160 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5161 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5162 as_fn_error $? "Cannot continue" "$LINENO" 5 5163 fi 5164 5165 5166 5167 for ac_prog in pwd 5168 do 5169 # Extract the first word of "$ac_prog", so it can be a program name with args. 5170 set dummy $ac_prog; ac_word=$2 5171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5172 $as_echo_n "checking for $ac_word... " >&6; } 5173 if test "${ac_cv_path_THEPWDCMD+set}" = set; then : 5174 $as_echo_n "(cached) " >&6 5175 else 5176 case $THEPWDCMD in 5177 [\\/]* | ?:[\\/]*) 5178 ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path. 5179 ;; 5180 *) 5181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5182 for as_dir in $PATH 5183 do 5184 IFS=$as_save_IFS 5185 test -z "$as_dir" && as_dir=. 5186 for ac_exec_ext in '' $ac_executable_extensions; do 5187 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5188 ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext" 5189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5190 break 2 5191 fi 5192 done 5193 done 5194 IFS=$as_save_IFS 5195 5196 ;; 5197 esac 5198 fi 5199 THEPWDCMD=$ac_cv_path_THEPWDCMD 5200 if test -n "$THEPWDCMD"; then 5201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5 5202 $as_echo "$THEPWDCMD" >&6; } 5203 else 5204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5205 $as_echo "no" >&6; } 5206 fi 5207 5208 5209 test -n "$THEPWDCMD" && break 5210 done 5211 5212 5213 if test "x$THEPWDCMD" = x; then 5214 if test "xpwd" = x; then 5215 PROG_NAME=thepwdcmd 5216 else 5217 PROG_NAME=pwd 5218 fi 5219 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5220 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5221 as_fn_error $? "Cannot continue" "$LINENO" 5 5222 fi 5223 5224 5225 5226 for ac_prog in rm 5227 do 5228 # Extract the first word of "$ac_prog", so it can be a program name with args. 5229 set dummy $ac_prog; ac_word=$2 5230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5231 $as_echo_n "checking for $ac_word... " >&6; } 5232 if test "${ac_cv_path_RM+set}" = set; then : 5233 $as_echo_n "(cached) " >&6 5234 else 5235 case $RM in 5236 [\\/]* | ?:[\\/]*) 5237 ac_cv_path_RM="$RM" # Let the user override the test with a path. 5238 ;; 5239 *) 5240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5241 for as_dir in $PATH 5242 do 5243 IFS=$as_save_IFS 5244 test -z "$as_dir" && as_dir=. 5245 for ac_exec_ext in '' $ac_executable_extensions; do 5246 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5247 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" 5248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5249 break 2 5250 fi 5251 done 5252 done 5253 IFS=$as_save_IFS 5254 5255 ;; 5256 esac 5257 fi 5258 RM=$ac_cv_path_RM 5259 if test -n "$RM"; then 5260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 5261 $as_echo "$RM" >&6; } 5262 else 5263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5264 $as_echo "no" >&6; } 5265 fi 5266 5267 5268 test -n "$RM" && break 5269 done 5270 5271 5272 if test "x$RM" = x; then 5273 if test "xrm" = x; then 5274 PROG_NAME=rm 5275 else 5276 PROG_NAME=rm 5277 fi 5278 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5279 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5280 as_fn_error $? "Cannot continue" "$LINENO" 5 5281 fi 5282 5283 5284 5285 for ac_prog in sh 5286 do 5287 # Extract the first word of "$ac_prog", so it can be a program name with args. 5288 set dummy $ac_prog; ac_word=$2 5289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5290 $as_echo_n "checking for $ac_word... " >&6; } 5291 if test "${ac_cv_path_SH+set}" = set; then : 5292 $as_echo_n "(cached) " >&6 5293 else 5294 case $SH in 5295 [\\/]* | ?:[\\/]*) 5296 ac_cv_path_SH="$SH" # Let the user override the test with a path. 5297 ;; 5298 *) 5299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5300 for as_dir in $PATH 5301 do 5302 IFS=$as_save_IFS 5303 test -z "$as_dir" && as_dir=. 5304 for ac_exec_ext in '' $ac_executable_extensions; do 5305 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5306 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" 5307 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5308 break 2 5309 fi 5310 done 5311 done 5312 IFS=$as_save_IFS 5313 5314 ;; 5315 esac 5316 fi 5317 SH=$ac_cv_path_SH 5318 if test -n "$SH"; then 5319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5 5320 $as_echo "$SH" >&6; } 5321 else 5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5323 $as_echo "no" >&6; } 5324 fi 5325 5326 5327 test -n "$SH" && break 5328 done 5329 5330 5331 if test "x$SH" = x; then 5332 if test "xsh" = x; then 5333 PROG_NAME=sh 5334 else 5335 PROG_NAME=sh 5336 fi 5337 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5338 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5339 as_fn_error $? "Cannot continue" "$LINENO" 5 5340 fi 5341 5342 5343 5344 for ac_prog in sort 5345 do 5346 # Extract the first word of "$ac_prog", so it can be a program name with args. 5347 set dummy $ac_prog; ac_word=$2 5348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5349 $as_echo_n "checking for $ac_word... " >&6; } 5350 if test "${ac_cv_path_SORT+set}" = set; then : 5351 $as_echo_n "(cached) " >&6 5352 else 5353 case $SORT in 5354 [\\/]* | ?:[\\/]*) 5355 ac_cv_path_SORT="$SORT" # Let the user override the test with a path. 5356 ;; 5357 *) 5358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5359 for as_dir in $PATH 5360 do 5361 IFS=$as_save_IFS 5362 test -z "$as_dir" && as_dir=. 5363 for ac_exec_ext in '' $ac_executable_extensions; do 5364 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5365 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext" 5366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5367 break 2 5368 fi 5369 done 5370 done 5371 IFS=$as_save_IFS 5372 5373 ;; 5374 esac 5375 fi 5376 SORT=$ac_cv_path_SORT 5377 if test -n "$SORT"; then 5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5 5379 $as_echo "$SORT" >&6; } 5380 else 5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5382 $as_echo "no" >&6; } 5383 fi 5384 5385 5386 test -n "$SORT" && break 5387 done 5388 5389 5390 if test "x$SORT" = x; then 5391 if test "xsort" = x; then 5392 PROG_NAME=sort 5393 else 5394 PROG_NAME=sort 5395 fi 5396 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5397 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5398 as_fn_error $? "Cannot continue" "$LINENO" 5 5399 fi 5400 5401 5402 5403 for ac_prog in tail 5404 do 5405 # Extract the first word of "$ac_prog", so it can be a program name with args. 5406 set dummy $ac_prog; ac_word=$2 5407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5408 $as_echo_n "checking for $ac_word... " >&6; } 5409 if test "${ac_cv_path_TAIL+set}" = set; then : 5410 $as_echo_n "(cached) " >&6 5411 else 5412 case $TAIL in 5413 [\\/]* | ?:[\\/]*) 5414 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path. 5415 ;; 5416 *) 5417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5418 for as_dir in $PATH 5419 do 5420 IFS=$as_save_IFS 5421 test -z "$as_dir" && as_dir=. 5422 for ac_exec_ext in '' $ac_executable_extensions; do 5423 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5424 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext" 5425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5426 break 2 5427 fi 5428 done 5429 done 5430 IFS=$as_save_IFS 5431 5432 ;; 5433 esac 5434 fi 5435 TAIL=$ac_cv_path_TAIL 5436 if test -n "$TAIL"; then 5437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5 5438 $as_echo "$TAIL" >&6; } 5439 else 5440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5441 $as_echo "no" >&6; } 5442 fi 5443 5444 5445 test -n "$TAIL" && break 5446 done 5447 5448 5449 if test "x$TAIL" = x; then 5450 if test "xtail" = x; then 5451 PROG_NAME=tail 5452 else 5453 PROG_NAME=tail 5454 fi 5455 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5456 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5457 as_fn_error $? "Cannot continue" "$LINENO" 5 5458 fi 5459 5460 5461 5462 for ac_prog in tar 5463 do 5464 # Extract the first word of "$ac_prog", so it can be a program name with args. 5465 set dummy $ac_prog; ac_word=$2 5466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5467 $as_echo_n "checking for $ac_word... " >&6; } 5468 if test "${ac_cv_path_TAR+set}" = set; then : 5469 $as_echo_n "(cached) " >&6 5470 else 5471 case $TAR in 5472 [\\/]* | ?:[\\/]*) 5473 ac_cv_path_TAR="$TAR" # Let the user override the test with a path. 5474 ;; 5475 *) 5476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5477 for as_dir in $PATH 5478 do 5479 IFS=$as_save_IFS 5480 test -z "$as_dir" && as_dir=. 5481 for ac_exec_ext in '' $ac_executable_extensions; do 5482 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5483 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" 5484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5485 break 2 5486 fi 5487 done 5488 done 5489 IFS=$as_save_IFS 5490 5491 ;; 5492 esac 5493 fi 5494 TAR=$ac_cv_path_TAR 5495 if test -n "$TAR"; then 5496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 5497 $as_echo "$TAR" >&6; } 5498 else 5499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5500 $as_echo "no" >&6; } 5501 fi 5502 5503 5504 test -n "$TAR" && break 5505 done 5506 5507 5508 if test "x$TAR" = x; then 5509 if test "xtar" = x; then 5510 PROG_NAME=tar 5511 else 5512 PROG_NAME=tar 5513 fi 5514 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5515 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5516 as_fn_error $? "Cannot continue" "$LINENO" 5 5517 fi 5518 5519 5520 5521 for ac_prog in tee 5522 do 5523 # Extract the first word of "$ac_prog", so it can be a program name with args. 5524 set dummy $ac_prog; ac_word=$2 5525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5526 $as_echo_n "checking for $ac_word... " >&6; } 5527 if test "${ac_cv_path_TEE+set}" = set; then : 5528 $as_echo_n "(cached) " >&6 5529 else 5530 case $TEE in 5531 [\\/]* | ?:[\\/]*) 5532 ac_cv_path_TEE="$TEE" # Let the user override the test with a path. 5533 ;; 5534 *) 5535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5536 for as_dir in $PATH 5537 do 5538 IFS=$as_save_IFS 5539 test -z "$as_dir" && as_dir=. 5540 for ac_exec_ext in '' $ac_executable_extensions; do 5541 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5542 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext" 5543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5544 break 2 5545 fi 5546 done 5547 done 5548 IFS=$as_save_IFS 5549 5550 ;; 5551 esac 5552 fi 5553 TEE=$ac_cv_path_TEE 5554 if test -n "$TEE"; then 5555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5 5556 $as_echo "$TEE" >&6; } 5557 else 5558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5559 $as_echo "no" >&6; } 5560 fi 5561 5562 5563 test -n "$TEE" && break 5564 done 5565 5566 5567 if test "x$TEE" = x; then 5568 if test "xtee" = x; then 5569 PROG_NAME=tee 5570 else 5571 PROG_NAME=tee 5572 fi 5573 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5574 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5575 as_fn_error $? "Cannot continue" "$LINENO" 5 5576 fi 5577 5578 5579 5580 for ac_prog in touch 5581 do 5582 # Extract the first word of "$ac_prog", so it can be a program name with args. 5583 set dummy $ac_prog; ac_word=$2 5584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5585 $as_echo_n "checking for $ac_word... " >&6; } 5586 if test "${ac_cv_path_TOUCH+set}" = set; then : 5587 $as_echo_n "(cached) " >&6 5588 else 5589 case $TOUCH in 5590 [\\/]* | ?:[\\/]*) 5591 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path. 5592 ;; 5593 *) 5594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5595 for as_dir in $PATH 5596 do 5597 IFS=$as_save_IFS 5598 test -z "$as_dir" && as_dir=. 5599 for ac_exec_ext in '' $ac_executable_extensions; do 5600 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5601 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext" 5602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5603 break 2 5604 fi 5605 done 5606 done 5607 IFS=$as_save_IFS 5608 5609 ;; 5610 esac 5611 fi 5612 TOUCH=$ac_cv_path_TOUCH 5613 if test -n "$TOUCH"; then 5614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5 5615 $as_echo "$TOUCH" >&6; } 5616 else 5617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5618 $as_echo "no" >&6; } 5619 fi 5620 5621 5622 test -n "$TOUCH" && break 5623 done 5624 5625 5626 if test "x$TOUCH" = x; then 5627 if test "xtouch" = x; then 5628 PROG_NAME=touch 5629 else 5630 PROG_NAME=touch 5631 fi 5632 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5633 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5634 as_fn_error $? "Cannot continue" "$LINENO" 5 5635 fi 5636 5637 5638 5639 for ac_prog in tr 5640 do 5641 # Extract the first word of "$ac_prog", so it can be a program name with args. 5642 set dummy $ac_prog; ac_word=$2 5643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5644 $as_echo_n "checking for $ac_word... " >&6; } 5645 if test "${ac_cv_path_TR+set}" = set; then : 5646 $as_echo_n "(cached) " >&6 5647 else 5648 case $TR in 5649 [\\/]* | ?:[\\/]*) 5650 ac_cv_path_TR="$TR" # Let the user override the test with a path. 5651 ;; 5652 *) 5653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5654 for as_dir in $PATH 5655 do 5656 IFS=$as_save_IFS 5657 test -z "$as_dir" && as_dir=. 5658 for ac_exec_ext in '' $ac_executable_extensions; do 5659 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5660 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" 5661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5662 break 2 5663 fi 5664 done 5665 done 5666 IFS=$as_save_IFS 5667 5668 ;; 5669 esac 5670 fi 5671 TR=$ac_cv_path_TR 5672 if test -n "$TR"; then 5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 5674 $as_echo "$TR" >&6; } 5675 else 5676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5677 $as_echo "no" >&6; } 5678 fi 5679 5680 5681 test -n "$TR" && break 5682 done 5683 5684 5685 if test "x$TR" = x; then 5686 if test "xtr" = x; then 5687 PROG_NAME=tr 5688 else 5689 PROG_NAME=tr 5690 fi 5691 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5692 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5693 as_fn_error $? "Cannot continue" "$LINENO" 5 5694 fi 5695 5696 5697 5698 for ac_prog in uname 5699 do 5700 # Extract the first word of "$ac_prog", so it can be a program name with args. 5701 set dummy $ac_prog; ac_word=$2 5702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5703 $as_echo_n "checking for $ac_word... " >&6; } 5704 if test "${ac_cv_path_UNAME+set}" = set; then : 5705 $as_echo_n "(cached) " >&6 5706 else 5707 case $UNAME in 5708 [\\/]* | ?:[\\/]*) 5709 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path. 5710 ;; 5711 *) 5712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5713 for as_dir in $PATH 5714 do 5715 IFS=$as_save_IFS 5716 test -z "$as_dir" && as_dir=. 5717 for ac_exec_ext in '' $ac_executable_extensions; do 5718 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5719 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext" 5720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5721 break 2 5722 fi 5723 done 5724 done 5725 IFS=$as_save_IFS 5726 5727 ;; 5728 esac 5729 fi 5730 UNAME=$ac_cv_path_UNAME 5731 if test -n "$UNAME"; then 5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5 5733 $as_echo "$UNAME" >&6; } 5734 else 5735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5736 $as_echo "no" >&6; } 5737 fi 5738 5739 5740 test -n "$UNAME" && break 5741 done 5742 5743 5744 if test "x$UNAME" = x; then 5745 if test "xuname" = x; then 5746 PROG_NAME=uname 5747 else 5748 PROG_NAME=uname 5749 fi 5750 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5751 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5752 as_fn_error $? "Cannot continue" "$LINENO" 5 5753 fi 5754 5755 5756 5757 for ac_prog in uniq 5758 do 5759 # Extract the first word of "$ac_prog", so it can be a program name with args. 5760 set dummy $ac_prog; ac_word=$2 5761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5762 $as_echo_n "checking for $ac_word... " >&6; } 5763 if test "${ac_cv_path_UNIQ+set}" = set; then : 5764 $as_echo_n "(cached) " >&6 5765 else 5766 case $UNIQ in 5767 [\\/]* | ?:[\\/]*) 5768 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path. 5769 ;; 5770 *) 5771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5772 for as_dir in $PATH 5773 do 5774 IFS=$as_save_IFS 5775 test -z "$as_dir" && as_dir=. 5776 for ac_exec_ext in '' $ac_executable_extensions; do 5777 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5778 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext" 5779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5780 break 2 5781 fi 5782 done 5783 done 5784 IFS=$as_save_IFS 5785 5786 ;; 5787 esac 5788 fi 5789 UNIQ=$ac_cv_path_UNIQ 5790 if test -n "$UNIQ"; then 5791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5 5792 $as_echo "$UNIQ" >&6; } 5793 else 5794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5795 $as_echo "no" >&6; } 5796 fi 5797 5798 5799 test -n "$UNIQ" && break 5800 done 5801 5802 5803 if test "x$UNIQ" = x; then 5804 if test "xuniq" = x; then 5805 PROG_NAME=uniq 5806 else 5807 PROG_NAME=uniq 5808 fi 5809 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5810 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5811 as_fn_error $? "Cannot continue" "$LINENO" 5 5812 fi 5813 5814 5815 5816 for ac_prog in wc 5817 do 5818 # Extract the first word of "$ac_prog", so it can be a program name with args. 5819 set dummy $ac_prog; ac_word=$2 5820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5821 $as_echo_n "checking for $ac_word... " >&6; } 5822 if test "${ac_cv_path_WC+set}" = set; then : 5823 $as_echo_n "(cached) " >&6 5824 else 5825 case $WC in 5826 [\\/]* | ?:[\\/]*) 5827 ac_cv_path_WC="$WC" # Let the user override the test with a path. 5828 ;; 5829 *) 5830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5831 for as_dir in $PATH 5832 do 5833 IFS=$as_save_IFS 5834 test -z "$as_dir" && as_dir=. 5835 for ac_exec_ext in '' $ac_executable_extensions; do 5836 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5837 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext" 5838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5839 break 2 5840 fi 5841 done 5842 done 5843 IFS=$as_save_IFS 5844 5845 ;; 5846 esac 5847 fi 5848 WC=$ac_cv_path_WC 5849 if test -n "$WC"; then 5850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5 5851 $as_echo "$WC" >&6; } 5852 else 5853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5854 $as_echo "no" >&6; } 5855 fi 5856 5857 5858 test -n "$WC" && break 5859 done 5860 5861 5862 if test "x$WC" = x; then 5863 if test "xwc" = x; then 5864 PROG_NAME=wc 5865 else 5866 PROG_NAME=wc 5867 fi 5868 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5869 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5870 as_fn_error $? "Cannot continue" "$LINENO" 5 5871 fi 5872 5873 5874 5875 for ac_prog in which 5876 do 5877 # Extract the first word of "$ac_prog", so it can be a program name with args. 5878 set dummy $ac_prog; ac_word=$2 5879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5880 $as_echo_n "checking for $ac_word... " >&6; } 5881 if test "${ac_cv_path_WHICH+set}" = set; then : 5882 $as_echo_n "(cached) " >&6 5883 else 5884 case $WHICH in 5885 [\\/]* | ?:[\\/]*) 5886 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path. 5887 ;; 5888 *) 5889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5890 for as_dir in $PATH 5891 do 5892 IFS=$as_save_IFS 5893 test -z "$as_dir" && as_dir=. 5894 for ac_exec_ext in '' $ac_executable_extensions; do 5895 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5896 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext" 5897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5898 break 2 5899 fi 5900 done 5901 done 5902 IFS=$as_save_IFS 5903 5904 ;; 5905 esac 5906 fi 5907 WHICH=$ac_cv_path_WHICH 5908 if test -n "$WHICH"; then 5909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5 5910 $as_echo "$WHICH" >&6; } 5911 else 5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5913 $as_echo "no" >&6; } 5914 fi 5915 5916 5917 test -n "$WHICH" && break 5918 done 5919 5920 5921 if test "x$WHICH" = x; then 5922 if test "xwhich" = x; then 5923 PROG_NAME=which 5924 else 5925 PROG_NAME=which 5926 fi 5927 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5928 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5929 as_fn_error $? "Cannot continue" "$LINENO" 5 5930 fi 5931 5932 5933 5934 for ac_prog in xargs 5935 do 5936 # Extract the first word of "$ac_prog", so it can be a program name with args. 5937 set dummy $ac_prog; ac_word=$2 5938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5939 $as_echo_n "checking for $ac_word... " >&6; } 5940 if test "${ac_cv_path_XARGS+set}" = set; then : 5941 $as_echo_n "(cached) " >&6 5942 else 5943 case $XARGS in 5944 [\\/]* | ?:[\\/]*) 5945 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path. 5946 ;; 5947 *) 5948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5949 for as_dir in $PATH 5950 do 5951 IFS=$as_save_IFS 5952 test -z "$as_dir" && as_dir=. 5953 for ac_exec_ext in '' $ac_executable_extensions; do 5954 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5955 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext" 5956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5957 break 2 5958 fi 5959 done 5960 done 5961 IFS=$as_save_IFS 5962 5963 ;; 5964 esac 5965 fi 5966 XARGS=$ac_cv_path_XARGS 5967 if test -n "$XARGS"; then 5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5 5969 $as_echo "$XARGS" >&6; } 5970 else 5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5972 $as_echo "no" >&6; } 5973 fi 5974 5975 5976 test -n "$XARGS" && break 5977 done 5978 5979 5980 if test "x$XARGS" = x; then 5981 if test "xxargs" = x; then 5982 PROG_NAME=xargs 5983 else 5984 PROG_NAME=xargs 5985 fi 5986 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5987 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5988 as_fn_error $? "Cannot continue" "$LINENO" 5 5989 fi 5990 5991 5992 5993 # Then required tools that require some special treatment. 5994 for ac_prog in gawk mawk nawk awk 5995 do 5996 # Extract the first word of "$ac_prog", so it can be a program name with args. 5997 set dummy $ac_prog; ac_word=$2 5998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5999 $as_echo_n "checking for $ac_word... " >&6; } 6000 if test "${ac_cv_prog_AWK+set}" = set; then : 6001 $as_echo_n "(cached) " >&6 6002 else 6003 if test -n "$AWK"; then 6004 ac_cv_prog_AWK="$AWK" # Let the user override the test. 6005 else 6006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6007 for as_dir in $PATH 6008 do 6009 IFS=$as_save_IFS 6010 test -z "$as_dir" && as_dir=. 6011 for ac_exec_ext in '' $ac_executable_extensions; do 6012 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6013 ac_cv_prog_AWK="$ac_prog" 6014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6015 break 2 6016 fi 6017 done 6018 done 6019 IFS=$as_save_IFS 6020 6021 fi 6022 fi 6023 AWK=$ac_cv_prog_AWK 6024 if test -n "$AWK"; then 6025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 6026 $as_echo "$AWK" >&6; } 6027 else 6028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6029 $as_echo "no" >&6; } 6030 fi 6031 6032 6033 test -n "$AWK" && break 6034 done 6035 6036 6037 if test "x$AWK" = x; then 6038 if test "x" = x; then 6039 PROG_NAME=awk 6040 else 6041 PROG_NAME= 6042 fi 6043 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6044 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6045 as_fn_error $? "Cannot continue" "$LINENO" 5 6046 fi 6047 6048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 6049 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } 6050 if test "${ac_cv_path_GREP+set}" = set; then : 6051 $as_echo_n "(cached) " >&6 6052 else 6053 if test -z "$GREP"; then 6054 ac_path_GREP_found=false 6055 # Loop through the user's path and test for each of PROGNAME-LIST 6056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6057 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6058 do 6059 IFS=$as_save_IFS 6060 test -z "$as_dir" && as_dir=. 6061 for ac_prog in grep ggrep; do 6062 for ac_exec_ext in '' $ac_executable_extensions; do 6063 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 6064 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue 6065 # Check for GNU ac_path_GREP and select it if it is found. 6066 # Check for GNU $ac_path_GREP 6067 case `"$ac_path_GREP" --version 2>&1` in 6068 *GNU*) 6069 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 6070 *) 6071 ac_count=0 6072 $as_echo_n 0123456789 >"conftest.in" 6073 while : 6074 do 6075 cat "conftest.in" "conftest.in" >"conftest.tmp" 6076 mv "conftest.tmp" "conftest.in" 6077 cp "conftest.in" "conftest.nl" 6078 $as_echo 'GREP' >> "conftest.nl" 6079 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6080 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6081 as_fn_arith $ac_count + 1 && ac_count=$as_val 6082 if test $ac_count -gt ${ac_path_GREP_max-0}; then 6083 # Best one so far, save it but keep looking for a better one 6084 ac_cv_path_GREP="$ac_path_GREP" 6085 ac_path_GREP_max=$ac_count 6086 fi 6087 # 10*(2^10) chars as input seems more than enough 6088 test $ac_count -gt 10 && break 6089 done 6090 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6091 esac 6092 6093 $ac_path_GREP_found && break 3 6094 done 6095 done 6096 done 6097 IFS=$as_save_IFS 6098 if test -z "$ac_cv_path_GREP"; then 6099 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6100 fi 6101 else 6102 ac_cv_path_GREP=$GREP 6103 fi 6104 6105 fi 6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 6107 $as_echo "$ac_cv_path_GREP" >&6; } 6108 GREP="$ac_cv_path_GREP" 6109 6110 6111 6112 if test "x$GREP" = x; then 6113 if test "x" = x; then 6114 PROG_NAME=grep 6115 else 6116 PROG_NAME= 6117 fi 6118 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6119 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6120 as_fn_error $? "Cannot continue" "$LINENO" 5 6121 fi 6122 6123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 6124 $as_echo_n "checking for egrep... " >&6; } 6125 if test "${ac_cv_path_EGREP+set}" = set; then : 6126 $as_echo_n "(cached) " >&6 6127 else 6128 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 6129 then ac_cv_path_EGREP="$GREP -E" 6130 else 6131 if test -z "$EGREP"; then 6132 ac_path_EGREP_found=false 6133 # Loop through the user's path and test for each of PROGNAME-LIST 6134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6135 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6136 do 6137 IFS=$as_save_IFS 6138 test -z "$as_dir" && as_dir=. 6139 for ac_prog in egrep; do 6140 for ac_exec_ext in '' $ac_executable_extensions; do 6141 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 6142 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue 6143 # Check for GNU ac_path_EGREP and select it if it is found. 6144 # Check for GNU $ac_path_EGREP 6145 case `"$ac_path_EGREP" --version 2>&1` in 6146 *GNU*) 6147 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 6148 *) 6149 ac_count=0 6150 $as_echo_n 0123456789 >"conftest.in" 6151 while : 6152 do 6153 cat "conftest.in" "conftest.in" >"conftest.tmp" 6154 mv "conftest.tmp" "conftest.in" 6155 cp "conftest.in" "conftest.nl" 6156 $as_echo 'EGREP' >> "conftest.nl" 6157 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6158 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6159 as_fn_arith $ac_count + 1 && ac_count=$as_val 6160 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 6161 # Best one so far, save it but keep looking for a better one 6162 ac_cv_path_EGREP="$ac_path_EGREP" 6163 ac_path_EGREP_max=$ac_count 6164 fi 6165 # 10*(2^10) chars as input seems more than enough 6166 test $ac_count -gt 10 && break 6167 done 6168 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6169 esac 6170 6171 $ac_path_EGREP_found && break 3 6172 done 6173 done 6174 done 6175 IFS=$as_save_IFS 6176 if test -z "$ac_cv_path_EGREP"; then 6177 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6178 fi 6179 else 6180 ac_cv_path_EGREP=$EGREP 6181 fi 6182 6183 fi 6184 fi 6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 6186 $as_echo "$ac_cv_path_EGREP" >&6; } 6187 EGREP="$ac_cv_path_EGREP" 6188 6189 6190 6191 if test "x$EGREP" = x; then 6192 if test "x" = x; then 6193 PROG_NAME=egrep 6194 else 6195 PROG_NAME= 6196 fi 6197 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6198 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6199 as_fn_error $? "Cannot continue" "$LINENO" 5 6200 fi 6201 6202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 6203 $as_echo_n "checking for fgrep... " >&6; } 6204 if test "${ac_cv_path_FGREP+set}" = set; then : 6205 $as_echo_n "(cached) " >&6 6206 else 6207 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 6208 then ac_cv_path_FGREP="$GREP -F" 6209 else 6210 if test -z "$FGREP"; then 6211 ac_path_FGREP_found=false 6212 # Loop through the user's path and test for each of PROGNAME-LIST 6213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6214 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6215 do 6216 IFS=$as_save_IFS 6217 test -z "$as_dir" && as_dir=. 6218 for ac_prog in fgrep; do 6219 for ac_exec_ext in '' $ac_executable_extensions; do 6220 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" 6221 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue 6222 # Check for GNU ac_path_FGREP and select it if it is found. 6223 # Check for GNU $ac_path_FGREP 6224 case `"$ac_path_FGREP" --version 2>&1` in 6225 *GNU*) 6226 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; 6227 *) 6228 ac_count=0 6229 $as_echo_n 0123456789 >"conftest.in" 6230 while : 6231 do 6232 cat "conftest.in" "conftest.in" >"conftest.tmp" 6233 mv "conftest.tmp" "conftest.in" 6234 cp "conftest.in" "conftest.nl" 6235 $as_echo 'FGREP' >> "conftest.nl" 6236 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break 6237 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6238 as_fn_arith $ac_count + 1 && ac_count=$as_val 6239 if test $ac_count -gt ${ac_path_FGREP_max-0}; then 6240 # Best one so far, save it but keep looking for a better one 6241 ac_cv_path_FGREP="$ac_path_FGREP" 6242 ac_path_FGREP_max=$ac_count 6243 fi 6244 # 10*(2^10) chars as input seems more than enough 6245 test $ac_count -gt 10 && break 6246 done 6247 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6248 esac 6249 6250 $ac_path_FGREP_found && break 3 6251 done 6252 done 6253 done 6254 IFS=$as_save_IFS 6255 if test -z "$ac_cv_path_FGREP"; then 6256 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6257 fi 6258 else 6259 ac_cv_path_FGREP=$FGREP 6260 fi 6261 6262 fi 6263 fi 6264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 6265 $as_echo "$ac_cv_path_FGREP" >&6; } 6266 FGREP="$ac_cv_path_FGREP" 6267 6268 6269 6270 if test "x$FGREP" = x; then 6271 if test "x" = x; then 6272 PROG_NAME=fgrep 6273 else 6274 PROG_NAME= 6275 fi 6276 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6277 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6278 as_fn_error $? "Cannot continue" "$LINENO" 5 6279 fi 6280 6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 6282 $as_echo_n "checking for a sed that does not truncate output... " >&6; } 6283 if test "${ac_cv_path_SED+set}" = set; then : 6284 $as_echo_n "(cached) " >&6 6285 else 6286 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ 6287 for ac_i in 1 2 3 4 5 6 7; do 6288 ac_script="$ac_script$as_nl$ac_script" 6289 done 6290 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed 6291 { ac_script=; unset ac_script;} 6292 if test -z "$SED"; then 6293 ac_path_SED_found=false 6294 # Loop through the user's path and test for each of PROGNAME-LIST 6295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6296 for as_dir in $PATH 6297 do 6298 IFS=$as_save_IFS 6299 test -z "$as_dir" && as_dir=. 6300 for ac_prog in sed gsed; do 6301 for ac_exec_ext in '' $ac_executable_extensions; do 6302 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" 6303 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue 6304 # Check for GNU ac_path_SED and select it if it is found. 6305 # Check for GNU $ac_path_SED 6306 case `"$ac_path_SED" --version 2>&1` in 6307 *GNU*) 6308 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; 6309 *) 6310 ac_count=0 6311 $as_echo_n 0123456789 >"conftest.in" 6312 while : 6313 do 6314 cat "conftest.in" "conftest.in" >"conftest.tmp" 6315 mv "conftest.tmp" "conftest.in" 6316 cp "conftest.in" "conftest.nl" 6317 $as_echo '' >> "conftest.nl" 6318 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break 6319 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6320 as_fn_arith $ac_count + 1 && ac_count=$as_val 6321 if test $ac_count -gt ${ac_path_SED_max-0}; then 6322 # Best one so far, save it but keep looking for a better one 6323 ac_cv_path_SED="$ac_path_SED" 6324 ac_path_SED_max=$ac_count 6325 fi 6326 # 10*(2^10) chars as input seems more than enough 6327 test $ac_count -gt 10 && break 6328 done 6329 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6330 esac 6331 6332 $ac_path_SED_found && break 3 6333 done 6334 done 6335 done 6336 IFS=$as_save_IFS 6337 if test -z "$ac_cv_path_SED"; then 6338 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 6339 fi 6340 else 6341 ac_cv_path_SED=$SED 6342 fi 6343 6344 fi 6345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 6346 $as_echo "$ac_cv_path_SED" >&6; } 6347 SED="$ac_cv_path_SED" 6348 rm -f conftest.sed 6349 6350 6351 if test "x$SED" = x; then 6352 if test "x" = x; then 6353 PROG_NAME=sed 6354 else 6355 PROG_NAME= 6356 fi 6357 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6358 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6359 as_fn_error $? "Cannot continue" "$LINENO" 5 6360 fi 6361 6362 6363 for ac_prog in nawk gawk awk 6364 do 6365 # Extract the first word of "$ac_prog", so it can be a program name with args. 6366 set dummy $ac_prog; ac_word=$2 6367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6368 $as_echo_n "checking for $ac_word... " >&6; } 6369 if test "${ac_cv_path_NAWK+set}" = set; then : 6370 $as_echo_n "(cached) " >&6 6371 else 6372 case $NAWK in 6373 [\\/]* | ?:[\\/]*) 6374 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path. 6375 ;; 6376 *) 6377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6378 for as_dir in $PATH 6379 do 6380 IFS=$as_save_IFS 6381 test -z "$as_dir" && as_dir=. 6382 for ac_exec_ext in '' $ac_executable_extensions; do 6383 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6384 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext" 6385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6386 break 2 6387 fi 6388 done 6389 done 6390 IFS=$as_save_IFS 6391 6392 ;; 6393 esac 6394 fi 6395 NAWK=$ac_cv_path_NAWK 6396 if test -n "$NAWK"; then 6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5 6398 $as_echo "$NAWK" >&6; } 6399 else 6400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6401 $as_echo "no" >&6; } 6402 fi 6403 6404 6405 test -n "$NAWK" && break 6406 done 6407 6408 6409 if test "x$NAWK" = x; then 6410 if test "x" = x; then 6411 PROG_NAME=nawk 6412 else 6413 PROG_NAME= 6414 fi 6415 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6416 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6417 as_fn_error $? "Cannot continue" "$LINENO" 5 6418 fi 6419 6420 6421 # Always force rm. 6422 RM="$RM -f" 6423 6424 # These are not required on all platforms 6425 # Extract the first word of "cygpath", so it can be a program name with args. 6426 set dummy cygpath; ac_word=$2 6427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6428 $as_echo_n "checking for $ac_word... " >&6; } 6429 if test "${ac_cv_path_CYGPATH+set}" = set; then : 6430 $as_echo_n "(cached) " >&6 6431 else 6432 case $CYGPATH in 6433 [\\/]* | ?:[\\/]*) 6434 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path. 6435 ;; 6436 *) 6437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6438 for as_dir in $PATH 6439 do 6440 IFS=$as_save_IFS 6441 test -z "$as_dir" && as_dir=. 6442 for ac_exec_ext in '' $ac_executable_extensions; do 6443 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6444 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext" 6445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6446 break 2 6447 fi 6448 done 6449 done 6450 IFS=$as_save_IFS 6451 6452 ;; 6453 esac 6454 fi 6455 CYGPATH=$ac_cv_path_CYGPATH 6456 if test -n "$CYGPATH"; then 6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 6458 $as_echo "$CYGPATH" >&6; } 6459 else 6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6461 $as_echo "no" >&6; } 6462 fi 6463 6464 6465 # Extract the first word of "readlink", so it can be a program name with args. 6466 set dummy readlink; ac_word=$2 6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6468 $as_echo_n "checking for $ac_word... " >&6; } 6469 if test "${ac_cv_path_READLINK+set}" = set; then : 6470 $as_echo_n "(cached) " >&6 6471 else 6472 case $READLINK in 6473 [\\/]* | ?:[\\/]*) 6474 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path. 6475 ;; 6476 *) 6477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6478 for as_dir in $PATH 6479 do 6480 IFS=$as_save_IFS 6481 test -z "$as_dir" && as_dir=. 6482 for ac_exec_ext in '' $ac_executable_extensions; do 6483 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6484 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext" 6485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6486 break 2 6487 fi 6488 done 6489 done 6490 IFS=$as_save_IFS 6491 6492 ;; 6493 esac 6494 fi 6495 READLINK=$ac_cv_path_READLINK 6496 if test -n "$READLINK"; then 6497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5 6498 $as_echo "$READLINK" >&6; } 6499 else 6500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6501 $as_echo "no" >&6; } 6502 fi 6503 6504 6505 # Extract the first word of "df", so it can be a program name with args. 6506 set dummy df; ac_word=$2 6507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6508 $as_echo_n "checking for $ac_word... " >&6; } 6509 if test "${ac_cv_path_DF+set}" = set; then : 6510 $as_echo_n "(cached) " >&6 6511 else 6512 case $DF in 6513 [\\/]* | ?:[\\/]*) 6514 ac_cv_path_DF="$DF" # Let the user override the test with a path. 6515 ;; 6516 *) 6517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6518 for as_dir in $PATH 6519 do 6520 IFS=$as_save_IFS 6521 test -z "$as_dir" && as_dir=. 6522 for ac_exec_ext in '' $ac_executable_extensions; do 6523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6524 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext" 6525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6526 break 2 6527 fi 6528 done 6529 done 6530 IFS=$as_save_IFS 6531 6532 ;; 6533 esac 6534 fi 6535 DF=$ac_cv_path_DF 6536 if test -n "$DF"; then 6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5 6538 $as_echo "$DF" >&6; } 6539 else 6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6541 $as_echo "no" >&6; } 6542 fi 6543 6544 6545 # Extract the first word of "SetFile", so it can be a program name with args. 6546 set dummy SetFile; ac_word=$2 6547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6548 $as_echo_n "checking for $ac_word... " >&6; } 6549 if test "${ac_cv_path_SETFILE+set}" = set; then : 6550 $as_echo_n "(cached) " >&6 6551 else 6552 case $SETFILE in 6553 [\\/]* | ?:[\\/]*) 6554 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path. 6555 ;; 6556 *) 6557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6558 for as_dir in $PATH 6559 do 6560 IFS=$as_save_IFS 6561 test -z "$as_dir" && as_dir=. 6562 for ac_exec_ext in '' $ac_executable_extensions; do 6563 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6564 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext" 6565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6566 break 2 6567 fi 6568 done 6569 done 6570 IFS=$as_save_IFS 6571 6572 ;; 6573 esac 6574 fi 6575 SETFILE=$ac_cv_path_SETFILE 6576 if test -n "$SETFILE"; then 6577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5 6578 $as_echo "$SETFILE" >&6; } 6579 else 6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6581 $as_echo "no" >&6; } 6582 fi 6583 6584 6585 6586 6587 # Now we can determine OpenJDK build and target platforms. This is required to 6588 # have early on. 6589 # Make sure we can run config.sub. 6590 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 6591 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 6592 6593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 6594 $as_echo_n "checking build system type... " >&6; } 6595 if test "${ac_cv_build+set}" = set; then : 6596 $as_echo_n "(cached) " >&6 6597 else 6598 ac_build_alias=$build_alias 6599 test "x$ac_build_alias" = x && 6600 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 6601 test "x$ac_build_alias" = x && 6602 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 6603 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 6604 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 6605 6606 fi 6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 6608 $as_echo "$ac_cv_build" >&6; } 6609 case $ac_cv_build in 6610 *-*-*) ;; 6611 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; 6612 esac 6613 build=$ac_cv_build 6614 ac_save_IFS=$IFS; IFS='-' 6615 set x $ac_cv_build 6616 shift 6617 build_cpu=$1 6618 build_vendor=$2 6619 shift; shift 6620 # Remember, the first character of IFS is used to create $*, 6621 # except with old shells: 6622 build_os=$* 6623 IFS=$ac_save_IFS 6624 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 6625 6626 6627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 6628 $as_echo_n "checking host system type... " >&6; } 6629 if test "${ac_cv_host+set}" = set; then : 6630 $as_echo_n "(cached) " >&6 6631 else 6632 if test "x$host_alias" = x; then 6633 ac_cv_host=$ac_cv_build 6634 else 6635 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 6636 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 6637 fi 6638 6639 fi 6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 6641 $as_echo "$ac_cv_host" >&6; } 6642 case $ac_cv_host in 6643 *-*-*) ;; 6644 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; 6645 esac 6646 host=$ac_cv_host 6647 ac_save_IFS=$IFS; IFS='-' 6648 set x $ac_cv_host 6649 shift 6650 host_cpu=$1 6651 host_vendor=$2 6652 shift; shift 6653 # Remember, the first character of IFS is used to create $*, 6654 # except with old shells: 6655 host_os=$* 6656 IFS=$ac_save_IFS 6657 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 6658 6659 6660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 6661 $as_echo_n "checking target system type... " >&6; } 6662 if test "${ac_cv_target+set}" = set; then : 6663 $as_echo_n "(cached) " >&6 6664 else 6665 if test "x$target_alias" = x; then 6666 ac_cv_target=$ac_cv_host 6667 else 6668 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || 6669 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 6670 fi 6671 6672 fi 6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 6674 $as_echo "$ac_cv_target" >&6; } 6675 case $ac_cv_target in 6676 *-*-*) ;; 6677 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;; 6678 esac 6679 target=$ac_cv_target 6680 ac_save_IFS=$IFS; IFS='-' 6681 set x $ac_cv_target 6682 shift 6683 target_cpu=$1 6684 target_vendor=$2 6685 shift; shift 6686 # Remember, the first character of IFS is used to create $*, 6687 # except with old shells: 6688 target_os=$* 6689 IFS=$ac_save_IFS 6690 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac 6691 6692 6693 # The aliases save the names the user supplied, while $host etc. 6694 # will get canonicalized. 6695 test -n "$target_alias" && 6696 test "$program_prefix$program_suffix$program_transform_name" = \ 6697 NONENONEs,x,x, && 6698 program_prefix=${target_alias}- 6699 6700 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" 6701 # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the 6702 # product you're building. The target of this build is called "host". Since this is confusing to most people, we 6703 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need 6704 # to use the configure naming style. 6705 6706 6707 6708 6709 6710 # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME 6711 # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME 6712 # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build, 6713 # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME. 6714 OPENJDK_TARGET_AUTOCONF_NAME="$host" 6715 OPENJDK_BUILD_AUTOCONF_NAME="$build" 6716 6717 6718 6719 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. 6720 6721 case "$build_os" in 6722 *linux*) 6723 VAR_OS=linux 6724 VAR_OS_API=posix 6725 VAR_OS_ENV=linux 6726 ;; 6727 *solaris*) 6728 VAR_OS=solaris 6729 VAR_OS_API=posix 6730 VAR_OS_ENV=solaris 6731 ;; 6732 *darwin*) 6733 VAR_OS=macosx 6734 VAR_OS_API=posix 6735 VAR_OS_ENV=macosx 6736 ;; 6737 *bsd*) 6738 VAR_OS=bsd 6739 VAR_OS_API=posix 6740 VAR_OS_ENV=bsd 6741 ;; 6742 *cygwin*) 6743 VAR_OS=windows 6744 VAR_OS_API=winapi 6745 VAR_OS_ENV=windows.cygwin 6746 ;; 6747 *mingw*) 6748 VAR_OS=windows 6749 VAR_OS_API=winapi 6750 VAR_OS_ENV=windows.msys 6751 ;; 6752 *) 6753 as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5 6754 ;; 6755 esac 6756 6757 6758 # First argument is the cpu name from the trip/quad 6759 case "$build_cpu" in 6760 x86_64) 6761 VAR_CPU=x86_64 6762 VAR_CPU_ARCH=x86 6763 VAR_CPU_BITS=64 6764 VAR_CPU_ENDIAN=little 6765 ;; 6766 i?86) 6767 VAR_CPU=x86 6768 VAR_CPU_ARCH=x86 6769 VAR_CPU_BITS=32 6770 VAR_CPU_ENDIAN=little 6771 ;; 6772 arm*) 6773 VAR_CPU=arm 6774 VAR_CPU_ARCH=arm 6775 VAR_CPU_BITS=32 6776 VAR_CPU_ENDIAN=little 6777 ;; 6778 powerpc) 6779 VAR_CPU=ppc 6780 VAR_CPU_ARCH=ppc 6781 VAR_CPU_BITS=32 6782 VAR_CPU_ENDIAN=big 6783 ;; 6784 powerpc64) 6785 VAR_CPU=ppc64 6786 VAR_CPU_ARCH=ppc 6787 VAR_CPU_BITS=64 6788 VAR_CPU_ENDIAN=big 6789 ;; 6790 sparc) 6791 VAR_CPU=sparc 6792 VAR_CPU_ARCH=sparc 6793 VAR_CPU_BITS=32 6794 VAR_CPU_ENDIAN=big 6795 ;; 6796 sparcv9) 6797 VAR_CPU=sparcv9 6798 VAR_CPU_ARCH=sparc 6799 VAR_CPU_BITS=64 6800 VAR_CPU_ENDIAN=big 6801 ;; 6802 *) 6803 as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5 6804 ;; 6805 esac 6806 6807 # ..and setup our own variables. (Do this explicitely to facilitate searching) 6808 OPENJDK_BUILD_OS="$VAR_OS" 6809 OPENJDK_BUILD_OS_API="$VAR_OS_API" 6810 OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV" 6811 OPENJDK_BUILD_CPU="$VAR_CPU" 6812 OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH" 6813 OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS" 6814 OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN" 6815 6816 6817 6818 6819 6820 6821 6822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5 6823 $as_echo_n "checking openjdk-build os-cpu... " >&6; } 6824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5 6825 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; } 6826 6827 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. 6828 6829 case "$host_os" in 6830 *linux*) 6831 VAR_OS=linux 6832 VAR_OS_API=posix 6833 VAR_OS_ENV=linux 6834 ;; 6835 *solaris*) 6836 VAR_OS=solaris 6837 VAR_OS_API=posix 6838 VAR_OS_ENV=solaris 6839 ;; 6840 *darwin*) 6841 VAR_OS=macosx 6842 VAR_OS_API=posix 6843 VAR_OS_ENV=macosx 6844 ;; 6845 *bsd*) 6846 VAR_OS=bsd 6847 VAR_OS_API=posix 6848 VAR_OS_ENV=bsd 6849 ;; 6850 *cygwin*) 6851 VAR_OS=windows 6852 VAR_OS_API=winapi 6853 VAR_OS_ENV=windows.cygwin 6854 ;; 6855 *mingw*) 6856 VAR_OS=windows 6857 VAR_OS_API=winapi 6858 VAR_OS_ENV=windows.msys 6859 ;; 6860 *) 6861 as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5 6862 ;; 6863 esac 6864 6865 6866 # First argument is the cpu name from the trip/quad 6867 case "$host_cpu" in 6868 x86_64) 6869 VAR_CPU=x86_64 6870 VAR_CPU_ARCH=x86 6871 VAR_CPU_BITS=64 6872 VAR_CPU_ENDIAN=little 6873 ;; 6874 i?86) 6875 VAR_CPU=x86 6876 VAR_CPU_ARCH=x86 6877 VAR_CPU_BITS=32 6878 VAR_CPU_ENDIAN=little 6879 ;; 6880 arm*) 6881 VAR_CPU=arm 6882 VAR_CPU_ARCH=arm 6883 VAR_CPU_BITS=32 6884 VAR_CPU_ENDIAN=little 6885 ;; 6886 powerpc) 6887 VAR_CPU=ppc 6888 VAR_CPU_ARCH=ppc 6889 VAR_CPU_BITS=32 6890 VAR_CPU_ENDIAN=big 6891 ;; 6892 powerpc64) 6893 VAR_CPU=ppc64 6894 VAR_CPU_ARCH=ppc 6895 VAR_CPU_BITS=64 6896 VAR_CPU_ENDIAN=big 6897 ;; 6898 sparc) 6899 VAR_CPU=sparc 6900 VAR_CPU_ARCH=sparc 6901 VAR_CPU_BITS=32 6902 VAR_CPU_ENDIAN=big 6903 ;; 6904 sparcv9) 6905 VAR_CPU=sparcv9 6906 VAR_CPU_ARCH=sparc 6907 VAR_CPU_BITS=64 6908 VAR_CPU_ENDIAN=big 6909 ;; 6910 *) 6911 as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5 6912 ;; 6913 esac 6914 6915 # ... and setup our own variables. (Do this explicitely to facilitate searching) 6916 OPENJDK_TARGET_OS="$VAR_OS" 6917 OPENJDK_TARGET_OS_API="$VAR_OS_API" 6918 OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV" 6919 OPENJDK_TARGET_CPU="$VAR_CPU" 6920 OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH" 6921 OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS" 6922 OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN" 6923 6924 6925 6926 6927 6928 6929 6930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5 6931 $as_echo_n "checking openjdk-target os-cpu... " >&6; } 6932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5 6933 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; } 6934 6935 6936 6937 # Check whether --with-target-bits was given. 6938 if test "${with_target_bits+set}" = set; then : 6939 withval=$with_target_bits; 6940 fi 6941 6942 6943 # We have three types of compiles: 6944 # native == normal compilation, target system == build system 6945 # cross == traditional cross compilation, target system != build system; special toolchain needed 6946 # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines 6947 # 6948 if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then 6949 # We're doing a proper cross-compilation 6950 COMPILE_TYPE="cross" 6951 else 6952 COMPILE_TYPE="native" 6953 fi 6954 6955 if test "x$with_target_bits" != x; then 6956 if test "x$COMPILE_TYPE" = "xcross"; then 6957 as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5 6958 fi 6959 6960 if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 6961 # A reduced build is requested 6962 COMPILE_TYPE="reduced" 6963 OPENJDK_TARGET_CPU_BITS=32 6964 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then 6965 OPENJDK_TARGET_CPU=x86 6966 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then 6967 OPENJDK_TARGET_CPU=sparc 6968 else 6969 as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5 6970 fi 6971 elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 6972 as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5 6973 elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then 6974 { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5 6975 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;} 6976 else 6977 as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5 6978 fi 6979 fi 6980 6981 6982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5 6983 $as_echo_n "checking compilation type... " >&6; } 6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5 6985 $as_echo "$COMPILE_TYPE" >&6; } 6986 6987 6988 if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 6989 REQUIRED_OS_NAME=SunOS 6990 REQUIRED_OS_VERSION=5.10 6991 fi 6992 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then 6993 REQUIRED_OS_NAME=Linux 6994 REQUIRED_OS_VERSION=2.6 6995 fi 6996 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 6997 REQUIRED_OS_NAME=Windows 6998 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 6999 REQUIRED_OS_VERSION=5.2 7000 else 7001 REQUIRED_OS_VERSION=5.1 7002 fi 7003 fi 7004 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 7005 REQUIRED_OS_NAME=Darwin 7006 REQUIRED_OS_VERSION=11.2 7007 fi 7008 7009 7010 7011 7012 7013 # Also store the legacy naming of the cpu. 7014 # Ie i586 and amd64 instead of x86 and x86_64 7015 OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU" 7016 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7017 OPENJDK_TARGET_CPU_LEGACY="i586" 7018 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7019 # On all platforms except MacOSX replace x86_64 with amd64. 7020 OPENJDK_TARGET_CPU_LEGACY="amd64" 7021 fi 7022 7023 7024 # And the second legacy naming of the cpu. 7025 # Ie i386 and amd64 instead of x86 and x86_64. 7026 OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU" 7027 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7028 OPENJDK_TARGET_CPU_LEGACY_LIB="i386" 7029 elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7030 OPENJDK_TARGET_CPU_LEGACY_LIB="amd64" 7031 fi 7032 7033 7034 # This is the name of the cpu (but using i386 and amd64 instead of 7035 # x86 and x86_64, respectively), preceeded by a /, to be used when 7036 # locating libraries. On macosx, it's empty, though. 7037 OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB" 7038 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 7039 OPENJDK_TARGET_CPU_LIBDIR="" 7040 fi 7041 7042 7043 # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to 7044 # /amd64 or /sparcv9. This string is appended to some library paths, like this: 7045 # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so 7046 OPENJDK_TARGET_CPU_ISADIR="" 7047 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 7048 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7049 OPENJDK_TARGET_CPU_ISADIR="/amd64" 7050 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then 7051 OPENJDK_TARGET_CPU_ISADIR="/sparcv9" 7052 fi 7053 fi 7054 7055 7056 # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property 7057 OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU" 7058 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then 7059 # On linux only, we replace x86 with i386. 7060 OPENJDK_TARGET_CPU_OSARCH="i386" 7061 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7062 # On all platforms except macosx, we replace x86_64 with amd64. 7063 OPENJDK_TARGET_CPU_OSARCH="amd64" 7064 fi 7065 7066 7067 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU" 7068 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7069 OPENJDK_TARGET_CPU_JLI="i386" 7070 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7071 # On all platforms except macosx, we replace x86_64 with amd64. 7072 OPENJDK_TARGET_CPU_JLI="amd64" 7073 fi 7074 # Now setup the -D flags for building libjli. 7075 OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'" 7076 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 7077 if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then 7078 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'" 7079 elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then 7080 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'" 7081 fi 7082 fi 7083 7084 7085 # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths. 7086 if test "x$OPENJDK_TARGET_OS_API" = xposix; then 7087 OPENJDK_TARGET_OS_API_DIR="solaris" 7088 fi 7089 if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then 7090 OPENJDK_TARGET_OS_API_DIR="windows" 7091 fi 7092 7093 7094 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7095 A_LP64="LP64:=" 7096 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in 7097 # unpack200.exe 7098 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then 7099 ADD_LP64="-D_LP64=1" 7100 fi 7101 fi 7102 LP64=$A_LP64 7103 7104 7105 if test "x$COMPILE_TYPE" = "xcross"; then 7106 # FIXME: ... or should this include reduced builds..? 7107 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY" 7108 else 7109 DEFINE_CROSS_COMPILE_ARCH="" 7110 fi 7111 7112 7113 # ZERO_ARCHDEF is used to enable architecture-specific code 7114 case "${OPENJDK_TARGET_CPU}" in 7115 ppc*) ZERO_ARCHDEF=PPC ;; 7116 s390*) ZERO_ARCHDEF=S390 ;; 7117 sparc*) ZERO_ARCHDEF=SPARC ;; 7118 x86_64*) ZERO_ARCHDEF=AMD64 ;; 7119 x86) ZERO_ARCHDEF=IA32 ;; 7120 *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z) 7121 esac 7122 7123 7124 7125 7126 7127 # Continue setting up basic stuff. Most remaining code require fundamental tools. 7128 7129 # Locate the directory of this script. 7130 SCRIPT="$0" 7131 7132 if test "x$OPENJDK_BUILD_OS" != xwindows; then 7133 # Follow a chain of symbolic links. Use readlink 7134 # where it exists, else fall back to horribly 7135 # complicated shell code. 7136 if test "x$READLINK_TESTED" != yes; then 7137 # On MacOSX there is a readlink tool with a different 7138 # purpose than the GNU readlink tool. Check the found readlink. 7139 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 7140 if test "x$ISGNU" = x; then 7141 # A readlink that we do not know how to use. 7142 # Are there other non-GNU readlinks out there? 7143 READLINK_TESTED=yes 7144 READLINK= 7145 fi 7146 fi 7147 7148 if test "x$READLINK" != x; then 7149 SCRIPT=`$READLINK -f $SCRIPT` 7150 else 7151 # Save the current directory for restoring afterwards 7152 STARTDIR=$PWD 7153 COUNTER=0 7154 sym_link_dir=`$DIRNAME $SCRIPT` 7155 sym_link_file=`$BASENAME $SCRIPT` 7156 # Use the system pwd and not the shell builtin to resolve directory symlinks 7157 cd $sym_link_dir 7158 cd `$THEPWDCMD` 7159 sym_link_dir=`$THEPWDCMD` 7160 # Resolve file symlinks 7161 while test $COUNTER -lt 20; do 7162 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 7163 if test "x$ISLINK" == x; then 7164 # This is not a symbolic link! We are done! 7165 break 7166 fi 7167 # Again resolve directory symlinks since the target of the just found 7168 # link could be in a different directory 7169 cd `$DIRNAME $ISLINK` 7170 sym_link_dir=`$THEPWDCMD` 7171 sym_link_file=`$BASENAME $ISLINK` 7172 let COUNTER=COUNTER+1 7173 done 7174 cd $STARTDIR 7175 SCRIPT=$sym_link_dir/$sym_link_file 7176 fi 7177 fi 7178 7179 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD` 7180 7181 # Where is the source? It is located two levels above the configure script. 7182 CURDIR="$PWD" 7183 cd "$AUTOCONF_DIR/../.." 7184 SRC_ROOT="`$THEPWDCMD`" 7185 7186 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 7187 PATH_SEP=";" 7188 7189 SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m` 7190 if test $SRC_ROOT_LENGTH -gt 100; then 7191 as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5 7192 fi 7193 7194 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5 7196 $as_echo_n "checking cygwin release... " >&6; } 7197 CYGWIN_VERSION=`$UNAME -r` 7198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5 7199 $as_echo "$CYGWIN_VERSION" >&6; } 7200 WINDOWS_ENV_VENDOR='cygwin' 7201 WINDOWS_ENV_VERSION="$CYGWIN_VERSION" 7202 7203 CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.` 7204 if test "x$CYGWIN_VERSION_OK" = x; then 7205 { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5 7206 $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;} 7207 as_fn_error $? "Cannot continue" "$LINENO" 5 7208 fi 7209 if test "x$CYGPATH" = x; then 7210 as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5 7211 fi 7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5 7213 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; } 7214 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away 7215 cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"` 7216 # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. 7217 CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` 7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5 7219 $as_echo "$CYGWIN_ROOT_PATH" >&6; } 7220 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" 7221 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` 7222 if test "x$test_cygdrive_prefix" = x; then 7223 as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5 7224 fi 7225 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5 7227 $as_echo_n "checking msys release... " >&6; } 7228 MSYS_VERSION=`$UNAME -r` 7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5 7230 $as_echo "$MSYS_VERSION" >&6; } 7231 7232 WINDOWS_ENV_VENDOR='msys' 7233 WINDOWS_ENV_VERSION="$MSYS_VERSION" 7234 7235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5 7236 $as_echo_n "checking msys root directory as unix-style path... " >&6; } 7237 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away 7238 MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"` 7239 7240 windows_path="$MSYS_ROOT_PATH" 7241 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7242 unix_path=`$CYGPATH -u "$windows_path"` 7243 MSYS_ROOT_PATH="$unix_path" 7244 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7245 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7246 MSYS_ROOT_PATH="$unix_path" 7247 fi 7248 7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5 7250 $as_echo "$MSYS_ROOT_PATH" >&6; } 7251 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH" 7252 else 7253 as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5 7254 fi 7255 7256 # Test if windows or unix (cygwin/msys) find is first in path. 7257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5 7258 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; } 7259 FIND_BINARY_OUTPUT=`find --version 2>&1` 7260 if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then 7261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5 7262 $as_echo "unix style" >&6; } 7263 elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then 7264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5 7265 $as_echo "Windows" >&6; } 7266 { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5 7267 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;} 7268 { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5 7269 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;} 7270 as_fn_error $? "Cannot continue" "$LINENO" 5 7271 else 7272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 7273 $as_echo "unknown" >&6; } 7274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5 7275 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;} 7276 fi 7277 7278 else 7279 PATH_SEP=":" 7280 fi 7281 7282 7283 7284 cd "$CURDIR" 7285 7286 7287 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7288 7289 # Input might be given as Windows format, start by converting to 7290 # unix format. 7291 path="$SRC_ROOT" 7292 new_path=`$CYGPATH -u "$path"` 7293 7294 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7295 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7296 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7297 # "foo.exe" is OK but "foo" is an error. 7298 # 7299 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7300 # It is also a way to make sure we got the proper file name for the real test later on. 7301 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7302 if test "x$test_shortpath" = x; then 7303 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7304 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7305 as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5 7306 fi 7307 7308 # Call helper function which possibly converts this using DOS-style short mode. 7309 # If so, the updated path is stored in $new_path. 7310 7311 input_path="$new_path" 7312 # Check if we need to convert this using DOS-style short mode. If the path 7313 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7314 # take no chances and rewrite it. 7315 # Note: m4 eats our [], so we need to use [ and ] instead. 7316 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7317 if test "x$has_forbidden_chars" != x; then 7318 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7319 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7320 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7321 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7322 # Going to short mode and back again did indeed matter. Since short mode is 7323 # case insensitive, let's make it lowercase to improve readability. 7324 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7325 # Now convert it back to Unix-stile (cygpath) 7326 input_path=`$CYGPATH -u "$shortmode_path"` 7327 new_path="$input_path" 7328 fi 7329 fi 7330 7331 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7332 if test "x$test_cygdrive_prefix" = x; then 7333 # As a simple fix, exclude /usr/bin since it's not a real path. 7334 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7335 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7336 # a path prefixed by /cygdrive for fixpath to work. 7337 new_path="$CYGWIN_ROOT_PATH$input_path" 7338 fi 7339 fi 7340 7341 7342 if test "x$path" != "x$new_path"; then 7343 SRC_ROOT="$new_path" 7344 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7345 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7346 fi 7347 7348 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7349 7350 path="$SRC_ROOT" 7351 has_colon=`$ECHO $path | $GREP ^.:` 7352 new_path="$path" 7353 if test "x$has_colon" = x; then 7354 # Not in mixed or Windows style, start by that. 7355 new_path=`cmd //c echo $path` 7356 fi 7357 7358 7359 input_path="$new_path" 7360 # Check if we need to convert this using DOS-style short mode. If the path 7361 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7362 # take no chances and rewrite it. 7363 # Note: m4 eats our [], so we need to use [ and ] instead. 7364 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7365 if test "x$has_forbidden_chars" != x; then 7366 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7367 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7368 fi 7369 7370 7371 windows_path="$new_path" 7372 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7373 unix_path=`$CYGPATH -u "$windows_path"` 7374 new_path="$unix_path" 7375 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7376 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7377 new_path="$unix_path" 7378 fi 7379 7380 if test "x$path" != "x$new_path"; then 7381 SRC_ROOT="$new_path" 7382 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7383 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7384 fi 7385 7386 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7387 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7388 7389 else 7390 # We're on a posix platform. Hooray! :) 7391 path="$SRC_ROOT" 7392 7393 if test ! -f "$path" && test ! -d "$path"; then 7394 as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 7395 fi 7396 7397 has_space=`$ECHO "$path" | $GREP " "` 7398 if test "x$has_space" != x; then 7399 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7400 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7401 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7402 fi 7403 fi 7404 7405 7406 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7407 7408 # Input might be given as Windows format, start by converting to 7409 # unix format. 7410 path="$CURDIR" 7411 new_path=`$CYGPATH -u "$path"` 7412 7413 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7414 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7415 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7416 # "foo.exe" is OK but "foo" is an error. 7417 # 7418 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7419 # It is also a way to make sure we got the proper file name for the real test later on. 7420 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7421 if test "x$test_shortpath" = x; then 7422 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7423 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7424 as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5 7425 fi 7426 7427 # Call helper function which possibly converts this using DOS-style short mode. 7428 # If so, the updated path is stored in $new_path. 7429 7430 input_path="$new_path" 7431 # Check if we need to convert this using DOS-style short mode. If the path 7432 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7433 # take no chances and rewrite it. 7434 # Note: m4 eats our [], so we need to use [ and ] instead. 7435 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7436 if test "x$has_forbidden_chars" != x; then 7437 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7438 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7439 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7440 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7441 # Going to short mode and back again did indeed matter. Since short mode is 7442 # case insensitive, let's make it lowercase to improve readability. 7443 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7444 # Now convert it back to Unix-stile (cygpath) 7445 input_path=`$CYGPATH -u "$shortmode_path"` 7446 new_path="$input_path" 7447 fi 7448 fi 7449 7450 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7451 if test "x$test_cygdrive_prefix" = x; then 7452 # As a simple fix, exclude /usr/bin since it's not a real path. 7453 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7454 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7455 # a path prefixed by /cygdrive for fixpath to work. 7456 new_path="$CYGWIN_ROOT_PATH$input_path" 7457 fi 7458 fi 7459 7460 7461 if test "x$path" != "x$new_path"; then 7462 CURDIR="$new_path" 7463 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7464 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7465 fi 7466 7467 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7468 7469 path="$CURDIR" 7470 has_colon=`$ECHO $path | $GREP ^.:` 7471 new_path="$path" 7472 if test "x$has_colon" = x; then 7473 # Not in mixed or Windows style, start by that. 7474 new_path=`cmd //c echo $path` 7475 fi 7476 7477 7478 input_path="$new_path" 7479 # Check if we need to convert this using DOS-style short mode. If the path 7480 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7481 # take no chances and rewrite it. 7482 # Note: m4 eats our [], so we need to use [ and ] instead. 7483 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7484 if test "x$has_forbidden_chars" != x; then 7485 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7486 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7487 fi 7488 7489 7490 windows_path="$new_path" 7491 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7492 unix_path=`$CYGPATH -u "$windows_path"` 7493 new_path="$unix_path" 7494 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7495 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7496 new_path="$unix_path" 7497 fi 7498 7499 if test "x$path" != "x$new_path"; then 7500 CURDIR="$new_path" 7501 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7502 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7503 fi 7504 7505 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7506 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7507 7508 else 7509 # We're on a posix platform. Hooray! :) 7510 path="$CURDIR" 7511 7512 if test ! -f "$path" && test ! -d "$path"; then 7513 as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5 7514 fi 7515 7516 has_space=`$ECHO "$path" | $GREP " "` 7517 if test "x$has_space" != x; then 7518 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7519 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7520 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7521 fi 7522 fi 7523 7524 7525 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then 7526 # Add extra search paths on solaris for utilities like ar and as etc... 7527 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" 7528 fi 7529 7530 # You can force the sys-root if the sys-root encoded into the cross compiler tools 7531 # is not correct. 7532 7533 # Check whether --with-sys-root was given. 7534 if test "${with_sys_root+set}" = set; then : 7535 withval=$with_sys_root; 7536 fi 7537 7538 7539 if test "x$with_sys_root" != x; then 7540 SYS_ROOT=$with_sys_root 7541 else 7542 SYS_ROOT=/ 7543 fi 7544 7545 7546 7547 # Check whether --with-tools-dir was given. 7548 if test "${with_tools_dir+set}" = set; then : 7549 withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir 7550 fi 7551 7552 7553 7554 # Check whether --with-devkit was given. 7555 if test "${with_devkit+set}" = set; then : 7556 withval=$with_devkit; 7557 if test "x$with_sys_root" != x; then 7558 as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5 7559 fi 7560 if test "x$with_tools_dir" != x; then 7561 as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5 7562 fi 7563 TOOLS_DIR=$with_devkit/bin 7564 SYS_ROOT=$with_devkit/$host_alias/libc 7565 7566 fi 7567 7568 7569 7570 7571 # Setup default logging of stdout and stderr to build.log in the output root. 7572 BUILD_LOG='$(OUTPUT_ROOT)/build.log' 7573 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old' 7574 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)' 7575 7576 7577 7578 7579 7580 # Check if it's a pure open build or if custom sources are to be used. 7581 7582 # Check whether --enable-openjdk-only was given. 7583 if test "${enable_openjdk_only+set}" = set; then : 7584 enableval=$enable_openjdk_only; 7585 else 7586 enable_openjdk_only="no" 7587 fi 7588 7589 7590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5 7591 $as_echo_n "checking for presence of closed sources... " >&6; } 7592 if test -d "$SRC_ROOT/jdk/src/closed"; then 7593 CLOSED_SOURCE_PRESENT=yes 7594 else 7595 CLOSED_SOURCE_PRESENT=no 7596 fi 7597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5 7598 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; } 7599 7600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5 7601 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; } 7602 SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only" 7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5 7604 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; } 7605 7606 if test "x$CLOSED_SOURCE_PRESENT" = xno; then 7607 OPENJDK=true 7608 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 7609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5 7610 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;} 7611 fi 7612 else 7613 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 7614 OPENJDK=true 7615 else 7616 OPENJDK=false 7617 fi 7618 fi 7619 7620 if test "x$OPENJDK" = "xtrue"; then 7621 SET_OPENJDK="OPENJDK=true" 7622 fi 7623 7624 7625 7626 7627 # These are needed to be able to create a configuration name (and thus the output directory) 7628 7629 ############################################################################### 7630 # 7631 # Check which variant of the JDK that we want to build. 7632 # Currently we have: 7633 # normal: standard edition 7634 # but the custom make system may add other variants 7635 # 7636 # Effectively the JDK variant gives a name to a specific set of 7637 # modules to compile into the JDK. In the future, these modules 7638 # might even be Jigsaw modules. 7639 # 7640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5 7641 $as_echo_n "checking which variant of the JDK to build... " >&6; } 7642 7643 # Check whether --with-jdk-variant was given. 7644 if test "${with_jdk_variant+set}" = set; then : 7645 withval=$with_jdk_variant; 7646 fi 7647 7648 7649 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then 7650 JDK_VARIANT="normal" 7651 else 7652 as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5 7653 fi 7654 7655 7656 7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5 7658 $as_echo "$JDK_VARIANT" >&6; } 7659 7660 7661 7662 ############################################################################### 7663 # 7664 # Check which variants of the JVM that we want to build. 7665 # Currently we have: 7666 # server: normal interpreter and a tiered C1/C2 compiler 7667 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) 7668 # minimal1: reduced form of client with optional VM services and features stripped out 7669 # kernel: kernel footprint JVM that passes the TCK without major performance problems, 7670 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc 7671 # zero: no machine code interpreter, no compiler 7672 # zeroshark: zero interpreter and shark/llvm compiler backend 7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5 7674 $as_echo_n "checking which variants of the JVM to build... " >&6; } 7675 7676 # Check whether --with-jvm-variants was given. 7677 if test "${with_jvm_variants+set}" = set; then : 7678 withval=$with_jvm_variants; 7679 fi 7680 7681 7682 if test "x$with_jvm_variants" = x; then 7683 with_jvm_variants="server" 7684 fi 7685 7686 JVM_VARIANTS=",$with_jvm_variants," 7687 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` 7688 7689 if test "x$TEST_VARIANTS" != "x,"; then 7690 as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5 7691 fi 7692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5 7693 $as_echo "$with_jvm_variants" >&6; } 7694 7695 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` 7696 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 7697 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'` 7698 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` 7699 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` 7700 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` 7701 7702 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 7703 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7704 as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5 7705 fi 7706 fi 7707 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 7708 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7709 as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5 7710 fi 7711 fi 7712 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 7713 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7714 as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5 7715 fi 7716 fi 7717 7718 # Replace the commas with AND for use in the build directory name. 7719 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` 7720 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` 7721 if test "x$COUNT_VARIANTS" != "x,1"; then 7722 BUILDING_MULTIPLE_JVM_VARIANTS=yes 7723 else 7724 BUILDING_MULTIPLE_JVM_VARIANTS=no 7725 fi 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 INCLUDE_SA=true 7736 if test "x$JVM_VARIANT_ZERO" = xtrue ; then 7737 INCLUDE_SA=false 7738 fi 7739 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then 7740 INCLUDE_SA=false 7741 fi 7742 7743 7744 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 7745 MACOSX_UNIVERSAL="true" 7746 fi 7747 7748 7749 7750 7751 7752 ############################################################################### 7753 # 7754 # Set the debug level 7755 # release: no debug information, all optimizations, no asserts. 7756 # fastdebug: debug information (-g), all optimizations, all asserts 7757 # slowdebug: debug information (-g), no optimizations, all asserts 7758 # 7759 DEBUG_LEVEL="release" 7760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5 7761 $as_echo_n "checking which debug level to use... " >&6; } 7762 # Check whether --enable-debug was given. 7763 if test "${enable_debug+set}" = set; then : 7764 enableval=$enable_debug; 7765 ENABLE_DEBUG="${enableval}" 7766 DEBUG_LEVEL="fastdebug" 7767 7768 else 7769 ENABLE_DEBUG="no" 7770 fi 7771 7772 7773 7774 # Check whether --with-debug-level was given. 7775 if test "${with_debug_level+set}" = set; then : 7776 withval=$with_debug_level; 7777 DEBUG_LEVEL="${withval}" 7778 if test "x$ENABLE_DEBUG" = xyes; then 7779 as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5 7780 fi 7781 7782 fi 7783 7784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5 7785 $as_echo "$DEBUG_LEVEL" >&6; } 7786 7787 if test "x$DEBUG_LEVEL" != xrelease && \ 7788 test "x$DEBUG_LEVEL" != xfastdebug && \ 7789 test "x$DEBUG_LEVEL" != xslowdebug; then 7790 as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5 7791 fi 7792 7793 7794 ############################################################################### 7795 # 7796 # Setup legacy vars/targets and new vars to deal with different debug levels. 7797 # 7798 7799 case $DEBUG_LEVEL in 7800 release ) 7801 VARIANT="OPT" 7802 FASTDEBUG="false" 7803 DEBUG_CLASSFILES="false" 7804 BUILD_VARIANT_RELEASE="" 7805 HOTSPOT_DEBUG_LEVEL="product" 7806 HOTSPOT_EXPORT="product" 7807 ;; 7808 fastdebug ) 7809 VARIANT="DBG" 7810 FASTDEBUG="true" 7811 DEBUG_CLASSFILES="true" 7812 BUILD_VARIANT_RELEASE="-fastdebug" 7813 HOTSPOT_DEBUG_LEVEL="fastdebug" 7814 HOTSPOT_EXPORT="fastdebug" 7815 ;; 7816 slowdebug ) 7817 VARIANT="DBG" 7818 FASTDEBUG="false" 7819 DEBUG_CLASSFILES="true" 7820 BUILD_VARIANT_RELEASE="-debug" 7821 HOTSPOT_DEBUG_LEVEL="jvmg" 7822 HOTSPOT_EXPORT="debug" 7823 ;; 7824 esac 7825 7826 ##### 7827 # Generate the legacy makefile targets for hotspot. 7828 # The hotspot api for selecting the build artifacts, really, needs to be improved. 7829 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to 7830 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc 7831 # But until then ... 7832 HOTSPOT_TARGET="" 7833 7834 if test "x$JVM_VARIANT_SERVER" = xtrue; then 7835 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " 7836 fi 7837 7838 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 7839 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " 7840 fi 7841 7842 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 7843 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " 7844 fi 7845 7846 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 7847 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " 7848 fi 7849 7850 if test "x$JVM_VARIANT_ZERO" = xtrue; then 7851 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " 7852 fi 7853 7854 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 7855 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " 7856 fi 7857 7858 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" 7859 7860 # On Macosx universal binaries are produced, but they only contain 7861 # 64 bit intel. This invalidates control of which jvms are built 7862 # from configure, but only server is valid anyway. Fix this 7863 # when hotspot makefiles are rewritten. 7864 if test "x$MACOSX_UNIVERSAL" = xtrue; then 7865 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} 7866 fi 7867 7868 ##### 7869 7870 7871 7872 7873 7874 7875 7876 7877 # With basic setup done, call the custom early hook. 7878 7879 7880 # To properly create a configuration name, we need to have the OpenJDK target 7881 # and options (variants and debug level) parsed. 7882 7883 7884 7885 # Check whether --with-conf-name was given. 7886 if test "${with_conf_name+set}" = set; then : 7887 withval=$with_conf_name; CONF_NAME=${with_conf_name} 7888 fi 7889 7890 7891 # Test from where we are running configure, in or outside of src root. 7892 # To enable comparison of directories, CURDIR needs to be symlink free 7893 # just like SRC_ROOT already is 7894 NOSYM_CURDIR="$CURDIR" 7895 7896 if test "x$OPENJDK_BUILD_OS" != xwindows; then 7897 # Follow a chain of symbolic links. Use readlink 7898 # where it exists, else fall back to horribly 7899 # complicated shell code. 7900 if test "x$READLINK_TESTED" != yes; then 7901 # On MacOSX there is a readlink tool with a different 7902 # purpose than the GNU readlink tool. Check the found readlink. 7903 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 7904 if test "x$ISGNU" = x; then 7905 # A readlink that we do not know how to use. 7906 # Are there other non-GNU readlinks out there? 7907 READLINK_TESTED=yes 7908 READLINK= 7909 fi 7910 fi 7911 7912 if test "x$READLINK" != x; then 7913 NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR` 7914 else 7915 # Save the current directory for restoring afterwards 7916 STARTDIR=$PWD 7917 COUNTER=0 7918 sym_link_dir=`$DIRNAME $NOSYM_CURDIR` 7919 sym_link_file=`$BASENAME $NOSYM_CURDIR` 7920 # Use the system pwd and not the shell builtin to resolve directory symlinks 7921 cd $sym_link_dir 7922 cd `$THEPWDCMD` 7923 sym_link_dir=`$THEPWDCMD` 7924 # Resolve file symlinks 7925 while test $COUNTER -lt 20; do 7926 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 7927 if test "x$ISLINK" == x; then 7928 # This is not a symbolic link! We are done! 7929 break 7930 fi 7931 # Again resolve directory symlinks since the target of the just found 7932 # link could be in a different directory 7933 cd `$DIRNAME $ISLINK` 7934 sym_link_dir=`$THEPWDCMD` 7935 sym_link_file=`$BASENAME $ISLINK` 7936 let COUNTER=COUNTER+1 7937 done 7938 cd $STARTDIR 7939 NOSYM_CURDIR=$sym_link_dir/$sym_link_file 7940 fi 7941 fi 7942 7943 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \ 7944 || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \ 7945 || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then 7946 # We are running configure from the src root. 7947 # Create a default ./build/target-variant-debuglevel output root. 7948 if test "x${CONF_NAME}" = x; then 7949 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 7950 fi 7951 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 7952 $MKDIR -p "$OUTPUT_ROOT" 7953 if test ! -d "$OUTPUT_ROOT"; then 7954 as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5 7955 fi 7956 else 7957 # We are running configure from outside of the src dir. 7958 # Then use the current directory as output dir! 7959 # If configuration is situated in normal build directory, just use the build 7960 # directory name as configuration name, otherwise use the complete path. 7961 if test "x${CONF_NAME}" = x; then 7962 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 7963 fi 7964 OUTPUT_ROOT="$CURDIR" 7965 7966 # WARNING: This might be a bad thing to do. You need to be sure you want to 7967 # have a configuration in this directory. Do some sanity checks! 7968 7969 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then 7970 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for 7971 # other files 7972 files_present=`$LS $OUTPUT_ROOT` 7973 # Configure has already touched config.log and confdefs.h in the current dir when this check 7974 # is performed. 7975 filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \ 7976 | $TR -d '\n'` 7977 if test "x$filtered_files" != x; then 7978 { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5 7979 $as_echo "$as_me: Current directory is $CURDIR." >&6;} 7980 { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5 7981 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;} 7982 { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5 7983 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;} 7984 { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5 7985 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;} 7986 { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5 7987 $as_echo "$as_me: seriously mess up just about everything." >&6;} 7988 { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5 7989 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;} 7990 { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5 7991 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;} 7992 as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5 7993 fi 7994 fi 7995 fi 7996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5 7997 $as_echo_n "checking what configuration name to use... " >&6; } 7998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5 7999 $as_echo "$CONF_NAME" >&6; } 8000 8001 8002 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8003 8004 # Input might be given as Windows format, start by converting to 8005 # unix format. 8006 path="$OUTPUT_ROOT" 8007 new_path=`$CYGPATH -u "$path"` 8008 8009 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8010 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8011 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8012 # "foo.exe" is OK but "foo" is an error. 8013 # 8014 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8015 # It is also a way to make sure we got the proper file name for the real test later on. 8016 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8017 if test "x$test_shortpath" = x; then 8018 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5 8019 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;} 8020 as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5 8021 fi 8022 8023 # Call helper function which possibly converts this using DOS-style short mode. 8024 # If so, the updated path is stored in $new_path. 8025 8026 input_path="$new_path" 8027 # Check if we need to convert this using DOS-style short mode. If the path 8028 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8029 # take no chances and rewrite it. 8030 # Note: m4 eats our [], so we need to use [ and ] instead. 8031 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8032 if test "x$has_forbidden_chars" != x; then 8033 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8034 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8035 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8036 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8037 # Going to short mode and back again did indeed matter. Since short mode is 8038 # case insensitive, let's make it lowercase to improve readability. 8039 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8040 # Now convert it back to Unix-stile (cygpath) 8041 input_path=`$CYGPATH -u "$shortmode_path"` 8042 new_path="$input_path" 8043 fi 8044 fi 8045 8046 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8047 if test "x$test_cygdrive_prefix" = x; then 8048 # As a simple fix, exclude /usr/bin since it's not a real path. 8049 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 8050 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8051 # a path prefixed by /cygdrive for fixpath to work. 8052 new_path="$CYGWIN_ROOT_PATH$input_path" 8053 fi 8054 fi 8055 8056 8057 if test "x$path" != "x$new_path"; then 8058 OUTPUT_ROOT="$new_path" 8059 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5 8060 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;} 8061 fi 8062 8063 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8064 8065 path="$OUTPUT_ROOT" 8066 has_colon=`$ECHO $path | $GREP ^.:` 8067 new_path="$path" 8068 if test "x$has_colon" = x; then 8069 # Not in mixed or Windows style, start by that. 8070 new_path=`cmd //c echo $path` 8071 fi 8072 8073 8074 input_path="$new_path" 8075 # Check if we need to convert this using DOS-style short mode. If the path 8076 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8077 # take no chances and rewrite it. 8078 # Note: m4 eats our [], so we need to use [ and ] instead. 8079 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8080 if test "x$has_forbidden_chars" != x; then 8081 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8082 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8083 fi 8084 8085 8086 windows_path="$new_path" 8087 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8088 unix_path=`$CYGPATH -u "$windows_path"` 8089 new_path="$unix_path" 8090 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8091 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8092 new_path="$unix_path" 8093 fi 8094 8095 if test "x$path" != "x$new_path"; then 8096 OUTPUT_ROOT="$new_path" 8097 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5 8098 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;} 8099 fi 8100 8101 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8102 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8103 8104 else 8105 # We're on a posix platform. Hooray! :) 8106 path="$OUTPUT_ROOT" 8107 8108 if test ! -f "$path" && test ! -d "$path"; then 8109 as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 8110 fi 8111 8112 has_space=`$ECHO "$path" | $GREP " "` 8113 if test "x$has_space" != x; then 8114 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5 8115 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;} 8116 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 8117 fi 8118 fi 8119 8120 8121 SPEC=$OUTPUT_ROOT/spec.gmk 8122 8123 CONF_NAME=$CONF_NAME 8124 8125 OUTPUT_ROOT=$OUTPUT_ROOT 8126 8127 8128 # Most of the probed defines are put into config.h 8129 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" 8130 8131 # The spec.gmk file contains all variables for the make system. 8132 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" 8133 8134 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system. 8135 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" 8136 8137 # The bootcycle-spec.gmk file contains support for boot cycle builds. 8138 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" 8139 8140 # The compare.sh is used to compare the build output to other builds. 8141 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" 8142 8143 # Spec.sh is currently used by compare-objects.sh 8144 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" 8145 8146 # The generated Makefile knows where the spec.gmk is and where the source is. 8147 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile 8148 # which will look for generated configurations 8149 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" 8150 8151 8152 # Save the arguments given to us 8153 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments 8154 8155 8156 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY. 8157 8158 for ac_prog in apt-get yum port pkgutil pkgadd 8159 do 8160 # Extract the first word of "$ac_prog", so it can be a program name with args. 8161 set dummy $ac_prog; ac_word=$2 8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8163 $as_echo_n "checking for $ac_word... " >&6; } 8164 if test "${ac_cv_prog_PKGHANDLER+set}" = set; then : 8165 $as_echo_n "(cached) " >&6 8166 else 8167 if test -n "$PKGHANDLER"; then 8168 ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test. 8169 else 8170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8171 for as_dir in $PATH 8172 do 8173 IFS=$as_save_IFS 8174 test -z "$as_dir" && as_dir=. 8175 for ac_exec_ext in '' $ac_executable_extensions; do 8176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8177 ac_cv_prog_PKGHANDLER="$ac_prog" 8178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8179 break 2 8180 fi 8181 done 8182 done 8183 IFS=$as_save_IFS 8184 8185 fi 8186 fi 8187 PKGHANDLER=$ac_cv_prog_PKGHANDLER 8188 if test -n "$PKGHANDLER"; then 8189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5 8190 $as_echo "$PKGHANDLER" >&6; } 8191 else 8192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8193 $as_echo "no" >&6; } 8194 fi 8195 8196 8197 test -n "$PKGHANDLER" && break 8198 done 8199 8200 8201 8202 # Setup tools that requires more complex handling, or that is not needed by the configure script. 8203 8204 8205 # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky. 8206 if test "x$MAKE" != x; then 8207 # User has supplied a make, test it. 8208 if test ! -f "$MAKE"; then 8209 as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5 8210 fi 8211 8212 MAKE_CANDIDATE=""$MAKE"" 8213 DESCRIPTION="user supplied MAKE=$MAKE" 8214 if test "x$MAKE_CANDIDATE" != x; then 8215 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8216 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8217 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8218 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8219 if test "x$IS_GNU_MAKE" = x; then 8220 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8221 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8222 else 8223 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8224 if test "x$IS_MODERN_MAKE" = x; then 8225 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 8226 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 8227 else 8228 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8229 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8230 MAKE_EXPECTED_ENV='cygwin' 8231 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8232 MAKE_EXPECTED_ENV='msys' 8233 else 8234 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8235 fi 8236 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8237 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8238 else 8239 # Not relevant for non-Windows 8240 IS_MAKE_CORRECT_ENV=true 8241 fi 8242 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8243 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 8244 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 8245 else 8246 FOUND_MAKE=$MAKE_CANDIDATE 8247 8248 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8249 8250 # First separate the path from the arguments. This will split at the first 8251 # space. 8252 complete="$FOUND_MAKE" 8253 path="${complete%% *}" 8254 tmp="$complete EOL" 8255 arguments="${tmp#* }" 8256 8257 # Input might be given as Windows format, start by converting to 8258 # unix format. 8259 new_path=`$CYGPATH -u "$path"` 8260 8261 # Now try to locate executable using which 8262 new_path=`$WHICH "$new_path" 2> /dev/null` 8263 # bat and cmd files are not always considered executable in cygwin causing which 8264 # to not find them 8265 if test "x$new_path" = x \ 8266 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8267 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8268 new_path=`$CYGPATH -u "$path"` 8269 fi 8270 if test "x$new_path" = x; then 8271 # Oops. Which didn't find the executable. 8272 # The splitting of arguments from the executable at a space might have been incorrect, 8273 # since paths with space are more likely in Windows. Give it another try with the whole 8274 # argument. 8275 path="$complete" 8276 arguments="EOL" 8277 new_path=`$CYGPATH -u "$path"` 8278 new_path=`$WHICH "$new_path" 2> /dev/null` 8279 # bat and cmd files are not always considered executable in cygwin causing which 8280 # to not find them 8281 if test "x$new_path" = x \ 8282 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8283 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8284 new_path=`$CYGPATH -u "$path"` 8285 fi 8286 if test "x$new_path" = x; then 8287 # It's still not found. Now this is an unrecoverable error. 8288 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8289 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8290 has_space=`$ECHO "$complete" | $GREP " "` 8291 if test "x$has_space" != x; then 8292 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8294 fi 8295 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8296 fi 8297 fi 8298 8299 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8300 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8301 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8302 # "foo.exe" is OK but "foo" is an error. 8303 # 8304 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8305 # It is also a way to make sure we got the proper file name for the real test later on. 8306 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8307 if test "x$test_shortpath" = x; then 8308 # Short path failed, file does not exist as specified. 8309 # Try adding .exe or .cmd 8310 if test -f "${new_path}.exe"; then 8311 input_to_shortpath="${new_path}.exe" 8312 elif test -f "${new_path}.cmd"; then 8313 input_to_shortpath="${new_path}.cmd" 8314 else 8315 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8316 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8317 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8319 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8320 fi 8321 else 8322 input_to_shortpath="$new_path" 8323 fi 8324 8325 # Call helper function which possibly converts this using DOS-style short mode. 8326 # If so, the updated path is stored in $new_path. 8327 new_path="$input_to_shortpath" 8328 8329 input_path="$input_to_shortpath" 8330 # Check if we need to convert this using DOS-style short mode. If the path 8331 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8332 # take no chances and rewrite it. 8333 # Note: m4 eats our [], so we need to use [ and ] instead. 8334 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8335 if test "x$has_forbidden_chars" != x; then 8336 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8337 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8338 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8339 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8340 # Going to short mode and back again did indeed matter. Since short mode is 8341 # case insensitive, let's make it lowercase to improve readability. 8342 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8343 # Now convert it back to Unix-stile (cygpath) 8344 input_path=`$CYGPATH -u "$shortmode_path"` 8345 new_path="$input_path" 8346 fi 8347 fi 8348 8349 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8350 if test "x$test_cygdrive_prefix" = x; then 8351 # As a simple fix, exclude /usr/bin since it's not a real path. 8352 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8353 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8354 # a path prefixed by /cygdrive for fixpath to work. 8355 new_path="$CYGWIN_ROOT_PATH$input_path" 8356 fi 8357 fi 8358 8359 # remove trailing .exe if any 8360 new_path="${new_path/%.exe/}" 8361 8362 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8363 8364 # First separate the path from the arguments. This will split at the first 8365 # space. 8366 complete="$FOUND_MAKE" 8367 path="${complete%% *}" 8368 tmp="$complete EOL" 8369 arguments="${tmp#* }" 8370 8371 # Input might be given as Windows format, start by converting to 8372 # unix format. 8373 new_path="$path" 8374 8375 windows_path="$new_path" 8376 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8377 unix_path=`$CYGPATH -u "$windows_path"` 8378 new_path="$unix_path" 8379 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8380 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8381 new_path="$unix_path" 8382 fi 8383 8384 8385 # Now try to locate executable using which 8386 new_path=`$WHICH "$new_path" 2> /dev/null` 8387 8388 if test "x$new_path" = x; then 8389 # Oops. Which didn't find the executable. 8390 # The splitting of arguments from the executable at a space might have been incorrect, 8391 # since paths with space are more likely in Windows. Give it another try with the whole 8392 # argument. 8393 path="$complete" 8394 arguments="EOL" 8395 new_path="$path" 8396 8397 windows_path="$new_path" 8398 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8399 unix_path=`$CYGPATH -u "$windows_path"` 8400 new_path="$unix_path" 8401 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8402 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8403 new_path="$unix_path" 8404 fi 8405 8406 8407 new_path=`$WHICH "$new_path" 2> /dev/null` 8408 8409 if test "x$new_path" = x; then 8410 # It's still not found. Now this is an unrecoverable error. 8411 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8412 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8413 has_space=`$ECHO "$complete" | $GREP " "` 8414 if test "x$has_space" != x; then 8415 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8417 fi 8418 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8419 fi 8420 fi 8421 8422 # Now new_path has a complete unix path to the binary 8423 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 8424 # Keep paths in /bin as-is, but remove trailing .exe if any 8425 new_path="${new_path/%.exe/}" 8426 # Do not save /bin paths to all_fixpath_prefixes! 8427 else 8428 # Not in mixed or Windows style, start by that. 8429 new_path=`cmd //c echo $new_path` 8430 8431 input_path="$new_path" 8432 # Check if we need to convert this using DOS-style short mode. If the path 8433 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8434 # take no chances and rewrite it. 8435 # Note: m4 eats our [], so we need to use [ and ] instead. 8436 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8437 if test "x$has_forbidden_chars" != x; then 8438 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8439 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8440 fi 8441 8442 # Output is in $new_path 8443 8444 windows_path="$new_path" 8445 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8446 unix_path=`$CYGPATH -u "$windows_path"` 8447 new_path="$unix_path" 8448 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8449 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8450 new_path="$unix_path" 8451 fi 8452 8453 # remove trailing .exe if any 8454 new_path="${new_path/%.exe/}" 8455 8456 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8457 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8458 fi 8459 8460 else 8461 # We're on a posix platform. Hooray! :) 8462 # First separate the path from the arguments. This will split at the first 8463 # space. 8464 complete="$FOUND_MAKE" 8465 path="${complete%% *}" 8466 tmp="$complete EOL" 8467 arguments="${tmp#* }" 8468 8469 # Cannot rely on the command "which" here since it doesn't always work. 8470 is_absolute_path=`$ECHO "$path" | $GREP ^/` 8471 if test -z "$is_absolute_path"; then 8472 # Path to executable is not absolute. Find it. 8473 IFS_save="$IFS" 8474 IFS=: 8475 for p in $PATH; do 8476 if test -f "$p/$path" && test -x "$p/$path"; then 8477 new_path="$p/$path" 8478 break 8479 fi 8480 done 8481 IFS="$IFS_save" 8482 else 8483 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 8484 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 8485 new_path="$path" 8486 fi 8487 8488 if test "x$new_path" = x; then 8489 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8490 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8491 has_space=`$ECHO "$complete" | $GREP " "` 8492 if test "x$has_space" != x; then 8493 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 8494 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 8495 fi 8496 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8497 fi 8498 fi 8499 8500 # Now join together the path and the arguments once again 8501 if test "x$arguments" != xEOL; then 8502 new_complete="$new_path ${arguments% *}" 8503 else 8504 new_complete="$new_path" 8505 fi 8506 8507 if test "x$complete" != "x$new_complete"; then 8508 FOUND_MAKE="$new_complete" 8509 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 8510 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 8511 fi 8512 8513 fi 8514 fi 8515 fi 8516 fi 8517 8518 if test "x$FOUND_MAKE" = x; then 8519 as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5 8520 fi 8521 else 8522 # Try our hardest to locate a correct version of GNU make 8523 for ac_prog in gmake 8524 do 8525 # Extract the first word of "$ac_prog", so it can be a program name with args. 8526 set dummy $ac_prog; ac_word=$2 8527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8528 $as_echo_n "checking for $ac_word... " >&6; } 8529 if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then : 8530 $as_echo_n "(cached) " >&6 8531 else 8532 case $CHECK_GMAKE in 8533 [\\/]* | ?:[\\/]*) 8534 ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path. 8535 ;; 8536 *) 8537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8538 for as_dir in $PATH 8539 do 8540 IFS=$as_save_IFS 8541 test -z "$as_dir" && as_dir=. 8542 for ac_exec_ext in '' $ac_executable_extensions; do 8543 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8544 ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext" 8545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8546 break 2 8547 fi 8548 done 8549 done 8550 IFS=$as_save_IFS 8551 8552 ;; 8553 esac 8554 fi 8555 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE 8556 if test -n "$CHECK_GMAKE"; then 8557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5 8558 $as_echo "$CHECK_GMAKE" >&6; } 8559 else 8560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8561 $as_echo "no" >&6; } 8562 fi 8563 8564 8565 test -n "$CHECK_GMAKE" && break 8566 done 8567 8568 8569 MAKE_CANDIDATE=""$CHECK_GMAKE"" 8570 DESCRIPTION="gmake in PATH" 8571 if test "x$MAKE_CANDIDATE" != x; then 8572 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8573 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8574 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8575 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8576 if test "x$IS_GNU_MAKE" = x; then 8577 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8578 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8579 else 8580 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8581 if test "x$IS_MODERN_MAKE" = x; then 8582 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 8583 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 8584 else 8585 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8586 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8587 MAKE_EXPECTED_ENV='cygwin' 8588 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8589 MAKE_EXPECTED_ENV='msys' 8590 else 8591 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8592 fi 8593 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8594 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8595 else 8596 # Not relevant for non-Windows 8597 IS_MAKE_CORRECT_ENV=true 8598 fi 8599 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8600 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 8601 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 8602 else 8603 FOUND_MAKE=$MAKE_CANDIDATE 8604 8605 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8606 8607 # First separate the path from the arguments. This will split at the first 8608 # space. 8609 complete="$FOUND_MAKE" 8610 path="${complete%% *}" 8611 tmp="$complete EOL" 8612 arguments="${tmp#* }" 8613 8614 # Input might be given as Windows format, start by converting to 8615 # unix format. 8616 new_path=`$CYGPATH -u "$path"` 8617 8618 # Now try to locate executable using which 8619 new_path=`$WHICH "$new_path" 2> /dev/null` 8620 # bat and cmd files are not always considered executable in cygwin causing which 8621 # to not find them 8622 if test "x$new_path" = x \ 8623 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8624 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8625 new_path=`$CYGPATH -u "$path"` 8626 fi 8627 if test "x$new_path" = x; then 8628 # Oops. Which didn't find the executable. 8629 # The splitting of arguments from the executable at a space might have been incorrect, 8630 # since paths with space are more likely in Windows. Give it another try with the whole 8631 # argument. 8632 path="$complete" 8633 arguments="EOL" 8634 new_path=`$CYGPATH -u "$path"` 8635 new_path=`$WHICH "$new_path" 2> /dev/null` 8636 # bat and cmd files are not always considered executable in cygwin causing which 8637 # to not find them 8638 if test "x$new_path" = x \ 8639 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8640 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8641 new_path=`$CYGPATH -u "$path"` 8642 fi 8643 if test "x$new_path" = x; then 8644 # It's still not found. Now this is an unrecoverable error. 8645 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8646 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8647 has_space=`$ECHO "$complete" | $GREP " "` 8648 if test "x$has_space" != x; then 8649 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8650 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8651 fi 8652 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8653 fi 8654 fi 8655 8656 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8657 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8658 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8659 # "foo.exe" is OK but "foo" is an error. 8660 # 8661 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8662 # It is also a way to make sure we got the proper file name for the real test later on. 8663 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8664 if test "x$test_shortpath" = x; then 8665 # Short path failed, file does not exist as specified. 8666 # Try adding .exe or .cmd 8667 if test -f "${new_path}.exe"; then 8668 input_to_shortpath="${new_path}.exe" 8669 elif test -f "${new_path}.cmd"; then 8670 input_to_shortpath="${new_path}.cmd" 8671 else 8672 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8673 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8674 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8675 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8676 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8677 fi 8678 else 8679 input_to_shortpath="$new_path" 8680 fi 8681 8682 # Call helper function which possibly converts this using DOS-style short mode. 8683 # If so, the updated path is stored in $new_path. 8684 new_path="$input_to_shortpath" 8685 8686 input_path="$input_to_shortpath" 8687 # Check if we need to convert this using DOS-style short mode. If the path 8688 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8689 # take no chances and rewrite it. 8690 # Note: m4 eats our [], so we need to use [ and ] instead. 8691 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8692 if test "x$has_forbidden_chars" != x; then 8693 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8694 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8695 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8696 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8697 # Going to short mode and back again did indeed matter. Since short mode is 8698 # case insensitive, let's make it lowercase to improve readability. 8699 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8700 # Now convert it back to Unix-stile (cygpath) 8701 input_path=`$CYGPATH -u "$shortmode_path"` 8702 new_path="$input_path" 8703 fi 8704 fi 8705 8706 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8707 if test "x$test_cygdrive_prefix" = x; then 8708 # As a simple fix, exclude /usr/bin since it's not a real path. 8709 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8710 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8711 # a path prefixed by /cygdrive for fixpath to work. 8712 new_path="$CYGWIN_ROOT_PATH$input_path" 8713 fi 8714 fi 8715 8716 # remove trailing .exe if any 8717 new_path="${new_path/%.exe/}" 8718 8719 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8720 8721 # First separate the path from the arguments. This will split at the first 8722 # space. 8723 complete="$FOUND_MAKE" 8724 path="${complete%% *}" 8725 tmp="$complete EOL" 8726 arguments="${tmp#* }" 8727 8728 # Input might be given as Windows format, start by converting to 8729 # unix format. 8730 new_path="$path" 8731 8732 windows_path="$new_path" 8733 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8734 unix_path=`$CYGPATH -u "$windows_path"` 8735 new_path="$unix_path" 8736 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8737 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8738 new_path="$unix_path" 8739 fi 8740 8741 8742 # Now try to locate executable using which 8743 new_path=`$WHICH "$new_path" 2> /dev/null` 8744 8745 if test "x$new_path" = x; then 8746 # Oops. Which didn't find the executable. 8747 # The splitting of arguments from the executable at a space might have been incorrect, 8748 # since paths with space are more likely in Windows. Give it another try with the whole 8749 # argument. 8750 path="$complete" 8751 arguments="EOL" 8752 new_path="$path" 8753 8754 windows_path="$new_path" 8755 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8756 unix_path=`$CYGPATH -u "$windows_path"` 8757 new_path="$unix_path" 8758 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8759 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8760 new_path="$unix_path" 8761 fi 8762 8763 8764 new_path=`$WHICH "$new_path" 2> /dev/null` 8765 8766 if test "x$new_path" = x; then 8767 # It's still not found. Now this is an unrecoverable error. 8768 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8769 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8770 has_space=`$ECHO "$complete" | $GREP " "` 8771 if test "x$has_space" != x; then 8772 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8773 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8774 fi 8775 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8776 fi 8777 fi 8778 8779 # Now new_path has a complete unix path to the binary 8780 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 8781 # Keep paths in /bin as-is, but remove trailing .exe if any 8782 new_path="${new_path/%.exe/}" 8783 # Do not save /bin paths to all_fixpath_prefixes! 8784 else 8785 # Not in mixed or Windows style, start by that. 8786 new_path=`cmd //c echo $new_path` 8787 8788 input_path="$new_path" 8789 # Check if we need to convert this using DOS-style short mode. If the path 8790 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8791 # take no chances and rewrite it. 8792 # Note: m4 eats our [], so we need to use [ and ] instead. 8793 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8794 if test "x$has_forbidden_chars" != x; then 8795 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8796 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8797 fi 8798 8799 # Output is in $new_path 8800 8801 windows_path="$new_path" 8802 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8803 unix_path=`$CYGPATH -u "$windows_path"` 8804 new_path="$unix_path" 8805 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8806 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8807 new_path="$unix_path" 8808 fi 8809 8810 # remove trailing .exe if any 8811 new_path="${new_path/%.exe/}" 8812 8813 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8814 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8815 fi 8816 8817 else 8818 # We're on a posix platform. Hooray! :) 8819 # First separate the path from the arguments. This will split at the first 8820 # space. 8821 complete="$FOUND_MAKE" 8822 path="${complete%% *}" 8823 tmp="$complete EOL" 8824 arguments="${tmp#* }" 8825 8826 # Cannot rely on the command "which" here since it doesn't always work. 8827 is_absolute_path=`$ECHO "$path" | $GREP ^/` 8828 if test -z "$is_absolute_path"; then 8829 # Path to executable is not absolute. Find it. 8830 IFS_save="$IFS" 8831 IFS=: 8832 for p in $PATH; do 8833 if test -f "$p/$path" && test -x "$p/$path"; then 8834 new_path="$p/$path" 8835 break 8836 fi 8837 done 8838 IFS="$IFS_save" 8839 else 8840 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 8841 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 8842 new_path="$path" 8843 fi 8844 8845 if test "x$new_path" = x; then 8846 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8847 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8848 has_space=`$ECHO "$complete" | $GREP " "` 8849 if test "x$has_space" != x; then 8850 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 8851 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 8852 fi 8853 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8854 fi 8855 fi 8856 8857 # Now join together the path and the arguments once again 8858 if test "x$arguments" != xEOL; then 8859 new_complete="$new_path ${arguments% *}" 8860 else 8861 new_complete="$new_path" 8862 fi 8863 8864 if test "x$complete" != "x$new_complete"; then 8865 FOUND_MAKE="$new_complete" 8866 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 8867 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 8868 fi 8869 8870 fi 8871 fi 8872 fi 8873 fi 8874 8875 8876 if test "x$FOUND_MAKE" = x; then 8877 for ac_prog in make 8878 do 8879 # Extract the first word of "$ac_prog", so it can be a program name with args. 8880 set dummy $ac_prog; ac_word=$2 8881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8882 $as_echo_n "checking for $ac_word... " >&6; } 8883 if test "${ac_cv_path_CHECK_MAKE+set}" = set; then : 8884 $as_echo_n "(cached) " >&6 8885 else 8886 case $CHECK_MAKE in 8887 [\\/]* | ?:[\\/]*) 8888 ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path. 8889 ;; 8890 *) 8891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8892 for as_dir in $PATH 8893 do 8894 IFS=$as_save_IFS 8895 test -z "$as_dir" && as_dir=. 8896 for ac_exec_ext in '' $ac_executable_extensions; do 8897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8898 ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext" 8899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8900 break 2 8901 fi 8902 done 8903 done 8904 IFS=$as_save_IFS 8905 8906 ;; 8907 esac 8908 fi 8909 CHECK_MAKE=$ac_cv_path_CHECK_MAKE 8910 if test -n "$CHECK_MAKE"; then 8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5 8912 $as_echo "$CHECK_MAKE" >&6; } 8913 else 8914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8915 $as_echo "no" >&6; } 8916 fi 8917 8918 8919 test -n "$CHECK_MAKE" && break 8920 done 8921 8922 8923 MAKE_CANDIDATE=""$CHECK_MAKE"" 8924 DESCRIPTION="make in PATH" 8925 if test "x$MAKE_CANDIDATE" != x; then 8926 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8927 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8928 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8929 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8930 if test "x$IS_GNU_MAKE" = x; then 8931 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8932 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8933 else 8934 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8935 if test "x$IS_MODERN_MAKE" = x; then 8936 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 8937 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 8938 else 8939 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8940 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8941 MAKE_EXPECTED_ENV='cygwin' 8942 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8943 MAKE_EXPECTED_ENV='msys' 8944 else 8945 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8946 fi 8947 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8948 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8949 else 8950 # Not relevant for non-Windows 8951 IS_MAKE_CORRECT_ENV=true 8952 fi 8953 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8954 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 8955 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 8956 else 8957 FOUND_MAKE=$MAKE_CANDIDATE 8958 8959 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8960 8961 # First separate the path from the arguments. This will split at the first 8962 # space. 8963 complete="$FOUND_MAKE" 8964 path="${complete%% *}" 8965 tmp="$complete EOL" 8966 arguments="${tmp#* }" 8967 8968 # Input might be given as Windows format, start by converting to 8969 # unix format. 8970 new_path=`$CYGPATH -u "$path"` 8971 8972 # Now try to locate executable using which 8973 new_path=`$WHICH "$new_path" 2> /dev/null` 8974 # bat and cmd files are not always considered executable in cygwin causing which 8975 # to not find them 8976 if test "x$new_path" = x \ 8977 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8978 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8979 new_path=`$CYGPATH -u "$path"` 8980 fi 8981 if test "x$new_path" = x; then 8982 # Oops. Which didn't find the executable. 8983 # The splitting of arguments from the executable at a space might have been incorrect, 8984 # since paths with space are more likely in Windows. Give it another try with the whole 8985 # argument. 8986 path="$complete" 8987 arguments="EOL" 8988 new_path=`$CYGPATH -u "$path"` 8989 new_path=`$WHICH "$new_path" 2> /dev/null` 8990 # bat and cmd files are not always considered executable in cygwin causing which 8991 # to not find them 8992 if test "x$new_path" = x \ 8993 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8994 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8995 new_path=`$CYGPATH -u "$path"` 8996 fi 8997 if test "x$new_path" = x; then 8998 # It's still not found. Now this is an unrecoverable error. 8999 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9000 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9001 has_space=`$ECHO "$complete" | $GREP " "` 9002 if test "x$has_space" != x; then 9003 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9004 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9005 fi 9006 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9007 fi 9008 fi 9009 9010 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9011 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9012 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9013 # "foo.exe" is OK but "foo" is an error. 9014 # 9015 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9016 # It is also a way to make sure we got the proper file name for the real test later on. 9017 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9018 if test "x$test_shortpath" = x; then 9019 # Short path failed, file does not exist as specified. 9020 # Try adding .exe or .cmd 9021 if test -f "${new_path}.exe"; then 9022 input_to_shortpath="${new_path}.exe" 9023 elif test -f "${new_path}.cmd"; then 9024 input_to_shortpath="${new_path}.cmd" 9025 else 9026 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9027 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9028 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9029 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9030 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9031 fi 9032 else 9033 input_to_shortpath="$new_path" 9034 fi 9035 9036 # Call helper function which possibly converts this using DOS-style short mode. 9037 # If so, the updated path is stored in $new_path. 9038 new_path="$input_to_shortpath" 9039 9040 input_path="$input_to_shortpath" 9041 # Check if we need to convert this using DOS-style short mode. If the path 9042 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9043 # take no chances and rewrite it. 9044 # Note: m4 eats our [], so we need to use [ and ] instead. 9045 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9046 if test "x$has_forbidden_chars" != x; then 9047 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9048 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9049 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9050 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9051 # Going to short mode and back again did indeed matter. Since short mode is 9052 # case insensitive, let's make it lowercase to improve readability. 9053 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9054 # Now convert it back to Unix-stile (cygpath) 9055 input_path=`$CYGPATH -u "$shortmode_path"` 9056 new_path="$input_path" 9057 fi 9058 fi 9059 9060 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9061 if test "x$test_cygdrive_prefix" = x; then 9062 # As a simple fix, exclude /usr/bin since it's not a real path. 9063 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9064 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9065 # a path prefixed by /cygdrive for fixpath to work. 9066 new_path="$CYGWIN_ROOT_PATH$input_path" 9067 fi 9068 fi 9069 9070 # remove trailing .exe if any 9071 new_path="${new_path/%.exe/}" 9072 9073 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9074 9075 # First separate the path from the arguments. This will split at the first 9076 # space. 9077 complete="$FOUND_MAKE" 9078 path="${complete%% *}" 9079 tmp="$complete EOL" 9080 arguments="${tmp#* }" 9081 9082 # Input might be given as Windows format, start by converting to 9083 # unix format. 9084 new_path="$path" 9085 9086 windows_path="$new_path" 9087 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9088 unix_path=`$CYGPATH -u "$windows_path"` 9089 new_path="$unix_path" 9090 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9091 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9092 new_path="$unix_path" 9093 fi 9094 9095 9096 # Now try to locate executable using which 9097 new_path=`$WHICH "$new_path" 2> /dev/null` 9098 9099 if test "x$new_path" = x; then 9100 # Oops. Which didn't find the executable. 9101 # The splitting of arguments from the executable at a space might have been incorrect, 9102 # since paths with space are more likely in Windows. Give it another try with the whole 9103 # argument. 9104 path="$complete" 9105 arguments="EOL" 9106 new_path="$path" 9107 9108 windows_path="$new_path" 9109 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9110 unix_path=`$CYGPATH -u "$windows_path"` 9111 new_path="$unix_path" 9112 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9113 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9114 new_path="$unix_path" 9115 fi 9116 9117 9118 new_path=`$WHICH "$new_path" 2> /dev/null` 9119 9120 if test "x$new_path" = x; then 9121 # It's still not found. Now this is an unrecoverable error. 9122 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9123 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9124 has_space=`$ECHO "$complete" | $GREP " "` 9125 if test "x$has_space" != x; then 9126 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9127 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9128 fi 9129 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9130 fi 9131 fi 9132 9133 # Now new_path has a complete unix path to the binary 9134 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9135 # Keep paths in /bin as-is, but remove trailing .exe if any 9136 new_path="${new_path/%.exe/}" 9137 # Do not save /bin paths to all_fixpath_prefixes! 9138 else 9139 # Not in mixed or Windows style, start by that. 9140 new_path=`cmd //c echo $new_path` 9141 9142 input_path="$new_path" 9143 # Check if we need to convert this using DOS-style short mode. If the path 9144 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9145 # take no chances and rewrite it. 9146 # Note: m4 eats our [], so we need to use [ and ] instead. 9147 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9148 if test "x$has_forbidden_chars" != x; then 9149 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9150 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9151 fi 9152 9153 # Output is in $new_path 9154 9155 windows_path="$new_path" 9156 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9157 unix_path=`$CYGPATH -u "$windows_path"` 9158 new_path="$unix_path" 9159 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9160 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9161 new_path="$unix_path" 9162 fi 9163 9164 # remove trailing .exe if any 9165 new_path="${new_path/%.exe/}" 9166 9167 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9168 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9169 fi 9170 9171 else 9172 # We're on a posix platform. Hooray! :) 9173 # First separate the path from the arguments. This will split at the first 9174 # space. 9175 complete="$FOUND_MAKE" 9176 path="${complete%% *}" 9177 tmp="$complete EOL" 9178 arguments="${tmp#* }" 9179 9180 # Cannot rely on the command "which" here since it doesn't always work. 9181 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9182 if test -z "$is_absolute_path"; then 9183 # Path to executable is not absolute. Find it. 9184 IFS_save="$IFS" 9185 IFS=: 9186 for p in $PATH; do 9187 if test -f "$p/$path" && test -x "$p/$path"; then 9188 new_path="$p/$path" 9189 break 9190 fi 9191 done 9192 IFS="$IFS_save" 9193 else 9194 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9195 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9196 new_path="$path" 9197 fi 9198 9199 if test "x$new_path" = x; then 9200 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9201 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9202 has_space=`$ECHO "$complete" | $GREP " "` 9203 if test "x$has_space" != x; then 9204 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9205 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9206 fi 9207 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9208 fi 9209 fi 9210 9211 # Now join together the path and the arguments once again 9212 if test "x$arguments" != xEOL; then 9213 new_complete="$new_path ${arguments% *}" 9214 else 9215 new_complete="$new_path" 9216 fi 9217 9218 if test "x$complete" != "x$new_complete"; then 9219 FOUND_MAKE="$new_complete" 9220 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9221 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9222 fi 9223 9224 fi 9225 fi 9226 fi 9227 fi 9228 9229 fi 9230 9231 if test "x$FOUND_MAKE" = x; then 9232 if test "x$TOOLS_DIR" != x; then 9233 # We have a tools-dir, check that as well before giving up. 9234 OLD_PATH=$PATH 9235 PATH=$TOOLS_DIR:$PATH 9236 for ac_prog in gmake 9237 do 9238 # Extract the first word of "$ac_prog", so it can be a program name with args. 9239 set dummy $ac_prog; ac_word=$2 9240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9241 $as_echo_n "checking for $ac_word... " >&6; } 9242 if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then : 9243 $as_echo_n "(cached) " >&6 9244 else 9245 case $CHECK_TOOLSDIR_GMAKE in 9246 [\\/]* | ?:[\\/]*) 9247 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path. 9248 ;; 9249 *) 9250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9251 for as_dir in $PATH 9252 do 9253 IFS=$as_save_IFS 9254 test -z "$as_dir" && as_dir=. 9255 for ac_exec_ext in '' $ac_executable_extensions; do 9256 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 9257 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext" 9258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9259 break 2 9260 fi 9261 done 9262 done 9263 IFS=$as_save_IFS 9264 9265 ;; 9266 esac 9267 fi 9268 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE 9269 if test -n "$CHECK_TOOLSDIR_GMAKE"; then 9270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5 9271 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; } 9272 else 9273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9274 $as_echo "no" >&6; } 9275 fi 9276 9277 9278 test -n "$CHECK_TOOLSDIR_GMAKE" && break 9279 done 9280 9281 9282 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE"" 9283 DESCRIPTION="gmake in tools-dir" 9284 if test "x$MAKE_CANDIDATE" != x; then 9285 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 9286 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 9287 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 9288 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 9289 if test "x$IS_GNU_MAKE" = x; then 9290 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 9291 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 9292 else 9293 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 9294 if test "x$IS_MODERN_MAKE" = x; then 9295 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 9296 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 9297 else 9298 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 9299 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9300 MAKE_EXPECTED_ENV='cygwin' 9301 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9302 MAKE_EXPECTED_ENV='msys' 9303 else 9304 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 9305 fi 9306 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 9307 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 9308 else 9309 # Not relevant for non-Windows 9310 IS_MAKE_CORRECT_ENV=true 9311 fi 9312 if test "x$IS_MAKE_CORRECT_ENV" = x; then 9313 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 9314 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 9315 else 9316 FOUND_MAKE=$MAKE_CANDIDATE 9317 9318 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9319 9320 # First separate the path from the arguments. This will split at the first 9321 # space. 9322 complete="$FOUND_MAKE" 9323 path="${complete%% *}" 9324 tmp="$complete EOL" 9325 arguments="${tmp#* }" 9326 9327 # Input might be given as Windows format, start by converting to 9328 # unix format. 9329 new_path=`$CYGPATH -u "$path"` 9330 9331 # Now try to locate executable using which 9332 new_path=`$WHICH "$new_path" 2> /dev/null` 9333 # bat and cmd files are not always considered executable in cygwin causing which 9334 # to not find them 9335 if test "x$new_path" = x \ 9336 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9337 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9338 new_path=`$CYGPATH -u "$path"` 9339 fi 9340 if test "x$new_path" = x; then 9341 # Oops. Which didn't find the executable. 9342 # The splitting of arguments from the executable at a space might have been incorrect, 9343 # since paths with space are more likely in Windows. Give it another try with the whole 9344 # argument. 9345 path="$complete" 9346 arguments="EOL" 9347 new_path=`$CYGPATH -u "$path"` 9348 new_path=`$WHICH "$new_path" 2> /dev/null` 9349 # bat and cmd files are not always considered executable in cygwin causing which 9350 # to not find them 9351 if test "x$new_path" = x \ 9352 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9353 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9354 new_path=`$CYGPATH -u "$path"` 9355 fi 9356 if test "x$new_path" = x; then 9357 # It's still not found. Now this is an unrecoverable error. 9358 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9359 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9360 has_space=`$ECHO "$complete" | $GREP " "` 9361 if test "x$has_space" != x; then 9362 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9363 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9364 fi 9365 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9366 fi 9367 fi 9368 9369 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9370 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9371 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9372 # "foo.exe" is OK but "foo" is an error. 9373 # 9374 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9375 # It is also a way to make sure we got the proper file name for the real test later on. 9376 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9377 if test "x$test_shortpath" = x; then 9378 # Short path failed, file does not exist as specified. 9379 # Try adding .exe or .cmd 9380 if test -f "${new_path}.exe"; then 9381 input_to_shortpath="${new_path}.exe" 9382 elif test -f "${new_path}.cmd"; then 9383 input_to_shortpath="${new_path}.cmd" 9384 else 9385 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9386 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9387 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9388 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9389 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9390 fi 9391 else 9392 input_to_shortpath="$new_path" 9393 fi 9394 9395 # Call helper function which possibly converts this using DOS-style short mode. 9396 # If so, the updated path is stored in $new_path. 9397 new_path="$input_to_shortpath" 9398 9399 input_path="$input_to_shortpath" 9400 # Check if we need to convert this using DOS-style short mode. If the path 9401 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9402 # take no chances and rewrite it. 9403 # Note: m4 eats our [], so we need to use [ and ] instead. 9404 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9405 if test "x$has_forbidden_chars" != x; then 9406 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9407 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9408 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9409 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9410 # Going to short mode and back again did indeed matter. Since short mode is 9411 # case insensitive, let's make it lowercase to improve readability. 9412 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9413 # Now convert it back to Unix-stile (cygpath) 9414 input_path=`$CYGPATH -u "$shortmode_path"` 9415 new_path="$input_path" 9416 fi 9417 fi 9418 9419 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9420 if test "x$test_cygdrive_prefix" = x; then 9421 # As a simple fix, exclude /usr/bin since it's not a real path. 9422 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9423 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9424 # a path prefixed by /cygdrive for fixpath to work. 9425 new_path="$CYGWIN_ROOT_PATH$input_path" 9426 fi 9427 fi 9428 9429 # remove trailing .exe if any 9430 new_path="${new_path/%.exe/}" 9431 9432 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9433 9434 # First separate the path from the arguments. This will split at the first 9435 # space. 9436 complete="$FOUND_MAKE" 9437 path="${complete%% *}" 9438 tmp="$complete EOL" 9439 arguments="${tmp#* }" 9440 9441 # Input might be given as Windows format, start by converting to 9442 # unix format. 9443 new_path="$path" 9444 9445 windows_path="$new_path" 9446 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9447 unix_path=`$CYGPATH -u "$windows_path"` 9448 new_path="$unix_path" 9449 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9450 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9451 new_path="$unix_path" 9452 fi 9453 9454 9455 # Now try to locate executable using which 9456 new_path=`$WHICH "$new_path" 2> /dev/null` 9457 9458 if test "x$new_path" = x; then 9459 # Oops. Which didn't find the executable. 9460 # The splitting of arguments from the executable at a space might have been incorrect, 9461 # since paths with space are more likely in Windows. Give it another try with the whole 9462 # argument. 9463 path="$complete" 9464 arguments="EOL" 9465 new_path="$path" 9466 9467 windows_path="$new_path" 9468 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9469 unix_path=`$CYGPATH -u "$windows_path"` 9470 new_path="$unix_path" 9471 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9472 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9473 new_path="$unix_path" 9474 fi 9475 9476 9477 new_path=`$WHICH "$new_path" 2> /dev/null` 9478 9479 if test "x$new_path" = x; then 9480 # It's still not found. Now this is an unrecoverable error. 9481 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9482 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9483 has_space=`$ECHO "$complete" | $GREP " "` 9484 if test "x$has_space" != x; then 9485 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9486 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9487 fi 9488 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9489 fi 9490 fi 9491 9492 # Now new_path has a complete unix path to the binary 9493 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9494 # Keep paths in /bin as-is, but remove trailing .exe if any 9495 new_path="${new_path/%.exe/}" 9496 # Do not save /bin paths to all_fixpath_prefixes! 9497 else 9498 # Not in mixed or Windows style, start by that. 9499 new_path=`cmd //c echo $new_path` 9500 9501 input_path="$new_path" 9502 # Check if we need to convert this using DOS-style short mode. If the path 9503 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9504 # take no chances and rewrite it. 9505 # Note: m4 eats our [], so we need to use [ and ] instead. 9506 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9507 if test "x$has_forbidden_chars" != x; then 9508 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9509 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9510 fi 9511 9512 # Output is in $new_path 9513 9514 windows_path="$new_path" 9515 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9516 unix_path=`$CYGPATH -u "$windows_path"` 9517 new_path="$unix_path" 9518 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9519 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9520 new_path="$unix_path" 9521 fi 9522 9523 # remove trailing .exe if any 9524 new_path="${new_path/%.exe/}" 9525 9526 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9527 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9528 fi 9529 9530 else 9531 # We're on a posix platform. Hooray! :) 9532 # First separate the path from the arguments. This will split at the first 9533 # space. 9534 complete="$FOUND_MAKE" 9535 path="${complete%% *}" 9536 tmp="$complete EOL" 9537 arguments="${tmp#* }" 9538 9539 # Cannot rely on the command "which" here since it doesn't always work. 9540 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9541 if test -z "$is_absolute_path"; then 9542 # Path to executable is not absolute. Find it. 9543 IFS_save="$IFS" 9544 IFS=: 9545 for p in $PATH; do 9546 if test -f "$p/$path" && test -x "$p/$path"; then 9547 new_path="$p/$path" 9548 break 9549 fi 9550 done 9551 IFS="$IFS_save" 9552 else 9553 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9554 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9555 new_path="$path" 9556 fi 9557 9558 if test "x$new_path" = x; then 9559 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9560 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9561 has_space=`$ECHO "$complete" | $GREP " "` 9562 if test "x$has_space" != x; then 9563 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9564 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9565 fi 9566 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9567 fi 9568 fi 9569 9570 # Now join together the path and the arguments once again 9571 if test "x$arguments" != xEOL; then 9572 new_complete="$new_path ${arguments% *}" 9573 else 9574 new_complete="$new_path" 9575 fi 9576 9577 if test "x$complete" != "x$new_complete"; then 9578 FOUND_MAKE="$new_complete" 9579 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9580 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9581 fi 9582 9583 fi 9584 fi 9585 fi 9586 fi 9587 9588 if test "x$FOUND_MAKE" = x; then 9589 for ac_prog in make 9590 do 9591 # Extract the first word of "$ac_prog", so it can be a program name with args. 9592 set dummy $ac_prog; ac_word=$2 9593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9594 $as_echo_n "checking for $ac_word... " >&6; } 9595 if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then : 9596 $as_echo_n "(cached) " >&6 9597 else 9598 case $CHECK_TOOLSDIR_MAKE in 9599 [\\/]* | ?:[\\/]*) 9600 ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path. 9601 ;; 9602 *) 9603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9604 for as_dir in $PATH 9605 do 9606 IFS=$as_save_IFS 9607 test -z "$as_dir" && as_dir=. 9608 for ac_exec_ext in '' $ac_executable_extensions; do 9609 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 9610 ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext" 9611 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9612 break 2 9613 fi 9614 done 9615 done 9616 IFS=$as_save_IFS 9617 9618 ;; 9619 esac 9620 fi 9621 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE 9622 if test -n "$CHECK_TOOLSDIR_MAKE"; then 9623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5 9624 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; } 9625 else 9626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9627 $as_echo "no" >&6; } 9628 fi 9629 9630 9631 test -n "$CHECK_TOOLSDIR_MAKE" && break 9632 done 9633 9634 9635 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE"" 9636 DESCRIPTION="make in tools-dir" 9637 if test "x$MAKE_CANDIDATE" != x; then 9638 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 9639 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 9640 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 9641 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 9642 if test "x$IS_GNU_MAKE" = x; then 9643 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 9644 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 9645 else 9646 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 9647 if test "x$IS_MODERN_MAKE" = x; then 9648 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 9649 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 9650 else 9651 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 9652 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9653 MAKE_EXPECTED_ENV='cygwin' 9654 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9655 MAKE_EXPECTED_ENV='msys' 9656 else 9657 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 9658 fi 9659 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 9660 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 9661 else 9662 # Not relevant for non-Windows 9663 IS_MAKE_CORRECT_ENV=true 9664 fi 9665 if test "x$IS_MAKE_CORRECT_ENV" = x; then 9666 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 9667 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 9668 else 9669 FOUND_MAKE=$MAKE_CANDIDATE 9670 9671 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9672 9673 # First separate the path from the arguments. This will split at the first 9674 # space. 9675 complete="$FOUND_MAKE" 9676 path="${complete%% *}" 9677 tmp="$complete EOL" 9678 arguments="${tmp#* }" 9679 9680 # Input might be given as Windows format, start by converting to 9681 # unix format. 9682 new_path=`$CYGPATH -u "$path"` 9683 9684 # Now try to locate executable using which 9685 new_path=`$WHICH "$new_path" 2> /dev/null` 9686 # bat and cmd files are not always considered executable in cygwin causing which 9687 # to not find them 9688 if test "x$new_path" = x \ 9689 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9690 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9691 new_path=`$CYGPATH -u "$path"` 9692 fi 9693 if test "x$new_path" = x; then 9694 # Oops. Which didn't find the executable. 9695 # The splitting of arguments from the executable at a space might have been incorrect, 9696 # since paths with space are more likely in Windows. Give it another try with the whole 9697 # argument. 9698 path="$complete" 9699 arguments="EOL" 9700 new_path=`$CYGPATH -u "$path"` 9701 new_path=`$WHICH "$new_path" 2> /dev/null` 9702 # bat and cmd files are not always considered executable in cygwin causing which 9703 # to not find them 9704 if test "x$new_path" = x \ 9705 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9706 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9707 new_path=`$CYGPATH -u "$path"` 9708 fi 9709 if test "x$new_path" = x; then 9710 # It's still not found. Now this is an unrecoverable error. 9711 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9712 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9713 has_space=`$ECHO "$complete" | $GREP " "` 9714 if test "x$has_space" != x; then 9715 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9716 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9717 fi 9718 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9719 fi 9720 fi 9721 9722 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9723 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9724 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9725 # "foo.exe" is OK but "foo" is an error. 9726 # 9727 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9728 # It is also a way to make sure we got the proper file name for the real test later on. 9729 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9730 if test "x$test_shortpath" = x; then 9731 # Short path failed, file does not exist as specified. 9732 # Try adding .exe or .cmd 9733 if test -f "${new_path}.exe"; then 9734 input_to_shortpath="${new_path}.exe" 9735 elif test -f "${new_path}.cmd"; then 9736 input_to_shortpath="${new_path}.cmd" 9737 else 9738 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9739 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9740 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9741 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9742 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9743 fi 9744 else 9745 input_to_shortpath="$new_path" 9746 fi 9747 9748 # Call helper function which possibly converts this using DOS-style short mode. 9749 # If so, the updated path is stored in $new_path. 9750 new_path="$input_to_shortpath" 9751 9752 input_path="$input_to_shortpath" 9753 # Check if we need to convert this using DOS-style short mode. If the path 9754 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9755 # take no chances and rewrite it. 9756 # Note: m4 eats our [], so we need to use [ and ] instead. 9757 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9758 if test "x$has_forbidden_chars" != x; then 9759 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9760 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9761 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9762 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9763 # Going to short mode and back again did indeed matter. Since short mode is 9764 # case insensitive, let's make it lowercase to improve readability. 9765 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9766 # Now convert it back to Unix-stile (cygpath) 9767 input_path=`$CYGPATH -u "$shortmode_path"` 9768 new_path="$input_path" 9769 fi 9770 fi 9771 9772 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9773 if test "x$test_cygdrive_prefix" = x; then 9774 # As a simple fix, exclude /usr/bin since it's not a real path. 9775 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9776 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9777 # a path prefixed by /cygdrive for fixpath to work. 9778 new_path="$CYGWIN_ROOT_PATH$input_path" 9779 fi 9780 fi 9781 9782 # remove trailing .exe if any 9783 new_path="${new_path/%.exe/}" 9784 9785 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9786 9787 # First separate the path from the arguments. This will split at the first 9788 # space. 9789 complete="$FOUND_MAKE" 9790 path="${complete%% *}" 9791 tmp="$complete EOL" 9792 arguments="${tmp#* }" 9793 9794 # Input might be given as Windows format, start by converting to 9795 # unix format. 9796 new_path="$path" 9797 9798 windows_path="$new_path" 9799 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9800 unix_path=`$CYGPATH -u "$windows_path"` 9801 new_path="$unix_path" 9802 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9803 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9804 new_path="$unix_path" 9805 fi 9806 9807 9808 # Now try to locate executable using which 9809 new_path=`$WHICH "$new_path" 2> /dev/null` 9810 9811 if test "x$new_path" = x; then 9812 # Oops. Which didn't find the executable. 9813 # The splitting of arguments from the executable at a space might have been incorrect, 9814 # since paths with space are more likely in Windows. Give it another try with the whole 9815 # argument. 9816 path="$complete" 9817 arguments="EOL" 9818 new_path="$path" 9819 9820 windows_path="$new_path" 9821 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9822 unix_path=`$CYGPATH -u "$windows_path"` 9823 new_path="$unix_path" 9824 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9825 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9826 new_path="$unix_path" 9827 fi 9828 9829 9830 new_path=`$WHICH "$new_path" 2> /dev/null` 9831 9832 if test "x$new_path" = x; then 9833 # It's still not found. Now this is an unrecoverable error. 9834 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9835 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9836 has_space=`$ECHO "$complete" | $GREP " "` 9837 if test "x$has_space" != x; then 9838 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9839 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9840 fi 9841 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9842 fi 9843 fi 9844 9845 # Now new_path has a complete unix path to the binary 9846 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9847 # Keep paths in /bin as-is, but remove trailing .exe if any 9848 new_path="${new_path/%.exe/}" 9849 # Do not save /bin paths to all_fixpath_prefixes! 9850 else 9851 # Not in mixed or Windows style, start by that. 9852 new_path=`cmd //c echo $new_path` 9853 9854 input_path="$new_path" 9855 # Check if we need to convert this using DOS-style short mode. If the path 9856 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9857 # take no chances and rewrite it. 9858 # Note: m4 eats our [], so we need to use [ and ] instead. 9859 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9860 if test "x$has_forbidden_chars" != x; then 9861 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9862 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9863 fi 9864 9865 # Output is in $new_path 9866 9867 windows_path="$new_path" 9868 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9869 unix_path=`$CYGPATH -u "$windows_path"` 9870 new_path="$unix_path" 9871 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9872 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9873 new_path="$unix_path" 9874 fi 9875 9876 # remove trailing .exe if any 9877 new_path="${new_path/%.exe/}" 9878 9879 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9880 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9881 fi 9882 9883 else 9884 # We're on a posix platform. Hooray! :) 9885 # First separate the path from the arguments. This will split at the first 9886 # space. 9887 complete="$FOUND_MAKE" 9888 path="${complete%% *}" 9889 tmp="$complete EOL" 9890 arguments="${tmp#* }" 9891 9892 # Cannot rely on the command "which" here since it doesn't always work. 9893 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9894 if test -z "$is_absolute_path"; then 9895 # Path to executable is not absolute. Find it. 9896 IFS_save="$IFS" 9897 IFS=: 9898 for p in $PATH; do 9899 if test -f "$p/$path" && test -x "$p/$path"; then 9900 new_path="$p/$path" 9901 break 9902 fi 9903 done 9904 IFS="$IFS_save" 9905 else 9906 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9907 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9908 new_path="$path" 9909 fi 9910 9911 if test "x$new_path" = x; then 9912 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9913 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9914 has_space=`$ECHO "$complete" | $GREP " "` 9915 if test "x$has_space" != x; then 9916 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9917 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9918 fi 9919 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9920 fi 9921 fi 9922 9923 # Now join together the path and the arguments once again 9924 if test "x$arguments" != xEOL; then 9925 new_complete="$new_path ${arguments% *}" 9926 else 9927 new_complete="$new_path" 9928 fi 9929 9930 if test "x$complete" != "x$new_complete"; then 9931 FOUND_MAKE="$new_complete" 9932 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9933 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9934 fi 9935 9936 fi 9937 fi 9938 fi 9939 fi 9940 9941 fi 9942 PATH=$OLD_PATH 9943 fi 9944 fi 9945 9946 if test "x$FOUND_MAKE" = x; then 9947 as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5 9948 fi 9949 fi 9950 9951 MAKE=$FOUND_MAKE 9952 9953 { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5 9954 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;} 9955 9956 9957 9958 # Test if find supports -delete 9959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5 9960 $as_echo_n "checking if find supports -delete... " >&6; } 9961 FIND_DELETE="-delete" 9962 9963 DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?) 9964 9965 echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete 9966 9967 TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1` 9968 if test -f $DELETEDIR/TestIfFindSupportsDelete; then 9969 # No, it does not. 9970 rm $DELETEDIR/TestIfFindSupportsDelete 9971 FIND_DELETE="-exec rm \{\} \+" 9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9973 $as_echo "no" >&6; } 9974 else 9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9976 $as_echo "yes" >&6; } 9977 fi 9978 rmdir $DELETEDIR 9979 9980 9981 9982 # These tools might not be installed by default, 9983 # need hint on how to install them. 9984 9985 for ac_prog in unzip 9986 do 9987 # Extract the first word of "$ac_prog", so it can be a program name with args. 9988 set dummy $ac_prog; ac_word=$2 9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9990 $as_echo_n "checking for $ac_word... " >&6; } 9991 if test "${ac_cv_path_UNZIP+set}" = set; then : 9992 $as_echo_n "(cached) " >&6 9993 else 9994 case $UNZIP in 9995 [\\/]* | ?:[\\/]*) 9996 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path. 9997 ;; 9998 *) 9999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10000 for as_dir in $PATH 10001 do 10002 IFS=$as_save_IFS 10003 test -z "$as_dir" && as_dir=. 10004 for ac_exec_ext in '' $ac_executable_extensions; do 10005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10006 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext" 10007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10008 break 2 10009 fi 10010 done 10011 done 10012 IFS=$as_save_IFS 10013 10014 ;; 10015 esac 10016 fi 10017 UNZIP=$ac_cv_path_UNZIP 10018 if test -n "$UNZIP"; then 10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5 10020 $as_echo "$UNZIP" >&6; } 10021 else 10022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10023 $as_echo "no" >&6; } 10024 fi 10025 10026 10027 test -n "$UNZIP" && break 10028 done 10029 10030 10031 if test "x$UNZIP" = x; then 10032 if test "xunzip" = x; then 10033 PROG_NAME=unzip 10034 else 10035 PROG_NAME=unzip 10036 fi 10037 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10038 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10039 as_fn_error $? "Cannot continue" "$LINENO" 5 10040 fi 10041 10042 10043 10044 for ac_prog in zip 10045 do 10046 # Extract the first word of "$ac_prog", so it can be a program name with args. 10047 set dummy $ac_prog; ac_word=$2 10048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10049 $as_echo_n "checking for $ac_word... " >&6; } 10050 if test "${ac_cv_path_ZIP+set}" = set; then : 10051 $as_echo_n "(cached) " >&6 10052 else 10053 case $ZIP in 10054 [\\/]* | ?:[\\/]*) 10055 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path. 10056 ;; 10057 *) 10058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10059 for as_dir in $PATH 10060 do 10061 IFS=$as_save_IFS 10062 test -z "$as_dir" && as_dir=. 10063 for ac_exec_ext in '' $ac_executable_extensions; do 10064 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10065 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" 10066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10067 break 2 10068 fi 10069 done 10070 done 10071 IFS=$as_save_IFS 10072 10073 ;; 10074 esac 10075 fi 10076 ZIP=$ac_cv_path_ZIP 10077 if test -n "$ZIP"; then 10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5 10079 $as_echo "$ZIP" >&6; } 10080 else 10081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10082 $as_echo "no" >&6; } 10083 fi 10084 10085 10086 test -n "$ZIP" && break 10087 done 10088 10089 10090 if test "x$ZIP" = x; then 10091 if test "xzip" = x; then 10092 PROG_NAME=zip 10093 else 10094 PROG_NAME=zip 10095 fi 10096 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10097 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10098 as_fn_error $? "Cannot continue" "$LINENO" 5 10099 fi 10100 10101 10102 10103 # Non-required basic tools 10104 10105 # Extract the first word of "ldd", so it can be a program name with args. 10106 set dummy ldd; ac_word=$2 10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10108 $as_echo_n "checking for $ac_word... " >&6; } 10109 if test "${ac_cv_path_LDD+set}" = set; then : 10110 $as_echo_n "(cached) " >&6 10111 else 10112 case $LDD in 10113 [\\/]* | ?:[\\/]*) 10114 ac_cv_path_LDD="$LDD" # Let the user override the test with a path. 10115 ;; 10116 *) 10117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10118 for as_dir in $PATH 10119 do 10120 IFS=$as_save_IFS 10121 test -z "$as_dir" && as_dir=. 10122 for ac_exec_ext in '' $ac_executable_extensions; do 10123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10124 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext" 10125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10126 break 2 10127 fi 10128 done 10129 done 10130 IFS=$as_save_IFS 10131 10132 ;; 10133 esac 10134 fi 10135 LDD=$ac_cv_path_LDD 10136 if test -n "$LDD"; then 10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5 10138 $as_echo "$LDD" >&6; } 10139 else 10140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10141 $as_echo "no" >&6; } 10142 fi 10143 10144 10145 if test "x$LDD" = "x"; then 10146 # List shared lib dependencies is used for 10147 # debug output and checking for forbidden dependencies. 10148 # We can build without it. 10149 LDD="true" 10150 fi 10151 # Extract the first word of "otool", so it can be a program name with args. 10152 set dummy otool; ac_word=$2 10153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10154 $as_echo_n "checking for $ac_word... " >&6; } 10155 if test "${ac_cv_path_OTOOL+set}" = set; then : 10156 $as_echo_n "(cached) " >&6 10157 else 10158 case $OTOOL in 10159 [\\/]* | ?:[\\/]*) 10160 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path. 10161 ;; 10162 *) 10163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10164 for as_dir in $PATH 10165 do 10166 IFS=$as_save_IFS 10167 test -z "$as_dir" && as_dir=. 10168 for ac_exec_ext in '' $ac_executable_extensions; do 10169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10170 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext" 10171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10172 break 2 10173 fi 10174 done 10175 done 10176 IFS=$as_save_IFS 10177 10178 ;; 10179 esac 10180 fi 10181 OTOOL=$ac_cv_path_OTOOL 10182 if test -n "$OTOOL"; then 10183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 10184 $as_echo "$OTOOL" >&6; } 10185 else 10186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10187 $as_echo "no" >&6; } 10188 fi 10189 10190 10191 if test "x$OTOOL" = "x"; then 10192 OTOOL="true" 10193 fi 10194 for ac_prog in readelf greadelf 10195 do 10196 # Extract the first word of "$ac_prog", so it can be a program name with args. 10197 set dummy $ac_prog; ac_word=$2 10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10199 $as_echo_n "checking for $ac_word... " >&6; } 10200 if test "${ac_cv_path_READELF+set}" = set; then : 10201 $as_echo_n "(cached) " >&6 10202 else 10203 case $READELF in 10204 [\\/]* | ?:[\\/]*) 10205 ac_cv_path_READELF="$READELF" # Let the user override the test with a path. 10206 ;; 10207 *) 10208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10209 for as_dir in $PATH 10210 do 10211 IFS=$as_save_IFS 10212 test -z "$as_dir" && as_dir=. 10213 for ac_exec_ext in '' $ac_executable_extensions; do 10214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10215 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext" 10216 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10217 break 2 10218 fi 10219 done 10220 done 10221 IFS=$as_save_IFS 10222 10223 ;; 10224 esac 10225 fi 10226 READELF=$ac_cv_path_READELF 10227 if test -n "$READELF"; then 10228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 10229 $as_echo "$READELF" >&6; } 10230 else 10231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10232 $as_echo "no" >&6; } 10233 fi 10234 10235 10236 test -n "$READELF" && break 10237 done 10238 10239 # Extract the first word of "hg", so it can be a program name with args. 10240 set dummy hg; ac_word=$2 10241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10242 $as_echo_n "checking for $ac_word... " >&6; } 10243 if test "${ac_cv_path_HG+set}" = set; then : 10244 $as_echo_n "(cached) " >&6 10245 else 10246 case $HG in 10247 [\\/]* | ?:[\\/]*) 10248 ac_cv_path_HG="$HG" # Let the user override the test with a path. 10249 ;; 10250 *) 10251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10252 for as_dir in $PATH 10253 do 10254 IFS=$as_save_IFS 10255 test -z "$as_dir" && as_dir=. 10256 for ac_exec_ext in '' $ac_executable_extensions; do 10257 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10258 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext" 10259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10260 break 2 10261 fi 10262 done 10263 done 10264 IFS=$as_save_IFS 10265 10266 ;; 10267 esac 10268 fi 10269 HG=$ac_cv_path_HG 10270 if test -n "$HG"; then 10271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5 10272 $as_echo "$HG" >&6; } 10273 else 10274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10275 $as_echo "no" >&6; } 10276 fi 10277 10278 10279 # Extract the first word of "stat", so it can be a program name with args. 10280 set dummy stat; ac_word=$2 10281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10282 $as_echo_n "checking for $ac_word... " >&6; } 10283 if test "${ac_cv_path_STAT+set}" = set; then : 10284 $as_echo_n "(cached) " >&6 10285 else 10286 case $STAT in 10287 [\\/]* | ?:[\\/]*) 10288 ac_cv_path_STAT="$STAT" # Let the user override the test with a path. 10289 ;; 10290 *) 10291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10292 for as_dir in $PATH 10293 do 10294 IFS=$as_save_IFS 10295 test -z "$as_dir" && as_dir=. 10296 for ac_exec_ext in '' $ac_executable_extensions; do 10297 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10298 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext" 10299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10300 break 2 10301 fi 10302 done 10303 done 10304 IFS=$as_save_IFS 10305 10306 ;; 10307 esac 10308 fi 10309 STAT=$ac_cv_path_STAT 10310 if test -n "$STAT"; then 10311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5 10312 $as_echo "$STAT" >&6; } 10313 else 10314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10315 $as_echo "no" >&6; } 10316 fi 10317 10318 10319 # Extract the first word of "time", so it can be a program name with args. 10320 set dummy time; ac_word=$2 10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10322 $as_echo_n "checking for $ac_word... " >&6; } 10323 if test "${ac_cv_path_TIME+set}" = set; then : 10324 $as_echo_n "(cached) " >&6 10325 else 10326 case $TIME in 10327 [\\/]* | ?:[\\/]*) 10328 ac_cv_path_TIME="$TIME" # Let the user override the test with a path. 10329 ;; 10330 *) 10331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10332 for as_dir in $PATH 10333 do 10334 IFS=$as_save_IFS 10335 test -z "$as_dir" && as_dir=. 10336 for ac_exec_ext in '' $ac_executable_extensions; do 10337 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10338 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext" 10339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10340 break 2 10341 fi 10342 done 10343 done 10344 IFS=$as_save_IFS 10345 10346 ;; 10347 esac 10348 fi 10349 TIME=$ac_cv_path_TIME 10350 if test -n "$TIME"; then 10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5 10352 $as_echo "$TIME" >&6; } 10353 else 10354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10355 $as_echo "no" >&6; } 10356 fi 10357 10358 10359 10360 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 10361 10362 for ac_prog in comm 10363 do 10364 # Extract the first word of "$ac_prog", so it can be a program name with args. 10365 set dummy $ac_prog; ac_word=$2 10366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10367 $as_echo_n "checking for $ac_word... " >&6; } 10368 if test "${ac_cv_path_COMM+set}" = set; then : 10369 $as_echo_n "(cached) " >&6 10370 else 10371 case $COMM in 10372 [\\/]* | ?:[\\/]*) 10373 ac_cv_path_COMM="$COMM" # Let the user override the test with a path. 10374 ;; 10375 *) 10376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10377 for as_dir in $PATH 10378 do 10379 IFS=$as_save_IFS 10380 test -z "$as_dir" && as_dir=. 10381 for ac_exec_ext in '' $ac_executable_extensions; do 10382 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10383 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext" 10384 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10385 break 2 10386 fi 10387 done 10388 done 10389 IFS=$as_save_IFS 10390 10391 ;; 10392 esac 10393 fi 10394 COMM=$ac_cv_path_COMM 10395 if test -n "$COMM"; then 10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5 10397 $as_echo "$COMM" >&6; } 10398 else 10399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10400 $as_echo "no" >&6; } 10401 fi 10402 10403 10404 test -n "$COMM" && break 10405 done 10406 10407 10408 if test "x$COMM" = x; then 10409 if test "xcomm" = x; then 10410 PROG_NAME=comm 10411 else 10412 PROG_NAME=comm 10413 fi 10414 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10415 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10416 as_fn_error $? "Cannot continue" "$LINENO" 5 10417 fi 10418 10419 10420 fi 10421 10422 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 10423 10424 for ac_prog in xattr 10425 do 10426 # Extract the first word of "$ac_prog", so it can be a program name with args. 10427 set dummy $ac_prog; ac_word=$2 10428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10429 $as_echo_n "checking for $ac_word... " >&6; } 10430 if test "${ac_cv_path_XATTR+set}" = set; then : 10431 $as_echo_n "(cached) " >&6 10432 else 10433 case $XATTR in 10434 [\\/]* | ?:[\\/]*) 10435 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path. 10436 ;; 10437 *) 10438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10439 for as_dir in $PATH 10440 do 10441 IFS=$as_save_IFS 10442 test -z "$as_dir" && as_dir=. 10443 for ac_exec_ext in '' $ac_executable_extensions; do 10444 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10445 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext" 10446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10447 break 2 10448 fi 10449 done 10450 done 10451 IFS=$as_save_IFS 10452 10453 ;; 10454 esac 10455 fi 10456 XATTR=$ac_cv_path_XATTR 10457 if test -n "$XATTR"; then 10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5 10459 $as_echo "$XATTR" >&6; } 10460 else 10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10462 $as_echo "no" >&6; } 10463 fi 10464 10465 10466 test -n "$XATTR" && break 10467 done 10468 10469 10470 if test "x$XATTR" = x; then 10471 if test "xxattr" = x; then 10472 PROG_NAME=xattr 10473 else 10474 PROG_NAME=xattr 10475 fi 10476 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10477 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10478 as_fn_error $? "Cannot continue" "$LINENO" 5 10479 fi 10480 10481 10482 fi 10483 10484 10485 # Check if pkg-config is available. 10486 10487 10488 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 10489 if test -n "$ac_tool_prefix"; then 10490 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. 10491 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 10492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10493 $as_echo_n "checking for $ac_word... " >&6; } 10494 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : 10495 $as_echo_n "(cached) " >&6 10496 else 10497 case $PKG_CONFIG in 10498 [\\/]* | ?:[\\/]*) 10499 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. 10500 ;; 10501 *) 10502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10503 for as_dir in $PATH 10504 do 10505 IFS=$as_save_IFS 10506 test -z "$as_dir" && as_dir=. 10507 for ac_exec_ext in '' $ac_executable_extensions; do 10508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10509 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 10510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10511 break 2 10512 fi 10513 done 10514 done 10515 IFS=$as_save_IFS 10516 10517 ;; 10518 esac 10519 fi 10520 PKG_CONFIG=$ac_cv_path_PKG_CONFIG 10521 if test -n "$PKG_CONFIG"; then 10522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 10523 $as_echo "$PKG_CONFIG" >&6; } 10524 else 10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10526 $as_echo "no" >&6; } 10527 fi 10528 10529 10530 fi 10531 if test -z "$ac_cv_path_PKG_CONFIG"; then 10532 ac_pt_PKG_CONFIG=$PKG_CONFIG 10533 # Extract the first word of "pkg-config", so it can be a program name with args. 10534 set dummy pkg-config; ac_word=$2 10535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10536 $as_echo_n "checking for $ac_word... " >&6; } 10537 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : 10538 $as_echo_n "(cached) " >&6 10539 else 10540 case $ac_pt_PKG_CONFIG in 10541 [\\/]* | ?:[\\/]*) 10542 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. 10543 ;; 10544 *) 10545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10546 for as_dir in $PATH 10547 do 10548 IFS=$as_save_IFS 10549 test -z "$as_dir" && as_dir=. 10550 for ac_exec_ext in '' $ac_executable_extensions; do 10551 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10552 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 10553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10554 break 2 10555 fi 10556 done 10557 done 10558 IFS=$as_save_IFS 10559 10560 ;; 10561 esac 10562 fi 10563 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG 10564 if test -n "$ac_pt_PKG_CONFIG"; then 10565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 10566 $as_echo "$ac_pt_PKG_CONFIG" >&6; } 10567 else 10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10569 $as_echo "no" >&6; } 10570 fi 10571 10572 if test "x$ac_pt_PKG_CONFIG" = x; then 10573 PKG_CONFIG="" 10574 else 10575 case $cross_compiling:$ac_tool_warned in 10576 yes:) 10577 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 10578 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 10579 ac_tool_warned=yes ;; 10580 esac 10581 PKG_CONFIG=$ac_pt_PKG_CONFIG 10582 fi 10583 else 10584 PKG_CONFIG="$ac_cv_path_PKG_CONFIG" 10585 fi 10586 10587 fi 10588 if test -n "$PKG_CONFIG"; then 10589 _pkg_min_version=0.9.0 10590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 10591 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } 10592 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 10593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10594 $as_echo "yes" >&6; } 10595 else 10596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10597 $as_echo "no" >&6; } 10598 PKG_CONFIG="" 10599 fi 10600 10601 fi 10602 10603 # After basic tools have been setup, we can check build os specific details. 10604 10605 ############################################################################### 10606 10607 # Note that this is the build platform OS version! 10608 10609 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`" 10610 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`" 10611 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`" 10612 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`" 10613 10614 10615 10616 10617 10618 # Setup builddeps, for automatic downloading of tools we need. 10619 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in 10620 # boot-jdk setup, but we need to have basic tools setup first. 10621 10622 10623 # Check whether --with-builddeps-conf was given. 10624 if test "${with_builddeps_conf+set}" = set; then : 10625 withval=$with_builddeps_conf; 10626 fi 10627 10628 10629 10630 # Check whether --with-builddeps-server was given. 10631 if test "${with_builddeps_server+set}" = set; then : 10632 withval=$with_builddeps_server; 10633 fi 10634 10635 10636 10637 # Check whether --with-builddeps-dir was given. 10638 if test "${with_builddeps_dir+set}" = set; then : 10639 withval=$with_builddeps_dir; 10640 else 10641 with_builddeps_dir=/localhome/builddeps 10642 fi 10643 10644 10645 10646 # Check whether --with-builddeps-group was given. 10647 if test "${with_builddeps_group+set}" = set; then : 10648 withval=$with_builddeps_group; 10649 fi 10650 10651 10652 10653 10654 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 10655 if test "x$with_builddeps_conf" != x; then 10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5 10657 $as_echo_n "checking for supplied builddeps configuration file... " >&6; } 10658 builddepsfile=$with_builddeps_conf 10659 if test -s $builddepsfile; then 10660 . $builddepsfile 10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5 10662 $as_echo "loaded!" >&6; } 10663 else 10664 as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5 10665 fi 10666 else 10667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5 10668 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; } 10669 builddepsfile=`mktemp` 10670 touch $builddepsfile 10671 # Put all found confs into a single file. 10672 find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile 10673 # Source the file to acquire the variables 10674 if test -s $builddepsfile; then 10675 . $builddepsfile 10676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5 10677 $as_echo "found at least one!" >&6; } 10678 else 10679 as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5 10680 fi 10681 fi 10682 # Create build and target names that use _ instead of "-" and ".". 10683 # This is necessary to use them in variable names. 10684 build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` 10685 target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` 10686 # Extract rewrite information for build and target 10687 eval rewritten_build=\${REWRITE_${build_var}} 10688 if test "x$rewritten_build" = x; then 10689 rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME} 10690 echo Build stays the same $rewritten_build 10691 else 10692 echo Rewriting build for builddeps into $rewritten_build 10693 fi 10694 eval rewritten_target=\${REWRITE_${target_var}} 10695 if test "x$rewritten_target" = x; then 10696 rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME} 10697 echo Target stays the same $rewritten_target 10698 else 10699 echo Rewriting target for builddeps into $rewritten_target 10700 fi 10701 rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'` 10702 rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'` 10703 fi 10704 for ac_prog in 7z unzip 10705 do 10706 # Extract the first word of "$ac_prog", so it can be a program name with args. 10707 set dummy $ac_prog; ac_word=$2 10708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10709 $as_echo_n "checking for $ac_word... " >&6; } 10710 if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then : 10711 $as_echo_n "(cached) " >&6 10712 else 10713 if test -n "$BDEPS_UNZIP"; then 10714 ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test. 10715 else 10716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10717 for as_dir in $PATH 10718 do 10719 IFS=$as_save_IFS 10720 test -z "$as_dir" && as_dir=. 10721 for ac_exec_ext in '' $ac_executable_extensions; do 10722 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10723 ac_cv_prog_BDEPS_UNZIP="$ac_prog" 10724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10725 break 2 10726 fi 10727 done 10728 done 10729 IFS=$as_save_IFS 10730 10731 fi 10732 fi 10733 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP 10734 if test -n "$BDEPS_UNZIP"; then 10735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5 10736 $as_echo "$BDEPS_UNZIP" >&6; } 10737 else 10738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10739 $as_echo "no" >&6; } 10740 fi 10741 10742 10743 test -n "$BDEPS_UNZIP" && break 10744 done 10745 10746 if test "x$BDEPS_UNZIP" = x7z; then 10747 BDEPS_UNZIP="7z x" 10748 fi 10749 10750 for ac_prog in wget lftp ftp 10751 do 10752 # Extract the first word of "$ac_prog", so it can be a program name with args. 10753 set dummy $ac_prog; ac_word=$2 10754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10755 $as_echo_n "checking for $ac_word... " >&6; } 10756 if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then : 10757 $as_echo_n "(cached) " >&6 10758 else 10759 if test -n "$BDEPS_FTP"; then 10760 ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test. 10761 else 10762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10763 for as_dir in $PATH 10764 do 10765 IFS=$as_save_IFS 10766 test -z "$as_dir" && as_dir=. 10767 for ac_exec_ext in '' $ac_executable_extensions; do 10768 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10769 ac_cv_prog_BDEPS_FTP="$ac_prog" 10770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10771 break 2 10772 fi 10773 done 10774 done 10775 IFS=$as_save_IFS 10776 10777 fi 10778 fi 10779 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP 10780 if test -n "$BDEPS_FTP"; then 10781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5 10782 $as_echo "$BDEPS_FTP" >&6; } 10783 else 10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10785 $as_echo "no" >&6; } 10786 fi 10787 10788 10789 test -n "$BDEPS_FTP" && break 10790 done 10791 10792 10793 10794 ############################################################################### 10795 # 10796 # Determine OpenJDK variants, options and version numbers. 10797 # 10798 ############################################################################### 10799 10800 # We need build & target for this. 10801 10802 10803 ############################################################################### 10804 # 10805 # Should we build a JDK/JVM with headful support (ie a graphical ui)? 10806 # We always build headless support. 10807 # 10808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5 10809 $as_echo_n "checking headful support... " >&6; } 10810 # Check whether --enable-headful was given. 10811 if test "${enable_headful+set}" = set; then : 10812 enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful} 10813 else 10814 SUPPORT_HEADFUL=yes 10815 fi 10816 10817 10818 SUPPORT_HEADLESS=yes 10819 BUILD_HEADLESS="BUILD_HEADLESS:=true" 10820 10821 if test "x$SUPPORT_HEADFUL" = xyes; then 10822 # We are building both headful and headless. 10823 headful_msg="inlude support for both headful and headless" 10824 fi 10825 10826 if test "x$SUPPORT_HEADFUL" = xno; then 10827 # Thus we are building headless only. 10828 BUILD_HEADLESS="BUILD_HEADLESS:=true" 10829 headful_msg="headless only" 10830 fi 10831 10832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5 10833 $as_echo "$headful_msg" >&6; } 10834 10835 10836 10837 10838 10839 # Control wether Hotspot runs Queens test after build. 10840 # Check whether --enable-hotspot-test-in-build was given. 10841 if test "${enable_hotspot_test_in_build+set}" = set; then : 10842 enableval=$enable_hotspot_test_in_build; 10843 else 10844 enable_hotspot_test_in_build=no 10845 fi 10846 10847 if test "x$enable_hotspot_test_in_build" = "xyes"; then 10848 TEST_IN_BUILD=true 10849 else 10850 TEST_IN_BUILD=false 10851 fi 10852 10853 10854 ############################################################################### 10855 # 10856 # Choose cacerts source file 10857 # 10858 10859 # Check whether --with-cacerts-file was given. 10860 if test "${with_cacerts_file+set}" = set; then : 10861 withval=$with_cacerts_file; 10862 fi 10863 10864 if test "x$with_cacerts_file" != x; then 10865 CACERTS_FILE=$with_cacerts_file 10866 else 10867 if test "x$OPENJDK" = "xtrue"; then 10868 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts 10869 else 10870 CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal 10871 fi 10872 fi 10873 10874 10875 ############################################################################### 10876 # 10877 # Enable or disable unlimited crypto 10878 # 10879 # Check whether --enable-unlimited-crypto was given. 10880 if test "${enable_unlimited_crypto+set}" = set; then : 10881 enableval=$enable_unlimited_crypto; 10882 else 10883 enable_unlimited_crypto=no 10884 fi 10885 10886 if test "x$enable_unlimited_crypto" = "xyes"; then 10887 UNLIMITED_CRYPTO=true 10888 else 10889 UNLIMITED_CRYPTO=false 10890 fi 10891 10892 10893 ############################################################################### 10894 # 10895 # Enable or disable the elliptic curve crypto implementation 10896 # 10897 10898 10899 ############################################################################### 10900 # 10901 # Compress jars 10902 # 10903 COMPRESS_JARS=false 10904 10905 10906 10907 10908 # Source the version numbers 10909 . $AUTOCONF_DIR/version-numbers 10910 10911 # Get the settings from parameters 10912 10913 # Check whether --with-milestone was given. 10914 if test "${with_milestone+set}" = set; then : 10915 withval=$with_milestone; 10916 fi 10917 10918 if test "x$with_milestone" = xyes; then 10919 as_fn_error $? "Milestone must have a value" "$LINENO" 5 10920 elif test "x$with_milestone" != x; then 10921 MILESTONE="$with_milestone" 10922 fi 10923 if test "x$MILESTONE" = x; then 10924 MILESTONE=internal 10925 fi 10926 10927 10928 # Check whether --with-build-number was given. 10929 if test "${with_build_number+set}" = set; then : 10930 withval=$with_build_number; 10931 fi 10932 10933 if test "x$with_build_number" = xyes; then 10934 as_fn_error $? "Build number must have a value" "$LINENO" 5 10935 elif test "x$with_build_number" != x; then 10936 JDK_BUILD_NUMBER="$with_build_number" 10937 fi 10938 if test "x$JDK_BUILD_NUMBER" = x; then 10939 JDK_BUILD_NUMBER=b00 10940 fi 10941 10942 10943 # Check whether --with-user-release-suffix was given. 10944 if test "${with_user_release_suffix+set}" = set; then : 10945 withval=$with_user_release_suffix; 10946 fi 10947 10948 if test "x$with_user_release_suffix" = xyes; then 10949 as_fn_error $? "Release suffix must have a value" "$LINENO" 5 10950 elif test "x$with_user_release_suffix" != x; then 10951 USER_RELEASE_SUFFIX="$with_user_release_suffix" 10952 else 10953 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` 10954 # Avoid [:alnum:] since it depends on the locale. 10955 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` 10956 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 10957 fi 10958 10959 10960 # Now set the JDK version, milestone, build number etc. 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 COPYRIGHT_YEAR=`date +'%Y'` 10976 10977 10978 if test "x$JDK_UPDATE_VERSION" != x; then 10979 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" 10980 else 10981 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" 10982 fi 10983 10984 10985 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` 10986 10987 10988 10989 ############################################################################### 10990 # 10991 # Setup BootJDK, used to bootstrap the build. 10992 # 10993 ############################################################################### 10994 10995 10996 BOOT_JDK_FOUND=no 10997 10998 # Check whether --with-boot-jdk was given. 10999 if test "${with_boot_jdk+set}" = set; then : 11000 withval=$with_boot_jdk; 11001 fi 11002 11003 11004 # We look for the Boot JDK through various means, going from more certain to 11005 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if 11006 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we 11007 # must check if this is indeed valid; otherwise we'll continue looking. 11008 11009 # Test: Is bootjdk explicitely set by command line arguments? 11010 11011 if test "x$BOOT_JDK_FOUND" = xno; then 11012 # Now execute the test 11013 11014 if test "x$with_boot_jdk" != x; then 11015 BOOT_JDK=$with_boot_jdk 11016 BOOT_JDK_FOUND=maybe 11017 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5 11018 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;} 11019 fi 11020 11021 11022 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11023 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11024 # Do we have a bin/java? 11025 if test ! -x "$BOOT_JDK/bin/java"; then 11026 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11027 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11028 BOOT_JDK_FOUND=no 11029 else 11030 # Do we have a bin/javac? 11031 if test ! -x "$BOOT_JDK/bin/javac"; then 11032 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11034 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11035 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11036 BOOT_JDK_FOUND=no 11037 else 11038 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11039 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11040 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11041 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11042 BOOT_JDK_FOUND=no 11043 else 11044 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11045 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11046 11047 # Extra M4 quote needed to protect [] in grep expression. 11048 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11049 if test "x$FOUND_VERSION_78" = x; then 11050 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11052 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11053 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11054 BOOT_JDK_FOUND=no 11055 else 11056 # We're done! :-) 11057 BOOT_JDK_FOUND=yes 11058 11059 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11060 11061 # Input might be given as Windows format, start by converting to 11062 # unix format. 11063 path="$BOOT_JDK" 11064 new_path=`$CYGPATH -u "$path"` 11065 11066 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11067 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11068 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11069 # "foo.exe" is OK but "foo" is an error. 11070 # 11071 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11072 # It is also a way to make sure we got the proper file name for the real test later on. 11073 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11074 if test "x$test_shortpath" = x; then 11075 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11076 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11077 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11078 fi 11079 11080 # Call helper function which possibly converts this using DOS-style short mode. 11081 # If so, the updated path is stored in $new_path. 11082 11083 input_path="$new_path" 11084 # Check if we need to convert this using DOS-style short mode. If the path 11085 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11086 # take no chances and rewrite it. 11087 # Note: m4 eats our [], so we need to use [ and ] instead. 11088 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11089 if test "x$has_forbidden_chars" != x; then 11090 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11091 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11092 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11093 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11094 # Going to short mode and back again did indeed matter. Since short mode is 11095 # case insensitive, let's make it lowercase to improve readability. 11096 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11097 # Now convert it back to Unix-stile (cygpath) 11098 input_path=`$CYGPATH -u "$shortmode_path"` 11099 new_path="$input_path" 11100 fi 11101 fi 11102 11103 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11104 if test "x$test_cygdrive_prefix" = x; then 11105 # As a simple fix, exclude /usr/bin since it's not a real path. 11106 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11107 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11108 # a path prefixed by /cygdrive for fixpath to work. 11109 new_path="$CYGWIN_ROOT_PATH$input_path" 11110 fi 11111 fi 11112 11113 11114 if test "x$path" != "x$new_path"; then 11115 BOOT_JDK="$new_path" 11116 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11117 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11118 fi 11119 11120 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11121 11122 path="$BOOT_JDK" 11123 has_colon=`$ECHO $path | $GREP ^.:` 11124 new_path="$path" 11125 if test "x$has_colon" = x; then 11126 # Not in mixed or Windows style, start by that. 11127 new_path=`cmd //c echo $path` 11128 fi 11129 11130 11131 input_path="$new_path" 11132 # Check if we need to convert this using DOS-style short mode. If the path 11133 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11134 # take no chances and rewrite it. 11135 # Note: m4 eats our [], so we need to use [ and ] instead. 11136 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11137 if test "x$has_forbidden_chars" != x; then 11138 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11139 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11140 fi 11141 11142 11143 windows_path="$new_path" 11144 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11145 unix_path=`$CYGPATH -u "$windows_path"` 11146 new_path="$unix_path" 11147 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11148 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11149 new_path="$unix_path" 11150 fi 11151 11152 if test "x$path" != "x$new_path"; then 11153 BOOT_JDK="$new_path" 11154 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11155 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11156 fi 11157 11158 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11159 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11160 11161 else 11162 # We're on a posix platform. Hooray! :) 11163 path="$BOOT_JDK" 11164 11165 if test ! -f "$path" && test ! -d "$path"; then 11166 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11167 fi 11168 11169 has_space=`$ECHO "$path" | $GREP " "` 11170 if test "x$has_space" != x; then 11171 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11173 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11174 fi 11175 fi 11176 11177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11178 $as_echo_n "checking for Boot JDK... " >&6; } 11179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11180 $as_echo "$BOOT_JDK" >&6; } 11181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11182 $as_echo_n "checking Boot JDK version... " >&6; } 11183 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11185 $as_echo "$BOOT_JDK_VERSION" >&6; } 11186 fi # end check jdk version 11187 fi # end check rt.jar 11188 fi # end check javac 11189 fi # end check java 11190 fi # end check boot jdk found 11191 fi 11192 11193 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then 11194 # Having specified an argument which is incorrect will produce an instant failure; 11195 # we should not go on looking 11196 as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5 11197 fi 11198 11199 # Test: Is bootjdk available from builddeps? 11200 11201 if test "x$BOOT_JDK_FOUND" = xno; then 11202 # Now execute the test 11203 11204 11205 11206 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 11207 # Source the builddeps file again, to make sure it uses the latest variables! 11208 . $builddepsfile 11209 # Look for a target and build machine specific resource! 11210 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 11211 if test "x$resource" = x; then 11212 # Ok, lets instead look for a target specific resource 11213 eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}} 11214 fi 11215 if test "x$resource" = x; then 11216 # Ok, lets instead look for a build specific resource 11217 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}} 11218 fi 11219 if test "x$resource" = x; then 11220 # Ok, lets instead look for a generic resource 11221 # (The bootjdk comes from M4 and not the shell, thus no need for eval here.) 11222 resource=${builddep_bootjdk} 11223 fi 11224 if test "x$resource" != x; then 11225 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5 11226 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;} 11227 # If the resource in the builddeps.conf file is an existing directory, 11228 # for example /java/linux/cups 11229 if test -d ${resource}; then 11230 depdir=${resource} 11231 else 11232 11233 # bootjdk is for example mymodule 11234 # $resource is for example libs/general/libmymod_1_2_3.zip 11235 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 11236 # $with_builddeps_dir is for example /localhome/builddeps 11237 # depdir is the name of the variable into which we store the depdir, eg MYMOD 11238 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 11239 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 11240 filename=`basename $resource` 11241 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 11242 filebase=${filename%%.*} 11243 extension=${filename#*.} 11244 installdir=$with_builddeps_dir/$filebase 11245 if test ! -f $installdir/$filename.unpacked; then 11246 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5 11247 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;} 11248 if test ! -d $installdir; then 11249 mkdir -p $installdir 11250 fi 11251 if test ! -d $installdir; then 11252 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 11253 fi 11254 tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX` 11255 touch $tmpfile 11256 if test ! -f $tmpfile; then 11257 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 11258 fi 11259 11260 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 11261 # $tmpfile is the local file name for the downloaded file. 11262 VALID_TOOL=no 11263 if test "x$BDEPS_FTP" = xwget; then 11264 VALID_TOOL=yes 11265 wget -O $tmpfile $with_builddeps_server/$resource 11266 fi 11267 if test "x$BDEPS_FTP" = xlftp; then 11268 VALID_TOOL=yes 11269 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 11270 fi 11271 if test "x$BDEPS_FTP" = xftp; then 11272 VALID_TOOL=yes 11273 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 11274 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 11275 FTPUSERPWD=${FTPSERVER%%@*} 11276 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 11277 FTPUSER=${userpwd%%:*} 11278 FTPPWD=${userpwd#*@} 11279 FTPSERVER=${FTPSERVER#*@} 11280 else 11281 FTPUSER=ftp 11282 FTPPWD=ftp 11283 fi 11284 # the "pass" command does not work on some 11285 # ftp clients (read ftp.exe) but if it works, 11286 # passive mode is better! 11287 (\ 11288 echo "user $FTPUSER $FTPPWD" ;\ 11289 echo "pass" ;\ 11290 echo "bin" ;\ 11291 echo "get $FTPPATH $tmpfile" ;\ 11292 ) | ftp -in $FTPSERVER 11293 fi 11294 if test "x$VALID_TOOL" != xyes; then 11295 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 11296 fi 11297 11298 mv $tmpfile $installdir/$filename 11299 if test ! -s $installdir/$filename; then 11300 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 11301 fi 11302 case "$extension" in 11303 zip) echo "Unzipping $installdir/$filename..." 11304 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 11305 ;; 11306 tar.gz) echo "Untaring $installdir/$filename..." 11307 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 11308 ;; 11309 tgz) echo "Untaring $installdir/$filename..." 11310 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 11311 ;; 11312 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 11313 ;; 11314 esac 11315 fi 11316 if test -f $installdir/$filename.unpacked; then 11317 depdir=$installdir 11318 fi 11319 11320 fi 11321 # Source the builddeps file again, because in the previous command, the depdir 11322 # was updated to point at the current build dependency install directory. 11323 . $builddepsfile 11324 # Now extract variables from the builddeps.conf files. 11325 theroot=${builddep_bootjdk_ROOT} 11326 thecflags=${builddep_bootjdk_CFLAGS} 11327 thelibs=${builddep_bootjdk_LIBS} 11328 if test "x$depdir" = x; then 11329 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5 11330 fi 11331 BOOT_JDK=$depdir 11332 if test "x$theroot" != x; then 11333 BOOT_JDK="$theroot" 11334 fi 11335 if test "x$thecflags" != x; then 11336 BOOT_JDK_CFLAGS="$thecflags" 11337 fi 11338 if test "x$thelibs" != x; then 11339 BOOT_JDK_LIBS="$thelibs" 11340 fi 11341 BOOT_JDK_FOUND=maybe 11342 else BOOT_JDK_FOUND=no 11343 11344 fi 11345 else BOOT_JDK_FOUND=no 11346 11347 fi 11348 11349 11350 11351 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11352 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11353 # Do we have a bin/java? 11354 if test ! -x "$BOOT_JDK/bin/java"; then 11355 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11356 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11357 BOOT_JDK_FOUND=no 11358 else 11359 # Do we have a bin/javac? 11360 if test ! -x "$BOOT_JDK/bin/javac"; then 11361 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11363 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11364 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11365 BOOT_JDK_FOUND=no 11366 else 11367 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11368 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11369 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11370 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11371 BOOT_JDK_FOUND=no 11372 else 11373 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11374 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11375 11376 # Extra M4 quote needed to protect [] in grep expression. 11377 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11378 if test "x$FOUND_VERSION_78" = x; then 11379 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11381 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11382 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11383 BOOT_JDK_FOUND=no 11384 else 11385 # We're done! :-) 11386 BOOT_JDK_FOUND=yes 11387 11388 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11389 11390 # Input might be given as Windows format, start by converting to 11391 # unix format. 11392 path="$BOOT_JDK" 11393 new_path=`$CYGPATH -u "$path"` 11394 11395 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11396 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11397 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11398 # "foo.exe" is OK but "foo" is an error. 11399 # 11400 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11401 # It is also a way to make sure we got the proper file name for the real test later on. 11402 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11403 if test "x$test_shortpath" = x; then 11404 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11405 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11406 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11407 fi 11408 11409 # Call helper function which possibly converts this using DOS-style short mode. 11410 # If so, the updated path is stored in $new_path. 11411 11412 input_path="$new_path" 11413 # Check if we need to convert this using DOS-style short mode. If the path 11414 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11415 # take no chances and rewrite it. 11416 # Note: m4 eats our [], so we need to use [ and ] instead. 11417 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11418 if test "x$has_forbidden_chars" != x; then 11419 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11420 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11421 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11422 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11423 # Going to short mode and back again did indeed matter. Since short mode is 11424 # case insensitive, let's make it lowercase to improve readability. 11425 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11426 # Now convert it back to Unix-stile (cygpath) 11427 input_path=`$CYGPATH -u "$shortmode_path"` 11428 new_path="$input_path" 11429 fi 11430 fi 11431 11432 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11433 if test "x$test_cygdrive_prefix" = x; then 11434 # As a simple fix, exclude /usr/bin since it's not a real path. 11435 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11436 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11437 # a path prefixed by /cygdrive for fixpath to work. 11438 new_path="$CYGWIN_ROOT_PATH$input_path" 11439 fi 11440 fi 11441 11442 11443 if test "x$path" != "x$new_path"; then 11444 BOOT_JDK="$new_path" 11445 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11446 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11447 fi 11448 11449 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11450 11451 path="$BOOT_JDK" 11452 has_colon=`$ECHO $path | $GREP ^.:` 11453 new_path="$path" 11454 if test "x$has_colon" = x; then 11455 # Not in mixed or Windows style, start by that. 11456 new_path=`cmd //c echo $path` 11457 fi 11458 11459 11460 input_path="$new_path" 11461 # Check if we need to convert this using DOS-style short mode. If the path 11462 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11463 # take no chances and rewrite it. 11464 # Note: m4 eats our [], so we need to use [ and ] instead. 11465 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11466 if test "x$has_forbidden_chars" != x; then 11467 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11468 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11469 fi 11470 11471 11472 windows_path="$new_path" 11473 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11474 unix_path=`$CYGPATH -u "$windows_path"` 11475 new_path="$unix_path" 11476 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11477 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11478 new_path="$unix_path" 11479 fi 11480 11481 if test "x$path" != "x$new_path"; then 11482 BOOT_JDK="$new_path" 11483 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11484 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11485 fi 11486 11487 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11488 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11489 11490 else 11491 # We're on a posix platform. Hooray! :) 11492 path="$BOOT_JDK" 11493 11494 if test ! -f "$path" && test ! -d "$path"; then 11495 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11496 fi 11497 11498 has_space=`$ECHO "$path" | $GREP " "` 11499 if test "x$has_space" != x; then 11500 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11501 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11502 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11503 fi 11504 fi 11505 11506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11507 $as_echo_n "checking for Boot JDK... " >&6; } 11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11509 $as_echo "$BOOT_JDK" >&6; } 11510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11511 $as_echo_n "checking Boot JDK version... " >&6; } 11512 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11514 $as_echo "$BOOT_JDK_VERSION" >&6; } 11515 fi # end check jdk version 11516 fi # end check rt.jar 11517 fi # end check javac 11518 fi # end check java 11519 fi # end check boot jdk found 11520 fi 11521 11522 11523 # Test: Is $JAVA_HOME set? 11524 11525 if test "x$BOOT_JDK_FOUND" = xno; then 11526 # Now execute the test 11527 11528 if test "x$JAVA_HOME" != x; then 11529 JAVA_HOME_PROCESSED="$JAVA_HOME" 11530 11531 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11532 11533 # Input might be given as Windows format, start by converting to 11534 # unix format. 11535 path="$JAVA_HOME_PROCESSED" 11536 new_path=`$CYGPATH -u "$path"` 11537 11538 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11539 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11540 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11541 # "foo.exe" is OK but "foo" is an error. 11542 # 11543 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11544 # It is also a way to make sure we got the proper file name for the real test later on. 11545 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11546 if test "x$test_shortpath" = x; then 11547 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5 11548 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;} 11549 as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5 11550 fi 11551 11552 # Call helper function which possibly converts this using DOS-style short mode. 11553 # If so, the updated path is stored in $new_path. 11554 11555 input_path="$new_path" 11556 # Check if we need to convert this using DOS-style short mode. If the path 11557 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11558 # take no chances and rewrite it. 11559 # Note: m4 eats our [], so we need to use [ and ] instead. 11560 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11561 if test "x$has_forbidden_chars" != x; then 11562 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11563 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11564 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11565 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11566 # Going to short mode and back again did indeed matter. Since short mode is 11567 # case insensitive, let's make it lowercase to improve readability. 11568 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11569 # Now convert it back to Unix-stile (cygpath) 11570 input_path=`$CYGPATH -u "$shortmode_path"` 11571 new_path="$input_path" 11572 fi 11573 fi 11574 11575 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11576 if test "x$test_cygdrive_prefix" = x; then 11577 # As a simple fix, exclude /usr/bin since it's not a real path. 11578 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11579 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11580 # a path prefixed by /cygdrive for fixpath to work. 11581 new_path="$CYGWIN_ROOT_PATH$input_path" 11582 fi 11583 fi 11584 11585 11586 if test "x$path" != "x$new_path"; then 11587 JAVA_HOME_PROCESSED="$new_path" 11588 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5 11589 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;} 11590 fi 11591 11592 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11593 11594 path="$JAVA_HOME_PROCESSED" 11595 has_colon=`$ECHO $path | $GREP ^.:` 11596 new_path="$path" 11597 if test "x$has_colon" = x; then 11598 # Not in mixed or Windows style, start by that. 11599 new_path=`cmd //c echo $path` 11600 fi 11601 11602 11603 input_path="$new_path" 11604 # Check if we need to convert this using DOS-style short mode. If the path 11605 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11606 # take no chances and rewrite it. 11607 # Note: m4 eats our [], so we need to use [ and ] instead. 11608 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11609 if test "x$has_forbidden_chars" != x; then 11610 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11611 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11612 fi 11613 11614 11615 windows_path="$new_path" 11616 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11617 unix_path=`$CYGPATH -u "$windows_path"` 11618 new_path="$unix_path" 11619 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11620 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11621 new_path="$unix_path" 11622 fi 11623 11624 if test "x$path" != "x$new_path"; then 11625 JAVA_HOME_PROCESSED="$new_path" 11626 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5 11627 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;} 11628 fi 11629 11630 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11631 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11632 11633 else 11634 # We're on a posix platform. Hooray! :) 11635 path="$JAVA_HOME_PROCESSED" 11636 11637 if test ! -f "$path" && test ! -d "$path"; then 11638 as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5 11639 fi 11640 11641 has_space=`$ECHO "$path" | $GREP " "` 11642 if test "x$has_space" != x; then 11643 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5 11644 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;} 11645 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11646 fi 11647 fi 11648 11649 if test ! -d "$JAVA_HOME_PROCESSED"; then 11650 { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5 11651 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;} 11652 else 11653 # Aha, the user has set a JAVA_HOME 11654 # let us use that as the Boot JDK. 11655 BOOT_JDK="$JAVA_HOME_PROCESSED" 11656 BOOT_JDK_FOUND=maybe 11657 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5 11658 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;} 11659 fi 11660 fi 11661 11662 11663 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11664 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11665 # Do we have a bin/java? 11666 if test ! -x "$BOOT_JDK/bin/java"; then 11667 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11669 BOOT_JDK_FOUND=no 11670 else 11671 # Do we have a bin/javac? 11672 if test ! -x "$BOOT_JDK/bin/javac"; then 11673 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11674 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11675 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11676 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11677 BOOT_JDK_FOUND=no 11678 else 11679 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11680 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11681 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11682 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11683 BOOT_JDK_FOUND=no 11684 else 11685 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11686 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11687 11688 # Extra M4 quote needed to protect [] in grep expression. 11689 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11690 if test "x$FOUND_VERSION_78" = x; then 11691 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11692 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11693 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11694 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11695 BOOT_JDK_FOUND=no 11696 else 11697 # We're done! :-) 11698 BOOT_JDK_FOUND=yes 11699 11700 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11701 11702 # Input might be given as Windows format, start by converting to 11703 # unix format. 11704 path="$BOOT_JDK" 11705 new_path=`$CYGPATH -u "$path"` 11706 11707 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11708 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11709 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11710 # "foo.exe" is OK but "foo" is an error. 11711 # 11712 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11713 # It is also a way to make sure we got the proper file name for the real test later on. 11714 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11715 if test "x$test_shortpath" = x; then 11716 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11717 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11718 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11719 fi 11720 11721 # Call helper function which possibly converts this using DOS-style short mode. 11722 # If so, the updated path is stored in $new_path. 11723 11724 input_path="$new_path" 11725 # Check if we need to convert this using DOS-style short mode. If the path 11726 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11727 # take no chances and rewrite it. 11728 # Note: m4 eats our [], so we need to use [ and ] instead. 11729 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11730 if test "x$has_forbidden_chars" != x; then 11731 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11732 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11733 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11734 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11735 # Going to short mode and back again did indeed matter. Since short mode is 11736 # case insensitive, let's make it lowercase to improve readability. 11737 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11738 # Now convert it back to Unix-stile (cygpath) 11739 input_path=`$CYGPATH -u "$shortmode_path"` 11740 new_path="$input_path" 11741 fi 11742 fi 11743 11744 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11745 if test "x$test_cygdrive_prefix" = x; then 11746 # As a simple fix, exclude /usr/bin since it's not a real path. 11747 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11748 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11749 # a path prefixed by /cygdrive for fixpath to work. 11750 new_path="$CYGWIN_ROOT_PATH$input_path" 11751 fi 11752 fi 11753 11754 11755 if test "x$path" != "x$new_path"; then 11756 BOOT_JDK="$new_path" 11757 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11758 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11759 fi 11760 11761 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11762 11763 path="$BOOT_JDK" 11764 has_colon=`$ECHO $path | $GREP ^.:` 11765 new_path="$path" 11766 if test "x$has_colon" = x; then 11767 # Not in mixed or Windows style, start by that. 11768 new_path=`cmd //c echo $path` 11769 fi 11770 11771 11772 input_path="$new_path" 11773 # Check if we need to convert this using DOS-style short mode. If the path 11774 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11775 # take no chances and rewrite it. 11776 # Note: m4 eats our [], so we need to use [ and ] instead. 11777 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11778 if test "x$has_forbidden_chars" != x; then 11779 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11780 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11781 fi 11782 11783 11784 windows_path="$new_path" 11785 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11786 unix_path=`$CYGPATH -u "$windows_path"` 11787 new_path="$unix_path" 11788 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11789 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11790 new_path="$unix_path" 11791 fi 11792 11793 if test "x$path" != "x$new_path"; then 11794 BOOT_JDK="$new_path" 11795 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11796 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11797 fi 11798 11799 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11800 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11801 11802 else 11803 # We're on a posix platform. Hooray! :) 11804 path="$BOOT_JDK" 11805 11806 if test ! -f "$path" && test ! -d "$path"; then 11807 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11808 fi 11809 11810 has_space=`$ECHO "$path" | $GREP " "` 11811 if test "x$has_space" != x; then 11812 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11813 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11814 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11815 fi 11816 fi 11817 11818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11819 $as_echo_n "checking for Boot JDK... " >&6; } 11820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11821 $as_echo "$BOOT_JDK" >&6; } 11822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11823 $as_echo_n "checking Boot JDK version... " >&6; } 11824 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11826 $as_echo "$BOOT_JDK_VERSION" >&6; } 11827 fi # end check jdk version 11828 fi # end check rt.jar 11829 fi # end check javac 11830 fi # end check java 11831 fi # end check boot jdk found 11832 fi 11833 11834 11835 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) 11836 11837 if test "x$BOOT_JDK_FOUND" = xno; then 11838 # Now execute the test 11839 11840 if test -x /usr/libexec/java_home; then 11841 BOOT_JDK=`/usr/libexec/java_home` 11842 BOOT_JDK_FOUND=maybe 11843 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5 11844 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;} 11845 fi 11846 11847 11848 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11849 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11850 # Do we have a bin/java? 11851 if test ! -x "$BOOT_JDK/bin/java"; then 11852 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11853 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11854 BOOT_JDK_FOUND=no 11855 else 11856 # Do we have a bin/javac? 11857 if test ! -x "$BOOT_JDK/bin/javac"; then 11858 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11859 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11860 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11861 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11862 BOOT_JDK_FOUND=no 11863 else 11864 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11865 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11866 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11868 BOOT_JDK_FOUND=no 11869 else 11870 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11871 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11872 11873 # Extra M4 quote needed to protect [] in grep expression. 11874 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11875 if test "x$FOUND_VERSION_78" = x; then 11876 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11878 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11879 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11880 BOOT_JDK_FOUND=no 11881 else 11882 # We're done! :-) 11883 BOOT_JDK_FOUND=yes 11884 11885 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11886 11887 # Input might be given as Windows format, start by converting to 11888 # unix format. 11889 path="$BOOT_JDK" 11890 new_path=`$CYGPATH -u "$path"` 11891 11892 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11893 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11894 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11895 # "foo.exe" is OK but "foo" is an error. 11896 # 11897 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11898 # It is also a way to make sure we got the proper file name for the real test later on. 11899 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11900 if test "x$test_shortpath" = x; then 11901 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11902 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11903 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11904 fi 11905 11906 # Call helper function which possibly converts this using DOS-style short mode. 11907 # If so, the updated path is stored in $new_path. 11908 11909 input_path="$new_path" 11910 # Check if we need to convert this using DOS-style short mode. If the path 11911 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11912 # take no chances and rewrite it. 11913 # Note: m4 eats our [], so we need to use [ and ] instead. 11914 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11915 if test "x$has_forbidden_chars" != x; then 11916 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11917 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11918 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11919 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11920 # Going to short mode and back again did indeed matter. Since short mode is 11921 # case insensitive, let's make it lowercase to improve readability. 11922 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11923 # Now convert it back to Unix-stile (cygpath) 11924 input_path=`$CYGPATH -u "$shortmode_path"` 11925 new_path="$input_path" 11926 fi 11927 fi 11928 11929 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11930 if test "x$test_cygdrive_prefix" = x; then 11931 # As a simple fix, exclude /usr/bin since it's not a real path. 11932 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11933 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11934 # a path prefixed by /cygdrive for fixpath to work. 11935 new_path="$CYGWIN_ROOT_PATH$input_path" 11936 fi 11937 fi 11938 11939 11940 if test "x$path" != "x$new_path"; then 11941 BOOT_JDK="$new_path" 11942 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11943 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11944 fi 11945 11946 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11947 11948 path="$BOOT_JDK" 11949 has_colon=`$ECHO $path | $GREP ^.:` 11950 new_path="$path" 11951 if test "x$has_colon" = x; then 11952 # Not in mixed or Windows style, start by that. 11953 new_path=`cmd //c echo $path` 11954 fi 11955 11956 11957 input_path="$new_path" 11958 # Check if we need to convert this using DOS-style short mode. If the path 11959 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11960 # take no chances and rewrite it. 11961 # Note: m4 eats our [], so we need to use [ and ] instead. 11962 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11963 if test "x$has_forbidden_chars" != x; then 11964 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11965 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11966 fi 11967 11968 11969 windows_path="$new_path" 11970 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11971 unix_path=`$CYGPATH -u "$windows_path"` 11972 new_path="$unix_path" 11973 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11974 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11975 new_path="$unix_path" 11976 fi 11977 11978 if test "x$path" != "x$new_path"; then 11979 BOOT_JDK="$new_path" 11980 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11981 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11982 fi 11983 11984 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11985 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11986 11987 else 11988 # We're on a posix platform. Hooray! :) 11989 path="$BOOT_JDK" 11990 11991 if test ! -f "$path" && test ! -d "$path"; then 11992 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11993 fi 11994 11995 has_space=`$ECHO "$path" | $GREP " "` 11996 if test "x$has_space" != x; then 11997 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11999 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12000 fi 12001 fi 12002 12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12004 $as_echo_n "checking for Boot JDK... " >&6; } 12005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12006 $as_echo "$BOOT_JDK" >&6; } 12007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12008 $as_echo_n "checking Boot JDK version... " >&6; } 12009 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12011 $as_echo "$BOOT_JDK_VERSION" >&6; } 12012 fi # end check jdk version 12013 fi # end check rt.jar 12014 fi # end check javac 12015 fi # end check java 12016 fi # end check boot jdk found 12017 fi 12018 12019 12020 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK? 12021 12022 if test "x$BOOT_JDK_FOUND" = xno; then 12023 # Now execute the test 12024 12025 # Extract the first word of "javac", so it can be a program name with args. 12026 set dummy javac; ac_word=$2 12027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 12028 $as_echo_n "checking for $ac_word... " >&6; } 12029 if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then : 12030 $as_echo_n "(cached) " >&6 12031 else 12032 case $JAVAC_CHECK in 12033 [\\/]* | ?:[\\/]*) 12034 ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path. 12035 ;; 12036 *) 12037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12038 for as_dir in $PATH 12039 do 12040 IFS=$as_save_IFS 12041 test -z "$as_dir" && as_dir=. 12042 for ac_exec_ext in '' $ac_executable_extensions; do 12043 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 12044 ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext" 12045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 12046 break 2 12047 fi 12048 done 12049 done 12050 IFS=$as_save_IFS 12051 12052 ;; 12053 esac 12054 fi 12055 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK 12056 if test -n "$JAVAC_CHECK"; then 12057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5 12058 $as_echo "$JAVAC_CHECK" >&6; } 12059 else 12060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12061 $as_echo "no" >&6; } 12062 fi 12063 12064 12065 # Extract the first word of "java", so it can be a program name with args. 12066 set dummy java; ac_word=$2 12067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 12068 $as_echo_n "checking for $ac_word... " >&6; } 12069 if test "${ac_cv_path_JAVA_CHECK+set}" = set; then : 12070 $as_echo_n "(cached) " >&6 12071 else 12072 case $JAVA_CHECK in 12073 [\\/]* | ?:[\\/]*) 12074 ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path. 12075 ;; 12076 *) 12077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12078 for as_dir in $PATH 12079 do 12080 IFS=$as_save_IFS 12081 test -z "$as_dir" && as_dir=. 12082 for ac_exec_ext in '' $ac_executable_extensions; do 12083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 12084 ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext" 12085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 12086 break 2 12087 fi 12088 done 12089 done 12090 IFS=$as_save_IFS 12091 12092 ;; 12093 esac 12094 fi 12095 JAVA_CHECK=$ac_cv_path_JAVA_CHECK 12096 if test -n "$JAVA_CHECK"; then 12097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5 12098 $as_echo "$JAVA_CHECK" >&6; } 12099 else 12100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12101 $as_echo "no" >&6; } 12102 fi 12103 12104 12105 BINARY="$JAVAC_CHECK" 12106 if test "x$JAVAC_CHECK" = x; then 12107 BINARY="$JAVA_CHECK" 12108 fi 12109 if test "x$BINARY" != x; then 12110 # So there is a java(c) binary, it might be part of a JDK. 12111 # Lets find the JDK/JRE directory by following symbolic links. 12112 # Linux/GNU systems often have links from /usr/bin/java to 12113 # /etc/alternatives/java to the real JDK binary. 12114 12115 if test "x$OPENJDK_BUILD_OS" != xwindows; then 12116 # Follow a chain of symbolic links. Use readlink 12117 # where it exists, else fall back to horribly 12118 # complicated shell code. 12119 if test "x$READLINK_TESTED" != yes; then 12120 # On MacOSX there is a readlink tool with a different 12121 # purpose than the GNU readlink tool. Check the found readlink. 12122 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 12123 if test "x$ISGNU" = x; then 12124 # A readlink that we do not know how to use. 12125 # Are there other non-GNU readlinks out there? 12126 READLINK_TESTED=yes 12127 READLINK= 12128 fi 12129 fi 12130 12131 if test "x$READLINK" != x; then 12132 BINARY=`$READLINK -f $BINARY` 12133 else 12134 # Save the current directory for restoring afterwards 12135 STARTDIR=$PWD 12136 COUNTER=0 12137 sym_link_dir=`$DIRNAME $BINARY` 12138 sym_link_file=`$BASENAME $BINARY` 12139 # Use the system pwd and not the shell builtin to resolve directory symlinks 12140 cd $sym_link_dir 12141 cd `$THEPWDCMD` 12142 sym_link_dir=`$THEPWDCMD` 12143 # Resolve file symlinks 12144 while test $COUNTER -lt 20; do 12145 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 12146 if test "x$ISLINK" == x; then 12147 # This is not a symbolic link! We are done! 12148 break 12149 fi 12150 # Again resolve directory symlinks since the target of the just found 12151 # link could be in a different directory 12152 cd `$DIRNAME $ISLINK` 12153 sym_link_dir=`$THEPWDCMD` 12154 sym_link_file=`$BASENAME $ISLINK` 12155 let COUNTER=COUNTER+1 12156 done 12157 cd $STARTDIR 12158 BINARY=$sym_link_dir/$sym_link_file 12159 fi 12160 fi 12161 12162 BOOT_JDK=`dirname "$BINARY"` 12163 BOOT_JDK=`cd "$BOOT_JDK/.."; pwd` 12164 if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then 12165 # Looks like we found ourselves an JDK 12166 BOOT_JDK_FOUND=maybe 12167 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5 12168 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;} 12169 fi 12170 fi 12171 12172 12173 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12174 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12175 # Do we have a bin/java? 12176 if test ! -x "$BOOT_JDK/bin/java"; then 12177 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12179 BOOT_JDK_FOUND=no 12180 else 12181 # Do we have a bin/javac? 12182 if test ! -x "$BOOT_JDK/bin/javac"; then 12183 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12185 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12186 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12187 BOOT_JDK_FOUND=no 12188 else 12189 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12190 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12191 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12192 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12193 BOOT_JDK_FOUND=no 12194 else 12195 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12196 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12197 12198 # Extra M4 quote needed to protect [] in grep expression. 12199 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12200 if test "x$FOUND_VERSION_78" = x; then 12201 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12202 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12203 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12204 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12205 BOOT_JDK_FOUND=no 12206 else 12207 # We're done! :-) 12208 BOOT_JDK_FOUND=yes 12209 12210 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12211 12212 # Input might be given as Windows format, start by converting to 12213 # unix format. 12214 path="$BOOT_JDK" 12215 new_path=`$CYGPATH -u "$path"` 12216 12217 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12218 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12219 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12220 # "foo.exe" is OK but "foo" is an error. 12221 # 12222 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12223 # It is also a way to make sure we got the proper file name for the real test later on. 12224 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12225 if test "x$test_shortpath" = x; then 12226 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12227 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12228 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12229 fi 12230 12231 # Call helper function which possibly converts this using DOS-style short mode. 12232 # If so, the updated path is stored in $new_path. 12233 12234 input_path="$new_path" 12235 # Check if we need to convert this using DOS-style short mode. If the path 12236 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12237 # take no chances and rewrite it. 12238 # Note: m4 eats our [], so we need to use [ and ] instead. 12239 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12240 if test "x$has_forbidden_chars" != x; then 12241 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12242 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12243 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12244 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12245 # Going to short mode and back again did indeed matter. Since short mode is 12246 # case insensitive, let's make it lowercase to improve readability. 12247 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12248 # Now convert it back to Unix-stile (cygpath) 12249 input_path=`$CYGPATH -u "$shortmode_path"` 12250 new_path="$input_path" 12251 fi 12252 fi 12253 12254 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12255 if test "x$test_cygdrive_prefix" = x; then 12256 # As a simple fix, exclude /usr/bin since it's not a real path. 12257 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12258 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12259 # a path prefixed by /cygdrive for fixpath to work. 12260 new_path="$CYGWIN_ROOT_PATH$input_path" 12261 fi 12262 fi 12263 12264 12265 if test "x$path" != "x$new_path"; then 12266 BOOT_JDK="$new_path" 12267 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12268 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12269 fi 12270 12271 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12272 12273 path="$BOOT_JDK" 12274 has_colon=`$ECHO $path | $GREP ^.:` 12275 new_path="$path" 12276 if test "x$has_colon" = x; then 12277 # Not in mixed or Windows style, start by that. 12278 new_path=`cmd //c echo $path` 12279 fi 12280 12281 12282 input_path="$new_path" 12283 # Check if we need to convert this using DOS-style short mode. If the path 12284 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12285 # take no chances and rewrite it. 12286 # Note: m4 eats our [], so we need to use [ and ] instead. 12287 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12288 if test "x$has_forbidden_chars" != x; then 12289 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12290 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12291 fi 12292 12293 12294 windows_path="$new_path" 12295 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12296 unix_path=`$CYGPATH -u "$windows_path"` 12297 new_path="$unix_path" 12298 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12299 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12300 new_path="$unix_path" 12301 fi 12302 12303 if test "x$path" != "x$new_path"; then 12304 BOOT_JDK="$new_path" 12305 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12306 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12307 fi 12308 12309 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12310 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12311 12312 else 12313 # We're on a posix platform. Hooray! :) 12314 path="$BOOT_JDK" 12315 12316 if test ! -f "$path" && test ! -d "$path"; then 12317 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12318 fi 12319 12320 has_space=`$ECHO "$path" | $GREP " "` 12321 if test "x$has_space" != x; then 12322 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12323 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12324 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12325 fi 12326 fi 12327 12328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12329 $as_echo_n "checking for Boot JDK... " >&6; } 12330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12331 $as_echo "$BOOT_JDK" >&6; } 12332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12333 $as_echo_n "checking Boot JDK version... " >&6; } 12334 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12336 $as_echo "$BOOT_JDK_VERSION" >&6; } 12337 fi # end check jdk version 12338 fi # end check rt.jar 12339 fi # end check javac 12340 fi # end check java 12341 fi # end check boot jdk found 12342 fi 12343 12344 12345 # Test: Is there a JDK installed in default, well-known locations? 12346 12347 if test "x$BOOT_JDK_FOUND" = xno; then 12348 # Now execute the test 12349 12350 if test "x$OPENJDK_TARGET_OS" = xwindows; then 12351 12352 if test "x$BOOT_JDK_FOUND" = xno; then 12353 # Now execute the test 12354 12355 if test "x$ProgramW6432" != x; then 12356 VIRTUAL_DIR="$ProgramW6432/Java" 12357 12358 windows_path="$VIRTUAL_DIR" 12359 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12360 unix_path=`$CYGPATH -u "$windows_path"` 12361 VIRTUAL_DIR="$unix_path" 12362 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12363 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12364 VIRTUAL_DIR="$unix_path" 12365 fi 12366 12367 12368 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 12369 BOOT_JDK_SUFFIX="" 12370 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 12371 if test "x$ALL_JDKS_FOUND" != x; then 12372 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 12373 12374 if test "x$BOOT_JDK_FOUND" = xno; then 12375 # Now execute the test 12376 12377 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 12378 if test -d "$BOOT_JDK"; then 12379 BOOT_JDK_FOUND=maybe 12380 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 12381 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 12382 fi 12383 12384 12385 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12386 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12387 # Do we have a bin/java? 12388 if test ! -x "$BOOT_JDK/bin/java"; then 12389 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12390 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12391 BOOT_JDK_FOUND=no 12392 else 12393 # Do we have a bin/javac? 12394 if test ! -x "$BOOT_JDK/bin/javac"; then 12395 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12396 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12397 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12398 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12399 BOOT_JDK_FOUND=no 12400 else 12401 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12402 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12403 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12404 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12405 BOOT_JDK_FOUND=no 12406 else 12407 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12408 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12409 12410 # Extra M4 quote needed to protect [] in grep expression. 12411 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12412 if test "x$FOUND_VERSION_78" = x; then 12413 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12414 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12415 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12416 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12417 BOOT_JDK_FOUND=no 12418 else 12419 # We're done! :-) 12420 BOOT_JDK_FOUND=yes 12421 12422 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12423 12424 # Input might be given as Windows format, start by converting to 12425 # unix format. 12426 path="$BOOT_JDK" 12427 new_path=`$CYGPATH -u "$path"` 12428 12429 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12430 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12431 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12432 # "foo.exe" is OK but "foo" is an error. 12433 # 12434 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12435 # It is also a way to make sure we got the proper file name for the real test later on. 12436 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12437 if test "x$test_shortpath" = x; then 12438 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12439 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12440 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12441 fi 12442 12443 # Call helper function which possibly converts this using DOS-style short mode. 12444 # If so, the updated path is stored in $new_path. 12445 12446 input_path="$new_path" 12447 # Check if we need to convert this using DOS-style short mode. If the path 12448 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12449 # take no chances and rewrite it. 12450 # Note: m4 eats our [], so we need to use [ and ] instead. 12451 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12452 if test "x$has_forbidden_chars" != x; then 12453 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12454 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12455 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12456 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12457 # Going to short mode and back again did indeed matter. Since short mode is 12458 # case insensitive, let's make it lowercase to improve readability. 12459 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12460 # Now convert it back to Unix-stile (cygpath) 12461 input_path=`$CYGPATH -u "$shortmode_path"` 12462 new_path="$input_path" 12463 fi 12464 fi 12465 12466 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12467 if test "x$test_cygdrive_prefix" = x; then 12468 # As a simple fix, exclude /usr/bin since it's not a real path. 12469 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12470 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12471 # a path prefixed by /cygdrive for fixpath to work. 12472 new_path="$CYGWIN_ROOT_PATH$input_path" 12473 fi 12474 fi 12475 12476 12477 if test "x$path" != "x$new_path"; then 12478 BOOT_JDK="$new_path" 12479 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12480 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12481 fi 12482 12483 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12484 12485 path="$BOOT_JDK" 12486 has_colon=`$ECHO $path | $GREP ^.:` 12487 new_path="$path" 12488 if test "x$has_colon" = x; then 12489 # Not in mixed or Windows style, start by that. 12490 new_path=`cmd //c echo $path` 12491 fi 12492 12493 12494 input_path="$new_path" 12495 # Check if we need to convert this using DOS-style short mode. If the path 12496 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12497 # take no chances and rewrite it. 12498 # Note: m4 eats our [], so we need to use [ and ] instead. 12499 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12500 if test "x$has_forbidden_chars" != x; then 12501 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12502 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12503 fi 12504 12505 12506 windows_path="$new_path" 12507 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12508 unix_path=`$CYGPATH -u "$windows_path"` 12509 new_path="$unix_path" 12510 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12511 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12512 new_path="$unix_path" 12513 fi 12514 12515 if test "x$path" != "x$new_path"; then 12516 BOOT_JDK="$new_path" 12517 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12518 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12519 fi 12520 12521 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12522 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12523 12524 else 12525 # We're on a posix platform. Hooray! :) 12526 path="$BOOT_JDK" 12527 12528 if test ! -f "$path" && test ! -d "$path"; then 12529 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12530 fi 12531 12532 has_space=`$ECHO "$path" | $GREP " "` 12533 if test "x$has_space" != x; then 12534 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12535 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12536 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12537 fi 12538 fi 12539 12540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12541 $as_echo_n "checking for Boot JDK... " >&6; } 12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12543 $as_echo "$BOOT_JDK" >&6; } 12544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12545 $as_echo_n "checking Boot JDK version... " >&6; } 12546 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12548 $as_echo "$BOOT_JDK_VERSION" >&6; } 12549 fi # end check jdk version 12550 fi # end check rt.jar 12551 fi # end check javac 12552 fi # end check java 12553 fi # end check boot jdk found 12554 fi 12555 12556 done 12557 fi 12558 12559 fi 12560 12561 12562 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12563 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12564 # Do we have a bin/java? 12565 if test ! -x "$BOOT_JDK/bin/java"; then 12566 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12568 BOOT_JDK_FOUND=no 12569 else 12570 # Do we have a bin/javac? 12571 if test ! -x "$BOOT_JDK/bin/javac"; then 12572 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12573 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12574 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12575 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12576 BOOT_JDK_FOUND=no 12577 else 12578 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12579 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12580 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12581 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12582 BOOT_JDK_FOUND=no 12583 else 12584 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12585 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12586 12587 # Extra M4 quote needed to protect [] in grep expression. 12588 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12589 if test "x$FOUND_VERSION_78" = x; then 12590 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12592 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12593 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12594 BOOT_JDK_FOUND=no 12595 else 12596 # We're done! :-) 12597 BOOT_JDK_FOUND=yes 12598 12599 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12600 12601 # Input might be given as Windows format, start by converting to 12602 # unix format. 12603 path="$BOOT_JDK" 12604 new_path=`$CYGPATH -u "$path"` 12605 12606 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12607 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12608 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12609 # "foo.exe" is OK but "foo" is an error. 12610 # 12611 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12612 # It is also a way to make sure we got the proper file name for the real test later on. 12613 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12614 if test "x$test_shortpath" = x; then 12615 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12616 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12617 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12618 fi 12619 12620 # Call helper function which possibly converts this using DOS-style short mode. 12621 # If so, the updated path is stored in $new_path. 12622 12623 input_path="$new_path" 12624 # Check if we need to convert this using DOS-style short mode. If the path 12625 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12626 # take no chances and rewrite it. 12627 # Note: m4 eats our [], so we need to use [ and ] instead. 12628 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12629 if test "x$has_forbidden_chars" != x; then 12630 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12631 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12632 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12633 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12634 # Going to short mode and back again did indeed matter. Since short mode is 12635 # case insensitive, let's make it lowercase to improve readability. 12636 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12637 # Now convert it back to Unix-stile (cygpath) 12638 input_path=`$CYGPATH -u "$shortmode_path"` 12639 new_path="$input_path" 12640 fi 12641 fi 12642 12643 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12644 if test "x$test_cygdrive_prefix" = x; then 12645 # As a simple fix, exclude /usr/bin since it's not a real path. 12646 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12647 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12648 # a path prefixed by /cygdrive for fixpath to work. 12649 new_path="$CYGWIN_ROOT_PATH$input_path" 12650 fi 12651 fi 12652 12653 12654 if test "x$path" != "x$new_path"; then 12655 BOOT_JDK="$new_path" 12656 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12657 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12658 fi 12659 12660 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12661 12662 path="$BOOT_JDK" 12663 has_colon=`$ECHO $path | $GREP ^.:` 12664 new_path="$path" 12665 if test "x$has_colon" = x; then 12666 # Not in mixed or Windows style, start by that. 12667 new_path=`cmd //c echo $path` 12668 fi 12669 12670 12671 input_path="$new_path" 12672 # Check if we need to convert this using DOS-style short mode. If the path 12673 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12674 # take no chances and rewrite it. 12675 # Note: m4 eats our [], so we need to use [ and ] instead. 12676 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12677 if test "x$has_forbidden_chars" != x; then 12678 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12679 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12680 fi 12681 12682 12683 windows_path="$new_path" 12684 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12685 unix_path=`$CYGPATH -u "$windows_path"` 12686 new_path="$unix_path" 12687 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12688 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12689 new_path="$unix_path" 12690 fi 12691 12692 if test "x$path" != "x$new_path"; then 12693 BOOT_JDK="$new_path" 12694 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12695 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12696 fi 12697 12698 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12699 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12700 12701 else 12702 # We're on a posix platform. Hooray! :) 12703 path="$BOOT_JDK" 12704 12705 if test ! -f "$path" && test ! -d "$path"; then 12706 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12707 fi 12708 12709 has_space=`$ECHO "$path" | $GREP " "` 12710 if test "x$has_space" != x; then 12711 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12712 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12713 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12714 fi 12715 fi 12716 12717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12718 $as_echo_n "checking for Boot JDK... " >&6; } 12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12720 $as_echo "$BOOT_JDK" >&6; } 12721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12722 $as_echo_n "checking Boot JDK version... " >&6; } 12723 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12725 $as_echo "$BOOT_JDK_VERSION" >&6; } 12726 fi # end check jdk version 12727 fi # end check rt.jar 12728 fi # end check javac 12729 fi # end check java 12730 fi # end check boot jdk found 12731 fi 12732 12733 12734 if test "x$BOOT_JDK_FOUND" = xno; then 12735 # Now execute the test 12736 12737 if test "x$PROGRAMW6432" != x; then 12738 VIRTUAL_DIR="$PROGRAMW6432/Java" 12739 12740 windows_path="$VIRTUAL_DIR" 12741 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12742 unix_path=`$CYGPATH -u "$windows_path"` 12743 VIRTUAL_DIR="$unix_path" 12744 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12745 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12746 VIRTUAL_DIR="$unix_path" 12747 fi 12748 12749 12750 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 12751 BOOT_JDK_SUFFIX="" 12752 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 12753 if test "x$ALL_JDKS_FOUND" != x; then 12754 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 12755 12756 if test "x$BOOT_JDK_FOUND" = xno; then 12757 # Now execute the test 12758 12759 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 12760 if test -d "$BOOT_JDK"; then 12761 BOOT_JDK_FOUND=maybe 12762 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 12763 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 12764 fi 12765 12766 12767 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12768 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12769 # Do we have a bin/java? 12770 if test ! -x "$BOOT_JDK/bin/java"; then 12771 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12773 BOOT_JDK_FOUND=no 12774 else 12775 # Do we have a bin/javac? 12776 if test ! -x "$BOOT_JDK/bin/javac"; then 12777 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12778 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12779 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12780 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12781 BOOT_JDK_FOUND=no 12782 else 12783 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12784 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12785 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12786 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12787 BOOT_JDK_FOUND=no 12788 else 12789 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12790 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12791 12792 # Extra M4 quote needed to protect [] in grep expression. 12793 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12794 if test "x$FOUND_VERSION_78" = x; then 12795 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12796 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12797 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12798 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12799 BOOT_JDK_FOUND=no 12800 else 12801 # We're done! :-) 12802 BOOT_JDK_FOUND=yes 12803 12804 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12805 12806 # Input might be given as Windows format, start by converting to 12807 # unix format. 12808 path="$BOOT_JDK" 12809 new_path=`$CYGPATH -u "$path"` 12810 12811 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12812 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12813 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12814 # "foo.exe" is OK but "foo" is an error. 12815 # 12816 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12817 # It is also a way to make sure we got the proper file name for the real test later on. 12818 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12819 if test "x$test_shortpath" = x; then 12820 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12821 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12822 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12823 fi 12824 12825 # Call helper function which possibly converts this using DOS-style short mode. 12826 # If so, the updated path is stored in $new_path. 12827 12828 input_path="$new_path" 12829 # Check if we need to convert this using DOS-style short mode. If the path 12830 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12831 # take no chances and rewrite it. 12832 # Note: m4 eats our [], so we need to use [ and ] instead. 12833 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12834 if test "x$has_forbidden_chars" != x; then 12835 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12836 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12837 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12838 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12839 # Going to short mode and back again did indeed matter. Since short mode is 12840 # case insensitive, let's make it lowercase to improve readability. 12841 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12842 # Now convert it back to Unix-stile (cygpath) 12843 input_path=`$CYGPATH -u "$shortmode_path"` 12844 new_path="$input_path" 12845 fi 12846 fi 12847 12848 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12849 if test "x$test_cygdrive_prefix" = x; then 12850 # As a simple fix, exclude /usr/bin since it's not a real path. 12851 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12852 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12853 # a path prefixed by /cygdrive for fixpath to work. 12854 new_path="$CYGWIN_ROOT_PATH$input_path" 12855 fi 12856 fi 12857 12858 12859 if test "x$path" != "x$new_path"; then 12860 BOOT_JDK="$new_path" 12861 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12862 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12863 fi 12864 12865 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12866 12867 path="$BOOT_JDK" 12868 has_colon=`$ECHO $path | $GREP ^.:` 12869 new_path="$path" 12870 if test "x$has_colon" = x; then 12871 # Not in mixed or Windows style, start by that. 12872 new_path=`cmd //c echo $path` 12873 fi 12874 12875 12876 input_path="$new_path" 12877 # Check if we need to convert this using DOS-style short mode. If the path 12878 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12879 # take no chances and rewrite it. 12880 # Note: m4 eats our [], so we need to use [ and ] instead. 12881 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12882 if test "x$has_forbidden_chars" != x; then 12883 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12884 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12885 fi 12886 12887 12888 windows_path="$new_path" 12889 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12890 unix_path=`$CYGPATH -u "$windows_path"` 12891 new_path="$unix_path" 12892 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12893 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12894 new_path="$unix_path" 12895 fi 12896 12897 if test "x$path" != "x$new_path"; then 12898 BOOT_JDK="$new_path" 12899 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12900 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12901 fi 12902 12903 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12904 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12905 12906 else 12907 # We're on a posix platform. Hooray! :) 12908 path="$BOOT_JDK" 12909 12910 if test ! -f "$path" && test ! -d "$path"; then 12911 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12912 fi 12913 12914 has_space=`$ECHO "$path" | $GREP " "` 12915 if test "x$has_space" != x; then 12916 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12917 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12918 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12919 fi 12920 fi 12921 12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12923 $as_echo_n "checking for Boot JDK... " >&6; } 12924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12925 $as_echo "$BOOT_JDK" >&6; } 12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12927 $as_echo_n "checking Boot JDK version... " >&6; } 12928 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12930 $as_echo "$BOOT_JDK_VERSION" >&6; } 12931 fi # end check jdk version 12932 fi # end check rt.jar 12933 fi # end check javac 12934 fi # end check java 12935 fi # end check boot jdk found 12936 fi 12937 12938 done 12939 fi 12940 12941 fi 12942 12943 12944 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12945 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12946 # Do we have a bin/java? 12947 if test ! -x "$BOOT_JDK/bin/java"; then 12948 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12949 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12950 BOOT_JDK_FOUND=no 12951 else 12952 # Do we have a bin/javac? 12953 if test ! -x "$BOOT_JDK/bin/javac"; then 12954 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12955 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12956 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12957 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12958 BOOT_JDK_FOUND=no 12959 else 12960 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12961 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12962 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12964 BOOT_JDK_FOUND=no 12965 else 12966 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12967 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12968 12969 # Extra M4 quote needed to protect [] in grep expression. 12970 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12971 if test "x$FOUND_VERSION_78" = x; then 12972 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12974 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12975 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12976 BOOT_JDK_FOUND=no 12977 else 12978 # We're done! :-) 12979 BOOT_JDK_FOUND=yes 12980 12981 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12982 12983 # Input might be given as Windows format, start by converting to 12984 # unix format. 12985 path="$BOOT_JDK" 12986 new_path=`$CYGPATH -u "$path"` 12987 12988 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12989 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12990 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12991 # "foo.exe" is OK but "foo" is an error. 12992 # 12993 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12994 # It is also a way to make sure we got the proper file name for the real test later on. 12995 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12996 if test "x$test_shortpath" = x; then 12997 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12999 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13000 fi 13001 13002 # Call helper function which possibly converts this using DOS-style short mode. 13003 # If so, the updated path is stored in $new_path. 13004 13005 input_path="$new_path" 13006 # Check if we need to convert this using DOS-style short mode. If the path 13007 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13008 # take no chances and rewrite it. 13009 # Note: m4 eats our [], so we need to use [ and ] instead. 13010 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13011 if test "x$has_forbidden_chars" != x; then 13012 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13013 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13014 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13015 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13016 # Going to short mode and back again did indeed matter. Since short mode is 13017 # case insensitive, let's make it lowercase to improve readability. 13018 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13019 # Now convert it back to Unix-stile (cygpath) 13020 input_path=`$CYGPATH -u "$shortmode_path"` 13021 new_path="$input_path" 13022 fi 13023 fi 13024 13025 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13026 if test "x$test_cygdrive_prefix" = x; then 13027 # As a simple fix, exclude /usr/bin since it's not a real path. 13028 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13029 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13030 # a path prefixed by /cygdrive for fixpath to work. 13031 new_path="$CYGWIN_ROOT_PATH$input_path" 13032 fi 13033 fi 13034 13035 13036 if test "x$path" != "x$new_path"; then 13037 BOOT_JDK="$new_path" 13038 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13039 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13040 fi 13041 13042 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13043 13044 path="$BOOT_JDK" 13045 has_colon=`$ECHO $path | $GREP ^.:` 13046 new_path="$path" 13047 if test "x$has_colon" = x; then 13048 # Not in mixed or Windows style, start by that. 13049 new_path=`cmd //c echo $path` 13050 fi 13051 13052 13053 input_path="$new_path" 13054 # Check if we need to convert this using DOS-style short mode. If the path 13055 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13056 # take no chances and rewrite it. 13057 # Note: m4 eats our [], so we need to use [ and ] instead. 13058 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13059 if test "x$has_forbidden_chars" != x; then 13060 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13061 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13062 fi 13063 13064 13065 windows_path="$new_path" 13066 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13067 unix_path=`$CYGPATH -u "$windows_path"` 13068 new_path="$unix_path" 13069 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13070 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13071 new_path="$unix_path" 13072 fi 13073 13074 if test "x$path" != "x$new_path"; then 13075 BOOT_JDK="$new_path" 13076 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13077 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13078 fi 13079 13080 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13081 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13082 13083 else 13084 # We're on a posix platform. Hooray! :) 13085 path="$BOOT_JDK" 13086 13087 if test ! -f "$path" && test ! -d "$path"; then 13088 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13089 fi 13090 13091 has_space=`$ECHO "$path" | $GREP " "` 13092 if test "x$has_space" != x; then 13093 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13094 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13095 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13096 fi 13097 fi 13098 13099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13100 $as_echo_n "checking for Boot JDK... " >&6; } 13101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13102 $as_echo "$BOOT_JDK" >&6; } 13103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13104 $as_echo_n "checking Boot JDK version... " >&6; } 13105 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13107 $as_echo "$BOOT_JDK_VERSION" >&6; } 13108 fi # end check jdk version 13109 fi # end check rt.jar 13110 fi # end check javac 13111 fi # end check java 13112 fi # end check boot jdk found 13113 fi 13114 13115 13116 if test "x$BOOT_JDK_FOUND" = xno; then 13117 # Now execute the test 13118 13119 if test "x$PROGRAMFILES" != x; then 13120 VIRTUAL_DIR="$PROGRAMFILES/Java" 13121 13122 windows_path="$VIRTUAL_DIR" 13123 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13124 unix_path=`$CYGPATH -u "$windows_path"` 13125 VIRTUAL_DIR="$unix_path" 13126 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13127 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13128 VIRTUAL_DIR="$unix_path" 13129 fi 13130 13131 13132 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 13133 BOOT_JDK_SUFFIX="" 13134 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13135 if test "x$ALL_JDKS_FOUND" != x; then 13136 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13137 13138 if test "x$BOOT_JDK_FOUND" = xno; then 13139 # Now execute the test 13140 13141 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13142 if test -d "$BOOT_JDK"; then 13143 BOOT_JDK_FOUND=maybe 13144 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13145 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13146 fi 13147 13148 13149 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13150 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13151 # Do we have a bin/java? 13152 if test ! -x "$BOOT_JDK/bin/java"; then 13153 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13154 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13155 BOOT_JDK_FOUND=no 13156 else 13157 # Do we have a bin/javac? 13158 if test ! -x "$BOOT_JDK/bin/javac"; then 13159 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13161 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13162 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13163 BOOT_JDK_FOUND=no 13164 else 13165 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13166 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13167 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13169 BOOT_JDK_FOUND=no 13170 else 13171 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13172 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13173 13174 # Extra M4 quote needed to protect [] in grep expression. 13175 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13176 if test "x$FOUND_VERSION_78" = x; then 13177 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13179 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13180 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13181 BOOT_JDK_FOUND=no 13182 else 13183 # We're done! :-) 13184 BOOT_JDK_FOUND=yes 13185 13186 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13187 13188 # Input might be given as Windows format, start by converting to 13189 # unix format. 13190 path="$BOOT_JDK" 13191 new_path=`$CYGPATH -u "$path"` 13192 13193 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13194 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13195 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13196 # "foo.exe" is OK but "foo" is an error. 13197 # 13198 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13199 # It is also a way to make sure we got the proper file name for the real test later on. 13200 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13201 if test "x$test_shortpath" = x; then 13202 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13203 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13204 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13205 fi 13206 13207 # Call helper function which possibly converts this using DOS-style short mode. 13208 # If so, the updated path is stored in $new_path. 13209 13210 input_path="$new_path" 13211 # Check if we need to convert this using DOS-style short mode. If the path 13212 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13213 # take no chances and rewrite it. 13214 # Note: m4 eats our [], so we need to use [ and ] instead. 13215 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13216 if test "x$has_forbidden_chars" != x; then 13217 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13218 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13219 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13220 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13221 # Going to short mode and back again did indeed matter. Since short mode is 13222 # case insensitive, let's make it lowercase to improve readability. 13223 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13224 # Now convert it back to Unix-stile (cygpath) 13225 input_path=`$CYGPATH -u "$shortmode_path"` 13226 new_path="$input_path" 13227 fi 13228 fi 13229 13230 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13231 if test "x$test_cygdrive_prefix" = x; then 13232 # As a simple fix, exclude /usr/bin since it's not a real path. 13233 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13234 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13235 # a path prefixed by /cygdrive for fixpath to work. 13236 new_path="$CYGWIN_ROOT_PATH$input_path" 13237 fi 13238 fi 13239 13240 13241 if test "x$path" != "x$new_path"; then 13242 BOOT_JDK="$new_path" 13243 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13244 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13245 fi 13246 13247 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13248 13249 path="$BOOT_JDK" 13250 has_colon=`$ECHO $path | $GREP ^.:` 13251 new_path="$path" 13252 if test "x$has_colon" = x; then 13253 # Not in mixed or Windows style, start by that. 13254 new_path=`cmd //c echo $path` 13255 fi 13256 13257 13258 input_path="$new_path" 13259 # Check if we need to convert this using DOS-style short mode. If the path 13260 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13261 # take no chances and rewrite it. 13262 # Note: m4 eats our [], so we need to use [ and ] instead. 13263 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13264 if test "x$has_forbidden_chars" != x; then 13265 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13266 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13267 fi 13268 13269 13270 windows_path="$new_path" 13271 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13272 unix_path=`$CYGPATH -u "$windows_path"` 13273 new_path="$unix_path" 13274 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13275 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13276 new_path="$unix_path" 13277 fi 13278 13279 if test "x$path" != "x$new_path"; then 13280 BOOT_JDK="$new_path" 13281 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13282 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13283 fi 13284 13285 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13286 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13287 13288 else 13289 # We're on a posix platform. Hooray! :) 13290 path="$BOOT_JDK" 13291 13292 if test ! -f "$path" && test ! -d "$path"; then 13293 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13294 fi 13295 13296 has_space=`$ECHO "$path" | $GREP " "` 13297 if test "x$has_space" != x; then 13298 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13299 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13300 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13301 fi 13302 fi 13303 13304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13305 $as_echo_n "checking for Boot JDK... " >&6; } 13306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13307 $as_echo "$BOOT_JDK" >&6; } 13308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13309 $as_echo_n "checking Boot JDK version... " >&6; } 13310 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13312 $as_echo "$BOOT_JDK_VERSION" >&6; } 13313 fi # end check jdk version 13314 fi # end check rt.jar 13315 fi # end check javac 13316 fi # end check java 13317 fi # end check boot jdk found 13318 fi 13319 13320 done 13321 fi 13322 13323 fi 13324 13325 13326 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13327 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13328 # Do we have a bin/java? 13329 if test ! -x "$BOOT_JDK/bin/java"; then 13330 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13331 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13332 BOOT_JDK_FOUND=no 13333 else 13334 # Do we have a bin/javac? 13335 if test ! -x "$BOOT_JDK/bin/javac"; then 13336 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13337 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13338 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13339 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13340 BOOT_JDK_FOUND=no 13341 else 13342 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13343 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13344 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13345 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13346 BOOT_JDK_FOUND=no 13347 else 13348 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13349 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13350 13351 # Extra M4 quote needed to protect [] in grep expression. 13352 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13353 if test "x$FOUND_VERSION_78" = x; then 13354 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13356 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13357 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13358 BOOT_JDK_FOUND=no 13359 else 13360 # We're done! :-) 13361 BOOT_JDK_FOUND=yes 13362 13363 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13364 13365 # Input might be given as Windows format, start by converting to 13366 # unix format. 13367 path="$BOOT_JDK" 13368 new_path=`$CYGPATH -u "$path"` 13369 13370 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13371 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13372 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13373 # "foo.exe" is OK but "foo" is an error. 13374 # 13375 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13376 # It is also a way to make sure we got the proper file name for the real test later on. 13377 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13378 if test "x$test_shortpath" = x; then 13379 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13380 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13381 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13382 fi 13383 13384 # Call helper function which possibly converts this using DOS-style short mode. 13385 # If so, the updated path is stored in $new_path. 13386 13387 input_path="$new_path" 13388 # Check if we need to convert this using DOS-style short mode. If the path 13389 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13390 # take no chances and rewrite it. 13391 # Note: m4 eats our [], so we need to use [ and ] instead. 13392 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13393 if test "x$has_forbidden_chars" != x; then 13394 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13395 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13396 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13397 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13398 # Going to short mode and back again did indeed matter. Since short mode is 13399 # case insensitive, let's make it lowercase to improve readability. 13400 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13401 # Now convert it back to Unix-stile (cygpath) 13402 input_path=`$CYGPATH -u "$shortmode_path"` 13403 new_path="$input_path" 13404 fi 13405 fi 13406 13407 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13408 if test "x$test_cygdrive_prefix" = x; then 13409 # As a simple fix, exclude /usr/bin since it's not a real path. 13410 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13411 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13412 # a path prefixed by /cygdrive for fixpath to work. 13413 new_path="$CYGWIN_ROOT_PATH$input_path" 13414 fi 13415 fi 13416 13417 13418 if test "x$path" != "x$new_path"; then 13419 BOOT_JDK="$new_path" 13420 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13421 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13422 fi 13423 13424 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13425 13426 path="$BOOT_JDK" 13427 has_colon=`$ECHO $path | $GREP ^.:` 13428 new_path="$path" 13429 if test "x$has_colon" = x; then 13430 # Not in mixed or Windows style, start by that. 13431 new_path=`cmd //c echo $path` 13432 fi 13433 13434 13435 input_path="$new_path" 13436 # Check if we need to convert this using DOS-style short mode. If the path 13437 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13438 # take no chances and rewrite it. 13439 # Note: m4 eats our [], so we need to use [ and ] instead. 13440 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13441 if test "x$has_forbidden_chars" != x; then 13442 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13443 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13444 fi 13445 13446 13447 windows_path="$new_path" 13448 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13449 unix_path=`$CYGPATH -u "$windows_path"` 13450 new_path="$unix_path" 13451 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13452 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13453 new_path="$unix_path" 13454 fi 13455 13456 if test "x$path" != "x$new_path"; then 13457 BOOT_JDK="$new_path" 13458 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13459 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13460 fi 13461 13462 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13463 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13464 13465 else 13466 # We're on a posix platform. Hooray! :) 13467 path="$BOOT_JDK" 13468 13469 if test ! -f "$path" && test ! -d "$path"; then 13470 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13471 fi 13472 13473 has_space=`$ECHO "$path" | $GREP " "` 13474 if test "x$has_space" != x; then 13475 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13476 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13477 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13478 fi 13479 fi 13480 13481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13482 $as_echo_n "checking for Boot JDK... " >&6; } 13483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13484 $as_echo "$BOOT_JDK" >&6; } 13485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13486 $as_echo_n "checking Boot JDK version... " >&6; } 13487 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13489 $as_echo "$BOOT_JDK_VERSION" >&6; } 13490 fi # end check jdk version 13491 fi # end check rt.jar 13492 fi # end check javac 13493 fi # end check java 13494 fi # end check boot jdk found 13495 fi 13496 13497 13498 if test "x$BOOT_JDK_FOUND" = xno; then 13499 # Now execute the test 13500 13501 if test "x$ProgramFiles" != x; then 13502 VIRTUAL_DIR="$ProgramFiles/Java" 13503 13504 windows_path="$VIRTUAL_DIR" 13505 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13506 unix_path=`$CYGPATH -u "$windows_path"` 13507 VIRTUAL_DIR="$unix_path" 13508 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13509 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13510 VIRTUAL_DIR="$unix_path" 13511 fi 13512 13513 13514 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 13515 BOOT_JDK_SUFFIX="" 13516 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13517 if test "x$ALL_JDKS_FOUND" != x; then 13518 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13519 13520 if test "x$BOOT_JDK_FOUND" = xno; then 13521 # Now execute the test 13522 13523 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13524 if test -d "$BOOT_JDK"; then 13525 BOOT_JDK_FOUND=maybe 13526 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13527 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13528 fi 13529 13530 13531 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13532 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13533 # Do we have a bin/java? 13534 if test ! -x "$BOOT_JDK/bin/java"; then 13535 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13536 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13537 BOOT_JDK_FOUND=no 13538 else 13539 # Do we have a bin/javac? 13540 if test ! -x "$BOOT_JDK/bin/javac"; then 13541 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13543 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13544 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13545 BOOT_JDK_FOUND=no 13546 else 13547 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13548 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13549 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13550 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13551 BOOT_JDK_FOUND=no 13552 else 13553 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13554 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13555 13556 # Extra M4 quote needed to protect [] in grep expression. 13557 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13558 if test "x$FOUND_VERSION_78" = x; then 13559 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13560 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13561 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13562 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13563 BOOT_JDK_FOUND=no 13564 else 13565 # We're done! :-) 13566 BOOT_JDK_FOUND=yes 13567 13568 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13569 13570 # Input might be given as Windows format, start by converting to 13571 # unix format. 13572 path="$BOOT_JDK" 13573 new_path=`$CYGPATH -u "$path"` 13574 13575 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13576 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13577 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13578 # "foo.exe" is OK but "foo" is an error. 13579 # 13580 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13581 # It is also a way to make sure we got the proper file name for the real test later on. 13582 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13583 if test "x$test_shortpath" = x; then 13584 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13585 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13586 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13587 fi 13588 13589 # Call helper function which possibly converts this using DOS-style short mode. 13590 # If so, the updated path is stored in $new_path. 13591 13592 input_path="$new_path" 13593 # Check if we need to convert this using DOS-style short mode. If the path 13594 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13595 # take no chances and rewrite it. 13596 # Note: m4 eats our [], so we need to use [ and ] instead. 13597 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13598 if test "x$has_forbidden_chars" != x; then 13599 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13600 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13601 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13602 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13603 # Going to short mode and back again did indeed matter. Since short mode is 13604 # case insensitive, let's make it lowercase to improve readability. 13605 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13606 # Now convert it back to Unix-stile (cygpath) 13607 input_path=`$CYGPATH -u "$shortmode_path"` 13608 new_path="$input_path" 13609 fi 13610 fi 13611 13612 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13613 if test "x$test_cygdrive_prefix" = x; then 13614 # As a simple fix, exclude /usr/bin since it's not a real path. 13615 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13616 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13617 # a path prefixed by /cygdrive for fixpath to work. 13618 new_path="$CYGWIN_ROOT_PATH$input_path" 13619 fi 13620 fi 13621 13622 13623 if test "x$path" != "x$new_path"; then 13624 BOOT_JDK="$new_path" 13625 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13627 fi 13628 13629 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13630 13631 path="$BOOT_JDK" 13632 has_colon=`$ECHO $path | $GREP ^.:` 13633 new_path="$path" 13634 if test "x$has_colon" = x; then 13635 # Not in mixed or Windows style, start by that. 13636 new_path=`cmd //c echo $path` 13637 fi 13638 13639 13640 input_path="$new_path" 13641 # Check if we need to convert this using DOS-style short mode. If the path 13642 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13643 # take no chances and rewrite it. 13644 # Note: m4 eats our [], so we need to use [ and ] instead. 13645 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13646 if test "x$has_forbidden_chars" != x; then 13647 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13648 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13649 fi 13650 13651 13652 windows_path="$new_path" 13653 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13654 unix_path=`$CYGPATH -u "$windows_path"` 13655 new_path="$unix_path" 13656 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13657 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13658 new_path="$unix_path" 13659 fi 13660 13661 if test "x$path" != "x$new_path"; then 13662 BOOT_JDK="$new_path" 13663 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13664 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13665 fi 13666 13667 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13668 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13669 13670 else 13671 # We're on a posix platform. Hooray! :) 13672 path="$BOOT_JDK" 13673 13674 if test ! -f "$path" && test ! -d "$path"; then 13675 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13676 fi 13677 13678 has_space=`$ECHO "$path" | $GREP " "` 13679 if test "x$has_space" != x; then 13680 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13681 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13682 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13683 fi 13684 fi 13685 13686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13687 $as_echo_n "checking for Boot JDK... " >&6; } 13688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13689 $as_echo "$BOOT_JDK" >&6; } 13690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13691 $as_echo_n "checking Boot JDK version... " >&6; } 13692 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13694 $as_echo "$BOOT_JDK_VERSION" >&6; } 13695 fi # end check jdk version 13696 fi # end check rt.jar 13697 fi # end check javac 13698 fi # end check java 13699 fi # end check boot jdk found 13700 fi 13701 13702 done 13703 fi 13704 13705 fi 13706 13707 13708 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13709 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13710 # Do we have a bin/java? 13711 if test ! -x "$BOOT_JDK/bin/java"; then 13712 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13713 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13714 BOOT_JDK_FOUND=no 13715 else 13716 # Do we have a bin/javac? 13717 if test ! -x "$BOOT_JDK/bin/javac"; then 13718 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13719 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13720 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13721 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13722 BOOT_JDK_FOUND=no 13723 else 13724 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13725 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13726 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13728 BOOT_JDK_FOUND=no 13729 else 13730 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13731 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13732 13733 # Extra M4 quote needed to protect [] in grep expression. 13734 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13735 if test "x$FOUND_VERSION_78" = x; then 13736 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13738 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13739 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13740 BOOT_JDK_FOUND=no 13741 else 13742 # We're done! :-) 13743 BOOT_JDK_FOUND=yes 13744 13745 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13746 13747 # Input might be given as Windows format, start by converting to 13748 # unix format. 13749 path="$BOOT_JDK" 13750 new_path=`$CYGPATH -u "$path"` 13751 13752 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13753 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13754 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13755 # "foo.exe" is OK but "foo" is an error. 13756 # 13757 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13758 # It is also a way to make sure we got the proper file name for the real test later on. 13759 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13760 if test "x$test_shortpath" = x; then 13761 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13762 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13763 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13764 fi 13765 13766 # Call helper function which possibly converts this using DOS-style short mode. 13767 # If so, the updated path is stored in $new_path. 13768 13769 input_path="$new_path" 13770 # Check if we need to convert this using DOS-style short mode. If the path 13771 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13772 # take no chances and rewrite it. 13773 # Note: m4 eats our [], so we need to use [ and ] instead. 13774 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13775 if test "x$has_forbidden_chars" != x; then 13776 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13777 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13778 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13779 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13780 # Going to short mode and back again did indeed matter. Since short mode is 13781 # case insensitive, let's make it lowercase to improve readability. 13782 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13783 # Now convert it back to Unix-stile (cygpath) 13784 input_path=`$CYGPATH -u "$shortmode_path"` 13785 new_path="$input_path" 13786 fi 13787 fi 13788 13789 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13790 if test "x$test_cygdrive_prefix" = x; then 13791 # As a simple fix, exclude /usr/bin since it's not a real path. 13792 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13793 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13794 # a path prefixed by /cygdrive for fixpath to work. 13795 new_path="$CYGWIN_ROOT_PATH$input_path" 13796 fi 13797 fi 13798 13799 13800 if test "x$path" != "x$new_path"; then 13801 BOOT_JDK="$new_path" 13802 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13803 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13804 fi 13805 13806 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13807 13808 path="$BOOT_JDK" 13809 has_colon=`$ECHO $path | $GREP ^.:` 13810 new_path="$path" 13811 if test "x$has_colon" = x; then 13812 # Not in mixed or Windows style, start by that. 13813 new_path=`cmd //c echo $path` 13814 fi 13815 13816 13817 input_path="$new_path" 13818 # Check if we need to convert this using DOS-style short mode. If the path 13819 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13820 # take no chances and rewrite it. 13821 # Note: m4 eats our [], so we need to use [ and ] instead. 13822 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13823 if test "x$has_forbidden_chars" != x; then 13824 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13825 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13826 fi 13827 13828 13829 windows_path="$new_path" 13830 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13831 unix_path=`$CYGPATH -u "$windows_path"` 13832 new_path="$unix_path" 13833 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13834 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13835 new_path="$unix_path" 13836 fi 13837 13838 if test "x$path" != "x$new_path"; then 13839 BOOT_JDK="$new_path" 13840 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13841 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13842 fi 13843 13844 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13845 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13846 13847 else 13848 # We're on a posix platform. Hooray! :) 13849 path="$BOOT_JDK" 13850 13851 if test ! -f "$path" && test ! -d "$path"; then 13852 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13853 fi 13854 13855 has_space=`$ECHO "$path" | $GREP " "` 13856 if test "x$has_space" != x; then 13857 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13858 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13859 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13860 fi 13861 fi 13862 13863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13864 $as_echo_n "checking for Boot JDK... " >&6; } 13865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13866 $as_echo "$BOOT_JDK" >&6; } 13867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13868 $as_echo_n "checking Boot JDK version... " >&6; } 13869 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13871 $as_echo "$BOOT_JDK_VERSION" >&6; } 13872 fi # end check jdk version 13873 fi # end check rt.jar 13874 fi # end check javac 13875 fi # end check java 13876 fi # end check boot jdk found 13877 fi 13878 13879 13880 if test "x$BOOT_JDK_FOUND" = xno; then 13881 # Now execute the test 13882 13883 BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java" 13884 BOOT_JDK_SUFFIX="" 13885 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13886 if test "x$ALL_JDKS_FOUND" != x; then 13887 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13888 13889 if test "x$BOOT_JDK_FOUND" = xno; then 13890 # Now execute the test 13891 13892 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13893 if test -d "$BOOT_JDK"; then 13894 BOOT_JDK_FOUND=maybe 13895 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13896 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13897 fi 13898 13899 13900 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13901 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13902 # Do we have a bin/java? 13903 if test ! -x "$BOOT_JDK/bin/java"; then 13904 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13905 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13906 BOOT_JDK_FOUND=no 13907 else 13908 # Do we have a bin/javac? 13909 if test ! -x "$BOOT_JDK/bin/javac"; then 13910 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13911 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13912 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13913 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13914 BOOT_JDK_FOUND=no 13915 else 13916 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13917 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13918 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13919 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13920 BOOT_JDK_FOUND=no 13921 else 13922 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13923 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13924 13925 # Extra M4 quote needed to protect [] in grep expression. 13926 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13927 if test "x$FOUND_VERSION_78" = x; then 13928 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13929 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13930 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13931 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13932 BOOT_JDK_FOUND=no 13933 else 13934 # We're done! :-) 13935 BOOT_JDK_FOUND=yes 13936 13937 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13938 13939 # Input might be given as Windows format, start by converting to 13940 # unix format. 13941 path="$BOOT_JDK" 13942 new_path=`$CYGPATH -u "$path"` 13943 13944 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13945 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13946 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13947 # "foo.exe" is OK but "foo" is an error. 13948 # 13949 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13950 # It is also a way to make sure we got the proper file name for the real test later on. 13951 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13952 if test "x$test_shortpath" = x; then 13953 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13954 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13955 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13956 fi 13957 13958 # Call helper function which possibly converts this using DOS-style short mode. 13959 # If so, the updated path is stored in $new_path. 13960 13961 input_path="$new_path" 13962 # Check if we need to convert this using DOS-style short mode. If the path 13963 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13964 # take no chances and rewrite it. 13965 # Note: m4 eats our [], so we need to use [ and ] instead. 13966 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13967 if test "x$has_forbidden_chars" != x; then 13968 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13969 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13970 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13971 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13972 # Going to short mode and back again did indeed matter. Since short mode is 13973 # case insensitive, let's make it lowercase to improve readability. 13974 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13975 # Now convert it back to Unix-stile (cygpath) 13976 input_path=`$CYGPATH -u "$shortmode_path"` 13977 new_path="$input_path" 13978 fi 13979 fi 13980 13981 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13982 if test "x$test_cygdrive_prefix" = x; then 13983 # As a simple fix, exclude /usr/bin since it's not a real path. 13984 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13985 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13986 # a path prefixed by /cygdrive for fixpath to work. 13987 new_path="$CYGWIN_ROOT_PATH$input_path" 13988 fi 13989 fi 13990 13991 13992 if test "x$path" != "x$new_path"; then 13993 BOOT_JDK="$new_path" 13994 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13995 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13996 fi 13997 13998 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13999 14000 path="$BOOT_JDK" 14001 has_colon=`$ECHO $path | $GREP ^.:` 14002 new_path="$path" 14003 if test "x$has_colon" = x; then 14004 # Not in mixed or Windows style, start by that. 14005 new_path=`cmd //c echo $path` 14006 fi 14007 14008 14009 input_path="$new_path" 14010 # Check if we need to convert this using DOS-style short mode. If the path 14011 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14012 # take no chances and rewrite it. 14013 # Note: m4 eats our [], so we need to use [ and ] instead. 14014 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14015 if test "x$has_forbidden_chars" != x; then 14016 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14017 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14018 fi 14019 14020 14021 windows_path="$new_path" 14022 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14023 unix_path=`$CYGPATH -u "$windows_path"` 14024 new_path="$unix_path" 14025 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14026 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14027 new_path="$unix_path" 14028 fi 14029 14030 if test "x$path" != "x$new_path"; then 14031 BOOT_JDK="$new_path" 14032 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14033 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14034 fi 14035 14036 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14037 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14038 14039 else 14040 # We're on a posix platform. Hooray! :) 14041 path="$BOOT_JDK" 14042 14043 if test ! -f "$path" && test ! -d "$path"; then 14044 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14045 fi 14046 14047 has_space=`$ECHO "$path" | $GREP " "` 14048 if test "x$has_space" != x; then 14049 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14050 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14051 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14052 fi 14053 fi 14054 14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14056 $as_echo_n "checking for Boot JDK... " >&6; } 14057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14058 $as_echo "$BOOT_JDK" >&6; } 14059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14060 $as_echo_n "checking Boot JDK version... " >&6; } 14061 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14063 $as_echo "$BOOT_JDK_VERSION" >&6; } 14064 fi # end check jdk version 14065 fi # end check rt.jar 14066 fi # end check javac 14067 fi # end check java 14068 fi # end check boot jdk found 14069 fi 14070 14071 done 14072 fi 14073 14074 14075 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14076 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14077 # Do we have a bin/java? 14078 if test ! -x "$BOOT_JDK/bin/java"; then 14079 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14081 BOOT_JDK_FOUND=no 14082 else 14083 # Do we have a bin/javac? 14084 if test ! -x "$BOOT_JDK/bin/javac"; then 14085 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14087 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14088 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14089 BOOT_JDK_FOUND=no 14090 else 14091 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14092 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14093 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14094 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14095 BOOT_JDK_FOUND=no 14096 else 14097 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14098 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14099 14100 # Extra M4 quote needed to protect [] in grep expression. 14101 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14102 if test "x$FOUND_VERSION_78" = x; then 14103 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14104 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14105 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14106 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14107 BOOT_JDK_FOUND=no 14108 else 14109 # We're done! :-) 14110 BOOT_JDK_FOUND=yes 14111 14112 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14113 14114 # Input might be given as Windows format, start by converting to 14115 # unix format. 14116 path="$BOOT_JDK" 14117 new_path=`$CYGPATH -u "$path"` 14118 14119 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14120 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14121 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14122 # "foo.exe" is OK but "foo" is an error. 14123 # 14124 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14125 # It is also a way to make sure we got the proper file name for the real test later on. 14126 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14127 if test "x$test_shortpath" = x; then 14128 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14130 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14131 fi 14132 14133 # Call helper function which possibly converts this using DOS-style short mode. 14134 # If so, the updated path is stored in $new_path. 14135 14136 input_path="$new_path" 14137 # Check if we need to convert this using DOS-style short mode. If the path 14138 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14139 # take no chances and rewrite it. 14140 # Note: m4 eats our [], so we need to use [ and ] instead. 14141 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14142 if test "x$has_forbidden_chars" != x; then 14143 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14144 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14145 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14146 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14147 # Going to short mode and back again did indeed matter. Since short mode is 14148 # case insensitive, let's make it lowercase to improve readability. 14149 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14150 # Now convert it back to Unix-stile (cygpath) 14151 input_path=`$CYGPATH -u "$shortmode_path"` 14152 new_path="$input_path" 14153 fi 14154 fi 14155 14156 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14157 if test "x$test_cygdrive_prefix" = x; then 14158 # As a simple fix, exclude /usr/bin since it's not a real path. 14159 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14160 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14161 # a path prefixed by /cygdrive for fixpath to work. 14162 new_path="$CYGWIN_ROOT_PATH$input_path" 14163 fi 14164 fi 14165 14166 14167 if test "x$path" != "x$new_path"; then 14168 BOOT_JDK="$new_path" 14169 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14170 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14171 fi 14172 14173 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14174 14175 path="$BOOT_JDK" 14176 has_colon=`$ECHO $path | $GREP ^.:` 14177 new_path="$path" 14178 if test "x$has_colon" = x; then 14179 # Not in mixed or Windows style, start by that. 14180 new_path=`cmd //c echo $path` 14181 fi 14182 14183 14184 input_path="$new_path" 14185 # Check if we need to convert this using DOS-style short mode. If the path 14186 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14187 # take no chances and rewrite it. 14188 # Note: m4 eats our [], so we need to use [ and ] instead. 14189 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14190 if test "x$has_forbidden_chars" != x; then 14191 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14192 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14193 fi 14194 14195 14196 windows_path="$new_path" 14197 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14198 unix_path=`$CYGPATH -u "$windows_path"` 14199 new_path="$unix_path" 14200 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14201 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14202 new_path="$unix_path" 14203 fi 14204 14205 if test "x$path" != "x$new_path"; then 14206 BOOT_JDK="$new_path" 14207 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14208 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14209 fi 14210 14211 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14212 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14213 14214 else 14215 # We're on a posix platform. Hooray! :) 14216 path="$BOOT_JDK" 14217 14218 if test ! -f "$path" && test ! -d "$path"; then 14219 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14220 fi 14221 14222 has_space=`$ECHO "$path" | $GREP " "` 14223 if test "x$has_space" != x; then 14224 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14226 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14227 fi 14228 fi 14229 14230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14231 $as_echo_n "checking for Boot JDK... " >&6; } 14232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14233 $as_echo "$BOOT_JDK" >&6; } 14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14235 $as_echo_n "checking Boot JDK version... " >&6; } 14236 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14238 $as_echo "$BOOT_JDK_VERSION" >&6; } 14239 fi # end check jdk version 14240 fi # end check rt.jar 14241 fi # end check javac 14242 fi # end check java 14243 fi # end check boot jdk found 14244 fi 14245 14246 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then 14247 14248 if test "x$BOOT_JDK_FOUND" = xno; then 14249 # Now execute the test 14250 14251 BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines" 14252 BOOT_JDK_SUFFIX="/Contents/Home" 14253 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14254 if test "x$ALL_JDKS_FOUND" != x; then 14255 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14256 14257 if test "x$BOOT_JDK_FOUND" = xno; then 14258 # Now execute the test 14259 14260 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14261 if test -d "$BOOT_JDK"; then 14262 BOOT_JDK_FOUND=maybe 14263 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14264 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14265 fi 14266 14267 14268 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14269 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14270 # Do we have a bin/java? 14271 if test ! -x "$BOOT_JDK/bin/java"; then 14272 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14273 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14274 BOOT_JDK_FOUND=no 14275 else 14276 # Do we have a bin/javac? 14277 if test ! -x "$BOOT_JDK/bin/javac"; then 14278 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14279 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14280 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14281 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14282 BOOT_JDK_FOUND=no 14283 else 14284 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14285 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14286 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14287 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14288 BOOT_JDK_FOUND=no 14289 else 14290 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14291 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14292 14293 # Extra M4 quote needed to protect [] in grep expression. 14294 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14295 if test "x$FOUND_VERSION_78" = x; then 14296 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14297 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14298 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14299 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14300 BOOT_JDK_FOUND=no 14301 else 14302 # We're done! :-) 14303 BOOT_JDK_FOUND=yes 14304 14305 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14306 14307 # Input might be given as Windows format, start by converting to 14308 # unix format. 14309 path="$BOOT_JDK" 14310 new_path=`$CYGPATH -u "$path"` 14311 14312 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14313 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14314 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14315 # "foo.exe" is OK but "foo" is an error. 14316 # 14317 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14318 # It is also a way to make sure we got the proper file name for the real test later on. 14319 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14320 if test "x$test_shortpath" = x; then 14321 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14322 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14323 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14324 fi 14325 14326 # Call helper function which possibly converts this using DOS-style short mode. 14327 # If so, the updated path is stored in $new_path. 14328 14329 input_path="$new_path" 14330 # Check if we need to convert this using DOS-style short mode. If the path 14331 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14332 # take no chances and rewrite it. 14333 # Note: m4 eats our [], so we need to use [ and ] instead. 14334 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14335 if test "x$has_forbidden_chars" != x; then 14336 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14337 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14338 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14339 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14340 # Going to short mode and back again did indeed matter. Since short mode is 14341 # case insensitive, let's make it lowercase to improve readability. 14342 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14343 # Now convert it back to Unix-stile (cygpath) 14344 input_path=`$CYGPATH -u "$shortmode_path"` 14345 new_path="$input_path" 14346 fi 14347 fi 14348 14349 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14350 if test "x$test_cygdrive_prefix" = x; then 14351 # As a simple fix, exclude /usr/bin since it's not a real path. 14352 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14353 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14354 # a path prefixed by /cygdrive for fixpath to work. 14355 new_path="$CYGWIN_ROOT_PATH$input_path" 14356 fi 14357 fi 14358 14359 14360 if test "x$path" != "x$new_path"; then 14361 BOOT_JDK="$new_path" 14362 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14363 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14364 fi 14365 14366 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14367 14368 path="$BOOT_JDK" 14369 has_colon=`$ECHO $path | $GREP ^.:` 14370 new_path="$path" 14371 if test "x$has_colon" = x; then 14372 # Not in mixed or Windows style, start by that. 14373 new_path=`cmd //c echo $path` 14374 fi 14375 14376 14377 input_path="$new_path" 14378 # Check if we need to convert this using DOS-style short mode. If the path 14379 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14380 # take no chances and rewrite it. 14381 # Note: m4 eats our [], so we need to use [ and ] instead. 14382 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14383 if test "x$has_forbidden_chars" != x; then 14384 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14385 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14386 fi 14387 14388 14389 windows_path="$new_path" 14390 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14391 unix_path=`$CYGPATH -u "$windows_path"` 14392 new_path="$unix_path" 14393 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14394 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14395 new_path="$unix_path" 14396 fi 14397 14398 if test "x$path" != "x$new_path"; then 14399 BOOT_JDK="$new_path" 14400 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14401 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14402 fi 14403 14404 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14405 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14406 14407 else 14408 # We're on a posix platform. Hooray! :) 14409 path="$BOOT_JDK" 14410 14411 if test ! -f "$path" && test ! -d "$path"; then 14412 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14413 fi 14414 14415 has_space=`$ECHO "$path" | $GREP " "` 14416 if test "x$has_space" != x; then 14417 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14418 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14419 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14420 fi 14421 fi 14422 14423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14424 $as_echo_n "checking for Boot JDK... " >&6; } 14425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14426 $as_echo "$BOOT_JDK" >&6; } 14427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14428 $as_echo_n "checking Boot JDK version... " >&6; } 14429 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14431 $as_echo "$BOOT_JDK_VERSION" >&6; } 14432 fi # end check jdk version 14433 fi # end check rt.jar 14434 fi # end check javac 14435 fi # end check java 14436 fi # end check boot jdk found 14437 fi 14438 14439 done 14440 fi 14441 14442 14443 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14444 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14445 # Do we have a bin/java? 14446 if test ! -x "$BOOT_JDK/bin/java"; then 14447 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14448 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14449 BOOT_JDK_FOUND=no 14450 else 14451 # Do we have a bin/javac? 14452 if test ! -x "$BOOT_JDK/bin/javac"; then 14453 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14455 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14456 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14457 BOOT_JDK_FOUND=no 14458 else 14459 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14460 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14461 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14462 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14463 BOOT_JDK_FOUND=no 14464 else 14465 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14466 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14467 14468 # Extra M4 quote needed to protect [] in grep expression. 14469 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14470 if test "x$FOUND_VERSION_78" = x; then 14471 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14472 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14473 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14474 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14475 BOOT_JDK_FOUND=no 14476 else 14477 # We're done! :-) 14478 BOOT_JDK_FOUND=yes 14479 14480 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14481 14482 # Input might be given as Windows format, start by converting to 14483 # unix format. 14484 path="$BOOT_JDK" 14485 new_path=`$CYGPATH -u "$path"` 14486 14487 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14488 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14489 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14490 # "foo.exe" is OK but "foo" is an error. 14491 # 14492 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14493 # It is also a way to make sure we got the proper file name for the real test later on. 14494 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14495 if test "x$test_shortpath" = x; then 14496 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14497 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14498 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14499 fi 14500 14501 # Call helper function which possibly converts this using DOS-style short mode. 14502 # If so, the updated path is stored in $new_path. 14503 14504 input_path="$new_path" 14505 # Check if we need to convert this using DOS-style short mode. If the path 14506 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14507 # take no chances and rewrite it. 14508 # Note: m4 eats our [], so we need to use [ and ] instead. 14509 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14510 if test "x$has_forbidden_chars" != x; then 14511 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14512 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14513 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14514 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14515 # Going to short mode and back again did indeed matter. Since short mode is 14516 # case insensitive, let's make it lowercase to improve readability. 14517 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14518 # Now convert it back to Unix-stile (cygpath) 14519 input_path=`$CYGPATH -u "$shortmode_path"` 14520 new_path="$input_path" 14521 fi 14522 fi 14523 14524 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14525 if test "x$test_cygdrive_prefix" = x; then 14526 # As a simple fix, exclude /usr/bin since it's not a real path. 14527 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14528 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14529 # a path prefixed by /cygdrive for fixpath to work. 14530 new_path="$CYGWIN_ROOT_PATH$input_path" 14531 fi 14532 fi 14533 14534 14535 if test "x$path" != "x$new_path"; then 14536 BOOT_JDK="$new_path" 14537 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14538 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14539 fi 14540 14541 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14542 14543 path="$BOOT_JDK" 14544 has_colon=`$ECHO $path | $GREP ^.:` 14545 new_path="$path" 14546 if test "x$has_colon" = x; then 14547 # Not in mixed or Windows style, start by that. 14548 new_path=`cmd //c echo $path` 14549 fi 14550 14551 14552 input_path="$new_path" 14553 # Check if we need to convert this using DOS-style short mode. If the path 14554 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14555 # take no chances and rewrite it. 14556 # Note: m4 eats our [], so we need to use [ and ] instead. 14557 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14558 if test "x$has_forbidden_chars" != x; then 14559 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14560 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14561 fi 14562 14563 14564 windows_path="$new_path" 14565 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14566 unix_path=`$CYGPATH -u "$windows_path"` 14567 new_path="$unix_path" 14568 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14569 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14570 new_path="$unix_path" 14571 fi 14572 14573 if test "x$path" != "x$new_path"; then 14574 BOOT_JDK="$new_path" 14575 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14576 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14577 fi 14578 14579 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14580 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14581 14582 else 14583 # We're on a posix platform. Hooray! :) 14584 path="$BOOT_JDK" 14585 14586 if test ! -f "$path" && test ! -d "$path"; then 14587 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14588 fi 14589 14590 has_space=`$ECHO "$path" | $GREP " "` 14591 if test "x$has_space" != x; then 14592 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14593 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14594 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14595 fi 14596 fi 14597 14598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14599 $as_echo_n "checking for Boot JDK... " >&6; } 14600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14601 $as_echo "$BOOT_JDK" >&6; } 14602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14603 $as_echo_n "checking Boot JDK version... " >&6; } 14604 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14606 $as_echo "$BOOT_JDK_VERSION" >&6; } 14607 fi # end check jdk version 14608 fi # end check rt.jar 14609 fi # end check javac 14610 fi # end check java 14611 fi # end check boot jdk found 14612 fi 14613 14614 14615 if test "x$BOOT_JDK_FOUND" = xno; then 14616 # Now execute the test 14617 14618 BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines" 14619 BOOT_JDK_SUFFIX="/Contents/Home" 14620 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14621 if test "x$ALL_JDKS_FOUND" != x; then 14622 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14623 14624 if test "x$BOOT_JDK_FOUND" = xno; then 14625 # Now execute the test 14626 14627 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14628 if test -d "$BOOT_JDK"; then 14629 BOOT_JDK_FOUND=maybe 14630 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14631 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14632 fi 14633 14634 14635 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14636 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14637 # Do we have a bin/java? 14638 if test ! -x "$BOOT_JDK/bin/java"; then 14639 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14641 BOOT_JDK_FOUND=no 14642 else 14643 # Do we have a bin/javac? 14644 if test ! -x "$BOOT_JDK/bin/javac"; then 14645 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14646 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14647 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14648 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14649 BOOT_JDK_FOUND=no 14650 else 14651 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14652 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14653 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14654 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14655 BOOT_JDK_FOUND=no 14656 else 14657 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14658 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14659 14660 # Extra M4 quote needed to protect [] in grep expression. 14661 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14662 if test "x$FOUND_VERSION_78" = x; then 14663 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14664 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14665 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14666 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14667 BOOT_JDK_FOUND=no 14668 else 14669 # We're done! :-) 14670 BOOT_JDK_FOUND=yes 14671 14672 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14673 14674 # Input might be given as Windows format, start by converting to 14675 # unix format. 14676 path="$BOOT_JDK" 14677 new_path=`$CYGPATH -u "$path"` 14678 14679 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14680 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14681 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14682 # "foo.exe" is OK but "foo" is an error. 14683 # 14684 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14685 # It is also a way to make sure we got the proper file name for the real test later on. 14686 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14687 if test "x$test_shortpath" = x; then 14688 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14689 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14690 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14691 fi 14692 14693 # Call helper function which possibly converts this using DOS-style short mode. 14694 # If so, the updated path is stored in $new_path. 14695 14696 input_path="$new_path" 14697 # Check if we need to convert this using DOS-style short mode. If the path 14698 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14699 # take no chances and rewrite it. 14700 # Note: m4 eats our [], so we need to use [ and ] instead. 14701 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14702 if test "x$has_forbidden_chars" != x; then 14703 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14704 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14705 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14706 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14707 # Going to short mode and back again did indeed matter. Since short mode is 14708 # case insensitive, let's make it lowercase to improve readability. 14709 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14710 # Now convert it back to Unix-stile (cygpath) 14711 input_path=`$CYGPATH -u "$shortmode_path"` 14712 new_path="$input_path" 14713 fi 14714 fi 14715 14716 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14717 if test "x$test_cygdrive_prefix" = x; then 14718 # As a simple fix, exclude /usr/bin since it's not a real path. 14719 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14720 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14721 # a path prefixed by /cygdrive for fixpath to work. 14722 new_path="$CYGWIN_ROOT_PATH$input_path" 14723 fi 14724 fi 14725 14726 14727 if test "x$path" != "x$new_path"; then 14728 BOOT_JDK="$new_path" 14729 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14730 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14731 fi 14732 14733 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14734 14735 path="$BOOT_JDK" 14736 has_colon=`$ECHO $path | $GREP ^.:` 14737 new_path="$path" 14738 if test "x$has_colon" = x; then 14739 # Not in mixed or Windows style, start by that. 14740 new_path=`cmd //c echo $path` 14741 fi 14742 14743 14744 input_path="$new_path" 14745 # Check if we need to convert this using DOS-style short mode. If the path 14746 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14747 # take no chances and rewrite it. 14748 # Note: m4 eats our [], so we need to use [ and ] instead. 14749 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14750 if test "x$has_forbidden_chars" != x; then 14751 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14752 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14753 fi 14754 14755 14756 windows_path="$new_path" 14757 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14758 unix_path=`$CYGPATH -u "$windows_path"` 14759 new_path="$unix_path" 14760 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14761 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14762 new_path="$unix_path" 14763 fi 14764 14765 if test "x$path" != "x$new_path"; then 14766 BOOT_JDK="$new_path" 14767 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14768 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14769 fi 14770 14771 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14772 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14773 14774 else 14775 # We're on a posix platform. Hooray! :) 14776 path="$BOOT_JDK" 14777 14778 if test ! -f "$path" && test ! -d "$path"; then 14779 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14780 fi 14781 14782 has_space=`$ECHO "$path" | $GREP " "` 14783 if test "x$has_space" != x; then 14784 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14785 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14786 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14787 fi 14788 fi 14789 14790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14791 $as_echo_n "checking for Boot JDK... " >&6; } 14792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14793 $as_echo "$BOOT_JDK" >&6; } 14794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14795 $as_echo_n "checking Boot JDK version... " >&6; } 14796 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14798 $as_echo "$BOOT_JDK_VERSION" >&6; } 14799 fi # end check jdk version 14800 fi # end check rt.jar 14801 fi # end check javac 14802 fi # end check java 14803 fi # end check boot jdk found 14804 fi 14805 14806 done 14807 fi 14808 14809 14810 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14811 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14812 # Do we have a bin/java? 14813 if test ! -x "$BOOT_JDK/bin/java"; then 14814 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14816 BOOT_JDK_FOUND=no 14817 else 14818 # Do we have a bin/javac? 14819 if test ! -x "$BOOT_JDK/bin/javac"; then 14820 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14822 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14823 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14824 BOOT_JDK_FOUND=no 14825 else 14826 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14827 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14828 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14830 BOOT_JDK_FOUND=no 14831 else 14832 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14833 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14834 14835 # Extra M4 quote needed to protect [] in grep expression. 14836 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14837 if test "x$FOUND_VERSION_78" = x; then 14838 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14839 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14840 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14841 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14842 BOOT_JDK_FOUND=no 14843 else 14844 # We're done! :-) 14845 BOOT_JDK_FOUND=yes 14846 14847 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14848 14849 # Input might be given as Windows format, start by converting to 14850 # unix format. 14851 path="$BOOT_JDK" 14852 new_path=`$CYGPATH -u "$path"` 14853 14854 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14855 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14856 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14857 # "foo.exe" is OK but "foo" is an error. 14858 # 14859 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14860 # It is also a way to make sure we got the proper file name for the real test later on. 14861 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14862 if test "x$test_shortpath" = x; then 14863 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14864 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14865 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14866 fi 14867 14868 # Call helper function which possibly converts this using DOS-style short mode. 14869 # If so, the updated path is stored in $new_path. 14870 14871 input_path="$new_path" 14872 # Check if we need to convert this using DOS-style short mode. If the path 14873 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14874 # take no chances and rewrite it. 14875 # Note: m4 eats our [], so we need to use [ and ] instead. 14876 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14877 if test "x$has_forbidden_chars" != x; then 14878 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14879 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14880 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14881 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14882 # Going to short mode and back again did indeed matter. Since short mode is 14883 # case insensitive, let's make it lowercase to improve readability. 14884 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14885 # Now convert it back to Unix-stile (cygpath) 14886 input_path=`$CYGPATH -u "$shortmode_path"` 14887 new_path="$input_path" 14888 fi 14889 fi 14890 14891 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14892 if test "x$test_cygdrive_prefix" = x; then 14893 # As a simple fix, exclude /usr/bin since it's not a real path. 14894 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14895 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14896 # a path prefixed by /cygdrive for fixpath to work. 14897 new_path="$CYGWIN_ROOT_PATH$input_path" 14898 fi 14899 fi 14900 14901 14902 if test "x$path" != "x$new_path"; then 14903 BOOT_JDK="$new_path" 14904 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14905 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14906 fi 14907 14908 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14909 14910 path="$BOOT_JDK" 14911 has_colon=`$ECHO $path | $GREP ^.:` 14912 new_path="$path" 14913 if test "x$has_colon" = x; then 14914 # Not in mixed or Windows style, start by that. 14915 new_path=`cmd //c echo $path` 14916 fi 14917 14918 14919 input_path="$new_path" 14920 # Check if we need to convert this using DOS-style short mode. If the path 14921 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14922 # take no chances and rewrite it. 14923 # Note: m4 eats our [], so we need to use [ and ] instead. 14924 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14925 if test "x$has_forbidden_chars" != x; then 14926 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14927 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14928 fi 14929 14930 14931 windows_path="$new_path" 14932 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14933 unix_path=`$CYGPATH -u "$windows_path"` 14934 new_path="$unix_path" 14935 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14936 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14937 new_path="$unix_path" 14938 fi 14939 14940 if test "x$path" != "x$new_path"; then 14941 BOOT_JDK="$new_path" 14942 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14943 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14944 fi 14945 14946 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14947 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14948 14949 else 14950 # We're on a posix platform. Hooray! :) 14951 path="$BOOT_JDK" 14952 14953 if test ! -f "$path" && test ! -d "$path"; then 14954 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14955 fi 14956 14957 has_space=`$ECHO "$path" | $GREP " "` 14958 if test "x$has_space" != x; then 14959 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14960 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14961 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14962 fi 14963 fi 14964 14965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14966 $as_echo_n "checking for Boot JDK... " >&6; } 14967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14968 $as_echo "$BOOT_JDK" >&6; } 14969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14970 $as_echo_n "checking Boot JDK version... " >&6; } 14971 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14973 $as_echo "$BOOT_JDK_VERSION" >&6; } 14974 fi # end check jdk version 14975 fi # end check rt.jar 14976 fi # end check javac 14977 fi # end check java 14978 fi # end check boot jdk found 14979 fi 14980 14981 elif test "x$OPENJDK_TARGET_OS" = xlinux; then 14982 14983 if test "x$BOOT_JDK_FOUND" = xno; then 14984 # Now execute the test 14985 14986 BOOT_JDK_PREFIX="/usr/lib/jvm" 14987 BOOT_JDK_SUFFIX="" 14988 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14989 if test "x$ALL_JDKS_FOUND" != x; then 14990 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14991 14992 if test "x$BOOT_JDK_FOUND" = xno; then 14993 # Now execute the test 14994 14995 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14996 if test -d "$BOOT_JDK"; then 14997 BOOT_JDK_FOUND=maybe 14998 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14999 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 15000 fi 15001 15002 15003 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15004 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15005 # Do we have a bin/java? 15006 if test ! -x "$BOOT_JDK/bin/java"; then 15007 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15009 BOOT_JDK_FOUND=no 15010 else 15011 # Do we have a bin/javac? 15012 if test ! -x "$BOOT_JDK/bin/javac"; then 15013 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15014 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15015 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15016 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15017 BOOT_JDK_FOUND=no 15018 else 15019 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15020 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15021 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15023 BOOT_JDK_FOUND=no 15024 else 15025 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15026 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15027 15028 # Extra M4 quote needed to protect [] in grep expression. 15029 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15030 if test "x$FOUND_VERSION_78" = x; then 15031 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15032 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15033 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15034 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15035 BOOT_JDK_FOUND=no 15036 else 15037 # We're done! :-) 15038 BOOT_JDK_FOUND=yes 15039 15040 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15041 15042 # Input might be given as Windows format, start by converting to 15043 # unix format. 15044 path="$BOOT_JDK" 15045 new_path=`$CYGPATH -u "$path"` 15046 15047 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15048 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15049 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15050 # "foo.exe" is OK but "foo" is an error. 15051 # 15052 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15053 # It is also a way to make sure we got the proper file name for the real test later on. 15054 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15055 if test "x$test_shortpath" = x; then 15056 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15057 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15058 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15059 fi 15060 15061 # Call helper function which possibly converts this using DOS-style short mode. 15062 # If so, the updated path is stored in $new_path. 15063 15064 input_path="$new_path" 15065 # Check if we need to convert this using DOS-style short mode. If the path 15066 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15067 # take no chances and rewrite it. 15068 # Note: m4 eats our [], so we need to use [ and ] instead. 15069 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15070 if test "x$has_forbidden_chars" != x; then 15071 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15072 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15073 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15074 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15075 # Going to short mode and back again did indeed matter. Since short mode is 15076 # case insensitive, let's make it lowercase to improve readability. 15077 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15078 # Now convert it back to Unix-stile (cygpath) 15079 input_path=`$CYGPATH -u "$shortmode_path"` 15080 new_path="$input_path" 15081 fi 15082 fi 15083 15084 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15085 if test "x$test_cygdrive_prefix" = x; then 15086 # As a simple fix, exclude /usr/bin since it's not a real path. 15087 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15088 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15089 # a path prefixed by /cygdrive for fixpath to work. 15090 new_path="$CYGWIN_ROOT_PATH$input_path" 15091 fi 15092 fi 15093 15094 15095 if test "x$path" != "x$new_path"; then 15096 BOOT_JDK="$new_path" 15097 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15098 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15099 fi 15100 15101 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15102 15103 path="$BOOT_JDK" 15104 has_colon=`$ECHO $path | $GREP ^.:` 15105 new_path="$path" 15106 if test "x$has_colon" = x; then 15107 # Not in mixed or Windows style, start by that. 15108 new_path=`cmd //c echo $path` 15109 fi 15110 15111 15112 input_path="$new_path" 15113 # Check if we need to convert this using DOS-style short mode. If the path 15114 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15115 # take no chances and rewrite it. 15116 # Note: m4 eats our [], so we need to use [ and ] instead. 15117 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15118 if test "x$has_forbidden_chars" != x; then 15119 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15120 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15121 fi 15122 15123 15124 windows_path="$new_path" 15125 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15126 unix_path=`$CYGPATH -u "$windows_path"` 15127 new_path="$unix_path" 15128 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15129 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15130 new_path="$unix_path" 15131 fi 15132 15133 if test "x$path" != "x$new_path"; then 15134 BOOT_JDK="$new_path" 15135 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15136 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15137 fi 15138 15139 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15140 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15141 15142 else 15143 # We're on a posix platform. Hooray! :) 15144 path="$BOOT_JDK" 15145 15146 if test ! -f "$path" && test ! -d "$path"; then 15147 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15148 fi 15149 15150 has_space=`$ECHO "$path" | $GREP " "` 15151 if test "x$has_space" != x; then 15152 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15153 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15154 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15155 fi 15156 fi 15157 15158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15159 $as_echo_n "checking for Boot JDK... " >&6; } 15160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15161 $as_echo "$BOOT_JDK" >&6; } 15162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15163 $as_echo_n "checking Boot JDK version... " >&6; } 15164 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15166 $as_echo "$BOOT_JDK_VERSION" >&6; } 15167 fi # end check jdk version 15168 fi # end check rt.jar 15169 fi # end check javac 15170 fi # end check java 15171 fi # end check boot jdk found 15172 fi 15173 15174 done 15175 fi 15176 15177 15178 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15179 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15180 # Do we have a bin/java? 15181 if test ! -x "$BOOT_JDK/bin/java"; then 15182 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15183 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15184 BOOT_JDK_FOUND=no 15185 else 15186 # Do we have a bin/javac? 15187 if test ! -x "$BOOT_JDK/bin/javac"; then 15188 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15189 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15190 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15191 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15192 BOOT_JDK_FOUND=no 15193 else 15194 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15195 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15196 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15198 BOOT_JDK_FOUND=no 15199 else 15200 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15201 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15202 15203 # Extra M4 quote needed to protect [] in grep expression. 15204 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15205 if test "x$FOUND_VERSION_78" = x; then 15206 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15207 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15208 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15209 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15210 BOOT_JDK_FOUND=no 15211 else 15212 # We're done! :-) 15213 BOOT_JDK_FOUND=yes 15214 15215 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15216 15217 # Input might be given as Windows format, start by converting to 15218 # unix format. 15219 path="$BOOT_JDK" 15220 new_path=`$CYGPATH -u "$path"` 15221 15222 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15223 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15224 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15225 # "foo.exe" is OK but "foo" is an error. 15226 # 15227 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15228 # It is also a way to make sure we got the proper file name for the real test later on. 15229 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15230 if test "x$test_shortpath" = x; then 15231 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15232 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15233 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15234 fi 15235 15236 # Call helper function which possibly converts this using DOS-style short mode. 15237 # If so, the updated path is stored in $new_path. 15238 15239 input_path="$new_path" 15240 # Check if we need to convert this using DOS-style short mode. If the path 15241 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15242 # take no chances and rewrite it. 15243 # Note: m4 eats our [], so we need to use [ and ] instead. 15244 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15245 if test "x$has_forbidden_chars" != x; then 15246 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15247 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15248 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15249 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15250 # Going to short mode and back again did indeed matter. Since short mode is 15251 # case insensitive, let's make it lowercase to improve readability. 15252 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15253 # Now convert it back to Unix-stile (cygpath) 15254 input_path=`$CYGPATH -u "$shortmode_path"` 15255 new_path="$input_path" 15256 fi 15257 fi 15258 15259 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15260 if test "x$test_cygdrive_prefix" = x; then 15261 # As a simple fix, exclude /usr/bin since it's not a real path. 15262 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15263 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15264 # a path prefixed by /cygdrive for fixpath to work. 15265 new_path="$CYGWIN_ROOT_PATH$input_path" 15266 fi 15267 fi 15268 15269 15270 if test "x$path" != "x$new_path"; then 15271 BOOT_JDK="$new_path" 15272 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15273 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15274 fi 15275 15276 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15277 15278 path="$BOOT_JDK" 15279 has_colon=`$ECHO $path | $GREP ^.:` 15280 new_path="$path" 15281 if test "x$has_colon" = x; then 15282 # Not in mixed or Windows style, start by that. 15283 new_path=`cmd //c echo $path` 15284 fi 15285 15286 15287 input_path="$new_path" 15288 # Check if we need to convert this using DOS-style short mode. If the path 15289 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15290 # take no chances and rewrite it. 15291 # Note: m4 eats our [], so we need to use [ and ] instead. 15292 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15293 if test "x$has_forbidden_chars" != x; then 15294 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15295 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15296 fi 15297 15298 15299 windows_path="$new_path" 15300 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15301 unix_path=`$CYGPATH -u "$windows_path"` 15302 new_path="$unix_path" 15303 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15304 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15305 new_path="$unix_path" 15306 fi 15307 15308 if test "x$path" != "x$new_path"; then 15309 BOOT_JDK="$new_path" 15310 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15311 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15312 fi 15313 15314 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15315 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15316 15317 else 15318 # We're on a posix platform. Hooray! :) 15319 path="$BOOT_JDK" 15320 15321 if test ! -f "$path" && test ! -d "$path"; then 15322 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15323 fi 15324 15325 has_space=`$ECHO "$path" | $GREP " "` 15326 if test "x$has_space" != x; then 15327 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15328 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15329 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15330 fi 15331 fi 15332 15333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15334 $as_echo_n "checking for Boot JDK... " >&6; } 15335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15336 $as_echo "$BOOT_JDK" >&6; } 15337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15338 $as_echo_n "checking Boot JDK version... " >&6; } 15339 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15341 $as_echo "$BOOT_JDK_VERSION" >&6; } 15342 fi # end check jdk version 15343 fi # end check rt.jar 15344 fi # end check javac 15345 fi # end check java 15346 fi # end check boot jdk found 15347 fi 15348 15349 fi 15350 15351 15352 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15353 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15354 # Do we have a bin/java? 15355 if test ! -x "$BOOT_JDK/bin/java"; then 15356 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15357 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15358 BOOT_JDK_FOUND=no 15359 else 15360 # Do we have a bin/javac? 15361 if test ! -x "$BOOT_JDK/bin/javac"; then 15362 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15363 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15364 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15365 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15366 BOOT_JDK_FOUND=no 15367 else 15368 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15369 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15370 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15371 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15372 BOOT_JDK_FOUND=no 15373 else 15374 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15375 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15376 15377 # Extra M4 quote needed to protect [] in grep expression. 15378 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15379 if test "x$FOUND_VERSION_78" = x; then 15380 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15381 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15382 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15383 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15384 BOOT_JDK_FOUND=no 15385 else 15386 # We're done! :-) 15387 BOOT_JDK_FOUND=yes 15388 15389 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15390 15391 # Input might be given as Windows format, start by converting to 15392 # unix format. 15393 path="$BOOT_JDK" 15394 new_path=`$CYGPATH -u "$path"` 15395 15396 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15397 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15398 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15399 # "foo.exe" is OK but "foo" is an error. 15400 # 15401 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15402 # It is also a way to make sure we got the proper file name for the real test later on. 15403 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15404 if test "x$test_shortpath" = x; then 15405 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15406 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15407 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15408 fi 15409 15410 # Call helper function which possibly converts this using DOS-style short mode. 15411 # If so, the updated path is stored in $new_path. 15412 15413 input_path="$new_path" 15414 # Check if we need to convert this using DOS-style short mode. If the path 15415 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15416 # take no chances and rewrite it. 15417 # Note: m4 eats our [], so we need to use [ and ] instead. 15418 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15419 if test "x$has_forbidden_chars" != x; then 15420 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15421 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15422 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15423 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15424 # Going to short mode and back again did indeed matter. Since short mode is 15425 # case insensitive, let's make it lowercase to improve readability. 15426 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15427 # Now convert it back to Unix-stile (cygpath) 15428 input_path=`$CYGPATH -u "$shortmode_path"` 15429 new_path="$input_path" 15430 fi 15431 fi 15432 15433 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15434 if test "x$test_cygdrive_prefix" = x; then 15435 # As a simple fix, exclude /usr/bin since it's not a real path. 15436 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15437 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15438 # a path prefixed by /cygdrive for fixpath to work. 15439 new_path="$CYGWIN_ROOT_PATH$input_path" 15440 fi 15441 fi 15442 15443 15444 if test "x$path" != "x$new_path"; then 15445 BOOT_JDK="$new_path" 15446 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15447 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15448 fi 15449 15450 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15451 15452 path="$BOOT_JDK" 15453 has_colon=`$ECHO $path | $GREP ^.:` 15454 new_path="$path" 15455 if test "x$has_colon" = x; then 15456 # Not in mixed or Windows style, start by that. 15457 new_path=`cmd //c echo $path` 15458 fi 15459 15460 15461 input_path="$new_path" 15462 # Check if we need to convert this using DOS-style short mode. If the path 15463 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15464 # take no chances and rewrite it. 15465 # Note: m4 eats our [], so we need to use [ and ] instead. 15466 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15467 if test "x$has_forbidden_chars" != x; then 15468 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15469 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15470 fi 15471 15472 15473 windows_path="$new_path" 15474 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15475 unix_path=`$CYGPATH -u "$windows_path"` 15476 new_path="$unix_path" 15477 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15478 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15479 new_path="$unix_path" 15480 fi 15481 15482 if test "x$path" != "x$new_path"; then 15483 BOOT_JDK="$new_path" 15484 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15485 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15486 fi 15487 15488 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15489 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15490 15491 else 15492 # We're on a posix platform. Hooray! :) 15493 path="$BOOT_JDK" 15494 15495 if test ! -f "$path" && test ! -d "$path"; then 15496 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15497 fi 15498 15499 has_space=`$ECHO "$path" | $GREP " "` 15500 if test "x$has_space" != x; then 15501 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15502 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15503 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15504 fi 15505 fi 15506 15507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15508 $as_echo_n "checking for Boot JDK... " >&6; } 15509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15510 $as_echo "$BOOT_JDK" >&6; } 15511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15512 $as_echo_n "checking Boot JDK version... " >&6; } 15513 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15515 $as_echo "$BOOT_JDK_VERSION" >&6; } 15516 fi # end check jdk version 15517 fi # end check rt.jar 15518 fi # end check javac 15519 fi # end check java 15520 fi # end check boot jdk found 15521 fi 15522 15523 15524 # If we haven't found anything yet, we've truly lost. Give up. 15525 if test "x$BOOT_JDK_FOUND" = xno; then 15526 15527 # Print a helpful message on how to acquire the necessary build dependency. 15528 # openjdk is the help tag: freetyp2, cups, pulse, alsa etc 15529 MISSING_DEPENDENCY=openjdk 15530 PKGHANDLER_COMMAND= 15531 15532 case $PKGHANDLER in 15533 apt-get) 15534 apt_help $MISSING_DEPENDENCY ;; 15535 yum) 15536 yum_help $MISSING_DEPENDENCY ;; 15537 port) 15538 port_help $MISSING_DEPENDENCY ;; 15539 pkgutil) 15540 pkgutil_help $MISSING_DEPENDENCY ;; 15541 pkgadd) 15542 pkgadd_help $MISSING_DEPENDENCY ;; 15543 * ) 15544 break ;; 15545 esac 15546 15547 if test "x$PKGHANDLER_COMMAND" != x; then 15548 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 15549 fi 15550 15551 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5 15552 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;} 15553 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5 15554 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15555 as_fn_error $? "Cannot continue" "$LINENO" 5 15556 fi 15557 15558 # Setup proper paths for what we found 15559 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" 15560 if test ! -f "$BOOT_RTJAR"; then 15561 # On MacOSX it is called classes.jar 15562 BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar" 15563 if test -f "$BOOT_RTJAR"; then 15564 # Remove the .. 15565 BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" 15566 fi 15567 fi 15568 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" 15569 BOOT_JDK="$BOOT_JDK" 15570 15571 15572 15573 15574 # Setup tools from the Boot JDK. 15575 15576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5 15577 $as_echo_n "checking for java in Boot JDK... " >&6; } 15578 JAVA=$BOOT_JDK/bin/java 15579 if test ! -x $JAVA; then 15580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15581 $as_echo "not found" >&6; } 15582 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15583 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15584 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5 15585 fi 15586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15587 $as_echo "ok" >&6; } 15588 15589 15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5 15591 $as_echo_n "checking for javac in Boot JDK... " >&6; } 15592 JAVAC=$BOOT_JDK/bin/javac 15593 if test ! -x $JAVAC; then 15594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15595 $as_echo "not found" >&6; } 15596 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15597 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15598 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5 15599 fi 15600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15601 $as_echo "ok" >&6; } 15602 15603 15604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5 15605 $as_echo_n "checking for javah in Boot JDK... " >&6; } 15606 JAVAH=$BOOT_JDK/bin/javah 15607 if test ! -x $JAVAH; then 15608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15609 $as_echo "not found" >&6; } 15610 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15611 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15612 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5 15613 fi 15614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15615 $as_echo "ok" >&6; } 15616 15617 15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5 15619 $as_echo_n "checking for javap in Boot JDK... " >&6; } 15620 JAVAP=$BOOT_JDK/bin/javap 15621 if test ! -x $JAVAP; then 15622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15623 $as_echo "not found" >&6; } 15624 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15625 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15626 as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5 15627 fi 15628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15629 $as_echo "ok" >&6; } 15630 15631 15632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5 15633 $as_echo_n "checking for jar in Boot JDK... " >&6; } 15634 JAR=$BOOT_JDK/bin/jar 15635 if test ! -x $JAR; then 15636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15637 $as_echo "not found" >&6; } 15638 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15639 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15640 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5 15641 fi 15642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15643 $as_echo "ok" >&6; } 15644 15645 15646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5 15647 $as_echo_n "checking for rmic in Boot JDK... " >&6; } 15648 RMIC=$BOOT_JDK/bin/rmic 15649 if test ! -x $RMIC; then 15650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15651 $as_echo "not found" >&6; } 15652 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15653 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15654 as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5 15655 fi 15656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15657 $as_echo "ok" >&6; } 15658 15659 15660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5 15661 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; } 15662 NATIVE2ASCII=$BOOT_JDK/bin/native2ascii 15663 if test ! -x $NATIVE2ASCII; then 15664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15665 $as_echo "not found" >&6; } 15666 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15667 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15668 as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5 15669 fi 15670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15671 $as_echo "ok" >&6; } 15672 15673 15674 # Finally, set some other options... 15675 15676 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility. 15677 BOOT_JDK_SOURCETARGET="-source 7 -target 7" 15678 15679 15680 15681 15682 ############################################################################## 15683 # 15684 # Specify options for anything that is run with the Boot JDK. 15685 # 15686 15687 # Check whether --with-boot-jdk-jvmargs was given. 15688 if test "${with_boot_jdk_jvmargs+set}" = set; then : 15689 withval=$with_boot_jdk_jvmargs; 15690 fi 15691 15692 15693 if test "x$with_boot_jdk_jvmargs" = x; then 15694 # Not all JVM:s accept the same arguments on the command line. 15695 # OpenJDK specific increase in thread stack for JDK build, 15696 # well more specifically, when running javac. 15697 if test "x$BUILD_NUM_BITS" = x32; then 15698 STACK_SIZE=768 15699 else 15700 # Running Javac on a JVM on a 64-bit machine, the stack takes more space 15701 # since 64-bit pointers are pushed on the stach. Apparently, we need 15702 # to increase the stack space when javacing the JDK.... 15703 STACK_SIZE=1536 15704 fi 15705 15706 # Minimum amount of heap memory. 15707 15708 # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15709 # If so, then append -Xms64M to boot_jdk_jvmargs 15710 FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn` 15711 FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""` 15712 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15713 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M" 15714 fi 15715 15716 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 15717 # Why does macosx need more heap? Its the huge JDK batch. 15718 15719 # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15720 # If so, then append -Xmx1600M to boot_jdk_jvmargs 15721 FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn` 15722 FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""` 15723 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15724 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M" 15725 fi 15726 15727 else 15728 15729 # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15730 # If so, then append -Xmx1100M to boot_jdk_jvmargs 15731 FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn` 15732 FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""` 15733 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15734 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M" 15735 fi 15736 15737 fi 15738 # When is adding -client something that speeds up the JVM? 15739 # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) 15740 15741 # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15742 # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs 15743 FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn` 15744 FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""` 15745 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15746 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m" 15747 fi 15748 15749 15750 # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15751 # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs 15752 FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn` 15753 FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""` 15754 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15755 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m" 15756 fi 15757 15758 15759 # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15760 # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs 15761 FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn` 15762 FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""` 15763 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15764 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE" 15765 fi 15766 15767 # Disable special log output when a debug build is used as Boot JDK... 15768 15769 # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15770 # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs 15771 FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn` 15772 FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""` 15773 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15774 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" 15775 fi 15776 15777 fi 15778 15779 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs 15780 15781 15782 15783 ############################################################################### 15784 # 15785 # Configure the sources to use. We can add or override individual directories. 15786 # 15787 ############################################################################### 15788 15789 15790 15791 # Where are the sources. Any of these can be overridden 15792 # using --with-override-corba and the likes. 15793 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" 15794 CORBA_TOPDIR="$SRC_ROOT/corba" 15795 JAXP_TOPDIR="$SRC_ROOT/jaxp" 15796 JAXWS_TOPDIR="$SRC_ROOT/jaxws" 15797 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" 15798 NASHORN_TOPDIR="$SRC_ROOT/nashorn" 15799 JDK_TOPDIR="$SRC_ROOT/jdk" 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 ############################################################################### 15811 # 15812 # Pickup additional source for a component from outside of the source root 15813 # or override source for a component. 15814 # 15815 15816 # Check whether --with-add-source-root was given. 15817 if test "${with_add_source_root+set}" = set; then : 15818 withval=$with_add_source_root; 15819 fi 15820 15821 15822 15823 # Check whether --with-override-source-root was given. 15824 if test "${with_override_source_root+set}" = set; then : 15825 withval=$with_override_source_root; 15826 fi 15827 15828 15829 15830 # Check whether --with-adds-and-overrides was given. 15831 if test "${with_adds_and_overrides+set}" = set; then : 15832 withval=$with_adds_and_overrides; 15833 fi 15834 15835 15836 if test "x$with_adds_and_overrides" != x; then 15837 with_add_source_root="$with_adds_and_overrides/adds" 15838 with_override_source_root="$with_adds_and_overrides/overrides" 15839 fi 15840 15841 if test "x$with_add_source_root" != x; then 15842 if ! test -d $with_add_source_root; then 15843 as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5 15844 fi 15845 CURDIR="$PWD" 15846 cd "$with_add_source_root" 15847 ADD_SRC_ROOT="`pwd`" 15848 cd "$CURDIR" 15849 # Verify that the addon source root does not have any root makefiles. 15850 # If it does, then it is usually an error, prevent this. 15851 if test -f $with_add_source_root/langtools/makefiles/Makefile || \ 15852 test -f $with_add_source_root/langtools/make/Makefile; then 15853 as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5 15854 fi 15855 if test -f $with_add_source_root/corba/makefiles/Makefile || \ 15856 test -f $with_add_source_root/corba/make/Makefile; then 15857 as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5 15858 fi 15859 if test -f $with_add_source_root/jaxp/makefiles/Makefile || \ 15860 test -f $with_add_source_root/jaxp/make/Makefile; then 15861 as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5 15862 fi 15863 if test -f $with_add_source_root/jaxws/makefiles/Makefile || \ 15864 test -f $with_add_source_root/jaxws/make/Makefile; then 15865 as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5 15866 fi 15867 if test -f $with_add_source_root/hotspot/makefiles/Makefile || \ 15868 test -f $with_add_source_root/hotspot/make/Makefile; then 15869 as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5 15870 fi 15871 if test -f $with_add_source_root/jdk/makefiles/Makefile || \ 15872 test -f $with_add_source_root/jdk/make/Makefile; then 15873 as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5 15874 fi 15875 fi 15876 15877 15878 if test "x$with_override_source_root" != x; then 15879 if ! test -d $with_override_source_root; then 15880 as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5 15881 fi 15882 CURDIR="$PWD" 15883 cd "$with_override_source_root" 15884 OVERRIDE_SRC_ROOT="`pwd`" 15885 cd "$CURDIR" 15886 if test -f $with_override_source_root/langtools/makefiles/Makefile || \ 15887 test -f $with_override_source_root/langtools/make/Makefile; then 15888 as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5 15889 fi 15890 if test -f $with_override_source_root/corba/makefiles/Makefile || \ 15891 test -f $with_override_source_root/corba/make/Makefile; then 15892 as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5 15893 fi 15894 if test -f $with_override_source_root/jaxp/makefiles/Makefile || \ 15895 test -f $with_override_source_root/jaxp/make/Makefile; then 15896 as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5 15897 fi 15898 if test -f $with_override_source_root/jaxws/makefiles/Makefile || \ 15899 test -f $with_override_source_root/jaxws/make/Makefile; then 15900 as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5 15901 fi 15902 if test -f $with_override_source_root/hotspot/makefiles/Makefile || \ 15903 test -f $with_override_source_root/hotspot/make/Makefile; then 15904 as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5 15905 fi 15906 if test -f $with_override_source_root/jdk/makefiles/Makefile || \ 15907 test -f $with_override_source_root/jdk/make/Makefile; then 15908 as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5 15909 fi 15910 fi 15911 15912 15913 ############################################################################### 15914 # 15915 # Override a repo completely, this is used for example when you have 3 small 15916 # development sandboxes of the langtools sources and want to avoid having 3 full 15917 # OpenJDK sources checked out on disk. 15918 # 15919 # Assuming that the 3 langtools sandboxes are located here: 15920 # /home/fredrik/sandbox1/langtools 15921 # /home/fredrik/sandbox2/langtools 15922 # /home/fredrik/sandbox3/langtools 15923 # 15924 # From the source root you create build subdirs manually: 15925 # mkdir -p build1 build2 build3 15926 # in each build directory run: 15927 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) 15928 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) 15929 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) 15930 # 15931 15932 15933 # Check whether --with-override-langtools was given. 15934 if test "${with_override_langtools+set}" = set; then : 15935 withval=$with_override_langtools; 15936 fi 15937 15938 15939 15940 # Check whether --with-override-corba was given. 15941 if test "${with_override_corba+set}" = set; then : 15942 withval=$with_override_corba; 15943 fi 15944 15945 15946 15947 # Check whether --with-override-jaxp was given. 15948 if test "${with_override_jaxp+set}" = set; then : 15949 withval=$with_override_jaxp; 15950 fi 15951 15952 15953 15954 # Check whether --with-override-jaxws was given. 15955 if test "${with_override_jaxws+set}" = set; then : 15956 withval=$with_override_jaxws; 15957 fi 15958 15959 15960 15961 # Check whether --with-override-hotspot was given. 15962 if test "${with_override_hotspot+set}" = set; then : 15963 withval=$with_override_hotspot; 15964 fi 15965 15966 15967 15968 # Check whether --with-override-jdk was given. 15969 if test "${with_override_jdk+set}" = set; then : 15970 withval=$with_override_jdk; 15971 fi 15972 15973 15974 if test "x$with_override_langtools" != x; then 15975 CURDIR="$PWD" 15976 cd "$with_override_langtools" 15977 LANGTOOLS_TOPDIR="`pwd`" 15978 cd "$CURDIR" 15979 if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then 15980 as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5 15981 fi 15982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5 15983 $as_echo_n "checking if langtools should be overridden... " >&6; } 15984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5 15985 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; } 15986 fi 15987 if test "x$with_override_corba" != x; then 15988 CURDIR="$PWD" 15989 cd "$with_override_corba" 15990 CORBA_TOPDIR="`pwd`" 15991 cd "$CURDIR" 15992 if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then 15993 as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5 15994 fi 15995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5 15996 $as_echo_n "checking if corba should be overridden... " >&6; } 15997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5 15998 $as_echo "yes with $CORBA_TOPDIR" >&6; } 15999 fi 16000 if test "x$with_override_jaxp" != x; then 16001 CURDIR="$PWD" 16002 cd "$with_override_jaxp" 16003 JAXP_TOPDIR="`pwd`" 16004 cd "$CURDIR" 16005 if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then 16006 as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5 16007 fi 16008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5 16009 $as_echo_n "checking if jaxp should be overridden... " >&6; } 16010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5 16011 $as_echo "yes with $JAXP_TOPDIR" >&6; } 16012 fi 16013 if test "x$with_override_jaxws" != x; then 16014 CURDIR="$PWD" 16015 cd "$with_override_jaxws" 16016 JAXWS_TOPDIR="`pwd`" 16017 cd "$CURDIR" 16018 if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then 16019 as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5 16020 fi 16021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5 16022 $as_echo_n "checking if jaxws should be overridden... " >&6; } 16023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5 16024 $as_echo "yes with $JAXWS_TOPDIR" >&6; } 16025 fi 16026 if test "x$with_override_hotspot" != x; then 16027 CURDIR="$PWD" 16028 cd "$with_override_hotspot" 16029 HOTSPOT_TOPDIR="`pwd`" 16030 cd "$CURDIR" 16031 if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \ 16032 ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then 16033 as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5 16034 fi 16035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5 16036 $as_echo_n "checking if hotspot should be overridden... " >&6; } 16037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5 16038 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; } 16039 fi 16040 if test "x$with_override_nashorn" != x; then 16041 CURDIR="$PWD" 16042 cd "$with_override_nashorn" 16043 NASHORN_TOPDIR="`pwd`" 16044 cd "$CURDIR" 16045 if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then 16046 as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5 16047 fi 16048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5 16049 $as_echo_n "checking if nashorn should be overridden... " >&6; } 16050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5 16051 $as_echo "yes with $NASHORN_TOPDIR" >&6; } 16052 fi 16053 if test "x$with_override_jdk" != x; then 16054 CURDIR="$PWD" 16055 cd "$with_override_jdk" 16056 JDK_TOPDIR="`pwd`" 16057 cd "$CURDIR" 16058 if ! test -f $JDK_TOPDIR/makefiles/Makefile; then 16059 as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5 16060 fi 16061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5 16062 $as_echo_n "checking if JDK should be overridden... " >&6; } 16063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5 16064 $as_echo "yes with $JDK_TOPDIR" >&6; } 16065 fi 16066 16067 16068 16069 BUILD_OUTPUT="$OUTPUT_ROOT" 16070 16071 16072 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" 16073 BUILD_HOTSPOT=true 16074 16075 16076 16077 # Check whether --with-import-hotspot was given. 16078 if test "${with_import_hotspot+set}" = set; then : 16079 withval=$with_import_hotspot; 16080 fi 16081 16082 if test "x$with_import_hotspot" != x; then 16083 CURDIR="$PWD" 16084 cd "$with_import_hotspot" 16085 HOTSPOT_DIST="`pwd`" 16086 cd "$CURDIR" 16087 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then 16088 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5 16089 fi 16090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5 16091 $as_echo_n "checking if hotspot should be imported... " >&6; } 16092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5 16093 $as_echo "yes from $HOTSPOT_DIST" >&6; } 16094 BUILD_HOTSPOT=false 16095 fi 16096 16097 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" 16098 16099 16100 ############################################################################### 16101 # 16102 # Setup the toolchain (compilers etc), i.e. the tools that need to be 16103 # cross-compilation aware. 16104 # 16105 ############################################################################### 16106 16107 16108 ############################################################################### 16109 # 16110 # Configure the development tool paths and potential sysroot. 16111 # 16112 ac_ext=cpp 16113 ac_cpp='$CXXCPP $CPPFLAGS' 16114 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 16115 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 16116 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 16117 16118 16119 # The option used to specify the target .o,.a or .so file. 16120 # When compiling, how to specify the to be created object file. 16121 CC_OUT_OPTION='-o$(SPACE)' 16122 # When linking, how to specify the to be created executable. 16123 EXE_OUT_OPTION='-o$(SPACE)' 16124 # When linking, how to specify the to be created dynamically linkable library. 16125 LD_OUT_OPTION='-o$(SPACE)' 16126 # When archiving, how to specify the to be create static archive for object files. 16127 AR_OUT_OPTION='rcs$(SPACE)' 16128 16129 16130 16131 16132 16133 # Locate the actual tools 16134 16135 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 16136 16137 # Store path to cygwin link.exe to help excluding it when searching for 16138 # VS linker. This must be done before changing the PATH when looking for VS. 16139 # Extract the first word of "link", so it can be a program name with args. 16140 set dummy link; ac_word=$2 16141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 16142 $as_echo_n "checking for $ac_word... " >&6; } 16143 if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then : 16144 $as_echo_n "(cached) " >&6 16145 else 16146 case $CYGWIN_LINK in 16147 [\\/]* | ?:[\\/]*) 16148 ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path. 16149 ;; 16150 *) 16151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 16152 for as_dir in $PATH 16153 do 16154 IFS=$as_save_IFS 16155 test -z "$as_dir" && as_dir=. 16156 for ac_exec_ext in '' $ac_executable_extensions; do 16157 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 16158 ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext" 16159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 16160 break 2 16161 fi 16162 done 16163 done 16164 IFS=$as_save_IFS 16165 16166 ;; 16167 esac 16168 fi 16169 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK 16170 if test -n "$CYGWIN_LINK"; then 16171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5 16172 $as_echo "$CYGWIN_LINK" >&6; } 16173 else 16174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16175 $as_echo "no" >&6; } 16176 fi 16177 16178 16179 if test "x$CYGWIN_LINK" != x; then 16180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5 16181 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; } 16182 "$CYGWIN_LINK" --version > /dev/null 16183 if test $? -eq 0 ; then 16184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 16185 $as_echo "yes" >&6; } 16186 else 16187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16188 $as_echo "no" >&6; } 16189 # This might be the VS linker. Don't exclude it later on. 16190 CYGWIN_LINK="" 16191 fi 16192 fi 16193 16194 # First-hand choice is to locate and run the vsvars bat file. 16195 16196 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16197 VCVARSFILE="vc/bin/vcvars32.bat" 16198 else 16199 VCVARSFILE="vc/bin/amd64/vcvars64.bat" 16200 fi 16201 16202 VS_ENV_CMD="" 16203 VS_ENV_ARGS="" 16204 if test "x$with_toolsdir" != x; then 16205 16206 if test "x$VS_ENV_CMD" = x; then 16207 VS100BASE="$with_toolsdir/../.." 16208 METHOD="--with-tools-dir" 16209 16210 windows_path="$VS100BASE" 16211 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16212 unix_path=`$CYGPATH -u "$windows_path"` 16213 VS100BASE="$unix_path" 16214 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16215 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16216 VS100BASE="$unix_path" 16217 fi 16218 16219 if test -d "$VS100BASE"; then 16220 if test -f "$VS100BASE/$VCVARSFILE"; then 16221 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16222 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16223 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16224 else 16225 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16226 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16227 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16228 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16229 fi 16230 fi 16231 fi 16232 16233 fi 16234 16235 if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then 16236 # Having specified an argument which is incorrect will produce an instant failure; 16237 # we should not go on looking 16238 { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5 16239 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;} 16240 { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5 16241 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;} 16242 as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5 16243 fi 16244 16245 if test "x$ProgramW6432" != x; then 16246 16247 if test "x$VS_ENV_CMD" = x; then 16248 WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin" 16249 METHOD="well-known name" 16250 16251 windows_path="$WIN_SDK_BASE" 16252 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16253 unix_path=`$CYGPATH -u "$windows_path"` 16254 WIN_SDK_BASE="$unix_path" 16255 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16256 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16257 WIN_SDK_BASE="$unix_path" 16258 fi 16259 16260 if test -d "$WIN_SDK_BASE"; then 16261 # There have been cases of partial or broken SDK installations. A missing 16262 # lib dir is not going to work. 16263 if test ! -d "$WIN_SDK_BASE/../lib"; then 16264 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16265 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16266 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16267 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16268 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16269 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16270 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16271 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16272 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16273 VS_ENV_ARGS="/x86" 16274 else 16275 VS_ENV_ARGS="/x64" 16276 fi 16277 else 16278 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16279 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16280 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16281 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16282 fi 16283 fi 16284 fi 16285 16286 fi 16287 if test "x$PROGRAMW6432" != x; then 16288 16289 if test "x$VS_ENV_CMD" = x; then 16290 WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin" 16291 METHOD="well-known name" 16292 16293 windows_path="$WIN_SDK_BASE" 16294 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16295 unix_path=`$CYGPATH -u "$windows_path"` 16296 WIN_SDK_BASE="$unix_path" 16297 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16298 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16299 WIN_SDK_BASE="$unix_path" 16300 fi 16301 16302 if test -d "$WIN_SDK_BASE"; then 16303 # There have been cases of partial or broken SDK installations. A missing 16304 # lib dir is not going to work. 16305 if test ! -d "$WIN_SDK_BASE/../lib"; then 16306 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16307 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16308 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16309 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16310 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16311 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16312 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16313 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16314 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16315 VS_ENV_ARGS="/x86" 16316 else 16317 VS_ENV_ARGS="/x64" 16318 fi 16319 else 16320 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16321 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16322 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16323 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16324 fi 16325 fi 16326 fi 16327 16328 fi 16329 if test "x$PROGRAMFILES" != x; then 16330 16331 if test "x$VS_ENV_CMD" = x; then 16332 WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin" 16333 METHOD="well-known name" 16334 16335 windows_path="$WIN_SDK_BASE" 16336 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16337 unix_path=`$CYGPATH -u "$windows_path"` 16338 WIN_SDK_BASE="$unix_path" 16339 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16340 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16341 WIN_SDK_BASE="$unix_path" 16342 fi 16343 16344 if test -d "$WIN_SDK_BASE"; then 16345 # There have been cases of partial or broken SDK installations. A missing 16346 # lib dir is not going to work. 16347 if test ! -d "$WIN_SDK_BASE/../lib"; then 16348 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16349 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16350 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16351 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16352 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16353 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16354 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16355 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16356 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16357 VS_ENV_ARGS="/x86" 16358 else 16359 VS_ENV_ARGS="/x64" 16360 fi 16361 else 16362 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16363 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16364 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16365 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16366 fi 16367 fi 16368 fi 16369 16370 fi 16371 16372 if test "x$VS_ENV_CMD" = x; then 16373 WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin" 16374 METHOD="well-known name" 16375 16376 windows_path="$WIN_SDK_BASE" 16377 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16378 unix_path=`$CYGPATH -u "$windows_path"` 16379 WIN_SDK_BASE="$unix_path" 16380 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16381 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16382 WIN_SDK_BASE="$unix_path" 16383 fi 16384 16385 if test -d "$WIN_SDK_BASE"; then 16386 # There have been cases of partial or broken SDK installations. A missing 16387 # lib dir is not going to work. 16388 if test ! -d "$WIN_SDK_BASE/../lib"; then 16389 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16390 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16391 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16392 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16393 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16394 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16395 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16396 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16397 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16398 VS_ENV_ARGS="/x86" 16399 else 16400 VS_ENV_ARGS="/x64" 16401 fi 16402 else 16403 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16404 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16405 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16406 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16407 fi 16408 fi 16409 fi 16410 16411 16412 if test "x$VS_ENV_CMD" = x; then 16413 WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin" 16414 METHOD="well-known name" 16415 16416 windows_path="$WIN_SDK_BASE" 16417 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16418 unix_path=`$CYGPATH -u "$windows_path"` 16419 WIN_SDK_BASE="$unix_path" 16420 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16421 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16422 WIN_SDK_BASE="$unix_path" 16423 fi 16424 16425 if test -d "$WIN_SDK_BASE"; then 16426 # There have been cases of partial or broken SDK installations. A missing 16427 # lib dir is not going to work. 16428 if test ! -d "$WIN_SDK_BASE/../lib"; then 16429 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16430 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16431 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16432 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16433 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16434 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16435 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16436 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16437 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16438 VS_ENV_ARGS="/x86" 16439 else 16440 VS_ENV_ARGS="/x64" 16441 fi 16442 else 16443 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16444 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16445 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16446 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16447 fi 16448 fi 16449 fi 16450 16451 16452 if test "x$VS100COMNTOOLS" != x; then 16453 16454 if test "x$VS_ENV_CMD" = x; then 16455 VS100BASE="$VS100COMNTOOLS/../.." 16456 METHOD="VS100COMNTOOLS variable" 16457 16458 windows_path="$VS100BASE" 16459 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16460 unix_path=`$CYGPATH -u "$windows_path"` 16461 VS100BASE="$unix_path" 16462 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16463 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16464 VS100BASE="$unix_path" 16465 fi 16466 16467 if test -d "$VS100BASE"; then 16468 if test -f "$VS100BASE/$VCVARSFILE"; then 16469 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16470 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16471 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16472 else 16473 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16474 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16475 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16476 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16477 fi 16478 fi 16479 fi 16480 16481 fi 16482 if test "x$PROGRAMFILES" != x; then 16483 16484 if test "x$VS_ENV_CMD" = x; then 16485 VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0" 16486 METHOD="well-known name" 16487 16488 windows_path="$VS100BASE" 16489 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16490 unix_path=`$CYGPATH -u "$windows_path"` 16491 VS100BASE="$unix_path" 16492 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16493 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16494 VS100BASE="$unix_path" 16495 fi 16496 16497 if test -d "$VS100BASE"; then 16498 if test -f "$VS100BASE/$VCVARSFILE"; then 16499 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16500 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16501 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16502 else 16503 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16504 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16505 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16506 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16507 fi 16508 fi 16509 fi 16510 16511 fi 16512 16513 if test "x$VS_ENV_CMD" = x; then 16514 VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0" 16515 METHOD="well-known name" 16516 16517 windows_path="$VS100BASE" 16518 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16519 unix_path=`$CYGPATH -u "$windows_path"` 16520 VS100BASE="$unix_path" 16521 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16522 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16523 VS100BASE="$unix_path" 16524 fi 16525 16526 if test -d "$VS100BASE"; then 16527 if test -f "$VS100BASE/$VCVARSFILE"; then 16528 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16529 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16530 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16531 else 16532 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16533 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16534 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16535 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16536 fi 16537 fi 16538 fi 16539 16540 16541 if test "x$VS_ENV_CMD" = x; then 16542 VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0" 16543 METHOD="well-known name" 16544 16545 windows_path="$VS100BASE" 16546 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16547 unix_path=`$CYGPATH -u "$windows_path"` 16548 VS100BASE="$unix_path" 16549 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16550 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16551 VS100BASE="$unix_path" 16552 fi 16553 16554 if test -d "$VS100BASE"; then 16555 if test -f "$VS100BASE/$VCVARSFILE"; then 16556 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16557 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16558 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16559 else 16560 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16561 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16562 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16563 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16564 fi 16565 fi 16566 fi 16567 16568 16569 if test "x$VS_ENV_CMD" != x; then 16570 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file. 16571 16572 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16573 16574 # First separate the path from the arguments. This will split at the first 16575 # space. 16576 complete="$VS_ENV_CMD" 16577 path="${complete%% *}" 16578 tmp="$complete EOL" 16579 arguments="${tmp#* }" 16580 16581 # Input might be given as Windows format, start by converting to 16582 # unix format. 16583 new_path=`$CYGPATH -u "$path"` 16584 16585 # Now try to locate executable using which 16586 new_path=`$WHICH "$new_path" 2> /dev/null` 16587 # bat and cmd files are not always considered executable in cygwin causing which 16588 # to not find them 16589 if test "x$new_path" = x \ 16590 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 16591 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 16592 new_path=`$CYGPATH -u "$path"` 16593 fi 16594 if test "x$new_path" = x; then 16595 # Oops. Which didn't find the executable. 16596 # The splitting of arguments from the executable at a space might have been incorrect, 16597 # since paths with space are more likely in Windows. Give it another try with the whole 16598 # argument. 16599 path="$complete" 16600 arguments="EOL" 16601 new_path=`$CYGPATH -u "$path"` 16602 new_path=`$WHICH "$new_path" 2> /dev/null` 16603 # bat and cmd files are not always considered executable in cygwin causing which 16604 # to not find them 16605 if test "x$new_path" = x \ 16606 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 16607 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 16608 new_path=`$CYGPATH -u "$path"` 16609 fi 16610 if test "x$new_path" = x; then 16611 # It's still not found. Now this is an unrecoverable error. 16612 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 16613 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 16614 has_space=`$ECHO "$complete" | $GREP " "` 16615 if test "x$has_space" != x; then 16616 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 16617 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 16618 fi 16619 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16620 fi 16621 fi 16622 16623 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 16624 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 16625 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 16626 # "foo.exe" is OK but "foo" is an error. 16627 # 16628 # This test is therefore slightly more accurate than "test -f" to check for file precense. 16629 # It is also a way to make sure we got the proper file name for the real test later on. 16630 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 16631 if test "x$test_shortpath" = x; then 16632 # Short path failed, file does not exist as specified. 16633 # Try adding .exe or .cmd 16634 if test -f "${new_path}.exe"; then 16635 input_to_shortpath="${new_path}.exe" 16636 elif test -f "${new_path}.cmd"; then 16637 input_to_shortpath="${new_path}.cmd" 16638 else 16639 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5 16640 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;} 16641 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 16642 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 16643 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16644 fi 16645 else 16646 input_to_shortpath="$new_path" 16647 fi 16648 16649 # Call helper function which possibly converts this using DOS-style short mode. 16650 # If so, the updated path is stored in $new_path. 16651 new_path="$input_to_shortpath" 16652 16653 input_path="$input_to_shortpath" 16654 # Check if we need to convert this using DOS-style short mode. If the path 16655 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16656 # take no chances and rewrite it. 16657 # Note: m4 eats our [], so we need to use [ and ] instead. 16658 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 16659 if test "x$has_forbidden_chars" != x; then 16660 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16661 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 16662 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 16663 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 16664 # Going to short mode and back again did indeed matter. Since short mode is 16665 # case insensitive, let's make it lowercase to improve readability. 16666 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16667 # Now convert it back to Unix-stile (cygpath) 16668 input_path=`$CYGPATH -u "$shortmode_path"` 16669 new_path="$input_path" 16670 fi 16671 fi 16672 16673 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 16674 if test "x$test_cygdrive_prefix" = x; then 16675 # As a simple fix, exclude /usr/bin since it's not a real path. 16676 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 16677 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 16678 # a path prefixed by /cygdrive for fixpath to work. 16679 new_path="$CYGWIN_ROOT_PATH$input_path" 16680 fi 16681 fi 16682 16683 # remove trailing .exe if any 16684 new_path="${new_path/%.exe/}" 16685 16686 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16687 16688 # First separate the path from the arguments. This will split at the first 16689 # space. 16690 complete="$VS_ENV_CMD" 16691 path="${complete%% *}" 16692 tmp="$complete EOL" 16693 arguments="${tmp#* }" 16694 16695 # Input might be given as Windows format, start by converting to 16696 # unix format. 16697 new_path="$path" 16698 16699 windows_path="$new_path" 16700 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16701 unix_path=`$CYGPATH -u "$windows_path"` 16702 new_path="$unix_path" 16703 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16704 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16705 new_path="$unix_path" 16706 fi 16707 16708 16709 # Now try to locate executable using which 16710 new_path=`$WHICH "$new_path" 2> /dev/null` 16711 16712 if test "x$new_path" = x; then 16713 # Oops. Which didn't find the executable. 16714 # The splitting of arguments from the executable at a space might have been incorrect, 16715 # since paths with space are more likely in Windows. Give it another try with the whole 16716 # argument. 16717 path="$complete" 16718 arguments="EOL" 16719 new_path="$path" 16720 16721 windows_path="$new_path" 16722 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16723 unix_path=`$CYGPATH -u "$windows_path"` 16724 new_path="$unix_path" 16725 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16726 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16727 new_path="$unix_path" 16728 fi 16729 16730 16731 new_path=`$WHICH "$new_path" 2> /dev/null` 16732 16733 if test "x$new_path" = x; then 16734 # It's still not found. Now this is an unrecoverable error. 16735 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 16736 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 16737 has_space=`$ECHO "$complete" | $GREP " "` 16738 if test "x$has_space" != x; then 16739 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 16740 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 16741 fi 16742 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16743 fi 16744 fi 16745 16746 # Now new_path has a complete unix path to the binary 16747 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 16748 # Keep paths in /bin as-is, but remove trailing .exe if any 16749 new_path="${new_path/%.exe/}" 16750 # Do not save /bin paths to all_fixpath_prefixes! 16751 else 16752 # Not in mixed or Windows style, start by that. 16753 new_path=`cmd //c echo $new_path` 16754 16755 input_path="$new_path" 16756 # Check if we need to convert this using DOS-style short mode. If the path 16757 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16758 # take no chances and rewrite it. 16759 # Note: m4 eats our [], so we need to use [ and ] instead. 16760 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 16761 if test "x$has_forbidden_chars" != x; then 16762 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16763 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16764 fi 16765 16766 # Output is in $new_path 16767 16768 windows_path="$new_path" 16769 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16770 unix_path=`$CYGPATH -u "$windows_path"` 16771 new_path="$unix_path" 16772 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16773 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16774 new_path="$unix_path" 16775 fi 16776 16777 # remove trailing .exe if any 16778 new_path="${new_path/%.exe/}" 16779 16780 # Save the first 10 bytes of this path to the storage, so fixpath can work. 16781 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 16782 fi 16783 16784 else 16785 # We're on a posix platform. Hooray! :) 16786 # First separate the path from the arguments. This will split at the first 16787 # space. 16788 complete="$VS_ENV_CMD" 16789 path="${complete%% *}" 16790 tmp="$complete EOL" 16791 arguments="${tmp#* }" 16792 16793 # Cannot rely on the command "which" here since it doesn't always work. 16794 is_absolute_path=`$ECHO "$path" | $GREP ^/` 16795 if test -z "$is_absolute_path"; then 16796 # Path to executable is not absolute. Find it. 16797 IFS_save="$IFS" 16798 IFS=: 16799 for p in $PATH; do 16800 if test -f "$p/$path" && test -x "$p/$path"; then 16801 new_path="$p/$path" 16802 break 16803 fi 16804 done 16805 IFS="$IFS_save" 16806 else 16807 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5 16808 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;} 16809 new_path="$path" 16810 fi 16811 16812 if test "x$new_path" = x; then 16813 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 16814 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 16815 has_space=`$ECHO "$complete" | $GREP " "` 16816 if test "x$has_space" != x; then 16817 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 16818 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 16819 fi 16820 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16821 fi 16822 fi 16823 16824 # Now join together the path and the arguments once again 16825 if test "x$arguments" != xEOL; then 16826 new_complete="$new_path ${arguments% *}" 16827 else 16828 new_complete="$new_path" 16829 fi 16830 16831 if test "x$complete" != "x$new_complete"; then 16832 VS_ENV_CMD="$new_complete" 16833 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5 16834 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;} 16835 fi 16836 16837 16838 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat 16839 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5 16840 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;} 16841 cd $OUTPUT_ROOT 16842 # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted 16843 # to autoconf standards. 16844 16845 #---- 16846 16847 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment) 16848 # but calculate the difference in Cygwin environment before/after running it and then 16849 # apply the diff. 16850 16851 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 16852 _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"` 16853 _dosvs10varsall=`cygpath -a -w -s $_vs10varsall` 16854 _dosbash=`cygpath -a -w -s \`which bash\`.*` 16855 else 16856 _dosvs10varsall=`cmd //c echo $VS_ENV_CMD` 16857 _dosbash=`cmd //c echo \`which bash\`` 16858 fi 16859 16860 # generate the set of exported vars before/after the vs10 setup 16861 $ECHO "@echo off" > localdevenvtmp.bat 16862 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat 16863 $ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat 16864 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat 16865 16866 # Now execute the newly created bat file. 16867 # The | cat is to stop SetEnv.Cmd to mess with system colors on msys 16868 cmd /c localdevenvtmp.bat | cat 16869 16870 # apply the diff (less some non-vs10 vars named by "!") 16871 $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort 16872 $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort 16873 $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh 16874 16875 # cleanup 16876 $RM localdevenvtmp* 16877 #---- 16878 cd $CURDIR 16879 if test ! -s $OUTPUT_ROOT/localdevenv.sh; then 16880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16881 $as_echo "no" >&6; } 16882 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5 16883 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;} 16884 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 16885 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} 16886 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 16887 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} 16888 as_fn_error $? "Cannot continue" "$LINENO" 5 16889 fi 16890 16891 # Now set all paths and other env variables. This will allow the rest of 16892 # the configure script to find and run the compiler in the proper way. 16893 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5 16894 $as_echo "$as_me: Setting extracted environment variables" >&6;} 16895 . $OUTPUT_ROOT/localdevenv.sh 16896 else 16897 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. 16898 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5 16899 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;} 16900 fi 16901 16902 # At this point, we should have corrent variables in the environment, or we can't continue. 16903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5 16904 $as_echo_n "checking for Visual Studio variables... " >&6; } 16905 16906 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then 16907 if test "x$INCLUDE" = x || test "x$LIB" = x; then 16908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5 16909 $as_echo "present but broken" >&6; } 16910 as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5 16911 else 16912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 16913 $as_echo "ok" >&6; } 16914 # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk. 16915 VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'` 16916 VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'` 16917 VS_PATH="$PATH" 16918 16919 16920 16921 fi 16922 else 16923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 16924 $as_echo "not found" >&6; } 16925 16926 if test "x$VS_ENV_CMD" = x; then 16927 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5 16928 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;} 16929 { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5 16930 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;} 16931 else 16932 { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5 16933 $as_echo "$as_me: Running the extraction script failed." >&6;} 16934 fi 16935 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 16936 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} 16937 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 16938 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} 16939 as_fn_error $? "Cannot continue" "$LINENO" 5 16940 fi 16941 16942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 16943 $as_echo_n "checking for msvcr100.dll... " >&6; } 16944 16945 # Check whether --with-msvcr-dll was given. 16946 if test "${with_msvcr_dll+set}" = set; then : 16947 withval=$with_msvcr_dll; 16948 fi 16949 16950 if test "x$with_msvcr_dll" != x; then 16951 MSVCR_DLL="$with_msvcr_dll" 16952 else 16953 if test "x$VCINSTALLDIR" != x; then 16954 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 16955 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1` 16956 else 16957 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1` 16958 if test "x$MSVCR_DLL" = x; then 16959 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1` 16960 fi 16961 fi 16962 if test "x$MSVCR_DLL" != x; then 16963 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5 16964 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;} 16965 else 16966 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5 16967 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;} 16968 fi 16969 fi 16970 if test "x$MSVCR_DLL" = x; then 16971 if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then 16972 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5 16973 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;} 16974 MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll" 16975 fi 16976 fi 16977 fi 16978 if test "x$MSVCR_DLL" = x; then 16979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16980 $as_echo "no" >&6; } 16981 as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5 16982 fi 16983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 16984 $as_echo "$MSVCR_DLL" >&6; } 16985 16986 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16987 16988 # Input might be given as Windows format, start by converting to 16989 # unix format. 16990 path="$MSVCR_DLL" 16991 new_path=`$CYGPATH -u "$path"` 16992 16993 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 16994 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 16995 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 16996 # "foo.exe" is OK but "foo" is an error. 16997 # 16998 # This test is therefore slightly more accurate than "test -f" to check for file precense. 16999 # It is also a way to make sure we got the proper file name for the real test later on. 17000 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17001 if test "x$test_shortpath" = x; then 17002 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 17003 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} 17004 as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5 17005 fi 17006 17007 # Call helper function which possibly converts this using DOS-style short mode. 17008 # If so, the updated path is stored in $new_path. 17009 17010 input_path="$new_path" 17011 # Check if we need to convert this using DOS-style short mode. If the path 17012 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17013 # take no chances and rewrite it. 17014 # Note: m4 eats our [], so we need to use [ and ] instead. 17015 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17016 if test "x$has_forbidden_chars" != x; then 17017 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17018 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17019 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17020 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17021 # Going to short mode and back again did indeed matter. Since short mode is 17022 # case insensitive, let's make it lowercase to improve readability. 17023 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17024 # Now convert it back to Unix-stile (cygpath) 17025 input_path=`$CYGPATH -u "$shortmode_path"` 17026 new_path="$input_path" 17027 fi 17028 fi 17029 17030 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17031 if test "x$test_cygdrive_prefix" = x; then 17032 # As a simple fix, exclude /usr/bin since it's not a real path. 17033 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17034 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17035 # a path prefixed by /cygdrive for fixpath to work. 17036 new_path="$CYGWIN_ROOT_PATH$input_path" 17037 fi 17038 fi 17039 17040 17041 if test "x$path" != "x$new_path"; then 17042 MSVCR_DLL="$new_path" 17043 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 17044 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} 17045 fi 17046 17047 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17048 17049 path="$MSVCR_DLL" 17050 has_colon=`$ECHO $path | $GREP ^.:` 17051 new_path="$path" 17052 if test "x$has_colon" = x; then 17053 # Not in mixed or Windows style, start by that. 17054 new_path=`cmd //c echo $path` 17055 fi 17056 17057 17058 input_path="$new_path" 17059 # Check if we need to convert this using DOS-style short mode. If the path 17060 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17061 # take no chances and rewrite it. 17062 # Note: m4 eats our [], so we need to use [ and ] instead. 17063 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17064 if test "x$has_forbidden_chars" != x; then 17065 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17066 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17067 fi 17068 17069 17070 windows_path="$new_path" 17071 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17072 unix_path=`$CYGPATH -u "$windows_path"` 17073 new_path="$unix_path" 17074 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17075 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17076 new_path="$unix_path" 17077 fi 17078 17079 if test "x$path" != "x$new_path"; then 17080 MSVCR_DLL="$new_path" 17081 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 17082 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} 17083 fi 17084 17085 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17086 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17087 17088 else 17089 # We're on a posix platform. Hooray! :) 17090 path="$MSVCR_DLL" 17091 17092 if test ! -f "$path" && test ! -d "$path"; then 17093 as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 17094 fi 17095 17096 has_space=`$ECHO "$path" | $GREP " "` 17097 if test "x$has_space" != x; then 17098 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 17099 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} 17100 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17101 fi 17102 fi 17103 17104 17105 17106 17107 # Check whether --with-dxsdk was given. 17108 if test "${with_dxsdk+set}" = set; then : 17109 withval=$with_dxsdk; 17110 fi 17111 17112 17113 # Check whether --with-dxsdk-lib was given. 17114 if test "${with_dxsdk_lib+set}" = set; then : 17115 withval=$with_dxsdk_lib; 17116 fi 17117 17118 17119 # Check whether --with-dxsdk-include was given. 17120 if test "${with_dxsdk_include+set}" = set; then : 17121 withval=$with_dxsdk_include; 17122 fi 17123 17124 17125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5 17126 $as_echo_n "checking for DirectX SDK... " >&6; } 17127 17128 if test "x$with_dxsdk" != x; then 17129 dxsdk_path="$with_dxsdk" 17130 elif test "x$DXSDK_DIR" != x; then 17131 dxsdk_path="$DXSDK_DIR" 17132 elif test -d "C:/DXSDK"; then 17133 dxsdk_path="C:/DXSDK" 17134 else 17135 as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5 17136 fi 17137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5 17138 $as_echo "$dxsdk_path" >&6; } 17139 17140 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17141 17142 # Input might be given as Windows format, start by converting to 17143 # unix format. 17144 path="$dxsdk_path" 17145 new_path=`$CYGPATH -u "$path"` 17146 17147 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17148 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17149 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17150 # "foo.exe" is OK but "foo" is an error. 17151 # 17152 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17153 # It is also a way to make sure we got the proper file name for the real test later on. 17154 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17155 if test "x$test_shortpath" = x; then 17156 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5 17157 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;} 17158 as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5 17159 fi 17160 17161 # Call helper function which possibly converts this using DOS-style short mode. 17162 # If so, the updated path is stored in $new_path. 17163 17164 input_path="$new_path" 17165 # Check if we need to convert this using DOS-style short mode. If the path 17166 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17167 # take no chances and rewrite it. 17168 # Note: m4 eats our [], so we need to use [ and ] instead. 17169 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17170 if test "x$has_forbidden_chars" != x; then 17171 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17172 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17173 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17174 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17175 # Going to short mode and back again did indeed matter. Since short mode is 17176 # case insensitive, let's make it lowercase to improve readability. 17177 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17178 # Now convert it back to Unix-stile (cygpath) 17179 input_path=`$CYGPATH -u "$shortmode_path"` 17180 new_path="$input_path" 17181 fi 17182 fi 17183 17184 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17185 if test "x$test_cygdrive_prefix" = x; then 17186 # As a simple fix, exclude /usr/bin since it's not a real path. 17187 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17188 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17189 # a path prefixed by /cygdrive for fixpath to work. 17190 new_path="$CYGWIN_ROOT_PATH$input_path" 17191 fi 17192 fi 17193 17194 17195 if test "x$path" != "x$new_path"; then 17196 dxsdk_path="$new_path" 17197 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5 17198 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;} 17199 fi 17200 17201 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17202 17203 path="$dxsdk_path" 17204 has_colon=`$ECHO $path | $GREP ^.:` 17205 new_path="$path" 17206 if test "x$has_colon" = x; then 17207 # Not in mixed or Windows style, start by that. 17208 new_path=`cmd //c echo $path` 17209 fi 17210 17211 17212 input_path="$new_path" 17213 # Check if we need to convert this using DOS-style short mode. If the path 17214 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17215 # take no chances and rewrite it. 17216 # Note: m4 eats our [], so we need to use [ and ] instead. 17217 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17218 if test "x$has_forbidden_chars" != x; then 17219 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17220 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17221 fi 17222 17223 17224 windows_path="$new_path" 17225 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17226 unix_path=`$CYGPATH -u "$windows_path"` 17227 new_path="$unix_path" 17228 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17229 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17230 new_path="$unix_path" 17231 fi 17232 17233 if test "x$path" != "x$new_path"; then 17234 dxsdk_path="$new_path" 17235 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5 17236 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;} 17237 fi 17238 17239 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17240 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17241 17242 else 17243 # We're on a posix platform. Hooray! :) 17244 path="$dxsdk_path" 17245 17246 if test ! -f "$path" && test ! -d "$path"; then 17247 as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5 17248 fi 17249 17250 has_space=`$ECHO "$path" | $GREP " "` 17251 if test "x$has_space" != x; then 17252 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5 17253 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;} 17254 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17255 fi 17256 fi 17257 17258 17259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5 17260 $as_echo_n "checking for DirectX SDK lib dir... " >&6; } 17261 if test "x$with_dxsdk_lib" != x; then 17262 DXSDK_LIB_PATH="$with_dxsdk_lib" 17263 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 17264 DXSDK_LIB_PATH="$dxsdk_path/Lib/x64" 17265 else 17266 DXSDK_LIB_PATH="$dxsdk_path/Lib" 17267 fi 17268 # dsound.lib is linked to in jsoundds 17269 if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then 17270 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5 17271 fi 17272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5 17273 $as_echo "$DXSDK_LIB_PATH" >&6; } 17274 17275 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17276 17277 # Input might be given as Windows format, start by converting to 17278 # unix format. 17279 path="$DXSDK_LIB_PATH" 17280 new_path=`$CYGPATH -u "$path"` 17281 17282 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17283 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17284 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17285 # "foo.exe" is OK but "foo" is an error. 17286 # 17287 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17288 # It is also a way to make sure we got the proper file name for the real test later on. 17289 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17290 if test "x$test_shortpath" = x; then 17291 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5 17292 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 17293 as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5 17294 fi 17295 17296 # Call helper function which possibly converts this using DOS-style short mode. 17297 # If so, the updated path is stored in $new_path. 17298 17299 input_path="$new_path" 17300 # Check if we need to convert this using DOS-style short mode. If the path 17301 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17302 # take no chances and rewrite it. 17303 # Note: m4 eats our [], so we need to use [ and ] instead. 17304 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17305 if test "x$has_forbidden_chars" != x; then 17306 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17307 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17308 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17309 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17310 # Going to short mode and back again did indeed matter. Since short mode is 17311 # case insensitive, let's make it lowercase to improve readability. 17312 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17313 # Now convert it back to Unix-stile (cygpath) 17314 input_path=`$CYGPATH -u "$shortmode_path"` 17315 new_path="$input_path" 17316 fi 17317 fi 17318 17319 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17320 if test "x$test_cygdrive_prefix" = x; then 17321 # As a simple fix, exclude /usr/bin since it's not a real path. 17322 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17323 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17324 # a path prefixed by /cygdrive for fixpath to work. 17325 new_path="$CYGWIN_ROOT_PATH$input_path" 17326 fi 17327 fi 17328 17329 17330 if test "x$path" != "x$new_path"; then 17331 DXSDK_LIB_PATH="$new_path" 17332 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5 17333 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;} 17334 fi 17335 17336 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17337 17338 path="$DXSDK_LIB_PATH" 17339 has_colon=`$ECHO $path | $GREP ^.:` 17340 new_path="$path" 17341 if test "x$has_colon" = x; then 17342 # Not in mixed or Windows style, start by that. 17343 new_path=`cmd //c echo $path` 17344 fi 17345 17346 17347 input_path="$new_path" 17348 # Check if we need to convert this using DOS-style short mode. If the path 17349 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17350 # take no chances and rewrite it. 17351 # Note: m4 eats our [], so we need to use [ and ] instead. 17352 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17353 if test "x$has_forbidden_chars" != x; then 17354 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17355 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17356 fi 17357 17358 17359 windows_path="$new_path" 17360 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17361 unix_path=`$CYGPATH -u "$windows_path"` 17362 new_path="$unix_path" 17363 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17364 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17365 new_path="$unix_path" 17366 fi 17367 17368 if test "x$path" != "x$new_path"; then 17369 DXSDK_LIB_PATH="$new_path" 17370 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5 17371 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;} 17372 fi 17373 17374 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17375 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17376 17377 else 17378 # We're on a posix platform. Hooray! :) 17379 path="$DXSDK_LIB_PATH" 17380 17381 if test ! -f "$path" && test ! -d "$path"; then 17382 as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 17383 fi 17384 17385 has_space=`$ECHO "$path" | $GREP " "` 17386 if test "x$has_space" != x; then 17387 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5 17388 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 17389 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17390 fi 17391 fi 17392 17393 17394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5 17395 $as_echo_n "checking for DirectX SDK include dir... " >&6; } 17396 if test "x$with_dxsdk_include" != x; then 17397 DXSDK_INCLUDE_PATH="$with_dxsdk_include" 17398 else 17399 DXSDK_INCLUDE_PATH="$dxsdk_path/Include" 17400 fi 17401 # dsound.h is included in jsoundds 17402 if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then 17403 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5 17404 fi 17405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5 17406 $as_echo "$DXSDK_INCLUDE_PATH" >&6; } 17407 17408 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17409 17410 # Input might be given as Windows format, start by converting to 17411 # unix format. 17412 path="$DXSDK_INCLUDE_PATH" 17413 new_path=`$CYGPATH -u "$path"` 17414 17415 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17416 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17417 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17418 # "foo.exe" is OK but "foo" is an error. 17419 # 17420 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17421 # It is also a way to make sure we got the proper file name for the real test later on. 17422 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17423 if test "x$test_shortpath" = x; then 17424 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 17425 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 17426 as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5 17427 fi 17428 17429 # Call helper function which possibly converts this using DOS-style short mode. 17430 # If so, the updated path is stored in $new_path. 17431 17432 input_path="$new_path" 17433 # Check if we need to convert this using DOS-style short mode. If the path 17434 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17435 # take no chances and rewrite it. 17436 # Note: m4 eats our [], so we need to use [ and ] instead. 17437 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17438 if test "x$has_forbidden_chars" != x; then 17439 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17440 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17441 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17442 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17443 # Going to short mode and back again did indeed matter. Since short mode is 17444 # case insensitive, let's make it lowercase to improve readability. 17445 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17446 # Now convert it back to Unix-stile (cygpath) 17447 input_path=`$CYGPATH -u "$shortmode_path"` 17448 new_path="$input_path" 17449 fi 17450 fi 17451 17452 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17453 if test "x$test_cygdrive_prefix" = x; then 17454 # As a simple fix, exclude /usr/bin since it's not a real path. 17455 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17456 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17457 # a path prefixed by /cygdrive for fixpath to work. 17458 new_path="$CYGWIN_ROOT_PATH$input_path" 17459 fi 17460 fi 17461 17462 17463 if test "x$path" != "x$new_path"; then 17464 DXSDK_INCLUDE_PATH="$new_path" 17465 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5 17466 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;} 17467 fi 17468 17469 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17470 17471 path="$DXSDK_INCLUDE_PATH" 17472 has_colon=`$ECHO $path | $GREP ^.:` 17473 new_path="$path" 17474 if test "x$has_colon" = x; then 17475 # Not in mixed or Windows style, start by that. 17476 new_path=`cmd //c echo $path` 17477 fi 17478 17479 17480 input_path="$new_path" 17481 # Check if we need to convert this using DOS-style short mode. If the path 17482 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17483 # take no chances and rewrite it. 17484 # Note: m4 eats our [], so we need to use [ and ] instead. 17485 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17486 if test "x$has_forbidden_chars" != x; then 17487 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17488 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17489 fi 17490 17491 17492 windows_path="$new_path" 17493 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17494 unix_path=`$CYGPATH -u "$windows_path"` 17495 new_path="$unix_path" 17496 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17497 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17498 new_path="$unix_path" 17499 fi 17500 17501 if test "x$path" != "x$new_path"; then 17502 DXSDK_INCLUDE_PATH="$new_path" 17503 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5 17504 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;} 17505 fi 17506 17507 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17508 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17509 17510 else 17511 # We're on a posix platform. Hooray! :) 17512 path="$DXSDK_INCLUDE_PATH" 17513 17514 if test ! -f "$path" && test ! -d "$path"; then 17515 as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 17516 fi 17517 17518 has_space=`$ECHO "$path" | $GREP " "` 17519 if test "x$has_space" != x; then 17520 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 17521 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 17522 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17523 fi 17524 fi 17525 17526 17527 17528 17529 LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH" 17530 17531 fi 17532 17533 17534 17535 # If --build AND --host is set, then the configure script will find any 17536 # cross compilation tools in the PATH. Cross compilation tools 17537 # follows the cross compilation standard where they are prefixed with ${host}. 17538 # For example the binary i686-sun-solaris2.10-gcc 17539 # will cross compile for i686-sun-solaris2.10 17540 # If neither of build and host is not set, then build=host and the 17541 # default compiler found in the path will be used. 17542 # Setting only --host, does not seem to be really supported. 17543 # Please set both --build and --host if you want to cross compile. 17544 17545 if test "x$COMPILE_TYPE" = "xcross"; then 17546 # Now we to find a C/C++ compiler that can build executables for the build 17547 # platform. We can't use the AC_PROG_CC macro, since it can only be used 17548 # once. Also, we need to do this before adding a tools dir to the path, 17549 # otherwise we might pick up cross-compilers which don't use standard naming. 17550 # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have 17551 # to wait until they are properly discovered. 17552 for ac_prog in cl cc gcc 17553 do 17554 # Extract the first word of "$ac_prog", so it can be a program name with args. 17555 set dummy $ac_prog; ac_word=$2 17556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 17557 $as_echo_n "checking for $ac_word... " >&6; } 17558 if test "${ac_cv_path_BUILD_CC+set}" = set; then : 17559 $as_echo_n "(cached) " >&6 17560 else 17561 case $BUILD_CC in 17562 [\\/]* | ?:[\\/]*) 17563 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. 17564 ;; 17565 *) 17566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 17567 for as_dir in $PATH 17568 do 17569 IFS=$as_save_IFS 17570 test -z "$as_dir" && as_dir=. 17571 for ac_exec_ext in '' $ac_executable_extensions; do 17572 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 17573 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" 17574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 17575 break 2 17576 fi 17577 done 17578 done 17579 IFS=$as_save_IFS 17580 17581 ;; 17582 esac 17583 fi 17584 BUILD_CC=$ac_cv_path_BUILD_CC 17585 if test -n "$BUILD_CC"; then 17586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 17587 $as_echo "$BUILD_CC" >&6; } 17588 else 17589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17590 $as_echo "no" >&6; } 17591 fi 17592 17593 17594 test -n "$BUILD_CC" && break 17595 done 17596 17597 17598 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17599 17600 # First separate the path from the arguments. This will split at the first 17601 # space. 17602 complete="$BUILD_CC" 17603 path="${complete%% *}" 17604 tmp="$complete EOL" 17605 arguments="${tmp#* }" 17606 17607 # Input might be given as Windows format, start by converting to 17608 # unix format. 17609 new_path=`$CYGPATH -u "$path"` 17610 17611 # Now try to locate executable using which 17612 new_path=`$WHICH "$new_path" 2> /dev/null` 17613 # bat and cmd files are not always considered executable in cygwin causing which 17614 # to not find them 17615 if test "x$new_path" = x \ 17616 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17617 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17618 new_path=`$CYGPATH -u "$path"` 17619 fi 17620 if test "x$new_path" = x; then 17621 # Oops. Which didn't find the executable. 17622 # The splitting of arguments from the executable at a space might have been incorrect, 17623 # since paths with space are more likely in Windows. Give it another try with the whole 17624 # argument. 17625 path="$complete" 17626 arguments="EOL" 17627 new_path=`$CYGPATH -u "$path"` 17628 new_path=`$WHICH "$new_path" 2> /dev/null` 17629 # bat and cmd files are not always considered executable in cygwin causing which 17630 # to not find them 17631 if test "x$new_path" = x \ 17632 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17633 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17634 new_path=`$CYGPATH -u "$path"` 17635 fi 17636 if test "x$new_path" = x; then 17637 # It's still not found. Now this is an unrecoverable error. 17638 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 17639 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 17640 has_space=`$ECHO "$complete" | $GREP " "` 17641 if test "x$has_space" != x; then 17642 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17644 fi 17645 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17646 fi 17647 fi 17648 17649 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17650 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17651 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17652 # "foo.exe" is OK but "foo" is an error. 17653 # 17654 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17655 # It is also a way to make sure we got the proper file name for the real test later on. 17656 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17657 if test "x$test_shortpath" = x; then 17658 # Short path failed, file does not exist as specified. 17659 # Try adding .exe or .cmd 17660 if test -f "${new_path}.exe"; then 17661 input_to_shortpath="${new_path}.exe" 17662 elif test -f "${new_path}.cmd"; then 17663 input_to_shortpath="${new_path}.cmd" 17664 else 17665 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5 17666 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;} 17667 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 17668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 17669 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17670 fi 17671 else 17672 input_to_shortpath="$new_path" 17673 fi 17674 17675 # Call helper function which possibly converts this using DOS-style short mode. 17676 # If so, the updated path is stored in $new_path. 17677 new_path="$input_to_shortpath" 17678 17679 input_path="$input_to_shortpath" 17680 # Check if we need to convert this using DOS-style short mode. If the path 17681 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17682 # take no chances and rewrite it. 17683 # Note: m4 eats our [], so we need to use [ and ] instead. 17684 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17685 if test "x$has_forbidden_chars" != x; then 17686 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17687 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17688 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17689 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17690 # Going to short mode and back again did indeed matter. Since short mode is 17691 # case insensitive, let's make it lowercase to improve readability. 17692 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17693 # Now convert it back to Unix-stile (cygpath) 17694 input_path=`$CYGPATH -u "$shortmode_path"` 17695 new_path="$input_path" 17696 fi 17697 fi 17698 17699 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17700 if test "x$test_cygdrive_prefix" = x; then 17701 # As a simple fix, exclude /usr/bin since it's not a real path. 17702 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 17703 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17704 # a path prefixed by /cygdrive for fixpath to work. 17705 new_path="$CYGWIN_ROOT_PATH$input_path" 17706 fi 17707 fi 17708 17709 # remove trailing .exe if any 17710 new_path="${new_path/%.exe/}" 17711 17712 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17713 17714 # First separate the path from the arguments. This will split at the first 17715 # space. 17716 complete="$BUILD_CC" 17717 path="${complete%% *}" 17718 tmp="$complete EOL" 17719 arguments="${tmp#* }" 17720 17721 # Input might be given as Windows format, start by converting to 17722 # unix format. 17723 new_path="$path" 17724 17725 windows_path="$new_path" 17726 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17727 unix_path=`$CYGPATH -u "$windows_path"` 17728 new_path="$unix_path" 17729 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17730 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17731 new_path="$unix_path" 17732 fi 17733 17734 17735 # Now try to locate executable using which 17736 new_path=`$WHICH "$new_path" 2> /dev/null` 17737 17738 if test "x$new_path" = x; then 17739 # Oops. Which didn't find the executable. 17740 # The splitting of arguments from the executable at a space might have been incorrect, 17741 # since paths with space are more likely in Windows. Give it another try with the whole 17742 # argument. 17743 path="$complete" 17744 arguments="EOL" 17745 new_path="$path" 17746 17747 windows_path="$new_path" 17748 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17749 unix_path=`$CYGPATH -u "$windows_path"` 17750 new_path="$unix_path" 17751 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17752 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17753 new_path="$unix_path" 17754 fi 17755 17756 17757 new_path=`$WHICH "$new_path" 2> /dev/null` 17758 17759 if test "x$new_path" = x; then 17760 # It's still not found. Now this is an unrecoverable error. 17761 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 17762 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 17763 has_space=`$ECHO "$complete" | $GREP " "` 17764 if test "x$has_space" != x; then 17765 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17767 fi 17768 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17769 fi 17770 fi 17771 17772 # Now new_path has a complete unix path to the binary 17773 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 17774 # Keep paths in /bin as-is, but remove trailing .exe if any 17775 new_path="${new_path/%.exe/}" 17776 # Do not save /bin paths to all_fixpath_prefixes! 17777 else 17778 # Not in mixed or Windows style, start by that. 17779 new_path=`cmd //c echo $new_path` 17780 17781 input_path="$new_path" 17782 # Check if we need to convert this using DOS-style short mode. If the path 17783 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17784 # take no chances and rewrite it. 17785 # Note: m4 eats our [], so we need to use [ and ] instead. 17786 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17787 if test "x$has_forbidden_chars" != x; then 17788 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17789 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17790 fi 17791 17792 # Output is in $new_path 17793 17794 windows_path="$new_path" 17795 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17796 unix_path=`$CYGPATH -u "$windows_path"` 17797 new_path="$unix_path" 17798 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17799 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17800 new_path="$unix_path" 17801 fi 17802 17803 # remove trailing .exe if any 17804 new_path="${new_path/%.exe/}" 17805 17806 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17807 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17808 fi 17809 17810 else 17811 # We're on a posix platform. Hooray! :) 17812 # First separate the path from the arguments. This will split at the first 17813 # space. 17814 complete="$BUILD_CC" 17815 path="${complete%% *}" 17816 tmp="$complete EOL" 17817 arguments="${tmp#* }" 17818 17819 # Cannot rely on the command "which" here since it doesn't always work. 17820 is_absolute_path=`$ECHO "$path" | $GREP ^/` 17821 if test -z "$is_absolute_path"; then 17822 # Path to executable is not absolute. Find it. 17823 IFS_save="$IFS" 17824 IFS=: 17825 for p in $PATH; do 17826 if test -f "$p/$path" && test -x "$p/$path"; then 17827 new_path="$p/$path" 17828 break 17829 fi 17830 done 17831 IFS="$IFS_save" 17832 else 17833 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5 17834 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;} 17835 new_path="$path" 17836 fi 17837 17838 if test "x$new_path" = x; then 17839 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 17840 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 17841 has_space=`$ECHO "$complete" | $GREP " "` 17842 if test "x$has_space" != x; then 17843 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 17844 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 17845 fi 17846 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17847 fi 17848 fi 17849 17850 # Now join together the path and the arguments once again 17851 if test "x$arguments" != xEOL; then 17852 new_complete="$new_path ${arguments% *}" 17853 else 17854 new_complete="$new_path" 17855 fi 17856 17857 if test "x$complete" != "x$new_complete"; then 17858 BUILD_CC="$new_complete" 17859 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5 17860 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;} 17861 fi 17862 17863 for ac_prog in cl CC g++ 17864 do 17865 # Extract the first word of "$ac_prog", so it can be a program name with args. 17866 set dummy $ac_prog; ac_word=$2 17867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 17868 $as_echo_n "checking for $ac_word... " >&6; } 17869 if test "${ac_cv_path_BUILD_CXX+set}" = set; then : 17870 $as_echo_n "(cached) " >&6 17871 else 17872 case $BUILD_CXX in 17873 [\\/]* | ?:[\\/]*) 17874 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. 17875 ;; 17876 *) 17877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 17878 for as_dir in $PATH 17879 do 17880 IFS=$as_save_IFS 17881 test -z "$as_dir" && as_dir=. 17882 for ac_exec_ext in '' $ac_executable_extensions; do 17883 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 17884 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" 17885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 17886 break 2 17887 fi 17888 done 17889 done 17890 IFS=$as_save_IFS 17891 17892 ;; 17893 esac 17894 fi 17895 BUILD_CXX=$ac_cv_path_BUILD_CXX 17896 if test -n "$BUILD_CXX"; then 17897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 17898 $as_echo "$BUILD_CXX" >&6; } 17899 else 17900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17901 $as_echo "no" >&6; } 17902 fi 17903 17904 17905 test -n "$BUILD_CXX" && break 17906 done 17907 17908 17909 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17910 17911 # First separate the path from the arguments. This will split at the first 17912 # space. 17913 complete="$BUILD_CXX" 17914 path="${complete%% *}" 17915 tmp="$complete EOL" 17916 arguments="${tmp#* }" 17917 17918 # Input might be given as Windows format, start by converting to 17919 # unix format. 17920 new_path=`$CYGPATH -u "$path"` 17921 17922 # Now try to locate executable using which 17923 new_path=`$WHICH "$new_path" 2> /dev/null` 17924 # bat and cmd files are not always considered executable in cygwin causing which 17925 # to not find them 17926 if test "x$new_path" = x \ 17927 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17928 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17929 new_path=`$CYGPATH -u "$path"` 17930 fi 17931 if test "x$new_path" = x; then 17932 # Oops. Which didn't find the executable. 17933 # The splitting of arguments from the executable at a space might have been incorrect, 17934 # since paths with space are more likely in Windows. Give it another try with the whole 17935 # argument. 17936 path="$complete" 17937 arguments="EOL" 17938 new_path=`$CYGPATH -u "$path"` 17939 new_path=`$WHICH "$new_path" 2> /dev/null` 17940 # bat and cmd files are not always considered executable in cygwin causing which 17941 # to not find them 17942 if test "x$new_path" = x \ 17943 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17944 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17945 new_path=`$CYGPATH -u "$path"` 17946 fi 17947 if test "x$new_path" = x; then 17948 # It's still not found. Now this is an unrecoverable error. 17949 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 17950 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 17951 has_space=`$ECHO "$complete" | $GREP " "` 17952 if test "x$has_space" != x; then 17953 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17954 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17955 fi 17956 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 17957 fi 17958 fi 17959 17960 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17961 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17962 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17963 # "foo.exe" is OK but "foo" is an error. 17964 # 17965 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17966 # It is also a way to make sure we got the proper file name for the real test later on. 17967 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17968 if test "x$test_shortpath" = x; then 17969 # Short path failed, file does not exist as specified. 17970 # Try adding .exe or .cmd 17971 if test -f "${new_path}.exe"; then 17972 input_to_shortpath="${new_path}.exe" 17973 elif test -f "${new_path}.cmd"; then 17974 input_to_shortpath="${new_path}.cmd" 17975 else 17976 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5 17977 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;} 17978 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 17979 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 17980 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 17981 fi 17982 else 17983 input_to_shortpath="$new_path" 17984 fi 17985 17986 # Call helper function which possibly converts this using DOS-style short mode. 17987 # If so, the updated path is stored in $new_path. 17988 new_path="$input_to_shortpath" 17989 17990 input_path="$input_to_shortpath" 17991 # Check if we need to convert this using DOS-style short mode. If the path 17992 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17993 # take no chances and rewrite it. 17994 # Note: m4 eats our [], so we need to use [ and ] instead. 17995 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17996 if test "x$has_forbidden_chars" != x; then 17997 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17998 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17999 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18000 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18001 # Going to short mode and back again did indeed matter. Since short mode is 18002 # case insensitive, let's make it lowercase to improve readability. 18003 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18004 # Now convert it back to Unix-stile (cygpath) 18005 input_path=`$CYGPATH -u "$shortmode_path"` 18006 new_path="$input_path" 18007 fi 18008 fi 18009 18010 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18011 if test "x$test_cygdrive_prefix" = x; then 18012 # As a simple fix, exclude /usr/bin since it's not a real path. 18013 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18014 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18015 # a path prefixed by /cygdrive for fixpath to work. 18016 new_path="$CYGWIN_ROOT_PATH$input_path" 18017 fi 18018 fi 18019 18020 # remove trailing .exe if any 18021 new_path="${new_path/%.exe/}" 18022 18023 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18024 18025 # First separate the path from the arguments. This will split at the first 18026 # space. 18027 complete="$BUILD_CXX" 18028 path="${complete%% *}" 18029 tmp="$complete EOL" 18030 arguments="${tmp#* }" 18031 18032 # Input might be given as Windows format, start by converting to 18033 # unix format. 18034 new_path="$path" 18035 18036 windows_path="$new_path" 18037 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18038 unix_path=`$CYGPATH -u "$windows_path"` 18039 new_path="$unix_path" 18040 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18041 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18042 new_path="$unix_path" 18043 fi 18044 18045 18046 # Now try to locate executable using which 18047 new_path=`$WHICH "$new_path" 2> /dev/null` 18048 18049 if test "x$new_path" = x; then 18050 # Oops. Which didn't find the executable. 18051 # The splitting of arguments from the executable at a space might have been incorrect, 18052 # since paths with space are more likely in Windows. Give it another try with the whole 18053 # argument. 18054 path="$complete" 18055 arguments="EOL" 18056 new_path="$path" 18057 18058 windows_path="$new_path" 18059 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18060 unix_path=`$CYGPATH -u "$windows_path"` 18061 new_path="$unix_path" 18062 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18063 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18064 new_path="$unix_path" 18065 fi 18066 18067 18068 new_path=`$WHICH "$new_path" 2> /dev/null` 18069 18070 if test "x$new_path" = x; then 18071 # It's still not found. Now this is an unrecoverable error. 18072 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18073 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18074 has_space=`$ECHO "$complete" | $GREP " "` 18075 if test "x$has_space" != x; then 18076 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18077 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18078 fi 18079 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18080 fi 18081 fi 18082 18083 # Now new_path has a complete unix path to the binary 18084 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18085 # Keep paths in /bin as-is, but remove trailing .exe if any 18086 new_path="${new_path/%.exe/}" 18087 # Do not save /bin paths to all_fixpath_prefixes! 18088 else 18089 # Not in mixed or Windows style, start by that. 18090 new_path=`cmd //c echo $new_path` 18091 18092 input_path="$new_path" 18093 # Check if we need to convert this using DOS-style short mode. If the path 18094 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18095 # take no chances and rewrite it. 18096 # Note: m4 eats our [], so we need to use [ and ] instead. 18097 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18098 if test "x$has_forbidden_chars" != x; then 18099 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18100 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18101 fi 18102 18103 # Output is in $new_path 18104 18105 windows_path="$new_path" 18106 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18107 unix_path=`$CYGPATH -u "$windows_path"` 18108 new_path="$unix_path" 18109 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18110 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18111 new_path="$unix_path" 18112 fi 18113 18114 # remove trailing .exe if any 18115 new_path="${new_path/%.exe/}" 18116 18117 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18118 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18119 fi 18120 18121 else 18122 # We're on a posix platform. Hooray! :) 18123 # First separate the path from the arguments. This will split at the first 18124 # space. 18125 complete="$BUILD_CXX" 18126 path="${complete%% *}" 18127 tmp="$complete EOL" 18128 arguments="${tmp#* }" 18129 18130 # Cannot rely on the command "which" here since it doesn't always work. 18131 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18132 if test -z "$is_absolute_path"; then 18133 # Path to executable is not absolute. Find it. 18134 IFS_save="$IFS" 18135 IFS=: 18136 for p in $PATH; do 18137 if test -f "$p/$path" && test -x "$p/$path"; then 18138 new_path="$p/$path" 18139 break 18140 fi 18141 done 18142 IFS="$IFS_save" 18143 else 18144 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5 18145 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;} 18146 new_path="$path" 18147 fi 18148 18149 if test "x$new_path" = x; then 18150 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18151 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18152 has_space=`$ECHO "$complete" | $GREP " "` 18153 if test "x$has_space" != x; then 18154 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18155 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18156 fi 18157 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18158 fi 18159 fi 18160 18161 # Now join together the path and the arguments once again 18162 if test "x$arguments" != xEOL; then 18163 new_complete="$new_path ${arguments% *}" 18164 else 18165 new_complete="$new_path" 18166 fi 18167 18168 if test "x$complete" != "x$new_complete"; then 18169 BUILD_CXX="$new_complete" 18170 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5 18171 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;} 18172 fi 18173 18174 # Extract the first word of "ld", so it can be a program name with args. 18175 set dummy ld; ac_word=$2 18176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18177 $as_echo_n "checking for $ac_word... " >&6; } 18178 if test "${ac_cv_path_BUILD_LD+set}" = set; then : 18179 $as_echo_n "(cached) " >&6 18180 else 18181 case $BUILD_LD in 18182 [\\/]* | ?:[\\/]*) 18183 ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. 18184 ;; 18185 *) 18186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18187 for as_dir in $PATH 18188 do 18189 IFS=$as_save_IFS 18190 test -z "$as_dir" && as_dir=. 18191 for ac_exec_ext in '' $ac_executable_extensions; do 18192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18193 ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" 18194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18195 break 2 18196 fi 18197 done 18198 done 18199 IFS=$as_save_IFS 18200 18201 ;; 18202 esac 18203 fi 18204 BUILD_LD=$ac_cv_path_BUILD_LD 18205 if test -n "$BUILD_LD"; then 18206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 18207 $as_echo "$BUILD_LD" >&6; } 18208 else 18209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18210 $as_echo "no" >&6; } 18211 fi 18212 18213 18214 18215 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18216 18217 # First separate the path from the arguments. This will split at the first 18218 # space. 18219 complete="$BUILD_LD" 18220 path="${complete%% *}" 18221 tmp="$complete EOL" 18222 arguments="${tmp#* }" 18223 18224 # Input might be given as Windows format, start by converting to 18225 # unix format. 18226 new_path=`$CYGPATH -u "$path"` 18227 18228 # Now try to locate executable using which 18229 new_path=`$WHICH "$new_path" 2> /dev/null` 18230 # bat and cmd files are not always considered executable in cygwin causing which 18231 # to not find them 18232 if test "x$new_path" = x \ 18233 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18234 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18235 new_path=`$CYGPATH -u "$path"` 18236 fi 18237 if test "x$new_path" = x; then 18238 # Oops. Which didn't find the executable. 18239 # The splitting of arguments from the executable at a space might have been incorrect, 18240 # since paths with space are more likely in Windows. Give it another try with the whole 18241 # argument. 18242 path="$complete" 18243 arguments="EOL" 18244 new_path=`$CYGPATH -u "$path"` 18245 new_path=`$WHICH "$new_path" 2> /dev/null` 18246 # bat and cmd files are not always considered executable in cygwin causing which 18247 # to not find them 18248 if test "x$new_path" = x \ 18249 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18250 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18251 new_path=`$CYGPATH -u "$path"` 18252 fi 18253 if test "x$new_path" = x; then 18254 # It's still not found. Now this is an unrecoverable error. 18255 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18256 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18257 has_space=`$ECHO "$complete" | $GREP " "` 18258 if test "x$has_space" != x; then 18259 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18260 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18261 fi 18262 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18263 fi 18264 fi 18265 18266 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18267 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18268 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18269 # "foo.exe" is OK but "foo" is an error. 18270 # 18271 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18272 # It is also a way to make sure we got the proper file name for the real test later on. 18273 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18274 if test "x$test_shortpath" = x; then 18275 # Short path failed, file does not exist as specified. 18276 # Try adding .exe or .cmd 18277 if test -f "${new_path}.exe"; then 18278 input_to_shortpath="${new_path}.exe" 18279 elif test -f "${new_path}.cmd"; then 18280 input_to_shortpath="${new_path}.cmd" 18281 else 18282 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5 18283 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;} 18284 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18285 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18286 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18287 fi 18288 else 18289 input_to_shortpath="$new_path" 18290 fi 18291 18292 # Call helper function which possibly converts this using DOS-style short mode. 18293 # If so, the updated path is stored in $new_path. 18294 new_path="$input_to_shortpath" 18295 18296 input_path="$input_to_shortpath" 18297 # Check if we need to convert this using DOS-style short mode. If the path 18298 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18299 # take no chances and rewrite it. 18300 # Note: m4 eats our [], so we need to use [ and ] instead. 18301 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18302 if test "x$has_forbidden_chars" != x; then 18303 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18304 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18305 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18306 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18307 # Going to short mode and back again did indeed matter. Since short mode is 18308 # case insensitive, let's make it lowercase to improve readability. 18309 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18310 # Now convert it back to Unix-stile (cygpath) 18311 input_path=`$CYGPATH -u "$shortmode_path"` 18312 new_path="$input_path" 18313 fi 18314 fi 18315 18316 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18317 if test "x$test_cygdrive_prefix" = x; then 18318 # As a simple fix, exclude /usr/bin since it's not a real path. 18319 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18320 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18321 # a path prefixed by /cygdrive for fixpath to work. 18322 new_path="$CYGWIN_ROOT_PATH$input_path" 18323 fi 18324 fi 18325 18326 # remove trailing .exe if any 18327 new_path="${new_path/%.exe/}" 18328 18329 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18330 18331 # First separate the path from the arguments. This will split at the first 18332 # space. 18333 complete="$BUILD_LD" 18334 path="${complete%% *}" 18335 tmp="$complete EOL" 18336 arguments="${tmp#* }" 18337 18338 # Input might be given as Windows format, start by converting to 18339 # unix format. 18340 new_path="$path" 18341 18342 windows_path="$new_path" 18343 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18344 unix_path=`$CYGPATH -u "$windows_path"` 18345 new_path="$unix_path" 18346 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18347 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18348 new_path="$unix_path" 18349 fi 18350 18351 18352 # Now try to locate executable using which 18353 new_path=`$WHICH "$new_path" 2> /dev/null` 18354 18355 if test "x$new_path" = x; then 18356 # Oops. Which didn't find the executable. 18357 # The splitting of arguments from the executable at a space might have been incorrect, 18358 # since paths with space are more likely in Windows. Give it another try with the whole 18359 # argument. 18360 path="$complete" 18361 arguments="EOL" 18362 new_path="$path" 18363 18364 windows_path="$new_path" 18365 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18366 unix_path=`$CYGPATH -u "$windows_path"` 18367 new_path="$unix_path" 18368 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18369 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18370 new_path="$unix_path" 18371 fi 18372 18373 18374 new_path=`$WHICH "$new_path" 2> /dev/null` 18375 18376 if test "x$new_path" = x; then 18377 # It's still not found. Now this is an unrecoverable error. 18378 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18379 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18380 has_space=`$ECHO "$complete" | $GREP " "` 18381 if test "x$has_space" != x; then 18382 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18383 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18384 fi 18385 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18386 fi 18387 fi 18388 18389 # Now new_path has a complete unix path to the binary 18390 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18391 # Keep paths in /bin as-is, but remove trailing .exe if any 18392 new_path="${new_path/%.exe/}" 18393 # Do not save /bin paths to all_fixpath_prefixes! 18394 else 18395 # Not in mixed or Windows style, start by that. 18396 new_path=`cmd //c echo $new_path` 18397 18398 input_path="$new_path" 18399 # Check if we need to convert this using DOS-style short mode. If the path 18400 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18401 # take no chances and rewrite it. 18402 # Note: m4 eats our [], so we need to use [ and ] instead. 18403 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18404 if test "x$has_forbidden_chars" != x; then 18405 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18406 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18407 fi 18408 18409 # Output is in $new_path 18410 18411 windows_path="$new_path" 18412 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18413 unix_path=`$CYGPATH -u "$windows_path"` 18414 new_path="$unix_path" 18415 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18416 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18417 new_path="$unix_path" 18418 fi 18419 18420 # remove trailing .exe if any 18421 new_path="${new_path/%.exe/}" 18422 18423 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18424 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18425 fi 18426 18427 else 18428 # We're on a posix platform. Hooray! :) 18429 # First separate the path from the arguments. This will split at the first 18430 # space. 18431 complete="$BUILD_LD" 18432 path="${complete%% *}" 18433 tmp="$complete EOL" 18434 arguments="${tmp#* }" 18435 18436 # Cannot rely on the command "which" here since it doesn't always work. 18437 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18438 if test -z "$is_absolute_path"; then 18439 # Path to executable is not absolute. Find it. 18440 IFS_save="$IFS" 18441 IFS=: 18442 for p in $PATH; do 18443 if test -f "$p/$path" && test -x "$p/$path"; then 18444 new_path="$p/$path" 18445 break 18446 fi 18447 done 18448 IFS="$IFS_save" 18449 else 18450 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5 18451 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;} 18452 new_path="$path" 18453 fi 18454 18455 if test "x$new_path" = x; then 18456 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18457 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18458 has_space=`$ECHO "$complete" | $GREP " "` 18459 if test "x$has_space" != x; then 18460 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18461 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18462 fi 18463 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18464 fi 18465 fi 18466 18467 # Now join together the path and the arguments once again 18468 if test "x$arguments" != xEOL; then 18469 new_complete="$new_path ${arguments% *}" 18470 else 18471 new_complete="$new_path" 18472 fi 18473 18474 if test "x$complete" != "x$new_complete"; then 18475 BUILD_LD="$new_complete" 18476 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5 18477 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;} 18478 fi 18479 18480 fi 18481 18482 18483 18484 18485 # If a devkit is found on the builddeps server, then prepend its path to the 18486 # PATH variable. If there are cross compilers available in the devkit, these 18487 # will be found by AC_PROG_CC et al. 18488 DEVKIT= 18489 18490 18491 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 18492 # Source the builddeps file again, to make sure it uses the latest variables! 18493 . $builddepsfile 18494 # Look for a target and build machine specific resource! 18495 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 18496 if test "x$resource" = x; then 18497 # Ok, lets instead look for a target specific resource 18498 eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}} 18499 fi 18500 if test "x$resource" = x; then 18501 # Ok, lets instead look for a build specific resource 18502 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}} 18503 fi 18504 if test "x$resource" = x; then 18505 # Ok, lets instead look for a generic resource 18506 # (The devkit comes from M4 and not the shell, thus no need for eval here.) 18507 resource=${builddep_devkit} 18508 fi 18509 if test "x$resource" != x; then 18510 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5 18511 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;} 18512 # If the resource in the builddeps.conf file is an existing directory, 18513 # for example /java/linux/cups 18514 if test -d ${resource}; then 18515 depdir=${resource} 18516 else 18517 18518 # devkit is for example mymodule 18519 # $resource is for example libs/general/libmymod_1_2_3.zip 18520 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 18521 # $with_builddeps_dir is for example /localhome/builddeps 18522 # depdir is the name of the variable into which we store the depdir, eg MYMOD 18523 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 18524 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 18525 filename=`basename $resource` 18526 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 18527 filebase=${filename%%.*} 18528 extension=${filename#*.} 18529 installdir=$with_builddeps_dir/$filebase 18530 if test ! -f $installdir/$filename.unpacked; then 18531 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5 18532 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;} 18533 if test ! -d $installdir; then 18534 mkdir -p $installdir 18535 fi 18536 if test ! -d $installdir; then 18537 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 18538 fi 18539 tmpfile=`mktemp $installdir/devkit.XXXXXXXXX` 18540 touch $tmpfile 18541 if test ! -f $tmpfile; then 18542 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 18543 fi 18544 18545 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 18546 # $tmpfile is the local file name for the downloaded file. 18547 VALID_TOOL=no 18548 if test "x$BDEPS_FTP" = xwget; then 18549 VALID_TOOL=yes 18550 wget -O $tmpfile $with_builddeps_server/$resource 18551 fi 18552 if test "x$BDEPS_FTP" = xlftp; then 18553 VALID_TOOL=yes 18554 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 18555 fi 18556 if test "x$BDEPS_FTP" = xftp; then 18557 VALID_TOOL=yes 18558 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 18559 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 18560 FTPUSERPWD=${FTPSERVER%%@*} 18561 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 18562 FTPUSER=${userpwd%%:*} 18563 FTPPWD=${userpwd#*@} 18564 FTPSERVER=${FTPSERVER#*@} 18565 else 18566 FTPUSER=ftp 18567 FTPPWD=ftp 18568 fi 18569 # the "pass" command does not work on some 18570 # ftp clients (read ftp.exe) but if it works, 18571 # passive mode is better! 18572 (\ 18573 echo "user $FTPUSER $FTPPWD" ;\ 18574 echo "pass" ;\ 18575 echo "bin" ;\ 18576 echo "get $FTPPATH $tmpfile" ;\ 18577 ) | ftp -in $FTPSERVER 18578 fi 18579 if test "x$VALID_TOOL" != xyes; then 18580 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 18581 fi 18582 18583 mv $tmpfile $installdir/$filename 18584 if test ! -s $installdir/$filename; then 18585 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 18586 fi 18587 case "$extension" in 18588 zip) echo "Unzipping $installdir/$filename..." 18589 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 18590 ;; 18591 tar.gz) echo "Untaring $installdir/$filename..." 18592 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 18593 ;; 18594 tgz) echo "Untaring $installdir/$filename..." 18595 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 18596 ;; 18597 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 18598 ;; 18599 esac 18600 fi 18601 if test -f $installdir/$filename.unpacked; then 18602 depdir=$installdir 18603 fi 18604 18605 fi 18606 # Source the builddeps file again, because in the previous command, the depdir 18607 # was updated to point at the current build dependency install directory. 18608 . $builddepsfile 18609 # Now extract variables from the builddeps.conf files. 18610 theroot=${builddep_devkit_ROOT} 18611 thecflags=${builddep_devkit_CFLAGS} 18612 thelibs=${builddep_devkit_LIBS} 18613 if test "x$depdir" = x; then 18614 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5 18615 fi 18616 DEVKIT=$depdir 18617 if test "x$theroot" != x; then 18618 DEVKIT="$theroot" 18619 fi 18620 if test "x$thecflags" != x; then 18621 DEVKIT_CFLAGS="$thecflags" 18622 fi 18623 if test "x$thelibs" != x; then 18624 DEVKIT_LIBS="$thelibs" 18625 fi 18626 # Found devkit 18627 PATH="$DEVKIT/bin:$PATH" 18628 SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" 18629 if test "x$x_includes" = "xNONE"; then 18630 x_includes="$SYS_ROOT/usr/include/X11" 18631 fi 18632 if test "x$x_libraries" = "xNONE"; then 18633 x_libraries="$SYS_ROOT/usr/lib" 18634 fi 18635 18636 18637 fi 18638 18639 fi 18640 18641 18642 if test "x$SYS_ROOT" != "x/" ; then 18643 CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" 18644 CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" 18645 OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 18646 OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 18647 CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" 18648 LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" 18649 fi 18650 18651 # Store the CFLAGS etal passed to the configure script. 18652 ORG_CFLAGS="$CFLAGS" 18653 ORG_CXXFLAGS="$CXXFLAGS" 18654 ORG_OBJCFLAGS="$OBJCFLAGS" 18655 18656 # autoconf magic only relies on PATH, so update it if tools dir is specified 18657 OLD_PATH="$PATH" 18658 if test "x$TOOLS_DIR" != x; then 18659 PATH=$TOOLS_DIR:$PATH 18660 fi 18661 18662 18663 ### Locate C compiler (CC) 18664 18665 # On windows, only cl.exe is supported. 18666 # On Solaris, cc is preferred to gcc. 18667 # Elsewhere, gcc is preferred to cc. 18668 18669 if test "x$CC" != x; then 18670 COMPILER_CHECK_LIST="$CC" 18671 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 18672 COMPILER_CHECK_LIST="cl" 18673 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 18674 COMPILER_CHECK_LIST="cc gcc" 18675 else 18676 COMPILER_CHECK_LIST="gcc cc" 18677 fi 18678 18679 18680 COMPILER_NAME=C 18681 18682 CC= 18683 # If TOOLS_DIR is set, check for all compiler names in there first 18684 # before checking the rest of the PATH. 18685 if test -n "$TOOLS_DIR"; then 18686 PATH_save="$PATH" 18687 PATH="$TOOLS_DIR" 18688 for ac_prog in $COMPILER_CHECK_LIST 18689 do 18690 # Extract the first word of "$ac_prog", so it can be a program name with args. 18691 set dummy $ac_prog; ac_word=$2 18692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18693 $as_echo_n "checking for $ac_word... " >&6; } 18694 if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then : 18695 $as_echo_n "(cached) " >&6 18696 else 18697 case $TOOLS_DIR_CC in 18698 [\\/]* | ?:[\\/]*) 18699 ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path. 18700 ;; 18701 *) 18702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18703 for as_dir in $PATH 18704 do 18705 IFS=$as_save_IFS 18706 test -z "$as_dir" && as_dir=. 18707 for ac_exec_ext in '' $ac_executable_extensions; do 18708 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18709 ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext" 18710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18711 break 2 18712 fi 18713 done 18714 done 18715 IFS=$as_save_IFS 18716 18717 ;; 18718 esac 18719 fi 18720 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC 18721 if test -n "$TOOLS_DIR_CC"; then 18722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5 18723 $as_echo "$TOOLS_DIR_CC" >&6; } 18724 else 18725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18726 $as_echo "no" >&6; } 18727 fi 18728 18729 18730 test -n "$TOOLS_DIR_CC" && break 18731 done 18732 18733 CC=$TOOLS_DIR_CC 18734 PATH="$PATH_save" 18735 fi 18736 18737 # AC_PATH_PROGS can't be run multiple times with the same variable, 18738 # so create a new name for this run. 18739 if test "x$CC" = x; then 18740 for ac_prog in $COMPILER_CHECK_LIST 18741 do 18742 # Extract the first word of "$ac_prog", so it can be a program name with args. 18743 set dummy $ac_prog; ac_word=$2 18744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18745 $as_echo_n "checking for $ac_word... " >&6; } 18746 if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then : 18747 $as_echo_n "(cached) " >&6 18748 else 18749 case $POTENTIAL_CC in 18750 [\\/]* | ?:[\\/]*) 18751 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path. 18752 ;; 18753 *) 18754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18755 for as_dir in $PATH 18756 do 18757 IFS=$as_save_IFS 18758 test -z "$as_dir" && as_dir=. 18759 for ac_exec_ext in '' $ac_executable_extensions; do 18760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18761 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" 18762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18763 break 2 18764 fi 18765 done 18766 done 18767 IFS=$as_save_IFS 18768 18769 ;; 18770 esac 18771 fi 18772 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC 18773 if test -n "$POTENTIAL_CC"; then 18774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5 18775 $as_echo "$POTENTIAL_CC" >&6; } 18776 else 18777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18778 $as_echo "no" >&6; } 18779 fi 18780 18781 18782 test -n "$POTENTIAL_CC" && break 18783 done 18784 18785 CC=$POTENTIAL_CC 18786 fi 18787 18788 if test "x$CC" = x; then 18789 18790 # Print a helpful message on how to acquire the necessary build dependency. 18791 # devkit is the help tag: freetyp2, cups, pulse, alsa etc 18792 MISSING_DEPENDENCY=devkit 18793 PKGHANDLER_COMMAND= 18794 18795 case $PKGHANDLER in 18796 apt-get) 18797 apt_help $MISSING_DEPENDENCY ;; 18798 yum) 18799 yum_help $MISSING_DEPENDENCY ;; 18800 port) 18801 port_help $MISSING_DEPENDENCY ;; 18802 pkgutil) 18803 pkgutil_help $MISSING_DEPENDENCY ;; 18804 pkgadd) 18805 pkgadd_help $MISSING_DEPENDENCY ;; 18806 * ) 18807 break ;; 18808 esac 18809 18810 if test "x$PKGHANDLER_COMMAND" != x; then 18811 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 18812 fi 18813 18814 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 18815 fi 18816 18817 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18818 18819 # First separate the path from the arguments. This will split at the first 18820 # space. 18821 complete="$CC" 18822 path="${complete%% *}" 18823 tmp="$complete EOL" 18824 arguments="${tmp#* }" 18825 18826 # Input might be given as Windows format, start by converting to 18827 # unix format. 18828 new_path=`$CYGPATH -u "$path"` 18829 18830 # Now try to locate executable using which 18831 new_path=`$WHICH "$new_path" 2> /dev/null` 18832 # bat and cmd files are not always considered executable in cygwin causing which 18833 # to not find them 18834 if test "x$new_path" = x \ 18835 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18836 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18837 new_path=`$CYGPATH -u "$path"` 18838 fi 18839 if test "x$new_path" = x; then 18840 # Oops. Which didn't find the executable. 18841 # The splitting of arguments from the executable at a space might have been incorrect, 18842 # since paths with space are more likely in Windows. Give it another try with the whole 18843 # argument. 18844 path="$complete" 18845 arguments="EOL" 18846 new_path=`$CYGPATH -u "$path"` 18847 new_path=`$WHICH "$new_path" 2> /dev/null` 18848 # bat and cmd files are not always considered executable in cygwin causing which 18849 # to not find them 18850 if test "x$new_path" = x \ 18851 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18852 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18853 new_path=`$CYGPATH -u "$path"` 18854 fi 18855 if test "x$new_path" = x; then 18856 # It's still not found. Now this is an unrecoverable error. 18857 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 18858 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 18859 has_space=`$ECHO "$complete" | $GREP " "` 18860 if test "x$has_space" != x; then 18861 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18862 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18863 fi 18864 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 18865 fi 18866 fi 18867 18868 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18869 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18870 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18871 # "foo.exe" is OK but "foo" is an error. 18872 # 18873 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18874 # It is also a way to make sure we got the proper file name for the real test later on. 18875 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18876 if test "x$test_shortpath" = x; then 18877 # Short path failed, file does not exist as specified. 18878 # Try adding .exe or .cmd 18879 if test -f "${new_path}.exe"; then 18880 input_to_shortpath="${new_path}.exe" 18881 elif test -f "${new_path}.cmd"; then 18882 input_to_shortpath="${new_path}.cmd" 18883 else 18884 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5 18885 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;} 18886 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18887 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18888 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 18889 fi 18890 else 18891 input_to_shortpath="$new_path" 18892 fi 18893 18894 # Call helper function which possibly converts this using DOS-style short mode. 18895 # If so, the updated path is stored in $new_path. 18896 new_path="$input_to_shortpath" 18897 18898 input_path="$input_to_shortpath" 18899 # Check if we need to convert this using DOS-style short mode. If the path 18900 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18901 # take no chances and rewrite it. 18902 # Note: m4 eats our [], so we need to use [ and ] instead. 18903 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18904 if test "x$has_forbidden_chars" != x; then 18905 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18906 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18907 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18908 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18909 # Going to short mode and back again did indeed matter. Since short mode is 18910 # case insensitive, let's make it lowercase to improve readability. 18911 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18912 # Now convert it back to Unix-stile (cygpath) 18913 input_path=`$CYGPATH -u "$shortmode_path"` 18914 new_path="$input_path" 18915 fi 18916 fi 18917 18918 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18919 if test "x$test_cygdrive_prefix" = x; then 18920 # As a simple fix, exclude /usr/bin since it's not a real path. 18921 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18922 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18923 # a path prefixed by /cygdrive for fixpath to work. 18924 new_path="$CYGWIN_ROOT_PATH$input_path" 18925 fi 18926 fi 18927 18928 # remove trailing .exe if any 18929 new_path="${new_path/%.exe/}" 18930 18931 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18932 18933 # First separate the path from the arguments. This will split at the first 18934 # space. 18935 complete="$CC" 18936 path="${complete%% *}" 18937 tmp="$complete EOL" 18938 arguments="${tmp#* }" 18939 18940 # Input might be given as Windows format, start by converting to 18941 # unix format. 18942 new_path="$path" 18943 18944 windows_path="$new_path" 18945 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18946 unix_path=`$CYGPATH -u "$windows_path"` 18947 new_path="$unix_path" 18948 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18949 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18950 new_path="$unix_path" 18951 fi 18952 18953 18954 # Now try to locate executable using which 18955 new_path=`$WHICH "$new_path" 2> /dev/null` 18956 18957 if test "x$new_path" = x; then 18958 # Oops. Which didn't find the executable. 18959 # The splitting of arguments from the executable at a space might have been incorrect, 18960 # since paths with space are more likely in Windows. Give it another try with the whole 18961 # argument. 18962 path="$complete" 18963 arguments="EOL" 18964 new_path="$path" 18965 18966 windows_path="$new_path" 18967 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18968 unix_path=`$CYGPATH -u "$windows_path"` 18969 new_path="$unix_path" 18970 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18971 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18972 new_path="$unix_path" 18973 fi 18974 18975 18976 new_path=`$WHICH "$new_path" 2> /dev/null` 18977 18978 if test "x$new_path" = x; then 18979 # It's still not found. Now this is an unrecoverable error. 18980 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 18981 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 18982 has_space=`$ECHO "$complete" | $GREP " "` 18983 if test "x$has_space" != x; then 18984 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18985 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18986 fi 18987 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 18988 fi 18989 fi 18990 18991 # Now new_path has a complete unix path to the binary 18992 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18993 # Keep paths in /bin as-is, but remove trailing .exe if any 18994 new_path="${new_path/%.exe/}" 18995 # Do not save /bin paths to all_fixpath_prefixes! 18996 else 18997 # Not in mixed or Windows style, start by that. 18998 new_path=`cmd //c echo $new_path` 18999 19000 input_path="$new_path" 19001 # Check if we need to convert this using DOS-style short mode. If the path 19002 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19003 # take no chances and rewrite it. 19004 # Note: m4 eats our [], so we need to use [ and ] instead. 19005 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 19006 if test "x$has_forbidden_chars" != x; then 19007 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19008 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19009 fi 19010 19011 # Output is in $new_path 19012 19013 windows_path="$new_path" 19014 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19015 unix_path=`$CYGPATH -u "$windows_path"` 19016 new_path="$unix_path" 19017 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19018 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19019 new_path="$unix_path" 19020 fi 19021 19022 # remove trailing .exe if any 19023 new_path="${new_path/%.exe/}" 19024 19025 # Save the first 10 bytes of this path to the storage, so fixpath can work. 19026 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 19027 fi 19028 19029 else 19030 # We're on a posix platform. Hooray! :) 19031 # First separate the path from the arguments. This will split at the first 19032 # space. 19033 complete="$CC" 19034 path="${complete%% *}" 19035 tmp="$complete EOL" 19036 arguments="${tmp#* }" 19037 19038 # Cannot rely on the command "which" here since it doesn't always work. 19039 is_absolute_path=`$ECHO "$path" | $GREP ^/` 19040 if test -z "$is_absolute_path"; then 19041 # Path to executable is not absolute. Find it. 19042 IFS_save="$IFS" 19043 IFS=: 19044 for p in $PATH; do 19045 if test -f "$p/$path" && test -x "$p/$path"; then 19046 new_path="$p/$path" 19047 break 19048 fi 19049 done 19050 IFS="$IFS_save" 19051 else 19052 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5 19053 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;} 19054 new_path="$path" 19055 fi 19056 19057 if test "x$new_path" = x; then 19058 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 19059 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 19060 has_space=`$ECHO "$complete" | $GREP " "` 19061 if test "x$has_space" != x; then 19062 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 19063 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 19064 fi 19065 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19066 fi 19067 fi 19068 19069 # Now join together the path and the arguments once again 19070 if test "x$arguments" != xEOL; then 19071 new_complete="$new_path ${arguments% *}" 19072 else 19073 new_complete="$new_path" 19074 fi 19075 19076 if test "x$complete" != "x$new_complete"; then 19077 CC="$new_complete" 19078 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5 19079 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;} 19080 fi 19081 19082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 19083 $as_echo_n "checking resolved symbolic links for CC... " >&6; } 19084 TEST_COMPILER="$CC" 19085 19086 if test "x$OPENJDK_BUILD_OS" != xwindows; then 19087 # Follow a chain of symbolic links. Use readlink 19088 # where it exists, else fall back to horribly 19089 # complicated shell code. 19090 if test "x$READLINK_TESTED" != yes; then 19091 # On MacOSX there is a readlink tool with a different 19092 # purpose than the GNU readlink tool. Check the found readlink. 19093 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 19094 if test "x$ISGNU" = x; then 19095 # A readlink that we do not know how to use. 19096 # Are there other non-GNU readlinks out there? 19097 READLINK_TESTED=yes 19098 READLINK= 19099 fi 19100 fi 19101 19102 if test "x$READLINK" != x; then 19103 TEST_COMPILER=`$READLINK -f $TEST_COMPILER` 19104 else 19105 # Save the current directory for restoring afterwards 19106 STARTDIR=$PWD 19107 COUNTER=0 19108 sym_link_dir=`$DIRNAME $TEST_COMPILER` 19109 sym_link_file=`$BASENAME $TEST_COMPILER` 19110 # Use the system pwd and not the shell builtin to resolve directory symlinks 19111 cd $sym_link_dir 19112 cd `$THEPWDCMD` 19113 sym_link_dir=`$THEPWDCMD` 19114 # Resolve file symlinks 19115 while test $COUNTER -lt 20; do 19116 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 19117 if test "x$ISLINK" == x; then 19118 # This is not a symbolic link! We are done! 19119 break 19120 fi 19121 # Again resolve directory symlinks since the target of the just found 19122 # link could be in a different directory 19123 cd `$DIRNAME $ISLINK` 19124 sym_link_dir=`$THEPWDCMD` 19125 sym_link_file=`$BASENAME $ISLINK` 19126 let COUNTER=COUNTER+1 19127 done 19128 cd $STARTDIR 19129 TEST_COMPILER=$sym_link_dir/$sym_link_file 19130 fi 19131 fi 19132 19133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 19134 $as_echo "$TEST_COMPILER" >&6; } 19135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5 19136 $as_echo_n "checking if CC is disguised ccache... " >&6; } 19137 19138 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 19139 if test "x$COMPILER_BASENAME" = "xccache"; then 19140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 19141 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } 19142 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. 19143 # We want to control ccache invocation ourselves, so ignore this cc and try 19144 # searching again. 19145 19146 # Remove the path to the fake ccache cc from the PATH 19147 RETRY_COMPILER_SAVED_PATH="$PATH" 19148 COMPILER_DIRNAME=`$DIRNAME $CC` 19149 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" 19150 19151 # Try again looking for our compiler 19152 if test -n "$ac_tool_prefix"; then 19153 for ac_prog in $COMPILER_CHECK_LIST 19154 do 19155 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 19156 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 19157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19158 $as_echo_n "checking for $ac_word... " >&6; } 19159 if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then : 19160 $as_echo_n "(cached) " >&6 19161 else 19162 if test -n "$PROPER_COMPILER_CC"; then 19163 ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test. 19164 else 19165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19166 for as_dir in $PATH 19167 do 19168 IFS=$as_save_IFS 19169 test -z "$as_dir" && as_dir=. 19170 for ac_exec_ext in '' $ac_executable_extensions; do 19171 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19172 ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog" 19173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19174 break 2 19175 fi 19176 done 19177 done 19178 IFS=$as_save_IFS 19179 19180 fi 19181 fi 19182 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC 19183 if test -n "$PROPER_COMPILER_CC"; then 19184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 19185 $as_echo "$PROPER_COMPILER_CC" >&6; } 19186 else 19187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19188 $as_echo "no" >&6; } 19189 fi 19190 19191 19192 test -n "$PROPER_COMPILER_CC" && break 19193 done 19194 fi 19195 if test -z "$PROPER_COMPILER_CC"; then 19196 ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC 19197 for ac_prog in $COMPILER_CHECK_LIST 19198 do 19199 # Extract the first word of "$ac_prog", so it can be a program name with args. 19200 set dummy $ac_prog; ac_word=$2 19201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19202 $as_echo_n "checking for $ac_word... " >&6; } 19203 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then : 19204 $as_echo_n "(cached) " >&6 19205 else 19206 if test -n "$ac_ct_PROPER_COMPILER_CC"; then 19207 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test. 19208 else 19209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19210 for as_dir in $PATH 19211 do 19212 IFS=$as_save_IFS 19213 test -z "$as_dir" && as_dir=. 19214 for ac_exec_ext in '' $ac_executable_extensions; do 19215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19216 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog" 19217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19218 break 2 19219 fi 19220 done 19221 done 19222 IFS=$as_save_IFS 19223 19224 fi 19225 fi 19226 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC 19227 if test -n "$ac_ct_PROPER_COMPILER_CC"; then 19228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5 19229 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; } 19230 else 19231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19232 $as_echo "no" >&6; } 19233 fi 19234 19235 19236 test -n "$ac_ct_PROPER_COMPILER_CC" && break 19237 done 19238 19239 if test "x$ac_ct_PROPER_COMPILER_CC" = x; then 19240 PROPER_COMPILER_CC="" 19241 else 19242 case $cross_compiling:$ac_tool_warned in 19243 yes:) 19244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 19245 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 19246 ac_tool_warned=yes ;; 19247 esac 19248 PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC 19249 fi 19250 fi 19251 19252 19253 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19254 19255 # First separate the path from the arguments. This will split at the first 19256 # space. 19257 complete="$PROPER_COMPILER_CC" 19258 path="${complete%% *}" 19259 tmp="$complete EOL" 19260 arguments="${tmp#* }" 19261 19262 # Input might be given as Windows format, start by converting to 19263 # unix format. 19264 new_path=`$CYGPATH -u "$path"` 19265 19266 # Now try to locate executable using which 19267 new_path=`$WHICH "$new_path" 2> /dev/null` 19268 # bat and cmd files are not always considered executable in cygwin causing which 19269 # to not find them 19270 if test "x$new_path" = x \ 19271 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19272 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19273 new_path=`$CYGPATH -u "$path"` 19274 fi 19275 if test "x$new_path" = x; then 19276 # Oops. Which didn't find the executable. 19277 # The splitting of arguments from the executable at a space might have been incorrect, 19278 # since paths with space are more likely in Windows. Give it another try with the whole 19279 # argument. 19280 path="$complete" 19281 arguments="EOL" 19282 new_path=`$CYGPATH -u "$path"` 19283 new_path=`$WHICH "$new_path" 2> /dev/null` 19284 # bat and cmd files are not always considered executable in cygwin causing which 19285 # to not find them 19286 if test "x$new_path" = x \ 19287 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19288 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19289 new_path=`$CYGPATH -u "$path"` 19290 fi 19291 if test "x$new_path" = x; then 19292 # It's still not found. Now this is an unrecoverable error. 19293 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19294 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19295 has_space=`$ECHO "$complete" | $GREP " "` 19296 if test "x$has_space" != x; then 19297 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19298 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19299 fi 19300 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19301 fi 19302 fi 19303 19304 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 19305 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 19306 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 19307 # "foo.exe" is OK but "foo" is an error. 19308 # 19309 # This test is therefore slightly more accurate than "test -f" to check for file precense. 19310 # It is also a way to make sure we got the proper file name for the real test later on. 19311 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 19312 if test "x$test_shortpath" = x; then 19313 # Short path failed, file does not exist as specified. 19314 # Try adding .exe or .cmd 19315 if test -f "${new_path}.exe"; then 19316 input_to_shortpath="${new_path}.exe" 19317 elif test -f "${new_path}.cmd"; then 19318 input_to_shortpath="${new_path}.cmd" 19319 else 19320 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5 19321 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;} 19322 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 19323 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 19324 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19325 fi 19326 else 19327 input_to_shortpath="$new_path" 19328 fi 19329 19330 # Call helper function which possibly converts this using DOS-style short mode. 19331 # If so, the updated path is stored in $new_path. 19332 new_path="$input_to_shortpath" 19333 19334 input_path="$input_to_shortpath" 19335 # Check if we need to convert this using DOS-style short mode. If the path 19336 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19337 # take no chances and rewrite it. 19338 # Note: m4 eats our [], so we need to use [ and ] instead. 19339 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 19340 if test "x$has_forbidden_chars" != x; then 19341 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19342 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 19343 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 19344 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 19345 # Going to short mode and back again did indeed matter. Since short mode is 19346 # case insensitive, let's make it lowercase to improve readability. 19347 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19348 # Now convert it back to Unix-stile (cygpath) 19349 input_path=`$CYGPATH -u "$shortmode_path"` 19350 new_path="$input_path" 19351 fi 19352 fi 19353 19354 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 19355 if test "x$test_cygdrive_prefix" = x; then 19356 # As a simple fix, exclude /usr/bin since it's not a real path. 19357 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 19358 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 19359 # a path prefixed by /cygdrive for fixpath to work. 19360 new_path="$CYGWIN_ROOT_PATH$input_path" 19361 fi 19362 fi 19363 19364 # remove trailing .exe if any 19365 new_path="${new_path/%.exe/}" 19366 19367 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19368 19369 # First separate the path from the arguments. This will split at the first 19370 # space. 19371 complete="$PROPER_COMPILER_CC" 19372 path="${complete%% *}" 19373 tmp="$complete EOL" 19374 arguments="${tmp#* }" 19375 19376 # Input might be given as Windows format, start by converting to 19377 # unix format. 19378 new_path="$path" 19379 19380 windows_path="$new_path" 19381 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19382 unix_path=`$CYGPATH -u "$windows_path"` 19383 new_path="$unix_path" 19384 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19385 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19386 new_path="$unix_path" 19387 fi 19388 19389 19390 # Now try to locate executable using which 19391 new_path=`$WHICH "$new_path" 2> /dev/null` 19392 19393 if test "x$new_path" = x; then 19394 # Oops. Which didn't find the executable. 19395 # The splitting of arguments from the executable at a space might have been incorrect, 19396 # since paths with space are more likely in Windows. Give it another try with the whole 19397 # argument. 19398 path="$complete" 19399 arguments="EOL" 19400 new_path="$path" 19401 19402 windows_path="$new_path" 19403 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19404 unix_path=`$CYGPATH -u "$windows_path"` 19405 new_path="$unix_path" 19406 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19407 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19408 new_path="$unix_path" 19409 fi 19410 19411 19412 new_path=`$WHICH "$new_path" 2> /dev/null` 19413 19414 if test "x$new_path" = x; then 19415 # It's still not found. Now this is an unrecoverable error. 19416 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19417 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19418 has_space=`$ECHO "$complete" | $GREP " "` 19419 if test "x$has_space" != x; then 19420 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19421 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19422 fi 19423 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19424 fi 19425 fi 19426 19427 # Now new_path has a complete unix path to the binary 19428 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 19429 # Keep paths in /bin as-is, but remove trailing .exe if any 19430 new_path="${new_path/%.exe/}" 19431 # Do not save /bin paths to all_fixpath_prefixes! 19432 else 19433 # Not in mixed or Windows style, start by that. 19434 new_path=`cmd //c echo $new_path` 19435 19436 input_path="$new_path" 19437 # Check if we need to convert this using DOS-style short mode. If the path 19438 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19439 # take no chances and rewrite it. 19440 # Note: m4 eats our [], so we need to use [ and ] instead. 19441 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 19442 if test "x$has_forbidden_chars" != x; then 19443 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19444 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19445 fi 19446 19447 # Output is in $new_path 19448 19449 windows_path="$new_path" 19450 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19451 unix_path=`$CYGPATH -u "$windows_path"` 19452 new_path="$unix_path" 19453 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19454 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19455 new_path="$unix_path" 19456 fi 19457 19458 # remove trailing .exe if any 19459 new_path="${new_path/%.exe/}" 19460 19461 # Save the first 10 bytes of this path to the storage, so fixpath can work. 19462 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 19463 fi 19464 19465 else 19466 # We're on a posix platform. Hooray! :) 19467 # First separate the path from the arguments. This will split at the first 19468 # space. 19469 complete="$PROPER_COMPILER_CC" 19470 path="${complete%% *}" 19471 tmp="$complete EOL" 19472 arguments="${tmp#* }" 19473 19474 # Cannot rely on the command "which" here since it doesn't always work. 19475 is_absolute_path=`$ECHO "$path" | $GREP ^/` 19476 if test -z "$is_absolute_path"; then 19477 # Path to executable is not absolute. Find it. 19478 IFS_save="$IFS" 19479 IFS=: 19480 for p in $PATH; do 19481 if test -f "$p/$path" && test -x "$p/$path"; then 19482 new_path="$p/$path" 19483 break 19484 fi 19485 done 19486 IFS="$IFS_save" 19487 else 19488 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5 19489 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;} 19490 new_path="$path" 19491 fi 19492 19493 if test "x$new_path" = x; then 19494 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19495 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19496 has_space=`$ECHO "$complete" | $GREP " "` 19497 if test "x$has_space" != x; then 19498 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 19499 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 19500 fi 19501 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19502 fi 19503 fi 19504 19505 # Now join together the path and the arguments once again 19506 if test "x$arguments" != xEOL; then 19507 new_complete="$new_path ${arguments% *}" 19508 else 19509 new_complete="$new_path" 19510 fi 19511 19512 if test "x$complete" != "x$new_complete"; then 19513 PROPER_COMPILER_CC="$new_complete" 19514 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 19515 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;} 19516 fi 19517 19518 PATH="$RETRY_COMPILER_SAVED_PATH" 19519 19520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5 19521 $as_echo_n "checking for resolved symbolic links for CC... " >&6; } 19522 19523 if test "x$OPENJDK_BUILD_OS" != xwindows; then 19524 # Follow a chain of symbolic links. Use readlink 19525 # where it exists, else fall back to horribly 19526 # complicated shell code. 19527 if test "x$READLINK_TESTED" != yes; then 19528 # On MacOSX there is a readlink tool with a different 19529 # purpose than the GNU readlink tool. Check the found readlink. 19530 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 19531 if test "x$ISGNU" = x; then 19532 # A readlink that we do not know how to use. 19533 # Are there other non-GNU readlinks out there? 19534 READLINK_TESTED=yes 19535 READLINK= 19536 fi 19537 fi 19538 19539 if test "x$READLINK" != x; then 19540 PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC` 19541 else 19542 # Save the current directory for restoring afterwards 19543 STARTDIR=$PWD 19544 COUNTER=0 19545 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC` 19546 sym_link_file=`$BASENAME $PROPER_COMPILER_CC` 19547 # Use the system pwd and not the shell builtin to resolve directory symlinks 19548 cd $sym_link_dir 19549 cd `$THEPWDCMD` 19550 sym_link_dir=`$THEPWDCMD` 19551 # Resolve file symlinks 19552 while test $COUNTER -lt 20; do 19553 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 19554 if test "x$ISLINK" == x; then 19555 # This is not a symbolic link! We are done! 19556 break 19557 fi 19558 # Again resolve directory symlinks since the target of the just found 19559 # link could be in a different directory 19560 cd `$DIRNAME $ISLINK` 19561 sym_link_dir=`$THEPWDCMD` 19562 sym_link_file=`$BASENAME $ISLINK` 19563 let COUNTER=COUNTER+1 19564 done 19565 cd $STARTDIR 19566 PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file 19567 fi 19568 fi 19569 19570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 19571 $as_echo "$PROPER_COMPILER_CC" >&6; } 19572 CC="$PROPER_COMPILER_CC" 19573 else 19574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5 19575 $as_echo "no, keeping CC" >&6; } 19576 CC="$TEST_COMPILER" 19577 fi 19578 19579 COMPILER=$CC 19580 COMPILER_NAME=$COMPILER_NAME 19581 19582 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 19583 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work 19584 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` 19585 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 19586 if test $? -ne 0; then 19587 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 19588 19589 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5 19590 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} 19591 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 19592 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} 19593 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 19594 else 19595 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` 19596 COMPILER_VENDOR="Sun Studio" 19597 fi 19598 elif test "x$OPENJDK_TARGET_OS" = xwindows; then 19599 # First line typically looks something like: 19600 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 19601 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` 19602 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` 19603 COMPILER_VENDOR="Microsoft CL.EXE" 19604 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` 19605 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then 19606 if test "x$COMPILER_CPU_TEST" != "x80x86"; then 19607 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 19608 fi 19609 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 19610 if test "x$COMPILER_CPU_TEST" != "xx64"; then 19611 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 19612 fi 19613 fi 19614 else 19615 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 19616 # Check that this is likely to be GCC. 19617 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null 19618 if test $? -ne 0; then 19619 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 19620 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} 19621 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 19622 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} 19623 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 19624 fi 19625 19626 # First line typically looks something like: 19627 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 19628 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` 19629 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` 19630 fi 19631 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) 19632 CC_VERSION="$COMPILER_VERSION" 19633 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) 19634 CC_VENDOR="$COMPILER_VENDOR" 19635 19636 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 19637 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} 19638 19639 19640 # Now that we have resolved CC ourself, let autoconf have its go at it 19641 ac_ext=c 19642 ac_cpp='$CPP $CPPFLAGS' 19643 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 19644 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 19645 ac_compiler_gnu=$ac_cv_c_compiler_gnu 19646 if test -n "$ac_tool_prefix"; then 19647 for ac_prog in $CC 19648 do 19649 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 19650 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 19651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19652 $as_echo_n "checking for $ac_word... " >&6; } 19653 if test "${ac_cv_prog_CC+set}" = set; then : 19654 $as_echo_n "(cached) " >&6 19655 else 19656 if test -n "$CC"; then 19657 ac_cv_prog_CC="$CC" # Let the user override the test. 19658 else 19659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19660 for as_dir in $PATH 19661 do 19662 IFS=$as_save_IFS 19663 test -z "$as_dir" && as_dir=. 19664 for ac_exec_ext in '' $ac_executable_extensions; do 19665 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19666 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 19667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19668 break 2 19669 fi 19670 done 19671 done 19672 IFS=$as_save_IFS 19673 19674 fi 19675 fi 19676 CC=$ac_cv_prog_CC 19677 if test -n "$CC"; then 19678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 19679 $as_echo "$CC" >&6; } 19680 else 19681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19682 $as_echo "no" >&6; } 19683 fi 19684 19685 19686 test -n "$CC" && break 19687 done 19688 fi 19689 if test -z "$CC"; then 19690 ac_ct_CC=$CC 19691 for ac_prog in $CC 19692 do 19693 # Extract the first word of "$ac_prog", so it can be a program name with args. 19694 set dummy $ac_prog; ac_word=$2 19695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19696 $as_echo_n "checking for $ac_word... " >&6; } 19697 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : 19698 $as_echo_n "(cached) " >&6 19699 else 19700 if test -n "$ac_ct_CC"; then 19701 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 19702 else 19703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19704 for as_dir in $PATH 19705 do 19706 IFS=$as_save_IFS 19707 test -z "$as_dir" && as_dir=. 19708 for ac_exec_ext in '' $ac_executable_extensions; do 19709 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19710 ac_cv_prog_ac_ct_CC="$ac_prog" 19711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19712 break 2 19713 fi 19714 done 19715 done 19716 IFS=$as_save_IFS 19717 19718 fi 19719 fi 19720 ac_ct_CC=$ac_cv_prog_ac_ct_CC 19721 if test -n "$ac_ct_CC"; then 19722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 19723 $as_echo "$ac_ct_CC" >&6; } 19724 else 19725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19726 $as_echo "no" >&6; } 19727 fi 19728 19729 19730 test -n "$ac_ct_CC" && break 19731 done 19732 19733 if test "x$ac_ct_CC" = x; then 19734 CC="" 19735 else 19736 case $cross_compiling:$ac_tool_warned in 19737 yes:) 19738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 19739 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 19740 ac_tool_warned=yes ;; 19741 esac 19742 CC=$ac_ct_CC 19743 fi 19744 fi 19745 19746 19747 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19748 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19749 as_fn_error $? "no acceptable C compiler found in \$PATH 19750 See \`config.log' for more details" "$LINENO" 5 ; } 19751 19752 # Provide some information about the compiler. 19753 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 19754 set X $ac_compile 19755 ac_compiler=$2 19756 for ac_option in --version -v -V -qversion; do 19757 { { ac_try="$ac_compiler $ac_option >&5" 19758 case "(($ac_try" in 19759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19760 *) ac_try_echo=$ac_try;; 19761 esac 19762 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19763 $as_echo "$ac_try_echo"; } >&5 19764 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 19765 ac_status=$? 19766 if test -s conftest.err; then 19767 sed '10a\ 19768 ... rest of stderr output deleted ... 19769 10q' conftest.err >conftest.er1 19770 cat conftest.er1 >&5 19771 fi 19772 rm -f conftest.er1 conftest.err 19773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19774 test $ac_status = 0; } 19775 done 19776 19777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19778 /* end confdefs.h. */ 19779 19780 int 19781 main () 19782 { 19783 19784 ; 19785 return 0; 19786 } 19787 _ACEOF 19788 ac_clean_files_save=$ac_clean_files 19789 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 19790 # Try to create an executable without -o first, disregard a.out. 19791 # It will help us diagnose broken compilers, and finding out an intuition 19792 # of exeext. 19793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 19794 $as_echo_n "checking whether the C compiler works... " >&6; } 19795 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 19796 19797 # The possible output files: 19798 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 19799 19800 ac_rmfiles= 19801 for ac_file in $ac_files 19802 do 19803 case $ac_file in 19804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 19805 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 19806 esac 19807 done 19808 rm -f $ac_rmfiles 19809 19810 if { { ac_try="$ac_link_default" 19811 case "(($ac_try" in 19812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19813 *) ac_try_echo=$ac_try;; 19814 esac 19815 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19816 $as_echo "$ac_try_echo"; } >&5 19817 (eval "$ac_link_default") 2>&5 19818 ac_status=$? 19819 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19820 test $ac_status = 0; }; then : 19821 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 19822 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 19823 # in a Makefile. We should not override ac_cv_exeext if it was cached, 19824 # so that the user can short-circuit this test for compilers unknown to 19825 # Autoconf. 19826 for ac_file in $ac_files '' 19827 do 19828 test -f "$ac_file" || continue 19829 case $ac_file in 19830 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 19831 ;; 19832 [ab].out ) 19833 # We found the default executable, but exeext='' is most 19834 # certainly right. 19835 break;; 19836 *.* ) 19837 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 19838 then :; else 19839 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 19840 fi 19841 # We set ac_cv_exeext here because the later test for it is not 19842 # safe: cross compilers may not add the suffix if given an `-o' 19843 # argument, so we may need to know it at that point already. 19844 # Even if this section looks crufty: it has the advantage of 19845 # actually working. 19846 break;; 19847 * ) 19848 break;; 19849 esac 19850 done 19851 test "$ac_cv_exeext" = no && ac_cv_exeext= 19852 19853 else 19854 ac_file='' 19855 fi 19856 if test -z "$ac_file"; then : 19857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19858 $as_echo "no" >&6; } 19859 $as_echo "$as_me: failed program was:" >&5 19860 sed 's/^/| /' conftest.$ac_ext >&5 19861 19862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19863 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19864 as_fn_error 77 "C compiler cannot create executables 19865 See \`config.log' for more details" "$LINENO" 5 ; } 19866 else 19867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 19868 $as_echo "yes" >&6; } 19869 fi 19870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 19871 $as_echo_n "checking for C compiler default output file name... " >&6; } 19872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 19873 $as_echo "$ac_file" >&6; } 19874 ac_exeext=$ac_cv_exeext 19875 19876 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 19877 ac_clean_files=$ac_clean_files_save 19878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 19879 $as_echo_n "checking for suffix of executables... " >&6; } 19880 if { { ac_try="$ac_link" 19881 case "(($ac_try" in 19882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19883 *) ac_try_echo=$ac_try;; 19884 esac 19885 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19886 $as_echo "$ac_try_echo"; } >&5 19887 (eval "$ac_link") 2>&5 19888 ac_status=$? 19889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19890 test $ac_status = 0; }; then : 19891 # If both `conftest.exe' and `conftest' are `present' (well, observable) 19892 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 19893 # work properly (i.e., refer to `conftest.exe'), while it won't with 19894 # `rm'. 19895 for ac_file in conftest.exe conftest conftest.*; do 19896 test -f "$ac_file" || continue 19897 case $ac_file in 19898 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 19899 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 19900 break;; 19901 * ) break;; 19902 esac 19903 done 19904 else 19905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19906 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19907 as_fn_error $? "cannot compute suffix of executables: cannot compile and link 19908 See \`config.log' for more details" "$LINENO" 5 ; } 19909 fi 19910 rm -f conftest conftest$ac_cv_exeext 19911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 19912 $as_echo "$ac_cv_exeext" >&6; } 19913 19914 rm -f conftest.$ac_ext 19915 EXEEXT=$ac_cv_exeext 19916 ac_exeext=$EXEEXT 19917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19918 /* end confdefs.h. */ 19919 #include <stdio.h> 19920 int 19921 main () 19922 { 19923 FILE *f = fopen ("conftest.out", "w"); 19924 return ferror (f) || fclose (f) != 0; 19925 19926 ; 19927 return 0; 19928 } 19929 _ACEOF 19930 ac_clean_files="$ac_clean_files conftest.out" 19931 # Check that the compiler produces executables we can run. If not, either 19932 # the compiler is broken, or we cross compile. 19933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 19934 $as_echo_n "checking whether we are cross compiling... " >&6; } 19935 if test "$cross_compiling" != yes; then 19936 { { ac_try="$ac_link" 19937 case "(($ac_try" in 19938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19939 *) ac_try_echo=$ac_try;; 19940 esac 19941 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19942 $as_echo "$ac_try_echo"; } >&5 19943 (eval "$ac_link") 2>&5 19944 ac_status=$? 19945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19946 test $ac_status = 0; } 19947 if { ac_try='./conftest$ac_cv_exeext' 19948 { { case "(($ac_try" in 19949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19950 *) ac_try_echo=$ac_try;; 19951 esac 19952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19953 $as_echo "$ac_try_echo"; } >&5 19954 (eval "$ac_try") 2>&5 19955 ac_status=$? 19956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19957 test $ac_status = 0; }; }; then 19958 cross_compiling=no 19959 else 19960 if test "$cross_compiling" = maybe; then 19961 cross_compiling=yes 19962 else 19963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19964 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19965 as_fn_error $? "cannot run C compiled programs. 19966 If you meant to cross compile, use \`--host'. 19967 See \`config.log' for more details" "$LINENO" 5 ; } 19968 fi 19969 fi 19970 fi 19971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 19972 $as_echo "$cross_compiling" >&6; } 19973 19974 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 19975 ac_clean_files=$ac_clean_files_save 19976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 19977 $as_echo_n "checking for suffix of object files... " >&6; } 19978 if test "${ac_cv_objext+set}" = set; then : 19979 $as_echo_n "(cached) " >&6 19980 else 19981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19982 /* end confdefs.h. */ 19983 19984 int 19985 main () 19986 { 19987 19988 ; 19989 return 0; 19990 } 19991 _ACEOF 19992 rm -f conftest.o conftest.obj 19993 if { { ac_try="$ac_compile" 19994 case "(($ac_try" in 19995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19996 *) ac_try_echo=$ac_try;; 19997 esac 19998 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19999 $as_echo "$ac_try_echo"; } >&5 20000 (eval "$ac_compile") 2>&5 20001 ac_status=$? 20002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20003 test $ac_status = 0; }; then : 20004 for ac_file in conftest.o conftest.obj conftest.*; do 20005 test -f "$ac_file" || continue; 20006 case $ac_file in 20007 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 20008 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 20009 break;; 20010 esac 20011 done 20012 else 20013 $as_echo "$as_me: failed program was:" >&5 20014 sed 's/^/| /' conftest.$ac_ext >&5 20015 20016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20018 as_fn_error $? "cannot compute suffix of object files: cannot compile 20019 See \`config.log' for more details" "$LINENO" 5 ; } 20020 fi 20021 rm -f conftest.$ac_cv_objext conftest.$ac_ext 20022 fi 20023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 20024 $as_echo "$ac_cv_objext" >&6; } 20025 OBJEXT=$ac_cv_objext 20026 ac_objext=$OBJEXT 20027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 20028 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 20029 if test "${ac_cv_c_compiler_gnu+set}" = set; then : 20030 $as_echo_n "(cached) " >&6 20031 else 20032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20033 /* end confdefs.h. */ 20034 20035 int 20036 main () 20037 { 20038 #ifndef __GNUC__ 20039 choke me 20040 #endif 20041 20042 ; 20043 return 0; 20044 } 20045 _ACEOF 20046 if ac_fn_c_try_compile "$LINENO"; then : 20047 ac_compiler_gnu=yes 20048 else 20049 ac_compiler_gnu=no 20050 fi 20051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20052 ac_cv_c_compiler_gnu=$ac_compiler_gnu 20053 20054 fi 20055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 20056 $as_echo "$ac_cv_c_compiler_gnu" >&6; } 20057 if test $ac_compiler_gnu = yes; then 20058 GCC=yes 20059 else 20060 GCC= 20061 fi 20062 ac_test_CFLAGS=${CFLAGS+set} 20063 ac_save_CFLAGS=$CFLAGS 20064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 20065 $as_echo_n "checking whether $CC accepts -g... " >&6; } 20066 if test "${ac_cv_prog_cc_g+set}" = set; then : 20067 $as_echo_n "(cached) " >&6 20068 else 20069 ac_save_c_werror_flag=$ac_c_werror_flag 20070 ac_c_werror_flag=yes 20071 ac_cv_prog_cc_g=no 20072 CFLAGS="-g" 20073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20074 /* end confdefs.h. */ 20075 20076 int 20077 main () 20078 { 20079 20080 ; 20081 return 0; 20082 } 20083 _ACEOF 20084 if ac_fn_c_try_compile "$LINENO"; then : 20085 ac_cv_prog_cc_g=yes 20086 else 20087 CFLAGS="" 20088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20089 /* end confdefs.h. */ 20090 20091 int 20092 main () 20093 { 20094 20095 ; 20096 return 0; 20097 } 20098 _ACEOF 20099 if ac_fn_c_try_compile "$LINENO"; then : 20100 20101 else 20102 ac_c_werror_flag=$ac_save_c_werror_flag 20103 CFLAGS="-g" 20104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20105 /* end confdefs.h. */ 20106 20107 int 20108 main () 20109 { 20110 20111 ; 20112 return 0; 20113 } 20114 _ACEOF 20115 if ac_fn_c_try_compile "$LINENO"; then : 20116 ac_cv_prog_cc_g=yes 20117 fi 20118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20119 fi 20120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20121 fi 20122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20123 ac_c_werror_flag=$ac_save_c_werror_flag 20124 fi 20125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 20126 $as_echo "$ac_cv_prog_cc_g" >&6; } 20127 if test "$ac_test_CFLAGS" = set; then 20128 CFLAGS=$ac_save_CFLAGS 20129 elif test $ac_cv_prog_cc_g = yes; then 20130 if test "$GCC" = yes; then 20131 CFLAGS="-g -O2" 20132 else 20133 CFLAGS="-g" 20134 fi 20135 else 20136 if test "$GCC" = yes; then 20137 CFLAGS="-O2" 20138 else 20139 CFLAGS= 20140 fi 20141 fi 20142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 20143 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 20144 if test "${ac_cv_prog_cc_c89+set}" = set; then : 20145 $as_echo_n "(cached) " >&6 20146 else 20147 ac_cv_prog_cc_c89=no 20148 ac_save_CC=$CC 20149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20150 /* end confdefs.h. */ 20151 #include <stdarg.h> 20152 #include <stdio.h> 20153 #include <sys/types.h> 20154 #include <sys/stat.h> 20155 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 20156 struct buf { int x; }; 20157 FILE * (*rcsopen) (struct buf *, struct stat *, int); 20158 static char *e (p, i) 20159 char **p; 20160 int i; 20161 { 20162 return p[i]; 20163 } 20164 static char *f (char * (*g) (char **, int), char **p, ...) 20165 { 20166 char *s; 20167 va_list v; 20168 va_start (v,p); 20169 s = g (p, va_arg (v,int)); 20170 va_end (v); 20171 return s; 20172 } 20173 20174 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 20175 function prototypes and stuff, but not '\xHH' hex character constants. 20176 These don't provoke an error unfortunately, instead are silently treated 20177 as 'x'. The following induces an error, until -std is added to get 20178 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 20179 array size at least. It's necessary to write '\x00'==0 to get something 20180 that's true only with -std. */ 20181 int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 20182 20183 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 20184 inside strings and character constants. */ 20185 #define FOO(x) 'x' 20186 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 20187 20188 int test (int i, double x); 20189 struct s1 {int (*f) (int a);}; 20190 struct s2 {int (*f) (double a);}; 20191 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 20192 int argc; 20193 char **argv; 20194 int 20195 main () 20196 { 20197 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 20198 ; 20199 return 0; 20200 } 20201 _ACEOF 20202 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 20203 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 20204 do 20205 CC="$ac_save_CC $ac_arg" 20206 if ac_fn_c_try_compile "$LINENO"; then : 20207 ac_cv_prog_cc_c89=$ac_arg 20208 fi 20209 rm -f core conftest.err conftest.$ac_objext 20210 test "x$ac_cv_prog_cc_c89" != "xno" && break 20211 done 20212 rm -f conftest.$ac_ext 20213 CC=$ac_save_CC 20214 20215 fi 20216 # AC_CACHE_VAL 20217 case "x$ac_cv_prog_cc_c89" in 20218 x) 20219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 20220 $as_echo "none needed" >&6; } ;; 20221 xno) 20222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 20223 $as_echo "unsupported" >&6; } ;; 20224 *) 20225 CC="$CC $ac_cv_prog_cc_c89" 20226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 20227 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 20228 esac 20229 if test "x$ac_cv_prog_cc_c89" != xno; then : 20230 20231 fi 20232 20233 ac_ext=cpp 20234 ac_cpp='$CXXCPP $CPPFLAGS' 20235 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 20236 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 20237 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 20238 20239 20240 ### Locate C++ compiler (CXX) 20241 20242 if test "x$CXX" != x; then 20243 COMPILER_CHECK_LIST="$CXX" 20244 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 20245 COMPILER_CHECK_LIST="cl" 20246 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 20247 COMPILER_CHECK_LIST="CC g++" 20248 else 20249 COMPILER_CHECK_LIST="g++ CC" 20250 fi 20251 20252 20253 COMPILER_NAME=C++ 20254 20255 CXX= 20256 # If TOOLS_DIR is set, check for all compiler names in there first 20257 # before checking the rest of the PATH. 20258 if test -n "$TOOLS_DIR"; then 20259 PATH_save="$PATH" 20260 PATH="$TOOLS_DIR" 20261 for ac_prog in $COMPILER_CHECK_LIST 20262 do 20263 # Extract the first word of "$ac_prog", so it can be a program name with args. 20264 set dummy $ac_prog; ac_word=$2 20265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20266 $as_echo_n "checking for $ac_word... " >&6; } 20267 if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then : 20268 $as_echo_n "(cached) " >&6 20269 else 20270 case $TOOLS_DIR_CXX in 20271 [\\/]* | ?:[\\/]*) 20272 ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path. 20273 ;; 20274 *) 20275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20276 for as_dir in $PATH 20277 do 20278 IFS=$as_save_IFS 20279 test -z "$as_dir" && as_dir=. 20280 for ac_exec_ext in '' $ac_executable_extensions; do 20281 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20282 ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext" 20283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20284 break 2 20285 fi 20286 done 20287 done 20288 IFS=$as_save_IFS 20289 20290 ;; 20291 esac 20292 fi 20293 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX 20294 if test -n "$TOOLS_DIR_CXX"; then 20295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5 20296 $as_echo "$TOOLS_DIR_CXX" >&6; } 20297 else 20298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20299 $as_echo "no" >&6; } 20300 fi 20301 20302 20303 test -n "$TOOLS_DIR_CXX" && break 20304 done 20305 20306 CXX=$TOOLS_DIR_CXX 20307 PATH="$PATH_save" 20308 fi 20309 20310 # AC_PATH_PROGS can't be run multiple times with the same variable, 20311 # so create a new name for this run. 20312 if test "x$CXX" = x; then 20313 for ac_prog in $COMPILER_CHECK_LIST 20314 do 20315 # Extract the first word of "$ac_prog", so it can be a program name with args. 20316 set dummy $ac_prog; ac_word=$2 20317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20318 $as_echo_n "checking for $ac_word... " >&6; } 20319 if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then : 20320 $as_echo_n "(cached) " >&6 20321 else 20322 case $POTENTIAL_CXX in 20323 [\\/]* | ?:[\\/]*) 20324 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path. 20325 ;; 20326 *) 20327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20328 for as_dir in $PATH 20329 do 20330 IFS=$as_save_IFS 20331 test -z "$as_dir" && as_dir=. 20332 for ac_exec_ext in '' $ac_executable_extensions; do 20333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20334 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" 20335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20336 break 2 20337 fi 20338 done 20339 done 20340 IFS=$as_save_IFS 20341 20342 ;; 20343 esac 20344 fi 20345 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX 20346 if test -n "$POTENTIAL_CXX"; then 20347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5 20348 $as_echo "$POTENTIAL_CXX" >&6; } 20349 else 20350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20351 $as_echo "no" >&6; } 20352 fi 20353 20354 20355 test -n "$POTENTIAL_CXX" && break 20356 done 20357 20358 CXX=$POTENTIAL_CXX 20359 fi 20360 20361 if test "x$CXX" = x; then 20362 20363 # Print a helpful message on how to acquire the necessary build dependency. 20364 # devkit is the help tag: freetyp2, cups, pulse, alsa etc 20365 MISSING_DEPENDENCY=devkit 20366 PKGHANDLER_COMMAND= 20367 20368 case $PKGHANDLER in 20369 apt-get) 20370 apt_help $MISSING_DEPENDENCY ;; 20371 yum) 20372 yum_help $MISSING_DEPENDENCY ;; 20373 port) 20374 port_help $MISSING_DEPENDENCY ;; 20375 pkgutil) 20376 pkgutil_help $MISSING_DEPENDENCY ;; 20377 pkgadd) 20378 pkgadd_help $MISSING_DEPENDENCY ;; 20379 * ) 20380 break ;; 20381 esac 20382 20383 if test "x$PKGHANDLER_COMMAND" != x; then 20384 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 20385 fi 20386 20387 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 20388 fi 20389 20390 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20391 20392 # First separate the path from the arguments. This will split at the first 20393 # space. 20394 complete="$CXX" 20395 path="${complete%% *}" 20396 tmp="$complete EOL" 20397 arguments="${tmp#* }" 20398 20399 # Input might be given as Windows format, start by converting to 20400 # unix format. 20401 new_path=`$CYGPATH -u "$path"` 20402 20403 # Now try to locate executable using which 20404 new_path=`$WHICH "$new_path" 2> /dev/null` 20405 # bat and cmd files are not always considered executable in cygwin causing which 20406 # to not find them 20407 if test "x$new_path" = x \ 20408 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20409 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20410 new_path=`$CYGPATH -u "$path"` 20411 fi 20412 if test "x$new_path" = x; then 20413 # Oops. Which didn't find the executable. 20414 # The splitting of arguments from the executable at a space might have been incorrect, 20415 # since paths with space are more likely in Windows. Give it another try with the whole 20416 # argument. 20417 path="$complete" 20418 arguments="EOL" 20419 new_path=`$CYGPATH -u "$path"` 20420 new_path=`$WHICH "$new_path" 2> /dev/null` 20421 # bat and cmd files are not always considered executable in cygwin causing which 20422 # to not find them 20423 if test "x$new_path" = x \ 20424 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20425 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20426 new_path=`$CYGPATH -u "$path"` 20427 fi 20428 if test "x$new_path" = x; then 20429 # It's still not found. Now this is an unrecoverable error. 20430 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20431 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20432 has_space=`$ECHO "$complete" | $GREP " "` 20433 if test "x$has_space" != x; then 20434 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20436 fi 20437 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20438 fi 20439 fi 20440 20441 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 20442 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 20443 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 20444 # "foo.exe" is OK but "foo" is an error. 20445 # 20446 # This test is therefore slightly more accurate than "test -f" to check for file precense. 20447 # It is also a way to make sure we got the proper file name for the real test later on. 20448 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 20449 if test "x$test_shortpath" = x; then 20450 # Short path failed, file does not exist as specified. 20451 # Try adding .exe or .cmd 20452 if test -f "${new_path}.exe"; then 20453 input_to_shortpath="${new_path}.exe" 20454 elif test -f "${new_path}.cmd"; then 20455 input_to_shortpath="${new_path}.cmd" 20456 else 20457 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5 20458 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;} 20459 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 20460 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 20461 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20462 fi 20463 else 20464 input_to_shortpath="$new_path" 20465 fi 20466 20467 # Call helper function which possibly converts this using DOS-style short mode. 20468 # If so, the updated path is stored in $new_path. 20469 new_path="$input_to_shortpath" 20470 20471 input_path="$input_to_shortpath" 20472 # Check if we need to convert this using DOS-style short mode. If the path 20473 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20474 # take no chances and rewrite it. 20475 # Note: m4 eats our [], so we need to use [ and ] instead. 20476 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 20477 if test "x$has_forbidden_chars" != x; then 20478 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20479 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 20480 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 20481 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 20482 # Going to short mode and back again did indeed matter. Since short mode is 20483 # case insensitive, let's make it lowercase to improve readability. 20484 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20485 # Now convert it back to Unix-stile (cygpath) 20486 input_path=`$CYGPATH -u "$shortmode_path"` 20487 new_path="$input_path" 20488 fi 20489 fi 20490 20491 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 20492 if test "x$test_cygdrive_prefix" = x; then 20493 # As a simple fix, exclude /usr/bin since it's not a real path. 20494 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 20495 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 20496 # a path prefixed by /cygdrive for fixpath to work. 20497 new_path="$CYGWIN_ROOT_PATH$input_path" 20498 fi 20499 fi 20500 20501 # remove trailing .exe if any 20502 new_path="${new_path/%.exe/}" 20503 20504 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20505 20506 # First separate the path from the arguments. This will split at the first 20507 # space. 20508 complete="$CXX" 20509 path="${complete%% *}" 20510 tmp="$complete EOL" 20511 arguments="${tmp#* }" 20512 20513 # Input might be given as Windows format, start by converting to 20514 # unix format. 20515 new_path="$path" 20516 20517 windows_path="$new_path" 20518 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20519 unix_path=`$CYGPATH -u "$windows_path"` 20520 new_path="$unix_path" 20521 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20522 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20523 new_path="$unix_path" 20524 fi 20525 20526 20527 # Now try to locate executable using which 20528 new_path=`$WHICH "$new_path" 2> /dev/null` 20529 20530 if test "x$new_path" = x; then 20531 # Oops. Which didn't find the executable. 20532 # The splitting of arguments from the executable at a space might have been incorrect, 20533 # since paths with space are more likely in Windows. Give it another try with the whole 20534 # argument. 20535 path="$complete" 20536 arguments="EOL" 20537 new_path="$path" 20538 20539 windows_path="$new_path" 20540 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20541 unix_path=`$CYGPATH -u "$windows_path"` 20542 new_path="$unix_path" 20543 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20544 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20545 new_path="$unix_path" 20546 fi 20547 20548 20549 new_path=`$WHICH "$new_path" 2> /dev/null` 20550 20551 if test "x$new_path" = x; then 20552 # It's still not found. Now this is an unrecoverable error. 20553 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20554 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20555 has_space=`$ECHO "$complete" | $GREP " "` 20556 if test "x$has_space" != x; then 20557 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20558 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20559 fi 20560 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20561 fi 20562 fi 20563 20564 # Now new_path has a complete unix path to the binary 20565 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 20566 # Keep paths in /bin as-is, but remove trailing .exe if any 20567 new_path="${new_path/%.exe/}" 20568 # Do not save /bin paths to all_fixpath_prefixes! 20569 else 20570 # Not in mixed or Windows style, start by that. 20571 new_path=`cmd //c echo $new_path` 20572 20573 input_path="$new_path" 20574 # Check if we need to convert this using DOS-style short mode. If the path 20575 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20576 # take no chances and rewrite it. 20577 # Note: m4 eats our [], so we need to use [ and ] instead. 20578 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 20579 if test "x$has_forbidden_chars" != x; then 20580 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20581 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20582 fi 20583 20584 # Output is in $new_path 20585 20586 windows_path="$new_path" 20587 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20588 unix_path=`$CYGPATH -u "$windows_path"` 20589 new_path="$unix_path" 20590 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20591 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20592 new_path="$unix_path" 20593 fi 20594 20595 # remove trailing .exe if any 20596 new_path="${new_path/%.exe/}" 20597 20598 # Save the first 10 bytes of this path to the storage, so fixpath can work. 20599 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 20600 fi 20601 20602 else 20603 # We're on a posix platform. Hooray! :) 20604 # First separate the path from the arguments. This will split at the first 20605 # space. 20606 complete="$CXX" 20607 path="${complete%% *}" 20608 tmp="$complete EOL" 20609 arguments="${tmp#* }" 20610 20611 # Cannot rely on the command "which" here since it doesn't always work. 20612 is_absolute_path=`$ECHO "$path" | $GREP ^/` 20613 if test -z "$is_absolute_path"; then 20614 # Path to executable is not absolute. Find it. 20615 IFS_save="$IFS" 20616 IFS=: 20617 for p in $PATH; do 20618 if test -f "$p/$path" && test -x "$p/$path"; then 20619 new_path="$p/$path" 20620 break 20621 fi 20622 done 20623 IFS="$IFS_save" 20624 else 20625 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5 20626 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;} 20627 new_path="$path" 20628 fi 20629 20630 if test "x$new_path" = x; then 20631 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20632 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20633 has_space=`$ECHO "$complete" | $GREP " "` 20634 if test "x$has_space" != x; then 20635 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 20636 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 20637 fi 20638 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20639 fi 20640 fi 20641 20642 # Now join together the path and the arguments once again 20643 if test "x$arguments" != xEOL; then 20644 new_complete="$new_path ${arguments% *}" 20645 else 20646 new_complete="$new_path" 20647 fi 20648 20649 if test "x$complete" != "x$new_complete"; then 20650 CXX="$new_complete" 20651 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5 20652 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;} 20653 fi 20654 20655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 20656 $as_echo_n "checking resolved symbolic links for CXX... " >&6; } 20657 TEST_COMPILER="$CXX" 20658 20659 if test "x$OPENJDK_BUILD_OS" != xwindows; then 20660 # Follow a chain of symbolic links. Use readlink 20661 # where it exists, else fall back to horribly 20662 # complicated shell code. 20663 if test "x$READLINK_TESTED" != yes; then 20664 # On MacOSX there is a readlink tool with a different 20665 # purpose than the GNU readlink tool. Check the found readlink. 20666 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 20667 if test "x$ISGNU" = x; then 20668 # A readlink that we do not know how to use. 20669 # Are there other non-GNU readlinks out there? 20670 READLINK_TESTED=yes 20671 READLINK= 20672 fi 20673 fi 20674 20675 if test "x$READLINK" != x; then 20676 TEST_COMPILER=`$READLINK -f $TEST_COMPILER` 20677 else 20678 # Save the current directory for restoring afterwards 20679 STARTDIR=$PWD 20680 COUNTER=0 20681 sym_link_dir=`$DIRNAME $TEST_COMPILER` 20682 sym_link_file=`$BASENAME $TEST_COMPILER` 20683 # Use the system pwd and not the shell builtin to resolve directory symlinks 20684 cd $sym_link_dir 20685 cd `$THEPWDCMD` 20686 sym_link_dir=`$THEPWDCMD` 20687 # Resolve file symlinks 20688 while test $COUNTER -lt 20; do 20689 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 20690 if test "x$ISLINK" == x; then 20691 # This is not a symbolic link! We are done! 20692 break 20693 fi 20694 # Again resolve directory symlinks since the target of the just found 20695 # link could be in a different directory 20696 cd `$DIRNAME $ISLINK` 20697 sym_link_dir=`$THEPWDCMD` 20698 sym_link_file=`$BASENAME $ISLINK` 20699 let COUNTER=COUNTER+1 20700 done 20701 cd $STARTDIR 20702 TEST_COMPILER=$sym_link_dir/$sym_link_file 20703 fi 20704 fi 20705 20706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 20707 $as_echo "$TEST_COMPILER" >&6; } 20708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5 20709 $as_echo_n "checking if CXX is disguised ccache... " >&6; } 20710 20711 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 20712 if test "x$COMPILER_BASENAME" = "xccache"; then 20713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 20714 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } 20715 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. 20716 # We want to control ccache invocation ourselves, so ignore this cc and try 20717 # searching again. 20718 20719 # Remove the path to the fake ccache cc from the PATH 20720 RETRY_COMPILER_SAVED_PATH="$PATH" 20721 COMPILER_DIRNAME=`$DIRNAME $CXX` 20722 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" 20723 20724 # Try again looking for our compiler 20725 if test -n "$ac_tool_prefix"; then 20726 for ac_prog in $COMPILER_CHECK_LIST 20727 do 20728 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 20729 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 20730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20731 $as_echo_n "checking for $ac_word... " >&6; } 20732 if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then : 20733 $as_echo_n "(cached) " >&6 20734 else 20735 if test -n "$PROPER_COMPILER_CXX"; then 20736 ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test. 20737 else 20738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20739 for as_dir in $PATH 20740 do 20741 IFS=$as_save_IFS 20742 test -z "$as_dir" && as_dir=. 20743 for ac_exec_ext in '' $ac_executable_extensions; do 20744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20745 ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog" 20746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20747 break 2 20748 fi 20749 done 20750 done 20751 IFS=$as_save_IFS 20752 20753 fi 20754 fi 20755 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX 20756 if test -n "$PROPER_COMPILER_CXX"; then 20757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 20758 $as_echo "$PROPER_COMPILER_CXX" >&6; } 20759 else 20760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20761 $as_echo "no" >&6; } 20762 fi 20763 20764 20765 test -n "$PROPER_COMPILER_CXX" && break 20766 done 20767 fi 20768 if test -z "$PROPER_COMPILER_CXX"; then 20769 ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX 20770 for ac_prog in $COMPILER_CHECK_LIST 20771 do 20772 # Extract the first word of "$ac_prog", so it can be a program name with args. 20773 set dummy $ac_prog; ac_word=$2 20774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20775 $as_echo_n "checking for $ac_word... " >&6; } 20776 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then : 20777 $as_echo_n "(cached) " >&6 20778 else 20779 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then 20780 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test. 20781 else 20782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20783 for as_dir in $PATH 20784 do 20785 IFS=$as_save_IFS 20786 test -z "$as_dir" && as_dir=. 20787 for ac_exec_ext in '' $ac_executable_extensions; do 20788 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20789 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog" 20790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20791 break 2 20792 fi 20793 done 20794 done 20795 IFS=$as_save_IFS 20796 20797 fi 20798 fi 20799 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX 20800 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then 20801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5 20802 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; } 20803 else 20804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20805 $as_echo "no" >&6; } 20806 fi 20807 20808 20809 test -n "$ac_ct_PROPER_COMPILER_CXX" && break 20810 done 20811 20812 if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then 20813 PROPER_COMPILER_CXX="" 20814 else 20815 case $cross_compiling:$ac_tool_warned in 20816 yes:) 20817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 20818 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 20819 ac_tool_warned=yes ;; 20820 esac 20821 PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX 20822 fi 20823 fi 20824 20825 20826 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20827 20828 # First separate the path from the arguments. This will split at the first 20829 # space. 20830 complete="$PROPER_COMPILER_CXX" 20831 path="${complete%% *}" 20832 tmp="$complete EOL" 20833 arguments="${tmp#* }" 20834 20835 # Input might be given as Windows format, start by converting to 20836 # unix format. 20837 new_path=`$CYGPATH -u "$path"` 20838 20839 # Now try to locate executable using which 20840 new_path=`$WHICH "$new_path" 2> /dev/null` 20841 # bat and cmd files are not always considered executable in cygwin causing which 20842 # to not find them 20843 if test "x$new_path" = x \ 20844 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20845 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20846 new_path=`$CYGPATH -u "$path"` 20847 fi 20848 if test "x$new_path" = x; then 20849 # Oops. Which didn't find the executable. 20850 # The splitting of arguments from the executable at a space might have been incorrect, 20851 # since paths with space are more likely in Windows. Give it another try with the whole 20852 # argument. 20853 path="$complete" 20854 arguments="EOL" 20855 new_path=`$CYGPATH -u "$path"` 20856 new_path=`$WHICH "$new_path" 2> /dev/null` 20857 # bat and cmd files are not always considered executable in cygwin causing which 20858 # to not find them 20859 if test "x$new_path" = x \ 20860 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20861 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20862 new_path=`$CYGPATH -u "$path"` 20863 fi 20864 if test "x$new_path" = x; then 20865 # It's still not found. Now this is an unrecoverable error. 20866 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 20867 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 20868 has_space=`$ECHO "$complete" | $GREP " "` 20869 if test "x$has_space" != x; then 20870 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20871 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20872 fi 20873 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 20874 fi 20875 fi 20876 20877 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 20878 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 20879 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 20880 # "foo.exe" is OK but "foo" is an error. 20881 # 20882 # This test is therefore slightly more accurate than "test -f" to check for file precense. 20883 # It is also a way to make sure we got the proper file name for the real test later on. 20884 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 20885 if test "x$test_shortpath" = x; then 20886 # Short path failed, file does not exist as specified. 20887 # Try adding .exe or .cmd 20888 if test -f "${new_path}.exe"; then 20889 input_to_shortpath="${new_path}.exe" 20890 elif test -f "${new_path}.cmd"; then 20891 input_to_shortpath="${new_path}.cmd" 20892 else 20893 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5 20894 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;} 20895 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 20896 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 20897 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 20898 fi 20899 else 20900 input_to_shortpath="$new_path" 20901 fi 20902 20903 # Call helper function which possibly converts this using DOS-style short mode. 20904 # If so, the updated path is stored in $new_path. 20905 new_path="$input_to_shortpath" 20906 20907 input_path="$input_to_shortpath" 20908 # Check if we need to convert this using DOS-style short mode. If the path 20909 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20910 # take no chances and rewrite it. 20911 # Note: m4 eats our [], so we need to use [ and ] instead. 20912 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 20913 if test "x$has_forbidden_chars" != x; then 20914 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20915 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 20916 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 20917 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 20918 # Going to short mode and back again did indeed matter. Since short mode is 20919 # case insensitive, let's make it lowercase to improve readability. 20920 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20921 # Now convert it back to Unix-stile (cygpath) 20922 input_path=`$CYGPATH -u "$shortmode_path"` 20923 new_path="$input_path" 20924 fi 20925 fi 20926 20927 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 20928 if test "x$test_cygdrive_prefix" = x; then 20929 # As a simple fix, exclude /usr/bin since it's not a real path. 20930 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 20931 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 20932 # a path prefixed by /cygdrive for fixpath to work. 20933 new_path="$CYGWIN_ROOT_PATH$input_path" 20934 fi 20935 fi 20936 20937 # remove trailing .exe if any 20938 new_path="${new_path/%.exe/}" 20939 20940 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20941 20942 # First separate the path from the arguments. This will split at the first 20943 # space. 20944 complete="$PROPER_COMPILER_CXX" 20945 path="${complete%% *}" 20946 tmp="$complete EOL" 20947 arguments="${tmp#* }" 20948 20949 # Input might be given as Windows format, start by converting to 20950 # unix format. 20951 new_path="$path" 20952 20953 windows_path="$new_path" 20954 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20955 unix_path=`$CYGPATH -u "$windows_path"` 20956 new_path="$unix_path" 20957 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20958 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20959 new_path="$unix_path" 20960 fi 20961 20962 20963 # Now try to locate executable using which 20964 new_path=`$WHICH "$new_path" 2> /dev/null` 20965 20966 if test "x$new_path" = x; then 20967 # Oops. Which didn't find the executable. 20968 # The splitting of arguments from the executable at a space might have been incorrect, 20969 # since paths with space are more likely in Windows. Give it another try with the whole 20970 # argument. 20971 path="$complete" 20972 arguments="EOL" 20973 new_path="$path" 20974 20975 windows_path="$new_path" 20976 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20977 unix_path=`$CYGPATH -u "$windows_path"` 20978 new_path="$unix_path" 20979 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20980 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20981 new_path="$unix_path" 20982 fi 20983 20984 20985 new_path=`$WHICH "$new_path" 2> /dev/null` 20986 20987 if test "x$new_path" = x; then 20988 # It's still not found. Now this is an unrecoverable error. 20989 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 20990 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 20991 has_space=`$ECHO "$complete" | $GREP " "` 20992 if test "x$has_space" != x; then 20993 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20994 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20995 fi 20996 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 20997 fi 20998 fi 20999 21000 # Now new_path has a complete unix path to the binary 21001 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 21002 # Keep paths in /bin as-is, but remove trailing .exe if any 21003 new_path="${new_path/%.exe/}" 21004 # Do not save /bin paths to all_fixpath_prefixes! 21005 else 21006 # Not in mixed or Windows style, start by that. 21007 new_path=`cmd //c echo $new_path` 21008 21009 input_path="$new_path" 21010 # Check if we need to convert this using DOS-style short mode. If the path 21011 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21012 # take no chances and rewrite it. 21013 # Note: m4 eats our [], so we need to use [ and ] instead. 21014 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 21015 if test "x$has_forbidden_chars" != x; then 21016 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21017 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21018 fi 21019 21020 # Output is in $new_path 21021 21022 windows_path="$new_path" 21023 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21024 unix_path=`$CYGPATH -u "$windows_path"` 21025 new_path="$unix_path" 21026 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21027 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21028 new_path="$unix_path" 21029 fi 21030 21031 # remove trailing .exe if any 21032 new_path="${new_path/%.exe/}" 21033 21034 # Save the first 10 bytes of this path to the storage, so fixpath can work. 21035 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 21036 fi 21037 21038 else 21039 # We're on a posix platform. Hooray! :) 21040 # First separate the path from the arguments. This will split at the first 21041 # space. 21042 complete="$PROPER_COMPILER_CXX" 21043 path="${complete%% *}" 21044 tmp="$complete EOL" 21045 arguments="${tmp#* }" 21046 21047 # Cannot rely on the command "which" here since it doesn't always work. 21048 is_absolute_path=`$ECHO "$path" | $GREP ^/` 21049 if test -z "$is_absolute_path"; then 21050 # Path to executable is not absolute. Find it. 21051 IFS_save="$IFS" 21052 IFS=: 21053 for p in $PATH; do 21054 if test -f "$p/$path" && test -x "$p/$path"; then 21055 new_path="$p/$path" 21056 break 21057 fi 21058 done 21059 IFS="$IFS_save" 21060 else 21061 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5 21062 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;} 21063 new_path="$path" 21064 fi 21065 21066 if test "x$new_path" = x; then 21067 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 21068 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 21069 has_space=`$ECHO "$complete" | $GREP " "` 21070 if test "x$has_space" != x; then 21071 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 21072 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 21073 fi 21074 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21075 fi 21076 fi 21077 21078 # Now join together the path and the arguments once again 21079 if test "x$arguments" != xEOL; then 21080 new_complete="$new_path ${arguments% *}" 21081 else 21082 new_complete="$new_path" 21083 fi 21084 21085 if test "x$complete" != "x$new_complete"; then 21086 PROPER_COMPILER_CXX="$new_complete" 21087 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 21088 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;} 21089 fi 21090 21091 PATH="$RETRY_COMPILER_SAVED_PATH" 21092 21093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5 21094 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; } 21095 21096 if test "x$OPENJDK_BUILD_OS" != xwindows; then 21097 # Follow a chain of symbolic links. Use readlink 21098 # where it exists, else fall back to horribly 21099 # complicated shell code. 21100 if test "x$READLINK_TESTED" != yes; then 21101 # On MacOSX there is a readlink tool with a different 21102 # purpose than the GNU readlink tool. Check the found readlink. 21103 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 21104 if test "x$ISGNU" = x; then 21105 # A readlink that we do not know how to use. 21106 # Are there other non-GNU readlinks out there? 21107 READLINK_TESTED=yes 21108 READLINK= 21109 fi 21110 fi 21111 21112 if test "x$READLINK" != x; then 21113 PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX` 21114 else 21115 # Save the current directory for restoring afterwards 21116 STARTDIR=$PWD 21117 COUNTER=0 21118 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX` 21119 sym_link_file=`$BASENAME $PROPER_COMPILER_CXX` 21120 # Use the system pwd and not the shell builtin to resolve directory symlinks 21121 cd $sym_link_dir 21122 cd `$THEPWDCMD` 21123 sym_link_dir=`$THEPWDCMD` 21124 # Resolve file symlinks 21125 while test $COUNTER -lt 20; do 21126 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 21127 if test "x$ISLINK" == x; then 21128 # This is not a symbolic link! We are done! 21129 break 21130 fi 21131 # Again resolve directory symlinks since the target of the just found 21132 # link could be in a different directory 21133 cd `$DIRNAME $ISLINK` 21134 sym_link_dir=`$THEPWDCMD` 21135 sym_link_file=`$BASENAME $ISLINK` 21136 let COUNTER=COUNTER+1 21137 done 21138 cd $STARTDIR 21139 PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file 21140 fi 21141 fi 21142 21143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 21144 $as_echo "$PROPER_COMPILER_CXX" >&6; } 21145 CXX="$PROPER_COMPILER_CXX" 21146 else 21147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5 21148 $as_echo "no, keeping CXX" >&6; } 21149 CXX="$TEST_COMPILER" 21150 fi 21151 21152 COMPILER=$CXX 21153 COMPILER_NAME=$COMPILER_NAME 21154 21155 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 21156 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work 21157 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` 21158 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 21159 if test $? -ne 0; then 21160 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 21161 21162 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5 21163 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} 21164 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 21165 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} 21166 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 21167 else 21168 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` 21169 COMPILER_VENDOR="Sun Studio" 21170 fi 21171 elif test "x$OPENJDK_TARGET_OS" = xwindows; then 21172 # First line typically looks something like: 21173 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 21174 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` 21175 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` 21176 COMPILER_VENDOR="Microsoft CL.EXE" 21177 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` 21178 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then 21179 if test "x$COMPILER_CPU_TEST" != "x80x86"; then 21180 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 21181 fi 21182 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 21183 if test "x$COMPILER_CPU_TEST" != "xx64"; then 21184 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 21185 fi 21186 fi 21187 else 21188 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 21189 # Check that this is likely to be GCC. 21190 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null 21191 if test $? -ne 0; then 21192 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 21193 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} 21194 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 21195 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} 21196 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 21197 fi 21198 21199 # First line typically looks something like: 21200 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 21201 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` 21202 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` 21203 fi 21204 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) 21205 CXX_VERSION="$COMPILER_VERSION" 21206 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) 21207 CXX_VENDOR="$COMPILER_VENDOR" 21208 21209 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 21210 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} 21211 21212 21213 # Now that we have resolved CXX ourself, let autoconf have its go at it 21214 ac_ext=cpp 21215 ac_cpp='$CXXCPP $CPPFLAGS' 21216 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21217 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21218 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21219 if test -z "$CXX"; then 21220 if test -n "$CCC"; then 21221 CXX=$CCC 21222 else 21223 if test -n "$ac_tool_prefix"; then 21224 for ac_prog in $CXX 21225 do 21226 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21227 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21229 $as_echo_n "checking for $ac_word... " >&6; } 21230 if test "${ac_cv_prog_CXX+set}" = set; then : 21231 $as_echo_n "(cached) " >&6 21232 else 21233 if test -n "$CXX"; then 21234 ac_cv_prog_CXX="$CXX" # Let the user override the test. 21235 else 21236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21237 for as_dir in $PATH 21238 do 21239 IFS=$as_save_IFS 21240 test -z "$as_dir" && as_dir=. 21241 for ac_exec_ext in '' $ac_executable_extensions; do 21242 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21243 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 21244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21245 break 2 21246 fi 21247 done 21248 done 21249 IFS=$as_save_IFS 21250 21251 fi 21252 fi 21253 CXX=$ac_cv_prog_CXX 21254 if test -n "$CXX"; then 21255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 21256 $as_echo "$CXX" >&6; } 21257 else 21258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21259 $as_echo "no" >&6; } 21260 fi 21261 21262 21263 test -n "$CXX" && break 21264 done 21265 fi 21266 if test -z "$CXX"; then 21267 ac_ct_CXX=$CXX 21268 for ac_prog in $CXX 21269 do 21270 # Extract the first word of "$ac_prog", so it can be a program name with args. 21271 set dummy $ac_prog; ac_word=$2 21272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21273 $as_echo_n "checking for $ac_word... " >&6; } 21274 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : 21275 $as_echo_n "(cached) " >&6 21276 else 21277 if test -n "$ac_ct_CXX"; then 21278 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 21279 else 21280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21281 for as_dir in $PATH 21282 do 21283 IFS=$as_save_IFS 21284 test -z "$as_dir" && as_dir=. 21285 for ac_exec_ext in '' $ac_executable_extensions; do 21286 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21287 ac_cv_prog_ac_ct_CXX="$ac_prog" 21288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21289 break 2 21290 fi 21291 done 21292 done 21293 IFS=$as_save_IFS 21294 21295 fi 21296 fi 21297 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 21298 if test -n "$ac_ct_CXX"; then 21299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 21300 $as_echo "$ac_ct_CXX" >&6; } 21301 else 21302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21303 $as_echo "no" >&6; } 21304 fi 21305 21306 21307 test -n "$ac_ct_CXX" && break 21308 done 21309 21310 if test "x$ac_ct_CXX" = x; then 21311 CXX="g++" 21312 else 21313 case $cross_compiling:$ac_tool_warned in 21314 yes:) 21315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21316 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21317 ac_tool_warned=yes ;; 21318 esac 21319 CXX=$ac_ct_CXX 21320 fi 21321 fi 21322 21323 fi 21324 fi 21325 # Provide some information about the compiler. 21326 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 21327 set X $ac_compile 21328 ac_compiler=$2 21329 for ac_option in --version -v -V -qversion; do 21330 { { ac_try="$ac_compiler $ac_option >&5" 21331 case "(($ac_try" in 21332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21333 *) ac_try_echo=$ac_try;; 21334 esac 21335 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 21336 $as_echo "$ac_try_echo"; } >&5 21337 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 21338 ac_status=$? 21339 if test -s conftest.err; then 21340 sed '10a\ 21341 ... rest of stderr output deleted ... 21342 10q' conftest.err >conftest.er1 21343 cat conftest.er1 >&5 21344 fi 21345 rm -f conftest.er1 conftest.err 21346 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 21347 test $ac_status = 0; } 21348 done 21349 21350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 21351 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } 21352 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : 21353 $as_echo_n "(cached) " >&6 21354 else 21355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21356 /* end confdefs.h. */ 21357 21358 int 21359 main () 21360 { 21361 #ifndef __GNUC__ 21362 choke me 21363 #endif 21364 21365 ; 21366 return 0; 21367 } 21368 _ACEOF 21369 if ac_fn_cxx_try_compile "$LINENO"; then : 21370 ac_compiler_gnu=yes 21371 else 21372 ac_compiler_gnu=no 21373 fi 21374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21375 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 21376 21377 fi 21378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 21379 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } 21380 if test $ac_compiler_gnu = yes; then 21381 GXX=yes 21382 else 21383 GXX= 21384 fi 21385 ac_test_CXXFLAGS=${CXXFLAGS+set} 21386 ac_save_CXXFLAGS=$CXXFLAGS 21387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 21388 $as_echo_n "checking whether $CXX accepts -g... " >&6; } 21389 if test "${ac_cv_prog_cxx_g+set}" = set; then : 21390 $as_echo_n "(cached) " >&6 21391 else 21392 ac_save_cxx_werror_flag=$ac_cxx_werror_flag 21393 ac_cxx_werror_flag=yes 21394 ac_cv_prog_cxx_g=no 21395 CXXFLAGS="-g" 21396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21397 /* end confdefs.h. */ 21398 21399 int 21400 main () 21401 { 21402 21403 ; 21404 return 0; 21405 } 21406 _ACEOF 21407 if ac_fn_cxx_try_compile "$LINENO"; then : 21408 ac_cv_prog_cxx_g=yes 21409 else 21410 CXXFLAGS="" 21411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21412 /* end confdefs.h. */ 21413 21414 int 21415 main () 21416 { 21417 21418 ; 21419 return 0; 21420 } 21421 _ACEOF 21422 if ac_fn_cxx_try_compile "$LINENO"; then : 21423 21424 else 21425 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21426 CXXFLAGS="-g" 21427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21428 /* end confdefs.h. */ 21429 21430 int 21431 main () 21432 { 21433 21434 ; 21435 return 0; 21436 } 21437 _ACEOF 21438 if ac_fn_cxx_try_compile "$LINENO"; then : 21439 ac_cv_prog_cxx_g=yes 21440 fi 21441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21442 fi 21443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21444 fi 21445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21446 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21447 fi 21448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 21449 $as_echo "$ac_cv_prog_cxx_g" >&6; } 21450 if test "$ac_test_CXXFLAGS" = set; then 21451 CXXFLAGS=$ac_save_CXXFLAGS 21452 elif test $ac_cv_prog_cxx_g = yes; then 21453 if test "$GXX" = yes; then 21454 CXXFLAGS="-g -O2" 21455 else 21456 CXXFLAGS="-g" 21457 fi 21458 else 21459 if test "$GXX" = yes; then 21460 CXXFLAGS="-O2" 21461 else 21462 CXXFLAGS= 21463 fi 21464 fi 21465 ac_ext=cpp 21466 ac_cpp='$CXXCPP $CPPFLAGS' 21467 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21468 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21469 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21470 21471 21472 ### Locate other tools 21473 21474 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 21475 ac_ext=m 21476 ac_cpp='$OBJCPP $CPPFLAGS' 21477 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21478 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21479 ac_compiler_gnu=$ac_cv_objc_compiler_gnu 21480 if test -n "$ac_tool_prefix"; then 21481 for ac_prog in gcc objcc objc cc CC 21482 do 21483 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21484 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21486 $as_echo_n "checking for $ac_word... " >&6; } 21487 if test "${ac_cv_prog_OBJC+set}" = set; then : 21488 $as_echo_n "(cached) " >&6 21489 else 21490 if test -n "$OBJC"; then 21491 ac_cv_prog_OBJC="$OBJC" # Let the user override the test. 21492 else 21493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21494 for as_dir in $PATH 21495 do 21496 IFS=$as_save_IFS 21497 test -z "$as_dir" && as_dir=. 21498 for ac_exec_ext in '' $ac_executable_extensions; do 21499 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21500 ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" 21501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21502 break 2 21503 fi 21504 done 21505 done 21506 IFS=$as_save_IFS 21507 21508 fi 21509 fi 21510 OBJC=$ac_cv_prog_OBJC 21511 if test -n "$OBJC"; then 21512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 21513 $as_echo "$OBJC" >&6; } 21514 else 21515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21516 $as_echo "no" >&6; } 21517 fi 21518 21519 21520 test -n "$OBJC" && break 21521 done 21522 fi 21523 if test -z "$OBJC"; then 21524 ac_ct_OBJC=$OBJC 21525 for ac_prog in gcc objcc objc cc CC 21526 do 21527 # Extract the first word of "$ac_prog", so it can be a program name with args. 21528 set dummy $ac_prog; ac_word=$2 21529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21530 $as_echo_n "checking for $ac_word... " >&6; } 21531 if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then : 21532 $as_echo_n "(cached) " >&6 21533 else 21534 if test -n "$ac_ct_OBJC"; then 21535 ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. 21536 else 21537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21538 for as_dir in $PATH 21539 do 21540 IFS=$as_save_IFS 21541 test -z "$as_dir" && as_dir=. 21542 for ac_exec_ext in '' $ac_executable_extensions; do 21543 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21544 ac_cv_prog_ac_ct_OBJC="$ac_prog" 21545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21546 break 2 21547 fi 21548 done 21549 done 21550 IFS=$as_save_IFS 21551 21552 fi 21553 fi 21554 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC 21555 if test -n "$ac_ct_OBJC"; then 21556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 21557 $as_echo "$ac_ct_OBJC" >&6; } 21558 else 21559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21560 $as_echo "no" >&6; } 21561 fi 21562 21563 21564 test -n "$ac_ct_OBJC" && break 21565 done 21566 21567 if test "x$ac_ct_OBJC" = x; then 21568 OBJC="gcc" 21569 else 21570 case $cross_compiling:$ac_tool_warned in 21571 yes:) 21572 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21573 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21574 ac_tool_warned=yes ;; 21575 esac 21576 OBJC=$ac_ct_OBJC 21577 fi 21578 fi 21579 21580 # Provide some information about the compiler. 21581 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 21582 set X $ac_compile 21583 ac_compiler=$2 21584 for ac_option in --version -v -V -qversion; do 21585 { { ac_try="$ac_compiler $ac_option >&5" 21586 case "(($ac_try" in 21587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21588 *) ac_try_echo=$ac_try;; 21589 esac 21590 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 21591 $as_echo "$ac_try_echo"; } >&5 21592 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 21593 ac_status=$? 21594 if test -s conftest.err; then 21595 sed '10a\ 21596 ... rest of stderr output deleted ... 21597 10q' conftest.err >conftest.er1 21598 cat conftest.er1 >&5 21599 fi 21600 rm -f conftest.er1 conftest.err 21601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 21602 test $ac_status = 0; } 21603 done 21604 21605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5 21606 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; } 21607 if test "${ac_cv_objc_compiler_gnu+set}" = set; then : 21608 $as_echo_n "(cached) " >&6 21609 else 21610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21611 /* end confdefs.h. */ 21612 21613 int 21614 main () 21615 { 21616 #ifndef __GNUC__ 21617 choke me 21618 #endif 21619 21620 ; 21621 return 0; 21622 } 21623 _ACEOF 21624 if ac_fn_objc_try_compile "$LINENO"; then : 21625 ac_compiler_gnu=yes 21626 else 21627 ac_compiler_gnu=no 21628 fi 21629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21630 ac_cv_objc_compiler_gnu=$ac_compiler_gnu 21631 21632 fi 21633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 21634 $as_echo "$ac_cv_objc_compiler_gnu" >&6; } 21635 if test $ac_compiler_gnu = yes; then 21636 GOBJC=yes 21637 else 21638 GOBJC= 21639 fi 21640 ac_test_OBJCFLAGS=${OBJCFLAGS+set} 21641 ac_save_OBJCFLAGS=$OBJCFLAGS 21642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 21643 $as_echo_n "checking whether $OBJC accepts -g... " >&6; } 21644 if test "${ac_cv_prog_objc_g+set}" = set; then : 21645 $as_echo_n "(cached) " >&6 21646 else 21647 ac_save_objc_werror_flag=$ac_objc_werror_flag 21648 ac_objc_werror_flag=yes 21649 ac_cv_prog_objc_g=no 21650 OBJCFLAGS="-g" 21651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21652 /* end confdefs.h. */ 21653 21654 int 21655 main () 21656 { 21657 21658 ; 21659 return 0; 21660 } 21661 _ACEOF 21662 if ac_fn_objc_try_compile "$LINENO"; then : 21663 ac_cv_prog_objc_g=yes 21664 else 21665 OBJCFLAGS="" 21666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21667 /* end confdefs.h. */ 21668 21669 int 21670 main () 21671 { 21672 21673 ; 21674 return 0; 21675 } 21676 _ACEOF 21677 if ac_fn_objc_try_compile "$LINENO"; then : 21678 21679 else 21680 ac_objc_werror_flag=$ac_save_objc_werror_flag 21681 OBJCFLAGS="-g" 21682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21683 /* end confdefs.h. */ 21684 21685 int 21686 main () 21687 { 21688 21689 ; 21690 return 0; 21691 } 21692 _ACEOF 21693 if ac_fn_objc_try_compile "$LINENO"; then : 21694 ac_cv_prog_objc_g=yes 21695 fi 21696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21697 fi 21698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21699 fi 21700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21701 ac_objc_werror_flag=$ac_save_objc_werror_flag 21702 fi 21703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 21704 $as_echo "$ac_cv_prog_objc_g" >&6; } 21705 if test "$ac_test_OBJCFLAGS" = set; then 21706 OBJCFLAGS=$ac_save_OBJCFLAGS 21707 elif test $ac_cv_prog_objc_g = yes; then 21708 if test "$GOBJC" = yes; then 21709 OBJCFLAGS="-g -O2" 21710 else 21711 OBJCFLAGS="-g" 21712 fi 21713 else 21714 if test "$GOBJC" = yes; then 21715 OBJCFLAGS="-O2" 21716 else 21717 OBJCFLAGS= 21718 fi 21719 fi 21720 ac_ext=cpp 21721 ac_cpp='$CXXCPP $CPPFLAGS' 21722 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21723 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21724 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21725 21726 21727 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21728 21729 # First separate the path from the arguments. This will split at the first 21730 # space. 21731 complete="$OBJC" 21732 path="${complete%% *}" 21733 tmp="$complete EOL" 21734 arguments="${tmp#* }" 21735 21736 # Input might be given as Windows format, start by converting to 21737 # unix format. 21738 new_path=`$CYGPATH -u "$path"` 21739 21740 # Now try to locate executable using which 21741 new_path=`$WHICH "$new_path" 2> /dev/null` 21742 # bat and cmd files are not always considered executable in cygwin causing which 21743 # to not find them 21744 if test "x$new_path" = x \ 21745 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 21746 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 21747 new_path=`$CYGPATH -u "$path"` 21748 fi 21749 if test "x$new_path" = x; then 21750 # Oops. Which didn't find the executable. 21751 # The splitting of arguments from the executable at a space might have been incorrect, 21752 # since paths with space are more likely in Windows. Give it another try with the whole 21753 # argument. 21754 path="$complete" 21755 arguments="EOL" 21756 new_path=`$CYGPATH -u "$path"` 21757 new_path=`$WHICH "$new_path" 2> /dev/null` 21758 # bat and cmd files are not always considered executable in cygwin causing which 21759 # to not find them 21760 if test "x$new_path" = x \ 21761 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 21762 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 21763 new_path=`$CYGPATH -u "$path"` 21764 fi 21765 if test "x$new_path" = x; then 21766 # It's still not found. Now this is an unrecoverable error. 21767 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 21768 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 21769 has_space=`$ECHO "$complete" | $GREP " "` 21770 if test "x$has_space" != x; then 21771 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21772 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21773 fi 21774 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 21775 fi 21776 fi 21777 21778 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 21779 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 21780 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 21781 # "foo.exe" is OK but "foo" is an error. 21782 # 21783 # This test is therefore slightly more accurate than "test -f" to check for file precense. 21784 # It is also a way to make sure we got the proper file name for the real test later on. 21785 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 21786 if test "x$test_shortpath" = x; then 21787 # Short path failed, file does not exist as specified. 21788 # Try adding .exe or .cmd 21789 if test -f "${new_path}.exe"; then 21790 input_to_shortpath="${new_path}.exe" 21791 elif test -f "${new_path}.cmd"; then 21792 input_to_shortpath="${new_path}.cmd" 21793 else 21794 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5 21795 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;} 21796 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 21797 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 21798 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 21799 fi 21800 else 21801 input_to_shortpath="$new_path" 21802 fi 21803 21804 # Call helper function which possibly converts this using DOS-style short mode. 21805 # If so, the updated path is stored in $new_path. 21806 new_path="$input_to_shortpath" 21807 21808 input_path="$input_to_shortpath" 21809 # Check if we need to convert this using DOS-style short mode. If the path 21810 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21811 # take no chances and rewrite it. 21812 # Note: m4 eats our [], so we need to use [ and ] instead. 21813 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 21814 if test "x$has_forbidden_chars" != x; then 21815 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21816 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 21817 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 21818 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 21819 # Going to short mode and back again did indeed matter. Since short mode is 21820 # case insensitive, let's make it lowercase to improve readability. 21821 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21822 # Now convert it back to Unix-stile (cygpath) 21823 input_path=`$CYGPATH -u "$shortmode_path"` 21824 new_path="$input_path" 21825 fi 21826 fi 21827 21828 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 21829 if test "x$test_cygdrive_prefix" = x; then 21830 # As a simple fix, exclude /usr/bin since it's not a real path. 21831 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 21832 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 21833 # a path prefixed by /cygdrive for fixpath to work. 21834 new_path="$CYGWIN_ROOT_PATH$input_path" 21835 fi 21836 fi 21837 21838 # remove trailing .exe if any 21839 new_path="${new_path/%.exe/}" 21840 21841 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21842 21843 # First separate the path from the arguments. This will split at the first 21844 # space. 21845 complete="$OBJC" 21846 path="${complete%% *}" 21847 tmp="$complete EOL" 21848 arguments="${tmp#* }" 21849 21850 # Input might be given as Windows format, start by converting to 21851 # unix format. 21852 new_path="$path" 21853 21854 windows_path="$new_path" 21855 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21856 unix_path=`$CYGPATH -u "$windows_path"` 21857 new_path="$unix_path" 21858 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21859 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21860 new_path="$unix_path" 21861 fi 21862 21863 21864 # Now try to locate executable using which 21865 new_path=`$WHICH "$new_path" 2> /dev/null` 21866 21867 if test "x$new_path" = x; then 21868 # Oops. Which didn't find the executable. 21869 # The splitting of arguments from the executable at a space might have been incorrect, 21870 # since paths with space are more likely in Windows. Give it another try with the whole 21871 # argument. 21872 path="$complete" 21873 arguments="EOL" 21874 new_path="$path" 21875 21876 windows_path="$new_path" 21877 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21878 unix_path=`$CYGPATH -u "$windows_path"` 21879 new_path="$unix_path" 21880 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21881 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21882 new_path="$unix_path" 21883 fi 21884 21885 21886 new_path=`$WHICH "$new_path" 2> /dev/null` 21887 21888 if test "x$new_path" = x; then 21889 # It's still not found. Now this is an unrecoverable error. 21890 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 21891 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 21892 has_space=`$ECHO "$complete" | $GREP " "` 21893 if test "x$has_space" != x; then 21894 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21895 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21896 fi 21897 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 21898 fi 21899 fi 21900 21901 # Now new_path has a complete unix path to the binary 21902 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 21903 # Keep paths in /bin as-is, but remove trailing .exe if any 21904 new_path="${new_path/%.exe/}" 21905 # Do not save /bin paths to all_fixpath_prefixes! 21906 else 21907 # Not in mixed or Windows style, start by that. 21908 new_path=`cmd //c echo $new_path` 21909 21910 input_path="$new_path" 21911 # Check if we need to convert this using DOS-style short mode. If the path 21912 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21913 # take no chances and rewrite it. 21914 # Note: m4 eats our [], so we need to use [ and ] instead. 21915 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 21916 if test "x$has_forbidden_chars" != x; then 21917 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21918 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21919 fi 21920 21921 # Output is in $new_path 21922 21923 windows_path="$new_path" 21924 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21925 unix_path=`$CYGPATH -u "$windows_path"` 21926 new_path="$unix_path" 21927 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21928 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21929 new_path="$unix_path" 21930 fi 21931 21932 # remove trailing .exe if any 21933 new_path="${new_path/%.exe/}" 21934 21935 # Save the first 10 bytes of this path to the storage, so fixpath can work. 21936 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 21937 fi 21938 21939 else 21940 # We're on a posix platform. Hooray! :) 21941 # First separate the path from the arguments. This will split at the first 21942 # space. 21943 complete="$OBJC" 21944 path="${complete%% *}" 21945 tmp="$complete EOL" 21946 arguments="${tmp#* }" 21947 21948 # Cannot rely on the command "which" here since it doesn't always work. 21949 is_absolute_path=`$ECHO "$path" | $GREP ^/` 21950 if test -z "$is_absolute_path"; then 21951 # Path to executable is not absolute. Find it. 21952 IFS_save="$IFS" 21953 IFS=: 21954 for p in $PATH; do 21955 if test -f "$p/$path" && test -x "$p/$path"; then 21956 new_path="$p/$path" 21957 break 21958 fi 21959 done 21960 IFS="$IFS_save" 21961 else 21962 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5 21963 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;} 21964 new_path="$path" 21965 fi 21966 21967 if test "x$new_path" = x; then 21968 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 21969 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 21970 has_space=`$ECHO "$complete" | $GREP " "` 21971 if test "x$has_space" != x; then 21972 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 21973 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 21974 fi 21975 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 21976 fi 21977 fi 21978 21979 # Now join together the path and the arguments once again 21980 if test "x$arguments" != xEOL; then 21981 new_complete="$new_path ${arguments% *}" 21982 else 21983 new_complete="$new_path" 21984 fi 21985 21986 if test "x$complete" != "x$new_complete"; then 21987 OBJC="$new_complete" 21988 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5 21989 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;} 21990 fi 21991 21992 else 21993 OBJC= 21994 fi 21995 21996 # Restore the flags to the user specified values. 21997 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" 21998 CFLAGS="$ORG_CFLAGS" 21999 CXXFLAGS="$ORG_CXXFLAGS" 22000 OBJCFLAGS="$ORG_OBJCFLAGS" 22001 22002 LD="$CC" 22003 LDEXE="$CC" 22004 LDCXX="$CXX" 22005 LDEXECXX="$CXX" 22006 22007 # LDEXE is the linker to use, when creating executables. 22008 22009 # Linking C++ libraries. 22010 22011 # Linking C++ executables. 22012 22013 22014 if test "x$OPENJDK_TARGET_OS" != xwindows; then 22015 if test -n "$ac_tool_prefix"; then 22016 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 22017 set dummy ${ac_tool_prefix}ar; ac_word=$2 22018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22019 $as_echo_n "checking for $ac_word... " >&6; } 22020 if test "${ac_cv_prog_AR+set}" = set; then : 22021 $as_echo_n "(cached) " >&6 22022 else 22023 if test -n "$AR"; then 22024 ac_cv_prog_AR="$AR" # Let the user override the test. 22025 else 22026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22027 for as_dir in $PATH 22028 do 22029 IFS=$as_save_IFS 22030 test -z "$as_dir" && as_dir=. 22031 for ac_exec_ext in '' $ac_executable_extensions; do 22032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22033 ac_cv_prog_AR="${ac_tool_prefix}ar" 22034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22035 break 2 22036 fi 22037 done 22038 done 22039 IFS=$as_save_IFS 22040 22041 fi 22042 fi 22043 AR=$ac_cv_prog_AR 22044 if test -n "$AR"; then 22045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 22046 $as_echo "$AR" >&6; } 22047 else 22048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22049 $as_echo "no" >&6; } 22050 fi 22051 22052 22053 fi 22054 if test -z "$ac_cv_prog_AR"; then 22055 ac_ct_AR=$AR 22056 # Extract the first word of "ar", so it can be a program name with args. 22057 set dummy ar; ac_word=$2 22058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22059 $as_echo_n "checking for $ac_word... " >&6; } 22060 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : 22061 $as_echo_n "(cached) " >&6 22062 else 22063 if test -n "$ac_ct_AR"; then 22064 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 22065 else 22066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22067 for as_dir in $PATH 22068 do 22069 IFS=$as_save_IFS 22070 test -z "$as_dir" && as_dir=. 22071 for ac_exec_ext in '' $ac_executable_extensions; do 22072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22073 ac_cv_prog_ac_ct_AR="ar" 22074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22075 break 2 22076 fi 22077 done 22078 done 22079 IFS=$as_save_IFS 22080 22081 fi 22082 fi 22083 ac_ct_AR=$ac_cv_prog_ac_ct_AR 22084 if test -n "$ac_ct_AR"; then 22085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 22086 $as_echo "$ac_ct_AR" >&6; } 22087 else 22088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22089 $as_echo "no" >&6; } 22090 fi 22091 22092 if test "x$ac_ct_AR" = x; then 22093 AR="" 22094 else 22095 case $cross_compiling:$ac_tool_warned in 22096 yes:) 22097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 22098 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 22099 ac_tool_warned=yes ;; 22100 esac 22101 AR=$ac_ct_AR 22102 fi 22103 else 22104 AR="$ac_cv_prog_AR" 22105 fi 22106 22107 22108 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22109 22110 # First separate the path from the arguments. This will split at the first 22111 # space. 22112 complete="$AR" 22113 path="${complete%% *}" 22114 tmp="$complete EOL" 22115 arguments="${tmp#* }" 22116 22117 # Input might be given as Windows format, start by converting to 22118 # unix format. 22119 new_path=`$CYGPATH -u "$path"` 22120 22121 # Now try to locate executable using which 22122 new_path=`$WHICH "$new_path" 2> /dev/null` 22123 # bat and cmd files are not always considered executable in cygwin causing which 22124 # to not find them 22125 if test "x$new_path" = x \ 22126 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22127 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22128 new_path=`$CYGPATH -u "$path"` 22129 fi 22130 if test "x$new_path" = x; then 22131 # Oops. Which didn't find the executable. 22132 # The splitting of arguments from the executable at a space might have been incorrect, 22133 # since paths with space are more likely in Windows. Give it another try with the whole 22134 # argument. 22135 path="$complete" 22136 arguments="EOL" 22137 new_path=`$CYGPATH -u "$path"` 22138 new_path=`$WHICH "$new_path" 2> /dev/null` 22139 # bat and cmd files are not always considered executable in cygwin causing which 22140 # to not find them 22141 if test "x$new_path" = x \ 22142 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22143 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22144 new_path=`$CYGPATH -u "$path"` 22145 fi 22146 if test "x$new_path" = x; then 22147 # It's still not found. Now this is an unrecoverable error. 22148 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22149 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22150 has_space=`$ECHO "$complete" | $GREP " "` 22151 if test "x$has_space" != x; then 22152 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22153 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22154 fi 22155 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22156 fi 22157 fi 22158 22159 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22160 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22161 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22162 # "foo.exe" is OK but "foo" is an error. 22163 # 22164 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22165 # It is also a way to make sure we got the proper file name for the real test later on. 22166 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22167 if test "x$test_shortpath" = x; then 22168 # Short path failed, file does not exist as specified. 22169 # Try adding .exe or .cmd 22170 if test -f "${new_path}.exe"; then 22171 input_to_shortpath="${new_path}.exe" 22172 elif test -f "${new_path}.cmd"; then 22173 input_to_shortpath="${new_path}.cmd" 22174 else 22175 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5 22176 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;} 22177 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22178 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22179 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22180 fi 22181 else 22182 input_to_shortpath="$new_path" 22183 fi 22184 22185 # Call helper function which possibly converts this using DOS-style short mode. 22186 # If so, the updated path is stored in $new_path. 22187 new_path="$input_to_shortpath" 22188 22189 input_path="$input_to_shortpath" 22190 # Check if we need to convert this using DOS-style short mode. If the path 22191 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22192 # take no chances and rewrite it. 22193 # Note: m4 eats our [], so we need to use [ and ] instead. 22194 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22195 if test "x$has_forbidden_chars" != x; then 22196 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22197 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22198 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22199 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22200 # Going to short mode and back again did indeed matter. Since short mode is 22201 # case insensitive, let's make it lowercase to improve readability. 22202 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22203 # Now convert it back to Unix-stile (cygpath) 22204 input_path=`$CYGPATH -u "$shortmode_path"` 22205 new_path="$input_path" 22206 fi 22207 fi 22208 22209 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22210 if test "x$test_cygdrive_prefix" = x; then 22211 # As a simple fix, exclude /usr/bin since it's not a real path. 22212 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22213 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22214 # a path prefixed by /cygdrive for fixpath to work. 22215 new_path="$CYGWIN_ROOT_PATH$input_path" 22216 fi 22217 fi 22218 22219 # remove trailing .exe if any 22220 new_path="${new_path/%.exe/}" 22221 22222 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22223 22224 # First separate the path from the arguments. This will split at the first 22225 # space. 22226 complete="$AR" 22227 path="${complete%% *}" 22228 tmp="$complete EOL" 22229 arguments="${tmp#* }" 22230 22231 # Input might be given as Windows format, start by converting to 22232 # unix format. 22233 new_path="$path" 22234 22235 windows_path="$new_path" 22236 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22237 unix_path=`$CYGPATH -u "$windows_path"` 22238 new_path="$unix_path" 22239 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22240 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22241 new_path="$unix_path" 22242 fi 22243 22244 22245 # Now try to locate executable using which 22246 new_path=`$WHICH "$new_path" 2> /dev/null` 22247 22248 if test "x$new_path" = x; then 22249 # Oops. Which didn't find the executable. 22250 # The splitting of arguments from the executable at a space might have been incorrect, 22251 # since paths with space are more likely in Windows. Give it another try with the whole 22252 # argument. 22253 path="$complete" 22254 arguments="EOL" 22255 new_path="$path" 22256 22257 windows_path="$new_path" 22258 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22259 unix_path=`$CYGPATH -u "$windows_path"` 22260 new_path="$unix_path" 22261 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22262 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22263 new_path="$unix_path" 22264 fi 22265 22266 22267 new_path=`$WHICH "$new_path" 2> /dev/null` 22268 22269 if test "x$new_path" = x; then 22270 # It's still not found. Now this is an unrecoverable error. 22271 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22272 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22273 has_space=`$ECHO "$complete" | $GREP " "` 22274 if test "x$has_space" != x; then 22275 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22276 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22277 fi 22278 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22279 fi 22280 fi 22281 22282 # Now new_path has a complete unix path to the binary 22283 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22284 # Keep paths in /bin as-is, but remove trailing .exe if any 22285 new_path="${new_path/%.exe/}" 22286 # Do not save /bin paths to all_fixpath_prefixes! 22287 else 22288 # Not in mixed or Windows style, start by that. 22289 new_path=`cmd //c echo $new_path` 22290 22291 input_path="$new_path" 22292 # Check if we need to convert this using DOS-style short mode. If the path 22293 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22294 # take no chances and rewrite it. 22295 # Note: m4 eats our [], so we need to use [ and ] instead. 22296 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22297 if test "x$has_forbidden_chars" != x; then 22298 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22299 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22300 fi 22301 22302 # Output is in $new_path 22303 22304 windows_path="$new_path" 22305 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22306 unix_path=`$CYGPATH -u "$windows_path"` 22307 new_path="$unix_path" 22308 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22309 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22310 new_path="$unix_path" 22311 fi 22312 22313 # remove trailing .exe if any 22314 new_path="${new_path/%.exe/}" 22315 22316 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22317 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22318 fi 22319 22320 else 22321 # We're on a posix platform. Hooray! :) 22322 # First separate the path from the arguments. This will split at the first 22323 # space. 22324 complete="$AR" 22325 path="${complete%% *}" 22326 tmp="$complete EOL" 22327 arguments="${tmp#* }" 22328 22329 # Cannot rely on the command "which" here since it doesn't always work. 22330 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22331 if test -z "$is_absolute_path"; then 22332 # Path to executable is not absolute. Find it. 22333 IFS_save="$IFS" 22334 IFS=: 22335 for p in $PATH; do 22336 if test -f "$p/$path" && test -x "$p/$path"; then 22337 new_path="$p/$path" 22338 break 22339 fi 22340 done 22341 IFS="$IFS_save" 22342 else 22343 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5 22344 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;} 22345 new_path="$path" 22346 fi 22347 22348 if test "x$new_path" = x; then 22349 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22350 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22351 has_space=`$ECHO "$complete" | $GREP " "` 22352 if test "x$has_space" != x; then 22353 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 22354 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 22355 fi 22356 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22357 fi 22358 fi 22359 22360 # Now join together the path and the arguments once again 22361 if test "x$arguments" != xEOL; then 22362 new_complete="$new_path ${arguments% *}" 22363 else 22364 new_complete="$new_path" 22365 fi 22366 22367 if test "x$complete" != "x$new_complete"; then 22368 AR="$new_complete" 22369 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5 22370 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;} 22371 fi 22372 22373 fi 22374 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 22375 ARFLAGS="-r" 22376 else 22377 ARFLAGS="" 22378 fi 22379 22380 22381 # For hotspot, we need these in Windows mixed path; other platforms keep them the same 22382 HOTSPOT_CXX="$CXX" 22383 HOTSPOT_LD="$LD" 22384 22385 22386 22387 COMPILER_NAME=gcc 22388 COMPILER_TYPE=CC 22389 if test "x$OPENJDK_TARGET_OS" = xwindows; then : 22390 22391 # For now, assume that we are always compiling using cl.exe. 22392 CC_OUT_OPTION=-Fo 22393 EXE_OUT_OPTION=-out: 22394 LD_OUT_OPTION=-out: 22395 AR_OUT_OPTION=-out: 22396 # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin 22397 # program for something completely different. 22398 # Extract the first word of "link", so it can be a program name with args. 22399 set dummy link; ac_word=$2 22400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22401 $as_echo_n "checking for $ac_word... " >&6; } 22402 if test "${ac_cv_prog_WINLD+set}" = set; then : 22403 $as_echo_n "(cached) " >&6 22404 else 22405 if test -n "$WINLD"; then 22406 ac_cv_prog_WINLD="$WINLD" # Let the user override the test. 22407 else 22408 ac_prog_rejected=no 22409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22410 for as_dir in $PATH 22411 do 22412 IFS=$as_save_IFS 22413 test -z "$as_dir" && as_dir=. 22414 for ac_exec_ext in '' $ac_executable_extensions; do 22415 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22416 if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then 22417 ac_prog_rejected=yes 22418 continue 22419 fi 22420 ac_cv_prog_WINLD="link" 22421 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22422 break 2 22423 fi 22424 done 22425 done 22426 IFS=$as_save_IFS 22427 22428 if test $ac_prog_rejected = yes; then 22429 # We found a bogon in the path, so make sure we never use it. 22430 set dummy $ac_cv_prog_WINLD 22431 shift 22432 if test $# != 0; then 22433 # We chose a different compiler from the bogus one. 22434 # However, it has the same basename, so the bogon will be chosen 22435 # first if we set WINLD to just the basename; use the full file name. 22436 shift 22437 ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@" 22438 fi 22439 fi 22440 fi 22441 fi 22442 WINLD=$ac_cv_prog_WINLD 22443 if test -n "$WINLD"; then 22444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5 22445 $as_echo "$WINLD" >&6; } 22446 else 22447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22448 $as_echo "no" >&6; } 22449 fi 22450 22451 22452 # Since we must ignore the first found link, WINLD will contain 22453 # the full path to the link.exe program. 22454 22455 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22456 22457 # First separate the path from the arguments. This will split at the first 22458 # space. 22459 complete="$WINLD" 22460 path="${complete%% *}" 22461 tmp="$complete EOL" 22462 arguments="${tmp#* }" 22463 22464 # Input might be given as Windows format, start by converting to 22465 # unix format. 22466 new_path=`$CYGPATH -u "$path"` 22467 22468 # Now try to locate executable using which 22469 new_path=`$WHICH "$new_path" 2> /dev/null` 22470 # bat and cmd files are not always considered executable in cygwin causing which 22471 # to not find them 22472 if test "x$new_path" = x \ 22473 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22474 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22475 new_path=`$CYGPATH -u "$path"` 22476 fi 22477 if test "x$new_path" = x; then 22478 # Oops. Which didn't find the executable. 22479 # The splitting of arguments from the executable at a space might have been incorrect, 22480 # since paths with space are more likely in Windows. Give it another try with the whole 22481 # argument. 22482 path="$complete" 22483 arguments="EOL" 22484 new_path=`$CYGPATH -u "$path"` 22485 new_path=`$WHICH "$new_path" 2> /dev/null` 22486 # bat and cmd files are not always considered executable in cygwin causing which 22487 # to not find them 22488 if test "x$new_path" = x \ 22489 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22490 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22491 new_path=`$CYGPATH -u "$path"` 22492 fi 22493 if test "x$new_path" = x; then 22494 # It's still not found. Now this is an unrecoverable error. 22495 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22496 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22497 has_space=`$ECHO "$complete" | $GREP " "` 22498 if test "x$has_space" != x; then 22499 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22500 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22501 fi 22502 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22503 fi 22504 fi 22505 22506 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22507 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22508 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22509 # "foo.exe" is OK but "foo" is an error. 22510 # 22511 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22512 # It is also a way to make sure we got the proper file name for the real test later on. 22513 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22514 if test "x$test_shortpath" = x; then 22515 # Short path failed, file does not exist as specified. 22516 # Try adding .exe or .cmd 22517 if test -f "${new_path}.exe"; then 22518 input_to_shortpath="${new_path}.exe" 22519 elif test -f "${new_path}.cmd"; then 22520 input_to_shortpath="${new_path}.cmd" 22521 else 22522 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5 22523 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;} 22524 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22525 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22526 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22527 fi 22528 else 22529 input_to_shortpath="$new_path" 22530 fi 22531 22532 # Call helper function which possibly converts this using DOS-style short mode. 22533 # If so, the updated path is stored in $new_path. 22534 new_path="$input_to_shortpath" 22535 22536 input_path="$input_to_shortpath" 22537 # Check if we need to convert this using DOS-style short mode. If the path 22538 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22539 # take no chances and rewrite it. 22540 # Note: m4 eats our [], so we need to use [ and ] instead. 22541 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22542 if test "x$has_forbidden_chars" != x; then 22543 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22544 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22545 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22546 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22547 # Going to short mode and back again did indeed matter. Since short mode is 22548 # case insensitive, let's make it lowercase to improve readability. 22549 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22550 # Now convert it back to Unix-stile (cygpath) 22551 input_path=`$CYGPATH -u "$shortmode_path"` 22552 new_path="$input_path" 22553 fi 22554 fi 22555 22556 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22557 if test "x$test_cygdrive_prefix" = x; then 22558 # As a simple fix, exclude /usr/bin since it's not a real path. 22559 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22560 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22561 # a path prefixed by /cygdrive for fixpath to work. 22562 new_path="$CYGWIN_ROOT_PATH$input_path" 22563 fi 22564 fi 22565 22566 # remove trailing .exe if any 22567 new_path="${new_path/%.exe/}" 22568 22569 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22570 22571 # First separate the path from the arguments. This will split at the first 22572 # space. 22573 complete="$WINLD" 22574 path="${complete%% *}" 22575 tmp="$complete EOL" 22576 arguments="${tmp#* }" 22577 22578 # Input might be given as Windows format, start by converting to 22579 # unix format. 22580 new_path="$path" 22581 22582 windows_path="$new_path" 22583 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22584 unix_path=`$CYGPATH -u "$windows_path"` 22585 new_path="$unix_path" 22586 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22587 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22588 new_path="$unix_path" 22589 fi 22590 22591 22592 # Now try to locate executable using which 22593 new_path=`$WHICH "$new_path" 2> /dev/null` 22594 22595 if test "x$new_path" = x; then 22596 # Oops. Which didn't find the executable. 22597 # The splitting of arguments from the executable at a space might have been incorrect, 22598 # since paths with space are more likely in Windows. Give it another try with the whole 22599 # argument. 22600 path="$complete" 22601 arguments="EOL" 22602 new_path="$path" 22603 22604 windows_path="$new_path" 22605 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22606 unix_path=`$CYGPATH -u "$windows_path"` 22607 new_path="$unix_path" 22608 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22609 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22610 new_path="$unix_path" 22611 fi 22612 22613 22614 new_path=`$WHICH "$new_path" 2> /dev/null` 22615 22616 if test "x$new_path" = x; then 22617 # It's still not found. Now this is an unrecoverable error. 22618 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22619 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22620 has_space=`$ECHO "$complete" | $GREP " "` 22621 if test "x$has_space" != x; then 22622 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22623 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22624 fi 22625 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22626 fi 22627 fi 22628 22629 # Now new_path has a complete unix path to the binary 22630 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22631 # Keep paths in /bin as-is, but remove trailing .exe if any 22632 new_path="${new_path/%.exe/}" 22633 # Do not save /bin paths to all_fixpath_prefixes! 22634 else 22635 # Not in mixed or Windows style, start by that. 22636 new_path=`cmd //c echo $new_path` 22637 22638 input_path="$new_path" 22639 # Check if we need to convert this using DOS-style short mode. If the path 22640 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22641 # take no chances and rewrite it. 22642 # Note: m4 eats our [], so we need to use [ and ] instead. 22643 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22644 if test "x$has_forbidden_chars" != x; then 22645 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22646 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22647 fi 22648 22649 # Output is in $new_path 22650 22651 windows_path="$new_path" 22652 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22653 unix_path=`$CYGPATH -u "$windows_path"` 22654 new_path="$unix_path" 22655 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22656 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22657 new_path="$unix_path" 22658 fi 22659 22660 # remove trailing .exe if any 22661 new_path="${new_path/%.exe/}" 22662 22663 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22664 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22665 fi 22666 22667 else 22668 # We're on a posix platform. Hooray! :) 22669 # First separate the path from the arguments. This will split at the first 22670 # space. 22671 complete="$WINLD" 22672 path="${complete%% *}" 22673 tmp="$complete EOL" 22674 arguments="${tmp#* }" 22675 22676 # Cannot rely on the command "which" here since it doesn't always work. 22677 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22678 if test -z "$is_absolute_path"; then 22679 # Path to executable is not absolute. Find it. 22680 IFS_save="$IFS" 22681 IFS=: 22682 for p in $PATH; do 22683 if test -f "$p/$path" && test -x "$p/$path"; then 22684 new_path="$p/$path" 22685 break 22686 fi 22687 done 22688 IFS="$IFS_save" 22689 else 22690 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5 22691 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;} 22692 new_path="$path" 22693 fi 22694 22695 if test "x$new_path" = x; then 22696 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22697 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22698 has_space=`$ECHO "$complete" | $GREP " "` 22699 if test "x$has_space" != x; then 22700 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 22701 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 22702 fi 22703 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22704 fi 22705 fi 22706 22707 # Now join together the path and the arguments once again 22708 if test "x$arguments" != xEOL; then 22709 new_complete="$new_path ${arguments% *}" 22710 else 22711 new_complete="$new_path" 22712 fi 22713 22714 if test "x$complete" != "x$new_complete"; then 22715 WINLD="$new_complete" 22716 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5 22717 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;} 22718 fi 22719 22720 printf "Windows linker was found at $WINLD\n" 22721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5 22722 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; } 22723 "$WINLD" --version > /dev/null 22724 if test $? -eq 0 ; then 22725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22726 $as_echo "no" >&6; } 22727 as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5 22728 else 22729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22730 $as_echo "yes" >&6; } 22731 fi 22732 LD="$WINLD" 22733 LDEXE="$WINLD" 22734 LDCXX="$WINLD" 22735 LDEXECXX="$WINLD" 22736 22737 # Extract the first word of "mt", so it can be a program name with args. 22738 set dummy mt; ac_word=$2 22739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22740 $as_echo_n "checking for $ac_word... " >&6; } 22741 if test "${ac_cv_prog_MT+set}" = set; then : 22742 $as_echo_n "(cached) " >&6 22743 else 22744 if test -n "$MT"; then 22745 ac_cv_prog_MT="$MT" # Let the user override the test. 22746 else 22747 ac_prog_rejected=no 22748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22749 for as_dir in $PATH 22750 do 22751 IFS=$as_save_IFS 22752 test -z "$as_dir" && as_dir=. 22753 for ac_exec_ext in '' $ac_executable_extensions; do 22754 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22755 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then 22756 ac_prog_rejected=yes 22757 continue 22758 fi 22759 ac_cv_prog_MT="mt" 22760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22761 break 2 22762 fi 22763 done 22764 done 22765 IFS=$as_save_IFS 22766 22767 if test $ac_prog_rejected = yes; then 22768 # We found a bogon in the path, so make sure we never use it. 22769 set dummy $ac_cv_prog_MT 22770 shift 22771 if test $# != 0; then 22772 # We chose a different compiler from the bogus one. 22773 # However, it has the same basename, so the bogon will be chosen 22774 # first if we set MT to just the basename; use the full file name. 22775 shift 22776 ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@" 22777 fi 22778 fi 22779 fi 22780 fi 22781 MT=$ac_cv_prog_MT 22782 if test -n "$MT"; then 22783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5 22784 $as_echo "$MT" >&6; } 22785 else 22786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22787 $as_echo "no" >&6; } 22788 fi 22789 22790 22791 22792 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22793 22794 # First separate the path from the arguments. This will split at the first 22795 # space. 22796 complete="$MT" 22797 path="${complete%% *}" 22798 tmp="$complete EOL" 22799 arguments="${tmp#* }" 22800 22801 # Input might be given as Windows format, start by converting to 22802 # unix format. 22803 new_path=`$CYGPATH -u "$path"` 22804 22805 # Now try to locate executable using which 22806 new_path=`$WHICH "$new_path" 2> /dev/null` 22807 # bat and cmd files are not always considered executable in cygwin causing which 22808 # to not find them 22809 if test "x$new_path" = x \ 22810 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22811 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22812 new_path=`$CYGPATH -u "$path"` 22813 fi 22814 if test "x$new_path" = x; then 22815 # Oops. Which didn't find the executable. 22816 # The splitting of arguments from the executable at a space might have been incorrect, 22817 # since paths with space are more likely in Windows. Give it another try with the whole 22818 # argument. 22819 path="$complete" 22820 arguments="EOL" 22821 new_path=`$CYGPATH -u "$path"` 22822 new_path=`$WHICH "$new_path" 2> /dev/null` 22823 # bat and cmd files are not always considered executable in cygwin causing which 22824 # to not find them 22825 if test "x$new_path" = x \ 22826 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22827 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22828 new_path=`$CYGPATH -u "$path"` 22829 fi 22830 if test "x$new_path" = x; then 22831 # It's still not found. Now this is an unrecoverable error. 22832 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 22833 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 22834 has_space=`$ECHO "$complete" | $GREP " "` 22835 if test "x$has_space" != x; then 22836 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22838 fi 22839 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 22840 fi 22841 fi 22842 22843 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22844 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22845 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22846 # "foo.exe" is OK but "foo" is an error. 22847 # 22848 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22849 # It is also a way to make sure we got the proper file name for the real test later on. 22850 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22851 if test "x$test_shortpath" = x; then 22852 # Short path failed, file does not exist as specified. 22853 # Try adding .exe or .cmd 22854 if test -f "${new_path}.exe"; then 22855 input_to_shortpath="${new_path}.exe" 22856 elif test -f "${new_path}.cmd"; then 22857 input_to_shortpath="${new_path}.cmd" 22858 else 22859 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5 22860 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;} 22861 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22862 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22863 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 22864 fi 22865 else 22866 input_to_shortpath="$new_path" 22867 fi 22868 22869 # Call helper function which possibly converts this using DOS-style short mode. 22870 # If so, the updated path is stored in $new_path. 22871 new_path="$input_to_shortpath" 22872 22873 input_path="$input_to_shortpath" 22874 # Check if we need to convert this using DOS-style short mode. If the path 22875 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22876 # take no chances and rewrite it. 22877 # Note: m4 eats our [], so we need to use [ and ] instead. 22878 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22879 if test "x$has_forbidden_chars" != x; then 22880 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22881 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22882 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22883 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22884 # Going to short mode and back again did indeed matter. Since short mode is 22885 # case insensitive, let's make it lowercase to improve readability. 22886 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22887 # Now convert it back to Unix-stile (cygpath) 22888 input_path=`$CYGPATH -u "$shortmode_path"` 22889 new_path="$input_path" 22890 fi 22891 fi 22892 22893 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22894 if test "x$test_cygdrive_prefix" = x; then 22895 # As a simple fix, exclude /usr/bin since it's not a real path. 22896 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22897 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22898 # a path prefixed by /cygdrive for fixpath to work. 22899 new_path="$CYGWIN_ROOT_PATH$input_path" 22900 fi 22901 fi 22902 22903 # remove trailing .exe if any 22904 new_path="${new_path/%.exe/}" 22905 22906 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22907 22908 # First separate the path from the arguments. This will split at the first 22909 # space. 22910 complete="$MT" 22911 path="${complete%% *}" 22912 tmp="$complete EOL" 22913 arguments="${tmp#* }" 22914 22915 # Input might be given as Windows format, start by converting to 22916 # unix format. 22917 new_path="$path" 22918 22919 windows_path="$new_path" 22920 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22921 unix_path=`$CYGPATH -u "$windows_path"` 22922 new_path="$unix_path" 22923 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22924 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22925 new_path="$unix_path" 22926 fi 22927 22928 22929 # Now try to locate executable using which 22930 new_path=`$WHICH "$new_path" 2> /dev/null` 22931 22932 if test "x$new_path" = x; then 22933 # Oops. Which didn't find the executable. 22934 # The splitting of arguments from the executable at a space might have been incorrect, 22935 # since paths with space are more likely in Windows. Give it another try with the whole 22936 # argument. 22937 path="$complete" 22938 arguments="EOL" 22939 new_path="$path" 22940 22941 windows_path="$new_path" 22942 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22943 unix_path=`$CYGPATH -u "$windows_path"` 22944 new_path="$unix_path" 22945 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22946 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22947 new_path="$unix_path" 22948 fi 22949 22950 22951 new_path=`$WHICH "$new_path" 2> /dev/null` 22952 22953 if test "x$new_path" = x; then 22954 # It's still not found. Now this is an unrecoverable error. 22955 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 22956 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 22957 has_space=`$ECHO "$complete" | $GREP " "` 22958 if test "x$has_space" != x; then 22959 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22961 fi 22962 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 22963 fi 22964 fi 22965 22966 # Now new_path has a complete unix path to the binary 22967 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22968 # Keep paths in /bin as-is, but remove trailing .exe if any 22969 new_path="${new_path/%.exe/}" 22970 # Do not save /bin paths to all_fixpath_prefixes! 22971 else 22972 # Not in mixed or Windows style, start by that. 22973 new_path=`cmd //c echo $new_path` 22974 22975 input_path="$new_path" 22976 # Check if we need to convert this using DOS-style short mode. If the path 22977 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22978 # take no chances and rewrite it. 22979 # Note: m4 eats our [], so we need to use [ and ] instead. 22980 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22981 if test "x$has_forbidden_chars" != x; then 22982 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22983 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22984 fi 22985 22986 # Output is in $new_path 22987 22988 windows_path="$new_path" 22989 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22990 unix_path=`$CYGPATH -u "$windows_path"` 22991 new_path="$unix_path" 22992 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22993 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22994 new_path="$unix_path" 22995 fi 22996 22997 # remove trailing .exe if any 22998 new_path="${new_path/%.exe/}" 22999 23000 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23001 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23002 fi 23003 23004 else 23005 # We're on a posix platform. Hooray! :) 23006 # First separate the path from the arguments. This will split at the first 23007 # space. 23008 complete="$MT" 23009 path="${complete%% *}" 23010 tmp="$complete EOL" 23011 arguments="${tmp#* }" 23012 23013 # Cannot rely on the command "which" here since it doesn't always work. 23014 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23015 if test -z "$is_absolute_path"; then 23016 # Path to executable is not absolute. Find it. 23017 IFS_save="$IFS" 23018 IFS=: 23019 for p in $PATH; do 23020 if test -f "$p/$path" && test -x "$p/$path"; then 23021 new_path="$p/$path" 23022 break 23023 fi 23024 done 23025 IFS="$IFS_save" 23026 else 23027 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5 23028 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;} 23029 new_path="$path" 23030 fi 23031 23032 if test "x$new_path" = x; then 23033 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 23034 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 23035 has_space=`$ECHO "$complete" | $GREP " "` 23036 if test "x$has_space" != x; then 23037 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23038 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23039 fi 23040 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23041 fi 23042 fi 23043 23044 # Now join together the path and the arguments once again 23045 if test "x$arguments" != xEOL; then 23046 new_complete="$new_path ${arguments% *}" 23047 else 23048 new_complete="$new_path" 23049 fi 23050 23051 if test "x$complete" != "x$new_complete"; then 23052 MT="$new_complete" 23053 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5 23054 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;} 23055 fi 23056 23057 # The resource compiler 23058 # Extract the first word of "rc", so it can be a program name with args. 23059 set dummy rc; ac_word=$2 23060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23061 $as_echo_n "checking for $ac_word... " >&6; } 23062 if test "${ac_cv_prog_RC+set}" = set; then : 23063 $as_echo_n "(cached) " >&6 23064 else 23065 if test -n "$RC"; then 23066 ac_cv_prog_RC="$RC" # Let the user override the test. 23067 else 23068 ac_prog_rejected=no 23069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23070 for as_dir in $PATH 23071 do 23072 IFS=$as_save_IFS 23073 test -z "$as_dir" && as_dir=. 23074 for ac_exec_ext in '' $ac_executable_extensions; do 23075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23076 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then 23077 ac_prog_rejected=yes 23078 continue 23079 fi 23080 ac_cv_prog_RC="rc" 23081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23082 break 2 23083 fi 23084 done 23085 done 23086 IFS=$as_save_IFS 23087 23088 if test $ac_prog_rejected = yes; then 23089 # We found a bogon in the path, so make sure we never use it. 23090 set dummy $ac_cv_prog_RC 23091 shift 23092 if test $# != 0; then 23093 # We chose a different compiler from the bogus one. 23094 # However, it has the same basename, so the bogon will be chosen 23095 # first if we set RC to just the basename; use the full file name. 23096 shift 23097 ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@" 23098 fi 23099 fi 23100 fi 23101 fi 23102 RC=$ac_cv_prog_RC 23103 if test -n "$RC"; then 23104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 23105 $as_echo "$RC" >&6; } 23106 else 23107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23108 $as_echo "no" >&6; } 23109 fi 23110 23111 23112 23113 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23114 23115 # First separate the path from the arguments. This will split at the first 23116 # space. 23117 complete="$RC" 23118 path="${complete%% *}" 23119 tmp="$complete EOL" 23120 arguments="${tmp#* }" 23121 23122 # Input might be given as Windows format, start by converting to 23123 # unix format. 23124 new_path=`$CYGPATH -u "$path"` 23125 23126 # Now try to locate executable using which 23127 new_path=`$WHICH "$new_path" 2> /dev/null` 23128 # bat and cmd files are not always considered executable in cygwin causing which 23129 # to not find them 23130 if test "x$new_path" = x \ 23131 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23132 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23133 new_path=`$CYGPATH -u "$path"` 23134 fi 23135 if test "x$new_path" = x; then 23136 # Oops. Which didn't find the executable. 23137 # The splitting of arguments from the executable at a space might have been incorrect, 23138 # since paths with space are more likely in Windows. Give it another try with the whole 23139 # argument. 23140 path="$complete" 23141 arguments="EOL" 23142 new_path=`$CYGPATH -u "$path"` 23143 new_path=`$WHICH "$new_path" 2> /dev/null` 23144 # bat and cmd files are not always considered executable in cygwin causing which 23145 # to not find them 23146 if test "x$new_path" = x \ 23147 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23148 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23149 new_path=`$CYGPATH -u "$path"` 23150 fi 23151 if test "x$new_path" = x; then 23152 # It's still not found. Now this is an unrecoverable error. 23153 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23154 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23155 has_space=`$ECHO "$complete" | $GREP " "` 23156 if test "x$has_space" != x; then 23157 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23158 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23159 fi 23160 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23161 fi 23162 fi 23163 23164 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23165 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23166 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23167 # "foo.exe" is OK but "foo" is an error. 23168 # 23169 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23170 # It is also a way to make sure we got the proper file name for the real test later on. 23171 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23172 if test "x$test_shortpath" = x; then 23173 # Short path failed, file does not exist as specified. 23174 # Try adding .exe or .cmd 23175 if test -f "${new_path}.exe"; then 23176 input_to_shortpath="${new_path}.exe" 23177 elif test -f "${new_path}.cmd"; then 23178 input_to_shortpath="${new_path}.cmd" 23179 else 23180 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5 23181 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;} 23182 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23183 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23184 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23185 fi 23186 else 23187 input_to_shortpath="$new_path" 23188 fi 23189 23190 # Call helper function which possibly converts this using DOS-style short mode. 23191 # If so, the updated path is stored in $new_path. 23192 new_path="$input_to_shortpath" 23193 23194 input_path="$input_to_shortpath" 23195 # Check if we need to convert this using DOS-style short mode. If the path 23196 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23197 # take no chances and rewrite it. 23198 # Note: m4 eats our [], so we need to use [ and ] instead. 23199 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23200 if test "x$has_forbidden_chars" != x; then 23201 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23202 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23203 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23204 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23205 # Going to short mode and back again did indeed matter. Since short mode is 23206 # case insensitive, let's make it lowercase to improve readability. 23207 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23208 # Now convert it back to Unix-stile (cygpath) 23209 input_path=`$CYGPATH -u "$shortmode_path"` 23210 new_path="$input_path" 23211 fi 23212 fi 23213 23214 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23215 if test "x$test_cygdrive_prefix" = x; then 23216 # As a simple fix, exclude /usr/bin since it's not a real path. 23217 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23218 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23219 # a path prefixed by /cygdrive for fixpath to work. 23220 new_path="$CYGWIN_ROOT_PATH$input_path" 23221 fi 23222 fi 23223 23224 # remove trailing .exe if any 23225 new_path="${new_path/%.exe/}" 23226 23227 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23228 23229 # First separate the path from the arguments. This will split at the first 23230 # space. 23231 complete="$RC" 23232 path="${complete%% *}" 23233 tmp="$complete EOL" 23234 arguments="${tmp#* }" 23235 23236 # Input might be given as Windows format, start by converting to 23237 # unix format. 23238 new_path="$path" 23239 23240 windows_path="$new_path" 23241 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23242 unix_path=`$CYGPATH -u "$windows_path"` 23243 new_path="$unix_path" 23244 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23245 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23246 new_path="$unix_path" 23247 fi 23248 23249 23250 # Now try to locate executable using which 23251 new_path=`$WHICH "$new_path" 2> /dev/null` 23252 23253 if test "x$new_path" = x; then 23254 # Oops. Which didn't find the executable. 23255 # The splitting of arguments from the executable at a space might have been incorrect, 23256 # since paths with space are more likely in Windows. Give it another try with the whole 23257 # argument. 23258 path="$complete" 23259 arguments="EOL" 23260 new_path="$path" 23261 23262 windows_path="$new_path" 23263 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23264 unix_path=`$CYGPATH -u "$windows_path"` 23265 new_path="$unix_path" 23266 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23267 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23268 new_path="$unix_path" 23269 fi 23270 23271 23272 new_path=`$WHICH "$new_path" 2> /dev/null` 23273 23274 if test "x$new_path" = x; then 23275 # It's still not found. Now this is an unrecoverable error. 23276 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23277 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23278 has_space=`$ECHO "$complete" | $GREP " "` 23279 if test "x$has_space" != x; then 23280 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23281 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23282 fi 23283 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23284 fi 23285 fi 23286 23287 # Now new_path has a complete unix path to the binary 23288 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23289 # Keep paths in /bin as-is, but remove trailing .exe if any 23290 new_path="${new_path/%.exe/}" 23291 # Do not save /bin paths to all_fixpath_prefixes! 23292 else 23293 # Not in mixed or Windows style, start by that. 23294 new_path=`cmd //c echo $new_path` 23295 23296 input_path="$new_path" 23297 # Check if we need to convert this using DOS-style short mode. If the path 23298 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23299 # take no chances and rewrite it. 23300 # Note: m4 eats our [], so we need to use [ and ] instead. 23301 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23302 if test "x$has_forbidden_chars" != x; then 23303 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23304 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23305 fi 23306 23307 # Output is in $new_path 23308 23309 windows_path="$new_path" 23310 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23311 unix_path=`$CYGPATH -u "$windows_path"` 23312 new_path="$unix_path" 23313 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23314 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23315 new_path="$unix_path" 23316 fi 23317 23318 # remove trailing .exe if any 23319 new_path="${new_path/%.exe/}" 23320 23321 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23322 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23323 fi 23324 23325 else 23326 # We're on a posix platform. Hooray! :) 23327 # First separate the path from the arguments. This will split at the first 23328 # space. 23329 complete="$RC" 23330 path="${complete%% *}" 23331 tmp="$complete EOL" 23332 arguments="${tmp#* }" 23333 23334 # Cannot rely on the command "which" here since it doesn't always work. 23335 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23336 if test -z "$is_absolute_path"; then 23337 # Path to executable is not absolute. Find it. 23338 IFS_save="$IFS" 23339 IFS=: 23340 for p in $PATH; do 23341 if test -f "$p/$path" && test -x "$p/$path"; then 23342 new_path="$p/$path" 23343 break 23344 fi 23345 done 23346 IFS="$IFS_save" 23347 else 23348 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5 23349 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;} 23350 new_path="$path" 23351 fi 23352 23353 if test "x$new_path" = x; then 23354 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23355 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23356 has_space=`$ECHO "$complete" | $GREP " "` 23357 if test "x$has_space" != x; then 23358 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23359 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23360 fi 23361 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23362 fi 23363 fi 23364 23365 # Now join together the path and the arguments once again 23366 if test "x$arguments" != xEOL; then 23367 new_complete="$new_path ${arguments% *}" 23368 else 23369 new_complete="$new_path" 23370 fi 23371 23372 if test "x$complete" != "x$new_complete"; then 23373 RC="$new_complete" 23374 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5 23375 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;} 23376 fi 23377 23378 23379 # For hotspot, we need these in Windows mixed path, 23380 # so rewrite them all. Need added .exe suffix. 23381 HOTSPOT_CXX="$CXX.exe" 23382 HOTSPOT_LD="$LD.exe" 23383 HOTSPOT_MT="$MT.exe" 23384 HOTSPOT_RC="$RC.exe" 23385 23386 unix_path="$HOTSPOT_CXX" 23387 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23388 windows_path=`$CYGPATH -m "$unix_path"` 23389 HOTSPOT_CXX="$windows_path" 23390 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23391 windows_path=`cmd //c echo $unix_path` 23392 HOTSPOT_CXX="$windows_path" 23393 fi 23394 23395 23396 unix_path="$HOTSPOT_LD" 23397 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23398 windows_path=`$CYGPATH -m "$unix_path"` 23399 HOTSPOT_LD="$windows_path" 23400 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23401 windows_path=`cmd //c echo $unix_path` 23402 HOTSPOT_LD="$windows_path" 23403 fi 23404 23405 23406 unix_path="$HOTSPOT_MT" 23407 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23408 windows_path=`$CYGPATH -m "$unix_path"` 23409 HOTSPOT_MT="$windows_path" 23410 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23411 windows_path=`cmd //c echo $unix_path` 23412 HOTSPOT_MT="$windows_path" 23413 fi 23414 23415 23416 unix_path="$HOTSPOT_RC" 23417 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23418 windows_path=`$CYGPATH -m "$unix_path"` 23419 HOTSPOT_RC="$windows_path" 23420 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23421 windows_path=`cmd //c echo $unix_path` 23422 HOTSPOT_RC="$windows_path" 23423 fi 23424 23425 23426 23427 23428 RC_FLAGS="-nologo -l 0x409 -r" 23429 if test "x$VARIANT" = xOPT; then : 23430 23431 RC_FLAGS="$RC_FLAGS -d NDEBUG" 23432 23433 fi 23434 JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION 23435 if test "x$JDK_UPDATE_VERSION" = x; then : 23436 23437 JDK_UPDATE_VERSION_NOTNULL=0 23438 23439 fi 23440 RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\"" 23441 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\"" 23442 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\"" 23443 RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\"" 23444 RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\"" 23445 RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\"" 23446 RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\"" 23447 23448 # lib.exe is used to create static libraries. 23449 # Extract the first word of "lib", so it can be a program name with args. 23450 set dummy lib; ac_word=$2 23451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23452 $as_echo_n "checking for $ac_word... " >&6; } 23453 if test "${ac_cv_prog_WINAR+set}" = set; then : 23454 $as_echo_n "(cached) " >&6 23455 else 23456 if test -n "$WINAR"; then 23457 ac_cv_prog_WINAR="$WINAR" # Let the user override the test. 23458 else 23459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23460 for as_dir in $PATH 23461 do 23462 IFS=$as_save_IFS 23463 test -z "$as_dir" && as_dir=. 23464 for ac_exec_ext in '' $ac_executable_extensions; do 23465 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23466 ac_cv_prog_WINAR="lib" 23467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23468 break 2 23469 fi 23470 done 23471 done 23472 IFS=$as_save_IFS 23473 23474 fi 23475 fi 23476 WINAR=$ac_cv_prog_WINAR 23477 if test -n "$WINAR"; then 23478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5 23479 $as_echo "$WINAR" >&6; } 23480 else 23481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23482 $as_echo "no" >&6; } 23483 fi 23484 23485 23486 23487 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23488 23489 # First separate the path from the arguments. This will split at the first 23490 # space. 23491 complete="$WINAR" 23492 path="${complete%% *}" 23493 tmp="$complete EOL" 23494 arguments="${tmp#* }" 23495 23496 # Input might be given as Windows format, start by converting to 23497 # unix format. 23498 new_path=`$CYGPATH -u "$path"` 23499 23500 # Now try to locate executable using which 23501 new_path=`$WHICH "$new_path" 2> /dev/null` 23502 # bat and cmd files are not always considered executable in cygwin causing which 23503 # to not find them 23504 if test "x$new_path" = x \ 23505 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23506 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23507 new_path=`$CYGPATH -u "$path"` 23508 fi 23509 if test "x$new_path" = x; then 23510 # Oops. Which didn't find the executable. 23511 # The splitting of arguments from the executable at a space might have been incorrect, 23512 # since paths with space are more likely in Windows. Give it another try with the whole 23513 # argument. 23514 path="$complete" 23515 arguments="EOL" 23516 new_path=`$CYGPATH -u "$path"` 23517 new_path=`$WHICH "$new_path" 2> /dev/null` 23518 # bat and cmd files are not always considered executable in cygwin causing which 23519 # to not find them 23520 if test "x$new_path" = x \ 23521 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23522 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23523 new_path=`$CYGPATH -u "$path"` 23524 fi 23525 if test "x$new_path" = x; then 23526 # It's still not found. Now this is an unrecoverable error. 23527 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23528 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23529 has_space=`$ECHO "$complete" | $GREP " "` 23530 if test "x$has_space" != x; then 23531 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23532 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23533 fi 23534 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23535 fi 23536 fi 23537 23538 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23539 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23540 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23541 # "foo.exe" is OK but "foo" is an error. 23542 # 23543 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23544 # It is also a way to make sure we got the proper file name for the real test later on. 23545 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23546 if test "x$test_shortpath" = x; then 23547 # Short path failed, file does not exist as specified. 23548 # Try adding .exe or .cmd 23549 if test -f "${new_path}.exe"; then 23550 input_to_shortpath="${new_path}.exe" 23551 elif test -f "${new_path}.cmd"; then 23552 input_to_shortpath="${new_path}.cmd" 23553 else 23554 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5 23555 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;} 23556 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23557 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23558 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23559 fi 23560 else 23561 input_to_shortpath="$new_path" 23562 fi 23563 23564 # Call helper function which possibly converts this using DOS-style short mode. 23565 # If so, the updated path is stored in $new_path. 23566 new_path="$input_to_shortpath" 23567 23568 input_path="$input_to_shortpath" 23569 # Check if we need to convert this using DOS-style short mode. If the path 23570 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23571 # take no chances and rewrite it. 23572 # Note: m4 eats our [], so we need to use [ and ] instead. 23573 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23574 if test "x$has_forbidden_chars" != x; then 23575 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23576 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23577 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23578 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23579 # Going to short mode and back again did indeed matter. Since short mode is 23580 # case insensitive, let's make it lowercase to improve readability. 23581 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23582 # Now convert it back to Unix-stile (cygpath) 23583 input_path=`$CYGPATH -u "$shortmode_path"` 23584 new_path="$input_path" 23585 fi 23586 fi 23587 23588 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23589 if test "x$test_cygdrive_prefix" = x; then 23590 # As a simple fix, exclude /usr/bin since it's not a real path. 23591 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23592 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23593 # a path prefixed by /cygdrive for fixpath to work. 23594 new_path="$CYGWIN_ROOT_PATH$input_path" 23595 fi 23596 fi 23597 23598 # remove trailing .exe if any 23599 new_path="${new_path/%.exe/}" 23600 23601 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23602 23603 # First separate the path from the arguments. This will split at the first 23604 # space. 23605 complete="$WINAR" 23606 path="${complete%% *}" 23607 tmp="$complete EOL" 23608 arguments="${tmp#* }" 23609 23610 # Input might be given as Windows format, start by converting to 23611 # unix format. 23612 new_path="$path" 23613 23614 windows_path="$new_path" 23615 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23616 unix_path=`$CYGPATH -u "$windows_path"` 23617 new_path="$unix_path" 23618 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23619 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23620 new_path="$unix_path" 23621 fi 23622 23623 23624 # Now try to locate executable using which 23625 new_path=`$WHICH "$new_path" 2> /dev/null` 23626 23627 if test "x$new_path" = x; then 23628 # Oops. Which didn't find the executable. 23629 # The splitting of arguments from the executable at a space might have been incorrect, 23630 # since paths with space are more likely in Windows. Give it another try with the whole 23631 # argument. 23632 path="$complete" 23633 arguments="EOL" 23634 new_path="$path" 23635 23636 windows_path="$new_path" 23637 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23638 unix_path=`$CYGPATH -u "$windows_path"` 23639 new_path="$unix_path" 23640 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23641 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23642 new_path="$unix_path" 23643 fi 23644 23645 23646 new_path=`$WHICH "$new_path" 2> /dev/null` 23647 23648 if test "x$new_path" = x; then 23649 # It's still not found. Now this is an unrecoverable error. 23650 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23651 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23652 has_space=`$ECHO "$complete" | $GREP " "` 23653 if test "x$has_space" != x; then 23654 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23655 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23656 fi 23657 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23658 fi 23659 fi 23660 23661 # Now new_path has a complete unix path to the binary 23662 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23663 # Keep paths in /bin as-is, but remove trailing .exe if any 23664 new_path="${new_path/%.exe/}" 23665 # Do not save /bin paths to all_fixpath_prefixes! 23666 else 23667 # Not in mixed or Windows style, start by that. 23668 new_path=`cmd //c echo $new_path` 23669 23670 input_path="$new_path" 23671 # Check if we need to convert this using DOS-style short mode. If the path 23672 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23673 # take no chances and rewrite it. 23674 # Note: m4 eats our [], so we need to use [ and ] instead. 23675 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23676 if test "x$has_forbidden_chars" != x; then 23677 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23678 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23679 fi 23680 23681 # Output is in $new_path 23682 23683 windows_path="$new_path" 23684 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23685 unix_path=`$CYGPATH -u "$windows_path"` 23686 new_path="$unix_path" 23687 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23688 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23689 new_path="$unix_path" 23690 fi 23691 23692 # remove trailing .exe if any 23693 new_path="${new_path/%.exe/}" 23694 23695 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23696 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23697 fi 23698 23699 else 23700 # We're on a posix platform. Hooray! :) 23701 # First separate the path from the arguments. This will split at the first 23702 # space. 23703 complete="$WINAR" 23704 path="${complete%% *}" 23705 tmp="$complete EOL" 23706 arguments="${tmp#* }" 23707 23708 # Cannot rely on the command "which" here since it doesn't always work. 23709 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23710 if test -z "$is_absolute_path"; then 23711 # Path to executable is not absolute. Find it. 23712 IFS_save="$IFS" 23713 IFS=: 23714 for p in $PATH; do 23715 if test -f "$p/$path" && test -x "$p/$path"; then 23716 new_path="$p/$path" 23717 break 23718 fi 23719 done 23720 IFS="$IFS_save" 23721 else 23722 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5 23723 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;} 23724 new_path="$path" 23725 fi 23726 23727 if test "x$new_path" = x; then 23728 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23729 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23730 has_space=`$ECHO "$complete" | $GREP " "` 23731 if test "x$has_space" != x; then 23732 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23733 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23734 fi 23735 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23736 fi 23737 fi 23738 23739 # Now join together the path and the arguments once again 23740 if test "x$arguments" != xEOL; then 23741 new_complete="$new_path ${arguments% *}" 23742 else 23743 new_complete="$new_path" 23744 fi 23745 23746 if test "x$complete" != "x$new_complete"; then 23747 WINAR="$new_complete" 23748 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5 23749 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;} 23750 fi 23751 23752 AR="$WINAR" 23753 ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" 23754 23755 # Extract the first word of "dumpbin", so it can be a program name with args. 23756 set dummy dumpbin; ac_word=$2 23757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23758 $as_echo_n "checking for $ac_word... " >&6; } 23759 if test "${ac_cv_prog_DUMPBIN+set}" = set; then : 23760 $as_echo_n "(cached) " >&6 23761 else 23762 if test -n "$DUMPBIN"; then 23763 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. 23764 else 23765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23766 for as_dir in $PATH 23767 do 23768 IFS=$as_save_IFS 23769 test -z "$as_dir" && as_dir=. 23770 for ac_exec_ext in '' $ac_executable_extensions; do 23771 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23772 ac_cv_prog_DUMPBIN="dumpbin" 23773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23774 break 2 23775 fi 23776 done 23777 done 23778 IFS=$as_save_IFS 23779 23780 fi 23781 fi 23782 DUMPBIN=$ac_cv_prog_DUMPBIN 23783 if test -n "$DUMPBIN"; then 23784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 23785 $as_echo "$DUMPBIN" >&6; } 23786 else 23787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23788 $as_echo "no" >&6; } 23789 fi 23790 23791 23792 23793 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23794 23795 # First separate the path from the arguments. This will split at the first 23796 # space. 23797 complete="$DUMPBIN" 23798 path="${complete%% *}" 23799 tmp="$complete EOL" 23800 arguments="${tmp#* }" 23801 23802 # Input might be given as Windows format, start by converting to 23803 # unix format. 23804 new_path=`$CYGPATH -u "$path"` 23805 23806 # Now try to locate executable using which 23807 new_path=`$WHICH "$new_path" 2> /dev/null` 23808 # bat and cmd files are not always considered executable in cygwin causing which 23809 # to not find them 23810 if test "x$new_path" = x \ 23811 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23812 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23813 new_path=`$CYGPATH -u "$path"` 23814 fi 23815 if test "x$new_path" = x; then 23816 # Oops. Which didn't find the executable. 23817 # The splitting of arguments from the executable at a space might have been incorrect, 23818 # since paths with space are more likely in Windows. Give it another try with the whole 23819 # argument. 23820 path="$complete" 23821 arguments="EOL" 23822 new_path=`$CYGPATH -u "$path"` 23823 new_path=`$WHICH "$new_path" 2> /dev/null` 23824 # bat and cmd files are not always considered executable in cygwin causing which 23825 # to not find them 23826 if test "x$new_path" = x \ 23827 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23828 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23829 new_path=`$CYGPATH -u "$path"` 23830 fi 23831 if test "x$new_path" = x; then 23832 # It's still not found. Now this is an unrecoverable error. 23833 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 23834 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 23835 has_space=`$ECHO "$complete" | $GREP " "` 23836 if test "x$has_space" != x; then 23837 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23839 fi 23840 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 23841 fi 23842 fi 23843 23844 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23845 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23846 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23847 # "foo.exe" is OK but "foo" is an error. 23848 # 23849 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23850 # It is also a way to make sure we got the proper file name for the real test later on. 23851 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23852 if test "x$test_shortpath" = x; then 23853 # Short path failed, file does not exist as specified. 23854 # Try adding .exe or .cmd 23855 if test -f "${new_path}.exe"; then 23856 input_to_shortpath="${new_path}.exe" 23857 elif test -f "${new_path}.cmd"; then 23858 input_to_shortpath="${new_path}.cmd" 23859 else 23860 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5 23861 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;} 23862 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23863 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23864 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 23865 fi 23866 else 23867 input_to_shortpath="$new_path" 23868 fi 23869 23870 # Call helper function which possibly converts this using DOS-style short mode. 23871 # If so, the updated path is stored in $new_path. 23872 new_path="$input_to_shortpath" 23873 23874 input_path="$input_to_shortpath" 23875 # Check if we need to convert this using DOS-style short mode. If the path 23876 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23877 # take no chances and rewrite it. 23878 # Note: m4 eats our [], so we need to use [ and ] instead. 23879 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23880 if test "x$has_forbidden_chars" != x; then 23881 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23882 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23883 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23884 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23885 # Going to short mode and back again did indeed matter. Since short mode is 23886 # case insensitive, let's make it lowercase to improve readability. 23887 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23888 # Now convert it back to Unix-stile (cygpath) 23889 input_path=`$CYGPATH -u "$shortmode_path"` 23890 new_path="$input_path" 23891 fi 23892 fi 23893 23894 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23895 if test "x$test_cygdrive_prefix" = x; then 23896 # As a simple fix, exclude /usr/bin since it's not a real path. 23897 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23898 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23899 # a path prefixed by /cygdrive for fixpath to work. 23900 new_path="$CYGWIN_ROOT_PATH$input_path" 23901 fi 23902 fi 23903 23904 # remove trailing .exe if any 23905 new_path="${new_path/%.exe/}" 23906 23907 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23908 23909 # First separate the path from the arguments. This will split at the first 23910 # space. 23911 complete="$DUMPBIN" 23912 path="${complete%% *}" 23913 tmp="$complete EOL" 23914 arguments="${tmp#* }" 23915 23916 # Input might be given as Windows format, start by converting to 23917 # unix format. 23918 new_path="$path" 23919 23920 windows_path="$new_path" 23921 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23922 unix_path=`$CYGPATH -u "$windows_path"` 23923 new_path="$unix_path" 23924 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23925 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23926 new_path="$unix_path" 23927 fi 23928 23929 23930 # Now try to locate executable using which 23931 new_path=`$WHICH "$new_path" 2> /dev/null` 23932 23933 if test "x$new_path" = x; then 23934 # Oops. Which didn't find the executable. 23935 # The splitting of arguments from the executable at a space might have been incorrect, 23936 # since paths with space are more likely in Windows. Give it another try with the whole 23937 # argument. 23938 path="$complete" 23939 arguments="EOL" 23940 new_path="$path" 23941 23942 windows_path="$new_path" 23943 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23944 unix_path=`$CYGPATH -u "$windows_path"` 23945 new_path="$unix_path" 23946 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23947 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23948 new_path="$unix_path" 23949 fi 23950 23951 23952 new_path=`$WHICH "$new_path" 2> /dev/null` 23953 23954 if test "x$new_path" = x; then 23955 # It's still not found. Now this is an unrecoverable error. 23956 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 23957 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 23958 has_space=`$ECHO "$complete" | $GREP " "` 23959 if test "x$has_space" != x; then 23960 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23961 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23962 fi 23963 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 23964 fi 23965 fi 23966 23967 # Now new_path has a complete unix path to the binary 23968 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23969 # Keep paths in /bin as-is, but remove trailing .exe if any 23970 new_path="${new_path/%.exe/}" 23971 # Do not save /bin paths to all_fixpath_prefixes! 23972 else 23973 # Not in mixed or Windows style, start by that. 23974 new_path=`cmd //c echo $new_path` 23975 23976 input_path="$new_path" 23977 # Check if we need to convert this using DOS-style short mode. If the path 23978 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23979 # take no chances and rewrite it. 23980 # Note: m4 eats our [], so we need to use [ and ] instead. 23981 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23982 if test "x$has_forbidden_chars" != x; then 23983 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23984 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23985 fi 23986 23987 # Output is in $new_path 23988 23989 windows_path="$new_path" 23990 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23991 unix_path=`$CYGPATH -u "$windows_path"` 23992 new_path="$unix_path" 23993 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23994 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23995 new_path="$unix_path" 23996 fi 23997 23998 # remove trailing .exe if any 23999 new_path="${new_path/%.exe/}" 24000 24001 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24002 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24003 fi 24004 24005 else 24006 # We're on a posix platform. Hooray! :) 24007 # First separate the path from the arguments. This will split at the first 24008 # space. 24009 complete="$DUMPBIN" 24010 path="${complete%% *}" 24011 tmp="$complete EOL" 24012 arguments="${tmp#* }" 24013 24014 # Cannot rely on the command "which" here since it doesn't always work. 24015 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24016 if test -z "$is_absolute_path"; then 24017 # Path to executable is not absolute. Find it. 24018 IFS_save="$IFS" 24019 IFS=: 24020 for p in $PATH; do 24021 if test -f "$p/$path" && test -x "$p/$path"; then 24022 new_path="$p/$path" 24023 break 24024 fi 24025 done 24026 IFS="$IFS_save" 24027 else 24028 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5 24029 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;} 24030 new_path="$path" 24031 fi 24032 24033 if test "x$new_path" = x; then 24034 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 24035 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 24036 has_space=`$ECHO "$complete" | $GREP " "` 24037 if test "x$has_space" != x; then 24038 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24039 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24040 fi 24041 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24042 fi 24043 fi 24044 24045 # Now join together the path and the arguments once again 24046 if test "x$arguments" != xEOL; then 24047 new_complete="$new_path ${arguments% *}" 24048 else 24049 new_complete="$new_path" 24050 fi 24051 24052 if test "x$complete" != "x$new_complete"; then 24053 DUMPBIN="$new_complete" 24054 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5 24055 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;} 24056 fi 24057 24058 24059 COMPILER_TYPE=CL 24060 CCXXFLAGS="$CCXXFLAGS -nologo" 24061 24062 fi 24063 24064 24065 24066 ac_ext=c 24067 ac_cpp='$CPP $CPPFLAGS' 24068 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24069 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24070 ac_compiler_gnu=$ac_cv_c_compiler_gnu 24071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 24072 $as_echo_n "checking how to run the C preprocessor... " >&6; } 24073 # On Suns, sometimes $CPP names a directory. 24074 if test -n "$CPP" && test -d "$CPP"; then 24075 CPP= 24076 fi 24077 if test -z "$CPP"; then 24078 if test "${ac_cv_prog_CPP+set}" = set; then : 24079 $as_echo_n "(cached) " >&6 24080 else 24081 # Double quotes because CPP needs to be expanded 24082 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 24083 do 24084 ac_preproc_ok=false 24085 for ac_c_preproc_warn_flag in '' yes 24086 do 24087 # Use a header file that comes with gcc, so configuring glibc 24088 # with a fresh cross-compiler works. 24089 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24090 # <limits.h> exists even on freestanding compilers. 24091 # On the NeXT, cc -E runs the code through the compiler's parser, 24092 # not just through cpp. "Syntax error" is here to catch this case. 24093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24094 /* end confdefs.h. */ 24095 #ifdef __STDC__ 24096 # include <limits.h> 24097 #else 24098 # include <assert.h> 24099 #endif 24100 Syntax error 24101 _ACEOF 24102 if ac_fn_c_try_cpp "$LINENO"; then : 24103 24104 else 24105 # Broken: fails on valid input. 24106 continue 24107 fi 24108 rm -f conftest.err conftest.i conftest.$ac_ext 24109 24110 # OK, works on sane cases. Now check whether nonexistent headers 24111 # can be detected and how. 24112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24113 /* end confdefs.h. */ 24114 #include <ac_nonexistent.h> 24115 _ACEOF 24116 if ac_fn_c_try_cpp "$LINENO"; then : 24117 # Broken: success on invalid input. 24118 continue 24119 else 24120 # Passes both tests. 24121 ac_preproc_ok=: 24122 break 24123 fi 24124 rm -f conftest.err conftest.i conftest.$ac_ext 24125 24126 done 24127 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24128 rm -f conftest.i conftest.err conftest.$ac_ext 24129 if $ac_preproc_ok; then : 24130 break 24131 fi 24132 24133 done 24134 ac_cv_prog_CPP=$CPP 24135 24136 fi 24137 CPP=$ac_cv_prog_CPP 24138 else 24139 ac_cv_prog_CPP=$CPP 24140 fi 24141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 24142 $as_echo "$CPP" >&6; } 24143 ac_preproc_ok=false 24144 for ac_c_preproc_warn_flag in '' yes 24145 do 24146 # Use a header file that comes with gcc, so configuring glibc 24147 # with a fresh cross-compiler works. 24148 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24149 # <limits.h> exists even on freestanding compilers. 24150 # On the NeXT, cc -E runs the code through the compiler's parser, 24151 # not just through cpp. "Syntax error" is here to catch this case. 24152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24153 /* end confdefs.h. */ 24154 #ifdef __STDC__ 24155 # include <limits.h> 24156 #else 24157 # include <assert.h> 24158 #endif 24159 Syntax error 24160 _ACEOF 24161 if ac_fn_c_try_cpp "$LINENO"; then : 24162 24163 else 24164 # Broken: fails on valid input. 24165 continue 24166 fi 24167 rm -f conftest.err conftest.i conftest.$ac_ext 24168 24169 # OK, works on sane cases. Now check whether nonexistent headers 24170 # can be detected and how. 24171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24172 /* end confdefs.h. */ 24173 #include <ac_nonexistent.h> 24174 _ACEOF 24175 if ac_fn_c_try_cpp "$LINENO"; then : 24176 # Broken: success on invalid input. 24177 continue 24178 else 24179 # Passes both tests. 24180 ac_preproc_ok=: 24181 break 24182 fi 24183 rm -f conftest.err conftest.i conftest.$ac_ext 24184 24185 done 24186 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24187 rm -f conftest.i conftest.err conftest.$ac_ext 24188 if $ac_preproc_ok; then : 24189 24190 else 24191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 24192 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 24193 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 24194 See \`config.log' for more details" "$LINENO" 5 ; } 24195 fi 24196 24197 ac_ext=cpp 24198 ac_cpp='$CXXCPP $CPPFLAGS' 24199 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24200 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24201 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24202 24203 24204 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24205 24206 # First separate the path from the arguments. This will split at the first 24207 # space. 24208 complete="$CPP" 24209 path="${complete%% *}" 24210 tmp="$complete EOL" 24211 arguments="${tmp#* }" 24212 24213 # Input might be given as Windows format, start by converting to 24214 # unix format. 24215 new_path=`$CYGPATH -u "$path"` 24216 24217 # Now try to locate executable using which 24218 new_path=`$WHICH "$new_path" 2> /dev/null` 24219 # bat and cmd files are not always considered executable in cygwin causing which 24220 # to not find them 24221 if test "x$new_path" = x \ 24222 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24223 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24224 new_path=`$CYGPATH -u "$path"` 24225 fi 24226 if test "x$new_path" = x; then 24227 # Oops. Which didn't find the executable. 24228 # The splitting of arguments from the executable at a space might have been incorrect, 24229 # since paths with space are more likely in Windows. Give it another try with the whole 24230 # argument. 24231 path="$complete" 24232 arguments="EOL" 24233 new_path=`$CYGPATH -u "$path"` 24234 new_path=`$WHICH "$new_path" 2> /dev/null` 24235 # bat and cmd files are not always considered executable in cygwin causing which 24236 # to not find them 24237 if test "x$new_path" = x \ 24238 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24239 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24240 new_path=`$CYGPATH -u "$path"` 24241 fi 24242 if test "x$new_path" = x; then 24243 # It's still not found. Now this is an unrecoverable error. 24244 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24245 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24246 has_space=`$ECHO "$complete" | $GREP " "` 24247 if test "x$has_space" != x; then 24248 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24249 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24250 fi 24251 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24252 fi 24253 fi 24254 24255 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24256 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24257 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24258 # "foo.exe" is OK but "foo" is an error. 24259 # 24260 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24261 # It is also a way to make sure we got the proper file name for the real test later on. 24262 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24263 if test "x$test_shortpath" = x; then 24264 # Short path failed, file does not exist as specified. 24265 # Try adding .exe or .cmd 24266 if test -f "${new_path}.exe"; then 24267 input_to_shortpath="${new_path}.exe" 24268 elif test -f "${new_path}.cmd"; then 24269 input_to_shortpath="${new_path}.cmd" 24270 else 24271 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5 24272 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;} 24273 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24274 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24275 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24276 fi 24277 else 24278 input_to_shortpath="$new_path" 24279 fi 24280 24281 # Call helper function which possibly converts this using DOS-style short mode. 24282 # If so, the updated path is stored in $new_path. 24283 new_path="$input_to_shortpath" 24284 24285 input_path="$input_to_shortpath" 24286 # Check if we need to convert this using DOS-style short mode. If the path 24287 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24288 # take no chances and rewrite it. 24289 # Note: m4 eats our [], so we need to use [ and ] instead. 24290 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24291 if test "x$has_forbidden_chars" != x; then 24292 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24293 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24294 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24295 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24296 # Going to short mode and back again did indeed matter. Since short mode is 24297 # case insensitive, let's make it lowercase to improve readability. 24298 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24299 # Now convert it back to Unix-stile (cygpath) 24300 input_path=`$CYGPATH -u "$shortmode_path"` 24301 new_path="$input_path" 24302 fi 24303 fi 24304 24305 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24306 if test "x$test_cygdrive_prefix" = x; then 24307 # As a simple fix, exclude /usr/bin since it's not a real path. 24308 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24309 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24310 # a path prefixed by /cygdrive for fixpath to work. 24311 new_path="$CYGWIN_ROOT_PATH$input_path" 24312 fi 24313 fi 24314 24315 # remove trailing .exe if any 24316 new_path="${new_path/%.exe/}" 24317 24318 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24319 24320 # First separate the path from the arguments. This will split at the first 24321 # space. 24322 complete="$CPP" 24323 path="${complete%% *}" 24324 tmp="$complete EOL" 24325 arguments="${tmp#* }" 24326 24327 # Input might be given as Windows format, start by converting to 24328 # unix format. 24329 new_path="$path" 24330 24331 windows_path="$new_path" 24332 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24333 unix_path=`$CYGPATH -u "$windows_path"` 24334 new_path="$unix_path" 24335 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24336 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24337 new_path="$unix_path" 24338 fi 24339 24340 24341 # Now try to locate executable using which 24342 new_path=`$WHICH "$new_path" 2> /dev/null` 24343 24344 if test "x$new_path" = x; then 24345 # Oops. Which didn't find the executable. 24346 # The splitting of arguments from the executable at a space might have been incorrect, 24347 # since paths with space are more likely in Windows. Give it another try with the whole 24348 # argument. 24349 path="$complete" 24350 arguments="EOL" 24351 new_path="$path" 24352 24353 windows_path="$new_path" 24354 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24355 unix_path=`$CYGPATH -u "$windows_path"` 24356 new_path="$unix_path" 24357 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24358 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24359 new_path="$unix_path" 24360 fi 24361 24362 24363 new_path=`$WHICH "$new_path" 2> /dev/null` 24364 24365 if test "x$new_path" = x; then 24366 # It's still not found. Now this is an unrecoverable error. 24367 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24368 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24369 has_space=`$ECHO "$complete" | $GREP " "` 24370 if test "x$has_space" != x; then 24371 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24372 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24373 fi 24374 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24375 fi 24376 fi 24377 24378 # Now new_path has a complete unix path to the binary 24379 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24380 # Keep paths in /bin as-is, but remove trailing .exe if any 24381 new_path="${new_path/%.exe/}" 24382 # Do not save /bin paths to all_fixpath_prefixes! 24383 else 24384 # Not in mixed or Windows style, start by that. 24385 new_path=`cmd //c echo $new_path` 24386 24387 input_path="$new_path" 24388 # Check if we need to convert this using DOS-style short mode. If the path 24389 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24390 # take no chances and rewrite it. 24391 # Note: m4 eats our [], so we need to use [ and ] instead. 24392 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24393 if test "x$has_forbidden_chars" != x; then 24394 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24395 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24396 fi 24397 24398 # Output is in $new_path 24399 24400 windows_path="$new_path" 24401 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24402 unix_path=`$CYGPATH -u "$windows_path"` 24403 new_path="$unix_path" 24404 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24405 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24406 new_path="$unix_path" 24407 fi 24408 24409 # remove trailing .exe if any 24410 new_path="${new_path/%.exe/}" 24411 24412 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24413 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24414 fi 24415 24416 else 24417 # We're on a posix platform. Hooray! :) 24418 # First separate the path from the arguments. This will split at the first 24419 # space. 24420 complete="$CPP" 24421 path="${complete%% *}" 24422 tmp="$complete EOL" 24423 arguments="${tmp#* }" 24424 24425 # Cannot rely on the command "which" here since it doesn't always work. 24426 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24427 if test -z "$is_absolute_path"; then 24428 # Path to executable is not absolute. Find it. 24429 IFS_save="$IFS" 24430 IFS=: 24431 for p in $PATH; do 24432 if test -f "$p/$path" && test -x "$p/$path"; then 24433 new_path="$p/$path" 24434 break 24435 fi 24436 done 24437 IFS="$IFS_save" 24438 else 24439 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5 24440 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;} 24441 new_path="$path" 24442 fi 24443 24444 if test "x$new_path" = x; then 24445 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24446 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24447 has_space=`$ECHO "$complete" | $GREP " "` 24448 if test "x$has_space" != x; then 24449 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24450 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24451 fi 24452 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24453 fi 24454 fi 24455 24456 # Now join together the path and the arguments once again 24457 if test "x$arguments" != xEOL; then 24458 new_complete="$new_path ${arguments% *}" 24459 else 24460 new_complete="$new_path" 24461 fi 24462 24463 if test "x$complete" != "x$new_complete"; then 24464 CPP="$new_complete" 24465 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5 24466 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;} 24467 fi 24468 24469 24470 ac_ext=cpp 24471 ac_cpp='$CXXCPP $CPPFLAGS' 24472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 24476 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } 24477 if test -z "$CXXCPP"; then 24478 if test "${ac_cv_prog_CXXCPP+set}" = set; then : 24479 $as_echo_n "(cached) " >&6 24480 else 24481 # Double quotes because CXXCPP needs to be expanded 24482 for CXXCPP in "$CXX -E" "/lib/cpp" 24483 do 24484 ac_preproc_ok=false 24485 for ac_cxx_preproc_warn_flag in '' yes 24486 do 24487 # Use a header file that comes with gcc, so configuring glibc 24488 # with a fresh cross-compiler works. 24489 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24490 # <limits.h> exists even on freestanding compilers. 24491 # On the NeXT, cc -E runs the code through the compiler's parser, 24492 # not just through cpp. "Syntax error" is here to catch this case. 24493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24494 /* end confdefs.h. */ 24495 #ifdef __STDC__ 24496 # include <limits.h> 24497 #else 24498 # include <assert.h> 24499 #endif 24500 Syntax error 24501 _ACEOF 24502 if ac_fn_cxx_try_cpp "$LINENO"; then : 24503 24504 else 24505 # Broken: fails on valid input. 24506 continue 24507 fi 24508 rm -f conftest.err conftest.i conftest.$ac_ext 24509 24510 # OK, works on sane cases. Now check whether nonexistent headers 24511 # can be detected and how. 24512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24513 /* end confdefs.h. */ 24514 #include <ac_nonexistent.h> 24515 _ACEOF 24516 if ac_fn_cxx_try_cpp "$LINENO"; then : 24517 # Broken: success on invalid input. 24518 continue 24519 else 24520 # Passes both tests. 24521 ac_preproc_ok=: 24522 break 24523 fi 24524 rm -f conftest.err conftest.i conftest.$ac_ext 24525 24526 done 24527 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24528 rm -f conftest.i conftest.err conftest.$ac_ext 24529 if $ac_preproc_ok; then : 24530 break 24531 fi 24532 24533 done 24534 ac_cv_prog_CXXCPP=$CXXCPP 24535 24536 fi 24537 CXXCPP=$ac_cv_prog_CXXCPP 24538 else 24539 ac_cv_prog_CXXCPP=$CXXCPP 24540 fi 24541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 24542 $as_echo "$CXXCPP" >&6; } 24543 ac_preproc_ok=false 24544 for ac_cxx_preproc_warn_flag in '' yes 24545 do 24546 # Use a header file that comes with gcc, so configuring glibc 24547 # with a fresh cross-compiler works. 24548 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24549 # <limits.h> exists even on freestanding compilers. 24550 # On the NeXT, cc -E runs the code through the compiler's parser, 24551 # not just through cpp. "Syntax error" is here to catch this case. 24552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24553 /* end confdefs.h. */ 24554 #ifdef __STDC__ 24555 # include <limits.h> 24556 #else 24557 # include <assert.h> 24558 #endif 24559 Syntax error 24560 _ACEOF 24561 if ac_fn_cxx_try_cpp "$LINENO"; then : 24562 24563 else 24564 # Broken: fails on valid input. 24565 continue 24566 fi 24567 rm -f conftest.err conftest.i conftest.$ac_ext 24568 24569 # OK, works on sane cases. Now check whether nonexistent headers 24570 # can be detected and how. 24571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24572 /* end confdefs.h. */ 24573 #include <ac_nonexistent.h> 24574 _ACEOF 24575 if ac_fn_cxx_try_cpp "$LINENO"; then : 24576 # Broken: success on invalid input. 24577 continue 24578 else 24579 # Passes both tests. 24580 ac_preproc_ok=: 24581 break 24582 fi 24583 rm -f conftest.err conftest.i conftest.$ac_ext 24584 24585 done 24586 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24587 rm -f conftest.i conftest.err conftest.$ac_ext 24588 if $ac_preproc_ok; then : 24589 24590 else 24591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 24592 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 24593 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check 24594 See \`config.log' for more details" "$LINENO" 5 ; } 24595 fi 24596 24597 ac_ext=cpp 24598 ac_cpp='$CXXCPP $CPPFLAGS' 24599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24602 24603 24604 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24605 24606 # First separate the path from the arguments. This will split at the first 24607 # space. 24608 complete="$CXXCPP" 24609 path="${complete%% *}" 24610 tmp="$complete EOL" 24611 arguments="${tmp#* }" 24612 24613 # Input might be given as Windows format, start by converting to 24614 # unix format. 24615 new_path=`$CYGPATH -u "$path"` 24616 24617 # Now try to locate executable using which 24618 new_path=`$WHICH "$new_path" 2> /dev/null` 24619 # bat and cmd files are not always considered executable in cygwin causing which 24620 # to not find them 24621 if test "x$new_path" = x \ 24622 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24623 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24624 new_path=`$CYGPATH -u "$path"` 24625 fi 24626 if test "x$new_path" = x; then 24627 # Oops. Which didn't find the executable. 24628 # The splitting of arguments from the executable at a space might have been incorrect, 24629 # since paths with space are more likely in Windows. Give it another try with the whole 24630 # argument. 24631 path="$complete" 24632 arguments="EOL" 24633 new_path=`$CYGPATH -u "$path"` 24634 new_path=`$WHICH "$new_path" 2> /dev/null` 24635 # bat and cmd files are not always considered executable in cygwin causing which 24636 # to not find them 24637 if test "x$new_path" = x \ 24638 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24639 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24640 new_path=`$CYGPATH -u "$path"` 24641 fi 24642 if test "x$new_path" = x; then 24643 # It's still not found. Now this is an unrecoverable error. 24644 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 24645 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 24646 has_space=`$ECHO "$complete" | $GREP " "` 24647 if test "x$has_space" != x; then 24648 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24649 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24650 fi 24651 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24652 fi 24653 fi 24654 24655 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24656 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24657 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24658 # "foo.exe" is OK but "foo" is an error. 24659 # 24660 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24661 # It is also a way to make sure we got the proper file name for the real test later on. 24662 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24663 if test "x$test_shortpath" = x; then 24664 # Short path failed, file does not exist as specified. 24665 # Try adding .exe or .cmd 24666 if test -f "${new_path}.exe"; then 24667 input_to_shortpath="${new_path}.exe" 24668 elif test -f "${new_path}.cmd"; then 24669 input_to_shortpath="${new_path}.cmd" 24670 else 24671 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5 24672 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;} 24673 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24674 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24675 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24676 fi 24677 else 24678 input_to_shortpath="$new_path" 24679 fi 24680 24681 # Call helper function which possibly converts this using DOS-style short mode. 24682 # If so, the updated path is stored in $new_path. 24683 new_path="$input_to_shortpath" 24684 24685 input_path="$input_to_shortpath" 24686 # Check if we need to convert this using DOS-style short mode. If the path 24687 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24688 # take no chances and rewrite it. 24689 # Note: m4 eats our [], so we need to use [ and ] instead. 24690 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24691 if test "x$has_forbidden_chars" != x; then 24692 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24693 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24694 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24695 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24696 # Going to short mode and back again did indeed matter. Since short mode is 24697 # case insensitive, let's make it lowercase to improve readability. 24698 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24699 # Now convert it back to Unix-stile (cygpath) 24700 input_path=`$CYGPATH -u "$shortmode_path"` 24701 new_path="$input_path" 24702 fi 24703 fi 24704 24705 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24706 if test "x$test_cygdrive_prefix" = x; then 24707 # As a simple fix, exclude /usr/bin since it's not a real path. 24708 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24709 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24710 # a path prefixed by /cygdrive for fixpath to work. 24711 new_path="$CYGWIN_ROOT_PATH$input_path" 24712 fi 24713 fi 24714 24715 # remove trailing .exe if any 24716 new_path="${new_path/%.exe/}" 24717 24718 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24719 24720 # First separate the path from the arguments. This will split at the first 24721 # space. 24722 complete="$CXXCPP" 24723 path="${complete%% *}" 24724 tmp="$complete EOL" 24725 arguments="${tmp#* }" 24726 24727 # Input might be given as Windows format, start by converting to 24728 # unix format. 24729 new_path="$path" 24730 24731 windows_path="$new_path" 24732 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24733 unix_path=`$CYGPATH -u "$windows_path"` 24734 new_path="$unix_path" 24735 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24736 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24737 new_path="$unix_path" 24738 fi 24739 24740 24741 # Now try to locate executable using which 24742 new_path=`$WHICH "$new_path" 2> /dev/null` 24743 24744 if test "x$new_path" = x; then 24745 # Oops. Which didn't find the executable. 24746 # The splitting of arguments from the executable at a space might have been incorrect, 24747 # since paths with space are more likely in Windows. Give it another try with the whole 24748 # argument. 24749 path="$complete" 24750 arguments="EOL" 24751 new_path="$path" 24752 24753 windows_path="$new_path" 24754 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24755 unix_path=`$CYGPATH -u "$windows_path"` 24756 new_path="$unix_path" 24757 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24758 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24759 new_path="$unix_path" 24760 fi 24761 24762 24763 new_path=`$WHICH "$new_path" 2> /dev/null` 24764 24765 if test "x$new_path" = x; then 24766 # It's still not found. Now this is an unrecoverable error. 24767 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 24768 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 24769 has_space=`$ECHO "$complete" | $GREP " "` 24770 if test "x$has_space" != x; then 24771 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24772 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24773 fi 24774 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24775 fi 24776 fi 24777 24778 # Now new_path has a complete unix path to the binary 24779 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24780 # Keep paths in /bin as-is, but remove trailing .exe if any 24781 new_path="${new_path/%.exe/}" 24782 # Do not save /bin paths to all_fixpath_prefixes! 24783 else 24784 # Not in mixed or Windows style, start by that. 24785 new_path=`cmd //c echo $new_path` 24786 24787 input_path="$new_path" 24788 # Check if we need to convert this using DOS-style short mode. If the path 24789 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24790 # take no chances and rewrite it. 24791 # Note: m4 eats our [], so we need to use [ and ] instead. 24792 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24793 if test "x$has_forbidden_chars" != x; then 24794 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24795 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24796 fi 24797 24798 # Output is in $new_path 24799 24800 windows_path="$new_path" 24801 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24802 unix_path=`$CYGPATH -u "$windows_path"` 24803 new_path="$unix_path" 24804 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24805 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24806 new_path="$unix_path" 24807 fi 24808 24809 # remove trailing .exe if any 24810 new_path="${new_path/%.exe/}" 24811 24812 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24813 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24814 fi 24815 24816 else 24817 # We're on a posix platform. Hooray! :) 24818 # First separate the path from the arguments. This will split at the first 24819 # space. 24820 complete="$CXXCPP" 24821 path="${complete%% *}" 24822 tmp="$complete EOL" 24823 arguments="${tmp#* }" 24824 24825 # Cannot rely on the command "which" here since it doesn't always work. 24826 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24827 if test -z "$is_absolute_path"; then 24828 # Path to executable is not absolute. Find it. 24829 IFS_save="$IFS" 24830 IFS=: 24831 for p in $PATH; do 24832 if test -f "$p/$path" && test -x "$p/$path"; then 24833 new_path="$p/$path" 24834 break 24835 fi 24836 done 24837 IFS="$IFS_save" 24838 else 24839 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5 24840 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;} 24841 new_path="$path" 24842 fi 24843 24844 if test "x$new_path" = x; then 24845 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 24846 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 24847 has_space=`$ECHO "$complete" | $GREP " "` 24848 if test "x$has_space" != x; then 24849 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24850 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24851 fi 24852 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24853 fi 24854 fi 24855 24856 # Now join together the path and the arguments once again 24857 if test "x$arguments" != xEOL; then 24858 new_complete="$new_path ${arguments% *}" 24859 else 24860 new_complete="$new_path" 24861 fi 24862 24863 if test "x$complete" != "x$new_complete"; then 24864 CXXCPP="$new_complete" 24865 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5 24866 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;} 24867 fi 24868 24869 24870 if test "x$COMPILE_TYPE" != "xcross"; then 24871 # If we are not cross compiling, use the same compilers for 24872 # building the build platform executables. The cross-compilation 24873 # case needed to be done earlier, but this can only be done after 24874 # the native tools have been localized. 24875 BUILD_CC="$CC" 24876 BUILD_CXX="$CXX" 24877 BUILD_LD="$LD" 24878 fi 24879 24880 # for solaris we really need solaris tools, and not gnu equivalent 24881 # these seems to normally reside in /usr/ccs/bin so add that to path before 24882 # starting to probe 24883 # 24884 # NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH 24885 # so that it can be overriden --with-tools-dir 24886 if test "x$OPENJDK_BUILD_OS" = xsolaris; then 24887 PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" 24888 fi 24889 24890 # Find the right assembler. 24891 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 24892 # Extract the first word of "as", so it can be a program name with args. 24893 set dummy as; ac_word=$2 24894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 24895 $as_echo_n "checking for $ac_word... " >&6; } 24896 if test "${ac_cv_path_AS+set}" = set; then : 24897 $as_echo_n "(cached) " >&6 24898 else 24899 case $AS in 24900 [\\/]* | ?:[\\/]*) 24901 ac_cv_path_AS="$AS" # Let the user override the test with a path. 24902 ;; 24903 *) 24904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 24905 for as_dir in $PATH 24906 do 24907 IFS=$as_save_IFS 24908 test -z "$as_dir" && as_dir=. 24909 for ac_exec_ext in '' $ac_executable_extensions; do 24910 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 24911 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" 24912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 24913 break 2 24914 fi 24915 done 24916 done 24917 IFS=$as_save_IFS 24918 24919 ;; 24920 esac 24921 fi 24922 AS=$ac_cv_path_AS 24923 if test -n "$AS"; then 24924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 24925 $as_echo "$AS" >&6; } 24926 else 24927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 24928 $as_echo "no" >&6; } 24929 fi 24930 24931 24932 24933 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24934 24935 # First separate the path from the arguments. This will split at the first 24936 # space. 24937 complete="$AS" 24938 path="${complete%% *}" 24939 tmp="$complete EOL" 24940 arguments="${tmp#* }" 24941 24942 # Input might be given as Windows format, start by converting to 24943 # unix format. 24944 new_path=`$CYGPATH -u "$path"` 24945 24946 # Now try to locate executable using which 24947 new_path=`$WHICH "$new_path" 2> /dev/null` 24948 # bat and cmd files are not always considered executable in cygwin causing which 24949 # to not find them 24950 if test "x$new_path" = x \ 24951 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24952 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24953 new_path=`$CYGPATH -u "$path"` 24954 fi 24955 if test "x$new_path" = x; then 24956 # Oops. Which didn't find the executable. 24957 # The splitting of arguments from the executable at a space might have been incorrect, 24958 # since paths with space are more likely in Windows. Give it another try with the whole 24959 # argument. 24960 path="$complete" 24961 arguments="EOL" 24962 new_path=`$CYGPATH -u "$path"` 24963 new_path=`$WHICH "$new_path" 2> /dev/null` 24964 # bat and cmd files are not always considered executable in cygwin causing which 24965 # to not find them 24966 if test "x$new_path" = x \ 24967 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24968 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24969 new_path=`$CYGPATH -u "$path"` 24970 fi 24971 if test "x$new_path" = x; then 24972 # It's still not found. Now this is an unrecoverable error. 24973 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 24974 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 24975 has_space=`$ECHO "$complete" | $GREP " "` 24976 if test "x$has_space" != x; then 24977 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24978 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24979 fi 24980 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 24981 fi 24982 fi 24983 24984 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24985 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24986 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24987 # "foo.exe" is OK but "foo" is an error. 24988 # 24989 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24990 # It is also a way to make sure we got the proper file name for the real test later on. 24991 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24992 if test "x$test_shortpath" = x; then 24993 # Short path failed, file does not exist as specified. 24994 # Try adding .exe or .cmd 24995 if test -f "${new_path}.exe"; then 24996 input_to_shortpath="${new_path}.exe" 24997 elif test -f "${new_path}.cmd"; then 24998 input_to_shortpath="${new_path}.cmd" 24999 else 25000 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5 25001 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;} 25002 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25003 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25004 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25005 fi 25006 else 25007 input_to_shortpath="$new_path" 25008 fi 25009 25010 # Call helper function which possibly converts this using DOS-style short mode. 25011 # If so, the updated path is stored in $new_path. 25012 new_path="$input_to_shortpath" 25013 25014 input_path="$input_to_shortpath" 25015 # Check if we need to convert this using DOS-style short mode. If the path 25016 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25017 # take no chances and rewrite it. 25018 # Note: m4 eats our [], so we need to use [ and ] instead. 25019 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25020 if test "x$has_forbidden_chars" != x; then 25021 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25022 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25023 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25024 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25025 # Going to short mode and back again did indeed matter. Since short mode is 25026 # case insensitive, let's make it lowercase to improve readability. 25027 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25028 # Now convert it back to Unix-stile (cygpath) 25029 input_path=`$CYGPATH -u "$shortmode_path"` 25030 new_path="$input_path" 25031 fi 25032 fi 25033 25034 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25035 if test "x$test_cygdrive_prefix" = x; then 25036 # As a simple fix, exclude /usr/bin since it's not a real path. 25037 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25038 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25039 # a path prefixed by /cygdrive for fixpath to work. 25040 new_path="$CYGWIN_ROOT_PATH$input_path" 25041 fi 25042 fi 25043 25044 # remove trailing .exe if any 25045 new_path="${new_path/%.exe/}" 25046 25047 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25048 25049 # First separate the path from the arguments. This will split at the first 25050 # space. 25051 complete="$AS" 25052 path="${complete%% *}" 25053 tmp="$complete EOL" 25054 arguments="${tmp#* }" 25055 25056 # Input might be given as Windows format, start by converting to 25057 # unix format. 25058 new_path="$path" 25059 25060 windows_path="$new_path" 25061 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25062 unix_path=`$CYGPATH -u "$windows_path"` 25063 new_path="$unix_path" 25064 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25065 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25066 new_path="$unix_path" 25067 fi 25068 25069 25070 # Now try to locate executable using which 25071 new_path=`$WHICH "$new_path" 2> /dev/null` 25072 25073 if test "x$new_path" = x; then 25074 # Oops. Which didn't find the executable. 25075 # The splitting of arguments from the executable at a space might have been incorrect, 25076 # since paths with space are more likely in Windows. Give it another try with the whole 25077 # argument. 25078 path="$complete" 25079 arguments="EOL" 25080 new_path="$path" 25081 25082 windows_path="$new_path" 25083 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25084 unix_path=`$CYGPATH -u "$windows_path"` 25085 new_path="$unix_path" 25086 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25087 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25088 new_path="$unix_path" 25089 fi 25090 25091 25092 new_path=`$WHICH "$new_path" 2> /dev/null` 25093 25094 if test "x$new_path" = x; then 25095 # It's still not found. Now this is an unrecoverable error. 25096 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25097 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25098 has_space=`$ECHO "$complete" | $GREP " "` 25099 if test "x$has_space" != x; then 25100 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25101 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25102 fi 25103 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25104 fi 25105 fi 25106 25107 # Now new_path has a complete unix path to the binary 25108 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25109 # Keep paths in /bin as-is, but remove trailing .exe if any 25110 new_path="${new_path/%.exe/}" 25111 # Do not save /bin paths to all_fixpath_prefixes! 25112 else 25113 # Not in mixed or Windows style, start by that. 25114 new_path=`cmd //c echo $new_path` 25115 25116 input_path="$new_path" 25117 # Check if we need to convert this using DOS-style short mode. If the path 25118 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25119 # take no chances and rewrite it. 25120 # Note: m4 eats our [], so we need to use [ and ] instead. 25121 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25122 if test "x$has_forbidden_chars" != x; then 25123 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25124 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25125 fi 25126 25127 # Output is in $new_path 25128 25129 windows_path="$new_path" 25130 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25131 unix_path=`$CYGPATH -u "$windows_path"` 25132 new_path="$unix_path" 25133 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25134 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25135 new_path="$unix_path" 25136 fi 25137 25138 # remove trailing .exe if any 25139 new_path="${new_path/%.exe/}" 25140 25141 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25142 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25143 fi 25144 25145 else 25146 # We're on a posix platform. Hooray! :) 25147 # First separate the path from the arguments. This will split at the first 25148 # space. 25149 complete="$AS" 25150 path="${complete%% *}" 25151 tmp="$complete EOL" 25152 arguments="${tmp#* }" 25153 25154 # Cannot rely on the command "which" here since it doesn't always work. 25155 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25156 if test -z "$is_absolute_path"; then 25157 # Path to executable is not absolute. Find it. 25158 IFS_save="$IFS" 25159 IFS=: 25160 for p in $PATH; do 25161 if test -f "$p/$path" && test -x "$p/$path"; then 25162 new_path="$p/$path" 25163 break 25164 fi 25165 done 25166 IFS="$IFS_save" 25167 else 25168 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5 25169 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;} 25170 new_path="$path" 25171 fi 25172 25173 if test "x$new_path" = x; then 25174 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25175 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25176 has_space=`$ECHO "$complete" | $GREP " "` 25177 if test "x$has_space" != x; then 25178 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25179 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25180 fi 25181 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25182 fi 25183 fi 25184 25185 # Now join together the path and the arguments once again 25186 if test "x$arguments" != xEOL; then 25187 new_complete="$new_path ${arguments% *}" 25188 else 25189 new_complete="$new_path" 25190 fi 25191 25192 if test "x$complete" != "x$new_complete"; then 25193 AS="$new_complete" 25194 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5 25195 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;} 25196 fi 25197 25198 else 25199 AS="$CC -c" 25200 fi 25201 25202 25203 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 25204 # Extract the first word of "nm", so it can be a program name with args. 25205 set dummy nm; ac_word=$2 25206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25207 $as_echo_n "checking for $ac_word... " >&6; } 25208 if test "${ac_cv_path_NM+set}" = set; then : 25209 $as_echo_n "(cached) " >&6 25210 else 25211 case $NM in 25212 [\\/]* | ?:[\\/]*) 25213 ac_cv_path_NM="$NM" # Let the user override the test with a path. 25214 ;; 25215 *) 25216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25217 for as_dir in $PATH 25218 do 25219 IFS=$as_save_IFS 25220 test -z "$as_dir" && as_dir=. 25221 for ac_exec_ext in '' $ac_executable_extensions; do 25222 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25223 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" 25224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25225 break 2 25226 fi 25227 done 25228 done 25229 IFS=$as_save_IFS 25230 25231 ;; 25232 esac 25233 fi 25234 NM=$ac_cv_path_NM 25235 if test -n "$NM"; then 25236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 25237 $as_echo "$NM" >&6; } 25238 else 25239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25240 $as_echo "no" >&6; } 25241 fi 25242 25243 25244 25245 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25246 25247 # First separate the path from the arguments. This will split at the first 25248 # space. 25249 complete="$NM" 25250 path="${complete%% *}" 25251 tmp="$complete EOL" 25252 arguments="${tmp#* }" 25253 25254 # Input might be given as Windows format, start by converting to 25255 # unix format. 25256 new_path=`$CYGPATH -u "$path"` 25257 25258 # Now try to locate executable using which 25259 new_path=`$WHICH "$new_path" 2> /dev/null` 25260 # bat and cmd files are not always considered executable in cygwin causing which 25261 # to not find them 25262 if test "x$new_path" = x \ 25263 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25264 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25265 new_path=`$CYGPATH -u "$path"` 25266 fi 25267 if test "x$new_path" = x; then 25268 # Oops. Which didn't find the executable. 25269 # The splitting of arguments from the executable at a space might have been incorrect, 25270 # since paths with space are more likely in Windows. Give it another try with the whole 25271 # argument. 25272 path="$complete" 25273 arguments="EOL" 25274 new_path=`$CYGPATH -u "$path"` 25275 new_path=`$WHICH "$new_path" 2> /dev/null` 25276 # bat and cmd files are not always considered executable in cygwin causing which 25277 # to not find them 25278 if test "x$new_path" = x \ 25279 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25280 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25281 new_path=`$CYGPATH -u "$path"` 25282 fi 25283 if test "x$new_path" = x; then 25284 # It's still not found. Now this is an unrecoverable error. 25285 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25286 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25287 has_space=`$ECHO "$complete" | $GREP " "` 25288 if test "x$has_space" != x; then 25289 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25290 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25291 fi 25292 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25293 fi 25294 fi 25295 25296 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25297 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25298 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25299 # "foo.exe" is OK but "foo" is an error. 25300 # 25301 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25302 # It is also a way to make sure we got the proper file name for the real test later on. 25303 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25304 if test "x$test_shortpath" = x; then 25305 # Short path failed, file does not exist as specified. 25306 # Try adding .exe or .cmd 25307 if test -f "${new_path}.exe"; then 25308 input_to_shortpath="${new_path}.exe" 25309 elif test -f "${new_path}.cmd"; then 25310 input_to_shortpath="${new_path}.cmd" 25311 else 25312 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 25313 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} 25314 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25315 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25316 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25317 fi 25318 else 25319 input_to_shortpath="$new_path" 25320 fi 25321 25322 # Call helper function which possibly converts this using DOS-style short mode. 25323 # If so, the updated path is stored in $new_path. 25324 new_path="$input_to_shortpath" 25325 25326 input_path="$input_to_shortpath" 25327 # Check if we need to convert this using DOS-style short mode. If the path 25328 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25329 # take no chances and rewrite it. 25330 # Note: m4 eats our [], so we need to use [ and ] instead. 25331 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25332 if test "x$has_forbidden_chars" != x; then 25333 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25334 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25335 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25336 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25337 # Going to short mode and back again did indeed matter. Since short mode is 25338 # case insensitive, let's make it lowercase to improve readability. 25339 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25340 # Now convert it back to Unix-stile (cygpath) 25341 input_path=`$CYGPATH -u "$shortmode_path"` 25342 new_path="$input_path" 25343 fi 25344 fi 25345 25346 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25347 if test "x$test_cygdrive_prefix" = x; then 25348 # As a simple fix, exclude /usr/bin since it's not a real path. 25349 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25350 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25351 # a path prefixed by /cygdrive for fixpath to work. 25352 new_path="$CYGWIN_ROOT_PATH$input_path" 25353 fi 25354 fi 25355 25356 # remove trailing .exe if any 25357 new_path="${new_path/%.exe/}" 25358 25359 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25360 25361 # First separate the path from the arguments. This will split at the first 25362 # space. 25363 complete="$NM" 25364 path="${complete%% *}" 25365 tmp="$complete EOL" 25366 arguments="${tmp#* }" 25367 25368 # Input might be given as Windows format, start by converting to 25369 # unix format. 25370 new_path="$path" 25371 25372 windows_path="$new_path" 25373 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25374 unix_path=`$CYGPATH -u "$windows_path"` 25375 new_path="$unix_path" 25376 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25377 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25378 new_path="$unix_path" 25379 fi 25380 25381 25382 # Now try to locate executable using which 25383 new_path=`$WHICH "$new_path" 2> /dev/null` 25384 25385 if test "x$new_path" = x; then 25386 # Oops. Which didn't find the executable. 25387 # The splitting of arguments from the executable at a space might have been incorrect, 25388 # since paths with space are more likely in Windows. Give it another try with the whole 25389 # argument. 25390 path="$complete" 25391 arguments="EOL" 25392 new_path="$path" 25393 25394 windows_path="$new_path" 25395 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25396 unix_path=`$CYGPATH -u "$windows_path"` 25397 new_path="$unix_path" 25398 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25399 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25400 new_path="$unix_path" 25401 fi 25402 25403 25404 new_path=`$WHICH "$new_path" 2> /dev/null` 25405 25406 if test "x$new_path" = x; then 25407 # It's still not found. Now this is an unrecoverable error. 25408 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25409 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25410 has_space=`$ECHO "$complete" | $GREP " "` 25411 if test "x$has_space" != x; then 25412 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25414 fi 25415 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25416 fi 25417 fi 25418 25419 # Now new_path has a complete unix path to the binary 25420 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25421 # Keep paths in /bin as-is, but remove trailing .exe if any 25422 new_path="${new_path/%.exe/}" 25423 # Do not save /bin paths to all_fixpath_prefixes! 25424 else 25425 # Not in mixed or Windows style, start by that. 25426 new_path=`cmd //c echo $new_path` 25427 25428 input_path="$new_path" 25429 # Check if we need to convert this using DOS-style short mode. If the path 25430 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25431 # take no chances and rewrite it. 25432 # Note: m4 eats our [], so we need to use [ and ] instead. 25433 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25434 if test "x$has_forbidden_chars" != x; then 25435 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25436 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25437 fi 25438 25439 # Output is in $new_path 25440 25441 windows_path="$new_path" 25442 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25443 unix_path=`$CYGPATH -u "$windows_path"` 25444 new_path="$unix_path" 25445 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25446 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25447 new_path="$unix_path" 25448 fi 25449 25450 # remove trailing .exe if any 25451 new_path="${new_path/%.exe/}" 25452 25453 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25454 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25455 fi 25456 25457 else 25458 # We're on a posix platform. Hooray! :) 25459 # First separate the path from the arguments. This will split at the first 25460 # space. 25461 complete="$NM" 25462 path="${complete%% *}" 25463 tmp="$complete EOL" 25464 arguments="${tmp#* }" 25465 25466 # Cannot rely on the command "which" here since it doesn't always work. 25467 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25468 if test -z "$is_absolute_path"; then 25469 # Path to executable is not absolute. Find it. 25470 IFS_save="$IFS" 25471 IFS=: 25472 for p in $PATH; do 25473 if test -f "$p/$path" && test -x "$p/$path"; then 25474 new_path="$p/$path" 25475 break 25476 fi 25477 done 25478 IFS="$IFS_save" 25479 else 25480 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 25481 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} 25482 new_path="$path" 25483 fi 25484 25485 if test "x$new_path" = x; then 25486 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25487 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25488 has_space=`$ECHO "$complete" | $GREP " "` 25489 if test "x$has_space" != x; then 25490 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25491 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25492 fi 25493 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25494 fi 25495 fi 25496 25497 # Now join together the path and the arguments once again 25498 if test "x$arguments" != xEOL; then 25499 new_complete="$new_path ${arguments% *}" 25500 else 25501 new_complete="$new_path" 25502 fi 25503 25504 if test "x$complete" != "x$new_complete"; then 25505 NM="$new_complete" 25506 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 25507 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} 25508 fi 25509 25510 # Extract the first word of "gnm", so it can be a program name with args. 25511 set dummy gnm; ac_word=$2 25512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25513 $as_echo_n "checking for $ac_word... " >&6; } 25514 if test "${ac_cv_path_GNM+set}" = set; then : 25515 $as_echo_n "(cached) " >&6 25516 else 25517 case $GNM in 25518 [\\/]* | ?:[\\/]*) 25519 ac_cv_path_GNM="$GNM" # Let the user override the test with a path. 25520 ;; 25521 *) 25522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25523 for as_dir in $PATH 25524 do 25525 IFS=$as_save_IFS 25526 test -z "$as_dir" && as_dir=. 25527 for ac_exec_ext in '' $ac_executable_extensions; do 25528 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25529 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" 25530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25531 break 2 25532 fi 25533 done 25534 done 25535 IFS=$as_save_IFS 25536 25537 ;; 25538 esac 25539 fi 25540 GNM=$ac_cv_path_GNM 25541 if test -n "$GNM"; then 25542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 25543 $as_echo "$GNM" >&6; } 25544 else 25545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25546 $as_echo "no" >&6; } 25547 fi 25548 25549 25550 25551 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25552 25553 # First separate the path from the arguments. This will split at the first 25554 # space. 25555 complete="$GNM" 25556 path="${complete%% *}" 25557 tmp="$complete EOL" 25558 arguments="${tmp#* }" 25559 25560 # Input might be given as Windows format, start by converting to 25561 # unix format. 25562 new_path=`$CYGPATH -u "$path"` 25563 25564 # Now try to locate executable using which 25565 new_path=`$WHICH "$new_path" 2> /dev/null` 25566 # bat and cmd files are not always considered executable in cygwin causing which 25567 # to not find them 25568 if test "x$new_path" = x \ 25569 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25570 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25571 new_path=`$CYGPATH -u "$path"` 25572 fi 25573 if test "x$new_path" = x; then 25574 # Oops. Which didn't find the executable. 25575 # The splitting of arguments from the executable at a space might have been incorrect, 25576 # since paths with space are more likely in Windows. Give it another try with the whole 25577 # argument. 25578 path="$complete" 25579 arguments="EOL" 25580 new_path=`$CYGPATH -u "$path"` 25581 new_path=`$WHICH "$new_path" 2> /dev/null` 25582 # bat and cmd files are not always considered executable in cygwin causing which 25583 # to not find them 25584 if test "x$new_path" = x \ 25585 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25586 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25587 new_path=`$CYGPATH -u "$path"` 25588 fi 25589 if test "x$new_path" = x; then 25590 # It's still not found. Now this is an unrecoverable error. 25591 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 25592 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 25593 has_space=`$ECHO "$complete" | $GREP " "` 25594 if test "x$has_space" != x; then 25595 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25596 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25597 fi 25598 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25599 fi 25600 fi 25601 25602 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25603 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25604 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25605 # "foo.exe" is OK but "foo" is an error. 25606 # 25607 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25608 # It is also a way to make sure we got the proper file name for the real test later on. 25609 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25610 if test "x$test_shortpath" = x; then 25611 # Short path failed, file does not exist as specified. 25612 # Try adding .exe or .cmd 25613 if test -f "${new_path}.exe"; then 25614 input_to_shortpath="${new_path}.exe" 25615 elif test -f "${new_path}.cmd"; then 25616 input_to_shortpath="${new_path}.cmd" 25617 else 25618 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5 25619 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;} 25620 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25621 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25622 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25623 fi 25624 else 25625 input_to_shortpath="$new_path" 25626 fi 25627 25628 # Call helper function which possibly converts this using DOS-style short mode. 25629 # If so, the updated path is stored in $new_path. 25630 new_path="$input_to_shortpath" 25631 25632 input_path="$input_to_shortpath" 25633 # Check if we need to convert this using DOS-style short mode. If the path 25634 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25635 # take no chances and rewrite it. 25636 # Note: m4 eats our [], so we need to use [ and ] instead. 25637 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25638 if test "x$has_forbidden_chars" != x; then 25639 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25640 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25641 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25642 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25643 # Going to short mode and back again did indeed matter. Since short mode is 25644 # case insensitive, let's make it lowercase to improve readability. 25645 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25646 # Now convert it back to Unix-stile (cygpath) 25647 input_path=`$CYGPATH -u "$shortmode_path"` 25648 new_path="$input_path" 25649 fi 25650 fi 25651 25652 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25653 if test "x$test_cygdrive_prefix" = x; then 25654 # As a simple fix, exclude /usr/bin since it's not a real path. 25655 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25656 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25657 # a path prefixed by /cygdrive for fixpath to work. 25658 new_path="$CYGWIN_ROOT_PATH$input_path" 25659 fi 25660 fi 25661 25662 # remove trailing .exe if any 25663 new_path="${new_path/%.exe/}" 25664 25665 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25666 25667 # First separate the path from the arguments. This will split at the first 25668 # space. 25669 complete="$GNM" 25670 path="${complete%% *}" 25671 tmp="$complete EOL" 25672 arguments="${tmp#* }" 25673 25674 # Input might be given as Windows format, start by converting to 25675 # unix format. 25676 new_path="$path" 25677 25678 windows_path="$new_path" 25679 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25680 unix_path=`$CYGPATH -u "$windows_path"` 25681 new_path="$unix_path" 25682 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25683 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25684 new_path="$unix_path" 25685 fi 25686 25687 25688 # Now try to locate executable using which 25689 new_path=`$WHICH "$new_path" 2> /dev/null` 25690 25691 if test "x$new_path" = x; then 25692 # Oops. Which didn't find the executable. 25693 # The splitting of arguments from the executable at a space might have been incorrect, 25694 # since paths with space are more likely in Windows. Give it another try with the whole 25695 # argument. 25696 path="$complete" 25697 arguments="EOL" 25698 new_path="$path" 25699 25700 windows_path="$new_path" 25701 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25702 unix_path=`$CYGPATH -u "$windows_path"` 25703 new_path="$unix_path" 25704 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25705 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25706 new_path="$unix_path" 25707 fi 25708 25709 25710 new_path=`$WHICH "$new_path" 2> /dev/null` 25711 25712 if test "x$new_path" = x; then 25713 # It's still not found. Now this is an unrecoverable error. 25714 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 25715 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 25716 has_space=`$ECHO "$complete" | $GREP " "` 25717 if test "x$has_space" != x; then 25718 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25719 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25720 fi 25721 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25722 fi 25723 fi 25724 25725 # Now new_path has a complete unix path to the binary 25726 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25727 # Keep paths in /bin as-is, but remove trailing .exe if any 25728 new_path="${new_path/%.exe/}" 25729 # Do not save /bin paths to all_fixpath_prefixes! 25730 else 25731 # Not in mixed or Windows style, start by that. 25732 new_path=`cmd //c echo $new_path` 25733 25734 input_path="$new_path" 25735 # Check if we need to convert this using DOS-style short mode. If the path 25736 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25737 # take no chances and rewrite it. 25738 # Note: m4 eats our [], so we need to use [ and ] instead. 25739 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25740 if test "x$has_forbidden_chars" != x; then 25741 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25742 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25743 fi 25744 25745 # Output is in $new_path 25746 25747 windows_path="$new_path" 25748 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25749 unix_path=`$CYGPATH -u "$windows_path"` 25750 new_path="$unix_path" 25751 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25752 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25753 new_path="$unix_path" 25754 fi 25755 25756 # remove trailing .exe if any 25757 new_path="${new_path/%.exe/}" 25758 25759 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25760 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25761 fi 25762 25763 else 25764 # We're on a posix platform. Hooray! :) 25765 # First separate the path from the arguments. This will split at the first 25766 # space. 25767 complete="$GNM" 25768 path="${complete%% *}" 25769 tmp="$complete EOL" 25770 arguments="${tmp#* }" 25771 25772 # Cannot rely on the command "which" here since it doesn't always work. 25773 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25774 if test -z "$is_absolute_path"; then 25775 # Path to executable is not absolute. Find it. 25776 IFS_save="$IFS" 25777 IFS=: 25778 for p in $PATH; do 25779 if test -f "$p/$path" && test -x "$p/$path"; then 25780 new_path="$p/$path" 25781 break 25782 fi 25783 done 25784 IFS="$IFS_save" 25785 else 25786 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5 25787 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;} 25788 new_path="$path" 25789 fi 25790 25791 if test "x$new_path" = x; then 25792 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 25793 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 25794 has_space=`$ECHO "$complete" | $GREP " "` 25795 if test "x$has_space" != x; then 25796 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25797 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25798 fi 25799 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25800 fi 25801 fi 25802 25803 # Now join together the path and the arguments once again 25804 if test "x$arguments" != xEOL; then 25805 new_complete="$new_path ${arguments% *}" 25806 else 25807 new_complete="$new_path" 25808 fi 25809 25810 if test "x$complete" != "x$new_complete"; then 25811 GNM="$new_complete" 25812 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5 25813 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;} 25814 fi 25815 25816 # Extract the first word of "strip", so it can be a program name with args. 25817 set dummy strip; ac_word=$2 25818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25819 $as_echo_n "checking for $ac_word... " >&6; } 25820 if test "${ac_cv_path_STRIP+set}" = set; then : 25821 $as_echo_n "(cached) " >&6 25822 else 25823 case $STRIP in 25824 [\\/]* | ?:[\\/]*) 25825 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. 25826 ;; 25827 *) 25828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25829 for as_dir in $PATH 25830 do 25831 IFS=$as_save_IFS 25832 test -z "$as_dir" && as_dir=. 25833 for ac_exec_ext in '' $ac_executable_extensions; do 25834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25835 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" 25836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25837 break 2 25838 fi 25839 done 25840 done 25841 IFS=$as_save_IFS 25842 25843 ;; 25844 esac 25845 fi 25846 STRIP=$ac_cv_path_STRIP 25847 if test -n "$STRIP"; then 25848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 25849 $as_echo "$STRIP" >&6; } 25850 else 25851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25852 $as_echo "no" >&6; } 25853 fi 25854 25855 25856 25857 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25858 25859 # First separate the path from the arguments. This will split at the first 25860 # space. 25861 complete="$STRIP" 25862 path="${complete%% *}" 25863 tmp="$complete EOL" 25864 arguments="${tmp#* }" 25865 25866 # Input might be given as Windows format, start by converting to 25867 # unix format. 25868 new_path=`$CYGPATH -u "$path"` 25869 25870 # Now try to locate executable using which 25871 new_path=`$WHICH "$new_path" 2> /dev/null` 25872 # bat and cmd files are not always considered executable in cygwin causing which 25873 # to not find them 25874 if test "x$new_path" = x \ 25875 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25876 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25877 new_path=`$CYGPATH -u "$path"` 25878 fi 25879 if test "x$new_path" = x; then 25880 # Oops. Which didn't find the executable. 25881 # The splitting of arguments from the executable at a space might have been incorrect, 25882 # since paths with space are more likely in Windows. Give it another try with the whole 25883 # argument. 25884 path="$complete" 25885 arguments="EOL" 25886 new_path=`$CYGPATH -u "$path"` 25887 new_path=`$WHICH "$new_path" 2> /dev/null` 25888 # bat and cmd files are not always considered executable in cygwin causing which 25889 # to not find them 25890 if test "x$new_path" = x \ 25891 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25892 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25893 new_path=`$CYGPATH -u "$path"` 25894 fi 25895 if test "x$new_path" = x; then 25896 # It's still not found. Now this is an unrecoverable error. 25897 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 25898 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 25899 has_space=`$ECHO "$complete" | $GREP " "` 25900 if test "x$has_space" != x; then 25901 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25902 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25903 fi 25904 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 25905 fi 25906 fi 25907 25908 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25909 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25910 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25911 # "foo.exe" is OK but "foo" is an error. 25912 # 25913 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25914 # It is also a way to make sure we got the proper file name for the real test later on. 25915 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25916 if test "x$test_shortpath" = x; then 25917 # Short path failed, file does not exist as specified. 25918 # Try adding .exe or .cmd 25919 if test -f "${new_path}.exe"; then 25920 input_to_shortpath="${new_path}.exe" 25921 elif test -f "${new_path}.cmd"; then 25922 input_to_shortpath="${new_path}.cmd" 25923 else 25924 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 25925 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} 25926 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25927 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25928 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 25929 fi 25930 else 25931 input_to_shortpath="$new_path" 25932 fi 25933 25934 # Call helper function which possibly converts this using DOS-style short mode. 25935 # If so, the updated path is stored in $new_path. 25936 new_path="$input_to_shortpath" 25937 25938 input_path="$input_to_shortpath" 25939 # Check if we need to convert this using DOS-style short mode. If the path 25940 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25941 # take no chances and rewrite it. 25942 # Note: m4 eats our [], so we need to use [ and ] instead. 25943 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25944 if test "x$has_forbidden_chars" != x; then 25945 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25946 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25947 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25948 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25949 # Going to short mode and back again did indeed matter. Since short mode is 25950 # case insensitive, let's make it lowercase to improve readability. 25951 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25952 # Now convert it back to Unix-stile (cygpath) 25953 input_path=`$CYGPATH -u "$shortmode_path"` 25954 new_path="$input_path" 25955 fi 25956 fi 25957 25958 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25959 if test "x$test_cygdrive_prefix" = x; then 25960 # As a simple fix, exclude /usr/bin since it's not a real path. 25961 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25962 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25963 # a path prefixed by /cygdrive for fixpath to work. 25964 new_path="$CYGWIN_ROOT_PATH$input_path" 25965 fi 25966 fi 25967 25968 # remove trailing .exe if any 25969 new_path="${new_path/%.exe/}" 25970 25971 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25972 25973 # First separate the path from the arguments. This will split at the first 25974 # space. 25975 complete="$STRIP" 25976 path="${complete%% *}" 25977 tmp="$complete EOL" 25978 arguments="${tmp#* }" 25979 25980 # Input might be given as Windows format, start by converting to 25981 # unix format. 25982 new_path="$path" 25983 25984 windows_path="$new_path" 25985 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25986 unix_path=`$CYGPATH -u "$windows_path"` 25987 new_path="$unix_path" 25988 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25989 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25990 new_path="$unix_path" 25991 fi 25992 25993 25994 # Now try to locate executable using which 25995 new_path=`$WHICH "$new_path" 2> /dev/null` 25996 25997 if test "x$new_path" = x; then 25998 # Oops. Which didn't find the executable. 25999 # The splitting of arguments from the executable at a space might have been incorrect, 26000 # since paths with space are more likely in Windows. Give it another try with the whole 26001 # argument. 26002 path="$complete" 26003 arguments="EOL" 26004 new_path="$path" 26005 26006 windows_path="$new_path" 26007 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26008 unix_path=`$CYGPATH -u "$windows_path"` 26009 new_path="$unix_path" 26010 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26011 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26012 new_path="$unix_path" 26013 fi 26014 26015 26016 new_path=`$WHICH "$new_path" 2> /dev/null` 26017 26018 if test "x$new_path" = x; then 26019 # It's still not found. Now this is an unrecoverable error. 26020 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26021 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26022 has_space=`$ECHO "$complete" | $GREP " "` 26023 if test "x$has_space" != x; then 26024 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26025 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26026 fi 26027 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26028 fi 26029 fi 26030 26031 # Now new_path has a complete unix path to the binary 26032 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26033 # Keep paths in /bin as-is, but remove trailing .exe if any 26034 new_path="${new_path/%.exe/}" 26035 # Do not save /bin paths to all_fixpath_prefixes! 26036 else 26037 # Not in mixed or Windows style, start by that. 26038 new_path=`cmd //c echo $new_path` 26039 26040 input_path="$new_path" 26041 # Check if we need to convert this using DOS-style short mode. If the path 26042 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26043 # take no chances and rewrite it. 26044 # Note: m4 eats our [], so we need to use [ and ] instead. 26045 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26046 if test "x$has_forbidden_chars" != x; then 26047 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26048 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26049 fi 26050 26051 # Output is in $new_path 26052 26053 windows_path="$new_path" 26054 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26055 unix_path=`$CYGPATH -u "$windows_path"` 26056 new_path="$unix_path" 26057 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26058 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26059 new_path="$unix_path" 26060 fi 26061 26062 # remove trailing .exe if any 26063 new_path="${new_path/%.exe/}" 26064 26065 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26066 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26067 fi 26068 26069 else 26070 # We're on a posix platform. Hooray! :) 26071 # First separate the path from the arguments. This will split at the first 26072 # space. 26073 complete="$STRIP" 26074 path="${complete%% *}" 26075 tmp="$complete EOL" 26076 arguments="${tmp#* }" 26077 26078 # Cannot rely on the command "which" here since it doesn't always work. 26079 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26080 if test -z "$is_absolute_path"; then 26081 # Path to executable is not absolute. Find it. 26082 IFS_save="$IFS" 26083 IFS=: 26084 for p in $PATH; do 26085 if test -f "$p/$path" && test -x "$p/$path"; then 26086 new_path="$p/$path" 26087 break 26088 fi 26089 done 26090 IFS="$IFS_save" 26091 else 26092 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 26093 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} 26094 new_path="$path" 26095 fi 26096 26097 if test "x$new_path" = x; then 26098 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26099 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26100 has_space=`$ECHO "$complete" | $GREP " "` 26101 if test "x$has_space" != x; then 26102 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26103 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26104 fi 26105 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26106 fi 26107 fi 26108 26109 # Now join together the path and the arguments once again 26110 if test "x$arguments" != xEOL; then 26111 new_complete="$new_path ${arguments% *}" 26112 else 26113 new_complete="$new_path" 26114 fi 26115 26116 if test "x$complete" != "x$new_complete"; then 26117 STRIP="$new_complete" 26118 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 26119 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} 26120 fi 26121 26122 # Extract the first word of "mcs", so it can be a program name with args. 26123 set dummy mcs; ac_word=$2 26124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26125 $as_echo_n "checking for $ac_word... " >&6; } 26126 if test "${ac_cv_path_MCS+set}" = set; then : 26127 $as_echo_n "(cached) " >&6 26128 else 26129 case $MCS in 26130 [\\/]* | ?:[\\/]*) 26131 ac_cv_path_MCS="$MCS" # Let the user override the test with a path. 26132 ;; 26133 *) 26134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26135 for as_dir in $PATH 26136 do 26137 IFS=$as_save_IFS 26138 test -z "$as_dir" && as_dir=. 26139 for ac_exec_ext in '' $ac_executable_extensions; do 26140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26141 ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" 26142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26143 break 2 26144 fi 26145 done 26146 done 26147 IFS=$as_save_IFS 26148 26149 ;; 26150 esac 26151 fi 26152 MCS=$ac_cv_path_MCS 26153 if test -n "$MCS"; then 26154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 26155 $as_echo "$MCS" >&6; } 26156 else 26157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26158 $as_echo "no" >&6; } 26159 fi 26160 26161 26162 26163 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26164 26165 # First separate the path from the arguments. This will split at the first 26166 # space. 26167 complete="$MCS" 26168 path="${complete%% *}" 26169 tmp="$complete EOL" 26170 arguments="${tmp#* }" 26171 26172 # Input might be given as Windows format, start by converting to 26173 # unix format. 26174 new_path=`$CYGPATH -u "$path"` 26175 26176 # Now try to locate executable using which 26177 new_path=`$WHICH "$new_path" 2> /dev/null` 26178 # bat and cmd files are not always considered executable in cygwin causing which 26179 # to not find them 26180 if test "x$new_path" = x \ 26181 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26182 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26183 new_path=`$CYGPATH -u "$path"` 26184 fi 26185 if test "x$new_path" = x; then 26186 # Oops. Which didn't find the executable. 26187 # The splitting of arguments from the executable at a space might have been incorrect, 26188 # since paths with space are more likely in Windows. Give it another try with the whole 26189 # argument. 26190 path="$complete" 26191 arguments="EOL" 26192 new_path=`$CYGPATH -u "$path"` 26193 new_path=`$WHICH "$new_path" 2> /dev/null` 26194 # bat and cmd files are not always considered executable in cygwin causing which 26195 # to not find them 26196 if test "x$new_path" = x \ 26197 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26198 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26199 new_path=`$CYGPATH -u "$path"` 26200 fi 26201 if test "x$new_path" = x; then 26202 # It's still not found. Now this is an unrecoverable error. 26203 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26204 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26205 has_space=`$ECHO "$complete" | $GREP " "` 26206 if test "x$has_space" != x; then 26207 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26209 fi 26210 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26211 fi 26212 fi 26213 26214 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26215 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26216 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26217 # "foo.exe" is OK but "foo" is an error. 26218 # 26219 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26220 # It is also a way to make sure we got the proper file name for the real test later on. 26221 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26222 if test "x$test_shortpath" = x; then 26223 # Short path failed, file does not exist as specified. 26224 # Try adding .exe or .cmd 26225 if test -f "${new_path}.exe"; then 26226 input_to_shortpath="${new_path}.exe" 26227 elif test -f "${new_path}.cmd"; then 26228 input_to_shortpath="${new_path}.cmd" 26229 else 26230 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5 26231 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;} 26232 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26233 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26234 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26235 fi 26236 else 26237 input_to_shortpath="$new_path" 26238 fi 26239 26240 # Call helper function which possibly converts this using DOS-style short mode. 26241 # If so, the updated path is stored in $new_path. 26242 new_path="$input_to_shortpath" 26243 26244 input_path="$input_to_shortpath" 26245 # Check if we need to convert this using DOS-style short mode. If the path 26246 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26247 # take no chances and rewrite it. 26248 # Note: m4 eats our [], so we need to use [ and ] instead. 26249 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26250 if test "x$has_forbidden_chars" != x; then 26251 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26252 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26253 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26254 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26255 # Going to short mode and back again did indeed matter. Since short mode is 26256 # case insensitive, let's make it lowercase to improve readability. 26257 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26258 # Now convert it back to Unix-stile (cygpath) 26259 input_path=`$CYGPATH -u "$shortmode_path"` 26260 new_path="$input_path" 26261 fi 26262 fi 26263 26264 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26265 if test "x$test_cygdrive_prefix" = x; then 26266 # As a simple fix, exclude /usr/bin since it's not a real path. 26267 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26268 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26269 # a path prefixed by /cygdrive for fixpath to work. 26270 new_path="$CYGWIN_ROOT_PATH$input_path" 26271 fi 26272 fi 26273 26274 # remove trailing .exe if any 26275 new_path="${new_path/%.exe/}" 26276 26277 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26278 26279 # First separate the path from the arguments. This will split at the first 26280 # space. 26281 complete="$MCS" 26282 path="${complete%% *}" 26283 tmp="$complete EOL" 26284 arguments="${tmp#* }" 26285 26286 # Input might be given as Windows format, start by converting to 26287 # unix format. 26288 new_path="$path" 26289 26290 windows_path="$new_path" 26291 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26292 unix_path=`$CYGPATH -u "$windows_path"` 26293 new_path="$unix_path" 26294 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26295 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26296 new_path="$unix_path" 26297 fi 26298 26299 26300 # Now try to locate executable using which 26301 new_path=`$WHICH "$new_path" 2> /dev/null` 26302 26303 if test "x$new_path" = x; then 26304 # Oops. Which didn't find the executable. 26305 # The splitting of arguments from the executable at a space might have been incorrect, 26306 # since paths with space are more likely in Windows. Give it another try with the whole 26307 # argument. 26308 path="$complete" 26309 arguments="EOL" 26310 new_path="$path" 26311 26312 windows_path="$new_path" 26313 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26314 unix_path=`$CYGPATH -u "$windows_path"` 26315 new_path="$unix_path" 26316 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26317 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26318 new_path="$unix_path" 26319 fi 26320 26321 26322 new_path=`$WHICH "$new_path" 2> /dev/null` 26323 26324 if test "x$new_path" = x; then 26325 # It's still not found. Now this is an unrecoverable error. 26326 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26327 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26328 has_space=`$ECHO "$complete" | $GREP " "` 26329 if test "x$has_space" != x; then 26330 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26331 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26332 fi 26333 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26334 fi 26335 fi 26336 26337 # Now new_path has a complete unix path to the binary 26338 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26339 # Keep paths in /bin as-is, but remove trailing .exe if any 26340 new_path="${new_path/%.exe/}" 26341 # Do not save /bin paths to all_fixpath_prefixes! 26342 else 26343 # Not in mixed or Windows style, start by that. 26344 new_path=`cmd //c echo $new_path` 26345 26346 input_path="$new_path" 26347 # Check if we need to convert this using DOS-style short mode. If the path 26348 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26349 # take no chances and rewrite it. 26350 # Note: m4 eats our [], so we need to use [ and ] instead. 26351 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26352 if test "x$has_forbidden_chars" != x; then 26353 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26354 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26355 fi 26356 26357 # Output is in $new_path 26358 26359 windows_path="$new_path" 26360 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26361 unix_path=`$CYGPATH -u "$windows_path"` 26362 new_path="$unix_path" 26363 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26364 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26365 new_path="$unix_path" 26366 fi 26367 26368 # remove trailing .exe if any 26369 new_path="${new_path/%.exe/}" 26370 26371 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26372 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26373 fi 26374 26375 else 26376 # We're on a posix platform. Hooray! :) 26377 # First separate the path from the arguments. This will split at the first 26378 # space. 26379 complete="$MCS" 26380 path="${complete%% *}" 26381 tmp="$complete EOL" 26382 arguments="${tmp#* }" 26383 26384 # Cannot rely on the command "which" here since it doesn't always work. 26385 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26386 if test -z "$is_absolute_path"; then 26387 # Path to executable is not absolute. Find it. 26388 IFS_save="$IFS" 26389 IFS=: 26390 for p in $PATH; do 26391 if test -f "$p/$path" && test -x "$p/$path"; then 26392 new_path="$p/$path" 26393 break 26394 fi 26395 done 26396 IFS="$IFS_save" 26397 else 26398 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5 26399 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;} 26400 new_path="$path" 26401 fi 26402 26403 if test "x$new_path" = x; then 26404 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26405 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26406 has_space=`$ECHO "$complete" | $GREP " "` 26407 if test "x$has_space" != x; then 26408 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26409 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26410 fi 26411 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26412 fi 26413 fi 26414 26415 # Now join together the path and the arguments once again 26416 if test "x$arguments" != xEOL; then 26417 new_complete="$new_path ${arguments% *}" 26418 else 26419 new_complete="$new_path" 26420 fi 26421 26422 if test "x$complete" != "x$new_complete"; then 26423 MCS="$new_complete" 26424 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5 26425 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;} 26426 fi 26427 26428 elif test "x$OPENJDK_TARGET_OS" != xwindows; then 26429 if test -n "$ac_tool_prefix"; then 26430 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. 26431 set dummy ${ac_tool_prefix}nm; ac_word=$2 26432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26433 $as_echo_n "checking for $ac_word... " >&6; } 26434 if test "${ac_cv_prog_NM+set}" = set; then : 26435 $as_echo_n "(cached) " >&6 26436 else 26437 if test -n "$NM"; then 26438 ac_cv_prog_NM="$NM" # Let the user override the test. 26439 else 26440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26441 for as_dir in $PATH 26442 do 26443 IFS=$as_save_IFS 26444 test -z "$as_dir" && as_dir=. 26445 for ac_exec_ext in '' $ac_executable_extensions; do 26446 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26447 ac_cv_prog_NM="${ac_tool_prefix}nm" 26448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26449 break 2 26450 fi 26451 done 26452 done 26453 IFS=$as_save_IFS 26454 26455 fi 26456 fi 26457 NM=$ac_cv_prog_NM 26458 if test -n "$NM"; then 26459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 26460 $as_echo "$NM" >&6; } 26461 else 26462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26463 $as_echo "no" >&6; } 26464 fi 26465 26466 26467 fi 26468 if test -z "$ac_cv_prog_NM"; then 26469 ac_ct_NM=$NM 26470 # Extract the first word of "nm", so it can be a program name with args. 26471 set dummy nm; ac_word=$2 26472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26473 $as_echo_n "checking for $ac_word... " >&6; } 26474 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then : 26475 $as_echo_n "(cached) " >&6 26476 else 26477 if test -n "$ac_ct_NM"; then 26478 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. 26479 else 26480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26481 for as_dir in $PATH 26482 do 26483 IFS=$as_save_IFS 26484 test -z "$as_dir" && as_dir=. 26485 for ac_exec_ext in '' $ac_executable_extensions; do 26486 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26487 ac_cv_prog_ac_ct_NM="nm" 26488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26489 break 2 26490 fi 26491 done 26492 done 26493 IFS=$as_save_IFS 26494 26495 fi 26496 fi 26497 ac_ct_NM=$ac_cv_prog_ac_ct_NM 26498 if test -n "$ac_ct_NM"; then 26499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 26500 $as_echo "$ac_ct_NM" >&6; } 26501 else 26502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26503 $as_echo "no" >&6; } 26504 fi 26505 26506 if test "x$ac_ct_NM" = x; then 26507 NM="" 26508 else 26509 case $cross_compiling:$ac_tool_warned in 26510 yes:) 26511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 26512 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 26513 ac_tool_warned=yes ;; 26514 esac 26515 NM=$ac_ct_NM 26516 fi 26517 else 26518 NM="$ac_cv_prog_NM" 26519 fi 26520 26521 26522 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26523 26524 # First separate the path from the arguments. This will split at the first 26525 # space. 26526 complete="$NM" 26527 path="${complete%% *}" 26528 tmp="$complete EOL" 26529 arguments="${tmp#* }" 26530 26531 # Input might be given as Windows format, start by converting to 26532 # unix format. 26533 new_path=`$CYGPATH -u "$path"` 26534 26535 # Now try to locate executable using which 26536 new_path=`$WHICH "$new_path" 2> /dev/null` 26537 # bat and cmd files are not always considered executable in cygwin causing which 26538 # to not find them 26539 if test "x$new_path" = x \ 26540 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26541 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26542 new_path=`$CYGPATH -u "$path"` 26543 fi 26544 if test "x$new_path" = x; then 26545 # Oops. Which didn't find the executable. 26546 # The splitting of arguments from the executable at a space might have been incorrect, 26547 # since paths with space are more likely in Windows. Give it another try with the whole 26548 # argument. 26549 path="$complete" 26550 arguments="EOL" 26551 new_path=`$CYGPATH -u "$path"` 26552 new_path=`$WHICH "$new_path" 2> /dev/null` 26553 # bat and cmd files are not always considered executable in cygwin causing which 26554 # to not find them 26555 if test "x$new_path" = x \ 26556 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26557 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26558 new_path=`$CYGPATH -u "$path"` 26559 fi 26560 if test "x$new_path" = x; then 26561 # It's still not found. Now this is an unrecoverable error. 26562 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 26563 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 26564 has_space=`$ECHO "$complete" | $GREP " "` 26565 if test "x$has_space" != x; then 26566 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26567 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26568 fi 26569 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26570 fi 26571 fi 26572 26573 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26574 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26575 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26576 # "foo.exe" is OK but "foo" is an error. 26577 # 26578 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26579 # It is also a way to make sure we got the proper file name for the real test later on. 26580 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26581 if test "x$test_shortpath" = x; then 26582 # Short path failed, file does not exist as specified. 26583 # Try adding .exe or .cmd 26584 if test -f "${new_path}.exe"; then 26585 input_to_shortpath="${new_path}.exe" 26586 elif test -f "${new_path}.cmd"; then 26587 input_to_shortpath="${new_path}.cmd" 26588 else 26589 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 26590 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} 26591 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26592 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26593 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26594 fi 26595 else 26596 input_to_shortpath="$new_path" 26597 fi 26598 26599 # Call helper function which possibly converts this using DOS-style short mode. 26600 # If so, the updated path is stored in $new_path. 26601 new_path="$input_to_shortpath" 26602 26603 input_path="$input_to_shortpath" 26604 # Check if we need to convert this using DOS-style short mode. If the path 26605 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26606 # take no chances and rewrite it. 26607 # Note: m4 eats our [], so we need to use [ and ] instead. 26608 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26609 if test "x$has_forbidden_chars" != x; then 26610 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26611 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26612 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26613 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26614 # Going to short mode and back again did indeed matter. Since short mode is 26615 # case insensitive, let's make it lowercase to improve readability. 26616 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26617 # Now convert it back to Unix-stile (cygpath) 26618 input_path=`$CYGPATH -u "$shortmode_path"` 26619 new_path="$input_path" 26620 fi 26621 fi 26622 26623 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26624 if test "x$test_cygdrive_prefix" = x; then 26625 # As a simple fix, exclude /usr/bin since it's not a real path. 26626 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26627 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26628 # a path prefixed by /cygdrive for fixpath to work. 26629 new_path="$CYGWIN_ROOT_PATH$input_path" 26630 fi 26631 fi 26632 26633 # remove trailing .exe if any 26634 new_path="${new_path/%.exe/}" 26635 26636 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26637 26638 # First separate the path from the arguments. This will split at the first 26639 # space. 26640 complete="$NM" 26641 path="${complete%% *}" 26642 tmp="$complete EOL" 26643 arguments="${tmp#* }" 26644 26645 # Input might be given as Windows format, start by converting to 26646 # unix format. 26647 new_path="$path" 26648 26649 windows_path="$new_path" 26650 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26651 unix_path=`$CYGPATH -u "$windows_path"` 26652 new_path="$unix_path" 26653 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26654 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26655 new_path="$unix_path" 26656 fi 26657 26658 26659 # Now try to locate executable using which 26660 new_path=`$WHICH "$new_path" 2> /dev/null` 26661 26662 if test "x$new_path" = x; then 26663 # Oops. Which didn't find the executable. 26664 # The splitting of arguments from the executable at a space might have been incorrect, 26665 # since paths with space are more likely in Windows. Give it another try with the whole 26666 # argument. 26667 path="$complete" 26668 arguments="EOL" 26669 new_path="$path" 26670 26671 windows_path="$new_path" 26672 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26673 unix_path=`$CYGPATH -u "$windows_path"` 26674 new_path="$unix_path" 26675 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26676 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26677 new_path="$unix_path" 26678 fi 26679 26680 26681 new_path=`$WHICH "$new_path" 2> /dev/null` 26682 26683 if test "x$new_path" = x; then 26684 # It's still not found. Now this is an unrecoverable error. 26685 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 26686 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 26687 has_space=`$ECHO "$complete" | $GREP " "` 26688 if test "x$has_space" != x; then 26689 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26690 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26691 fi 26692 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26693 fi 26694 fi 26695 26696 # Now new_path has a complete unix path to the binary 26697 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26698 # Keep paths in /bin as-is, but remove trailing .exe if any 26699 new_path="${new_path/%.exe/}" 26700 # Do not save /bin paths to all_fixpath_prefixes! 26701 else 26702 # Not in mixed or Windows style, start by that. 26703 new_path=`cmd //c echo $new_path` 26704 26705 input_path="$new_path" 26706 # Check if we need to convert this using DOS-style short mode. If the path 26707 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26708 # take no chances and rewrite it. 26709 # Note: m4 eats our [], so we need to use [ and ] instead. 26710 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26711 if test "x$has_forbidden_chars" != x; then 26712 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26713 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26714 fi 26715 26716 # Output is in $new_path 26717 26718 windows_path="$new_path" 26719 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26720 unix_path=`$CYGPATH -u "$windows_path"` 26721 new_path="$unix_path" 26722 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26723 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26724 new_path="$unix_path" 26725 fi 26726 26727 # remove trailing .exe if any 26728 new_path="${new_path/%.exe/}" 26729 26730 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26731 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26732 fi 26733 26734 else 26735 # We're on a posix platform. Hooray! :) 26736 # First separate the path from the arguments. This will split at the first 26737 # space. 26738 complete="$NM" 26739 path="${complete%% *}" 26740 tmp="$complete EOL" 26741 arguments="${tmp#* }" 26742 26743 # Cannot rely on the command "which" here since it doesn't always work. 26744 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26745 if test -z "$is_absolute_path"; then 26746 # Path to executable is not absolute. Find it. 26747 IFS_save="$IFS" 26748 IFS=: 26749 for p in $PATH; do 26750 if test -f "$p/$path" && test -x "$p/$path"; then 26751 new_path="$p/$path" 26752 break 26753 fi 26754 done 26755 IFS="$IFS_save" 26756 else 26757 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 26758 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} 26759 new_path="$path" 26760 fi 26761 26762 if test "x$new_path" = x; then 26763 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 26764 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 26765 has_space=`$ECHO "$complete" | $GREP " "` 26766 if test "x$has_space" != x; then 26767 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26768 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26769 fi 26770 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26771 fi 26772 fi 26773 26774 # Now join together the path and the arguments once again 26775 if test "x$arguments" != xEOL; then 26776 new_complete="$new_path ${arguments% *}" 26777 else 26778 new_complete="$new_path" 26779 fi 26780 26781 if test "x$complete" != "x$new_complete"; then 26782 NM="$new_complete" 26783 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 26784 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} 26785 fi 26786 26787 GNM="$NM" 26788 26789 if test -n "$ac_tool_prefix"; then 26790 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 26791 set dummy ${ac_tool_prefix}strip; ac_word=$2 26792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26793 $as_echo_n "checking for $ac_word... " >&6; } 26794 if test "${ac_cv_prog_STRIP+set}" = set; then : 26795 $as_echo_n "(cached) " >&6 26796 else 26797 if test -n "$STRIP"; then 26798 ac_cv_prog_STRIP="$STRIP" # Let the user override the test. 26799 else 26800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26801 for as_dir in $PATH 26802 do 26803 IFS=$as_save_IFS 26804 test -z "$as_dir" && as_dir=. 26805 for ac_exec_ext in '' $ac_executable_extensions; do 26806 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26807 ac_cv_prog_STRIP="${ac_tool_prefix}strip" 26808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26809 break 2 26810 fi 26811 done 26812 done 26813 IFS=$as_save_IFS 26814 26815 fi 26816 fi 26817 STRIP=$ac_cv_prog_STRIP 26818 if test -n "$STRIP"; then 26819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 26820 $as_echo "$STRIP" >&6; } 26821 else 26822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26823 $as_echo "no" >&6; } 26824 fi 26825 26826 26827 fi 26828 if test -z "$ac_cv_prog_STRIP"; then 26829 ac_ct_STRIP=$STRIP 26830 # Extract the first word of "strip", so it can be a program name with args. 26831 set dummy strip; ac_word=$2 26832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26833 $as_echo_n "checking for $ac_word... " >&6; } 26834 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : 26835 $as_echo_n "(cached) " >&6 26836 else 26837 if test -n "$ac_ct_STRIP"; then 26838 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. 26839 else 26840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26841 for as_dir in $PATH 26842 do 26843 IFS=$as_save_IFS 26844 test -z "$as_dir" && as_dir=. 26845 for ac_exec_ext in '' $ac_executable_extensions; do 26846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26847 ac_cv_prog_ac_ct_STRIP="strip" 26848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26849 break 2 26850 fi 26851 done 26852 done 26853 IFS=$as_save_IFS 26854 26855 fi 26856 fi 26857 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP 26858 if test -n "$ac_ct_STRIP"; then 26859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 26860 $as_echo "$ac_ct_STRIP" >&6; } 26861 else 26862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26863 $as_echo "no" >&6; } 26864 fi 26865 26866 if test "x$ac_ct_STRIP" = x; then 26867 STRIP="" 26868 else 26869 case $cross_compiling:$ac_tool_warned in 26870 yes:) 26871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 26872 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 26873 ac_tool_warned=yes ;; 26874 esac 26875 STRIP=$ac_ct_STRIP 26876 fi 26877 else 26878 STRIP="$ac_cv_prog_STRIP" 26879 fi 26880 26881 26882 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26883 26884 # First separate the path from the arguments. This will split at the first 26885 # space. 26886 complete="$STRIP" 26887 path="${complete%% *}" 26888 tmp="$complete EOL" 26889 arguments="${tmp#* }" 26890 26891 # Input might be given as Windows format, start by converting to 26892 # unix format. 26893 new_path=`$CYGPATH -u "$path"` 26894 26895 # Now try to locate executable using which 26896 new_path=`$WHICH "$new_path" 2> /dev/null` 26897 # bat and cmd files are not always considered executable in cygwin causing which 26898 # to not find them 26899 if test "x$new_path" = x \ 26900 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26901 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26902 new_path=`$CYGPATH -u "$path"` 26903 fi 26904 if test "x$new_path" = x; then 26905 # Oops. Which didn't find the executable. 26906 # The splitting of arguments from the executable at a space might have been incorrect, 26907 # since paths with space are more likely in Windows. Give it another try with the whole 26908 # argument. 26909 path="$complete" 26910 arguments="EOL" 26911 new_path=`$CYGPATH -u "$path"` 26912 new_path=`$WHICH "$new_path" 2> /dev/null` 26913 # bat and cmd files are not always considered executable in cygwin causing which 26914 # to not find them 26915 if test "x$new_path" = x \ 26916 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26917 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26918 new_path=`$CYGPATH -u "$path"` 26919 fi 26920 if test "x$new_path" = x; then 26921 # It's still not found. Now this is an unrecoverable error. 26922 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26923 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26924 has_space=`$ECHO "$complete" | $GREP " "` 26925 if test "x$has_space" != x; then 26926 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26927 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26928 fi 26929 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26930 fi 26931 fi 26932 26933 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26934 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26935 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26936 # "foo.exe" is OK but "foo" is an error. 26937 # 26938 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26939 # It is also a way to make sure we got the proper file name for the real test later on. 26940 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26941 if test "x$test_shortpath" = x; then 26942 # Short path failed, file does not exist as specified. 26943 # Try adding .exe or .cmd 26944 if test -f "${new_path}.exe"; then 26945 input_to_shortpath="${new_path}.exe" 26946 elif test -f "${new_path}.cmd"; then 26947 input_to_shortpath="${new_path}.cmd" 26948 else 26949 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 26950 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} 26951 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26952 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26953 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26954 fi 26955 else 26956 input_to_shortpath="$new_path" 26957 fi 26958 26959 # Call helper function which possibly converts this using DOS-style short mode. 26960 # If so, the updated path is stored in $new_path. 26961 new_path="$input_to_shortpath" 26962 26963 input_path="$input_to_shortpath" 26964 # Check if we need to convert this using DOS-style short mode. If the path 26965 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26966 # take no chances and rewrite it. 26967 # Note: m4 eats our [], so we need to use [ and ] instead. 26968 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26969 if test "x$has_forbidden_chars" != x; then 26970 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26971 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26972 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26973 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26974 # Going to short mode and back again did indeed matter. Since short mode is 26975 # case insensitive, let's make it lowercase to improve readability. 26976 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26977 # Now convert it back to Unix-stile (cygpath) 26978 input_path=`$CYGPATH -u "$shortmode_path"` 26979 new_path="$input_path" 26980 fi 26981 fi 26982 26983 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26984 if test "x$test_cygdrive_prefix" = x; then 26985 # As a simple fix, exclude /usr/bin since it's not a real path. 26986 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26987 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26988 # a path prefixed by /cygdrive for fixpath to work. 26989 new_path="$CYGWIN_ROOT_PATH$input_path" 26990 fi 26991 fi 26992 26993 # remove trailing .exe if any 26994 new_path="${new_path/%.exe/}" 26995 26996 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26997 26998 # First separate the path from the arguments. This will split at the first 26999 # space. 27000 complete="$STRIP" 27001 path="${complete%% *}" 27002 tmp="$complete EOL" 27003 arguments="${tmp#* }" 27004 27005 # Input might be given as Windows format, start by converting to 27006 # unix format. 27007 new_path="$path" 27008 27009 windows_path="$new_path" 27010 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27011 unix_path=`$CYGPATH -u "$windows_path"` 27012 new_path="$unix_path" 27013 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27014 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27015 new_path="$unix_path" 27016 fi 27017 27018 27019 # Now try to locate executable using which 27020 new_path=`$WHICH "$new_path" 2> /dev/null` 27021 27022 if test "x$new_path" = x; then 27023 # Oops. Which didn't find the executable. 27024 # The splitting of arguments from the executable at a space might have been incorrect, 27025 # since paths with space are more likely in Windows. Give it another try with the whole 27026 # argument. 27027 path="$complete" 27028 arguments="EOL" 27029 new_path="$path" 27030 27031 windows_path="$new_path" 27032 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27033 unix_path=`$CYGPATH -u "$windows_path"` 27034 new_path="$unix_path" 27035 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27036 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27037 new_path="$unix_path" 27038 fi 27039 27040 27041 new_path=`$WHICH "$new_path" 2> /dev/null` 27042 27043 if test "x$new_path" = x; then 27044 # It's still not found. Now this is an unrecoverable error. 27045 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27046 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27047 has_space=`$ECHO "$complete" | $GREP " "` 27048 if test "x$has_space" != x; then 27049 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27050 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27051 fi 27052 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27053 fi 27054 fi 27055 27056 # Now new_path has a complete unix path to the binary 27057 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27058 # Keep paths in /bin as-is, but remove trailing .exe if any 27059 new_path="${new_path/%.exe/}" 27060 # Do not save /bin paths to all_fixpath_prefixes! 27061 else 27062 # Not in mixed or Windows style, start by that. 27063 new_path=`cmd //c echo $new_path` 27064 27065 input_path="$new_path" 27066 # Check if we need to convert this using DOS-style short mode. If the path 27067 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27068 # take no chances and rewrite it. 27069 # Note: m4 eats our [], so we need to use [ and ] instead. 27070 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27071 if test "x$has_forbidden_chars" != x; then 27072 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27073 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27074 fi 27075 27076 # Output is in $new_path 27077 27078 windows_path="$new_path" 27079 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27080 unix_path=`$CYGPATH -u "$windows_path"` 27081 new_path="$unix_path" 27082 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27083 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27084 new_path="$unix_path" 27085 fi 27086 27087 # remove trailing .exe if any 27088 new_path="${new_path/%.exe/}" 27089 27090 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27091 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27092 fi 27093 27094 else 27095 # We're on a posix platform. Hooray! :) 27096 # First separate the path from the arguments. This will split at the first 27097 # space. 27098 complete="$STRIP" 27099 path="${complete%% *}" 27100 tmp="$complete EOL" 27101 arguments="${tmp#* }" 27102 27103 # Cannot rely on the command "which" here since it doesn't always work. 27104 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27105 if test -z "$is_absolute_path"; then 27106 # Path to executable is not absolute. Find it. 27107 IFS_save="$IFS" 27108 IFS=: 27109 for p in $PATH; do 27110 if test -f "$p/$path" && test -x "$p/$path"; then 27111 new_path="$p/$path" 27112 break 27113 fi 27114 done 27115 IFS="$IFS_save" 27116 else 27117 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 27118 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} 27119 new_path="$path" 27120 fi 27121 27122 if test "x$new_path" = x; then 27123 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27124 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27125 has_space=`$ECHO "$complete" | $GREP " "` 27126 if test "x$has_space" != x; then 27127 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27128 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27129 fi 27130 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27131 fi 27132 fi 27133 27134 # Now join together the path and the arguments once again 27135 if test "x$arguments" != xEOL; then 27136 new_complete="$new_path ${arguments% *}" 27137 else 27138 new_complete="$new_path" 27139 fi 27140 27141 if test "x$complete" != "x$new_complete"; then 27142 STRIP="$new_complete" 27143 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 27144 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} 27145 fi 27146 27147 fi 27148 27149 # objcopy is used for moving debug symbols to separate files when 27150 # full debug symbols are enabled. 27151 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then 27152 if test -n "$ac_tool_prefix"; then 27153 for ac_prog in gobjcopy objcopy 27154 do 27155 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 27156 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 27157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27158 $as_echo_n "checking for $ac_word... " >&6; } 27159 if test "${ac_cv_prog_OBJCOPY+set}" = set; then : 27160 $as_echo_n "(cached) " >&6 27161 else 27162 if test -n "$OBJCOPY"; then 27163 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. 27164 else 27165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27166 for as_dir in $PATH 27167 do 27168 IFS=$as_save_IFS 27169 test -z "$as_dir" && as_dir=. 27170 for ac_exec_ext in '' $ac_executable_extensions; do 27171 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27172 ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" 27173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27174 break 2 27175 fi 27176 done 27177 done 27178 IFS=$as_save_IFS 27179 27180 fi 27181 fi 27182 OBJCOPY=$ac_cv_prog_OBJCOPY 27183 if test -n "$OBJCOPY"; then 27184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 27185 $as_echo "$OBJCOPY" >&6; } 27186 else 27187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27188 $as_echo "no" >&6; } 27189 fi 27190 27191 27192 test -n "$OBJCOPY" && break 27193 done 27194 fi 27195 if test -z "$OBJCOPY"; then 27196 ac_ct_OBJCOPY=$OBJCOPY 27197 for ac_prog in gobjcopy objcopy 27198 do 27199 # Extract the first word of "$ac_prog", so it can be a program name with args. 27200 set dummy $ac_prog; ac_word=$2 27201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27202 $as_echo_n "checking for $ac_word... " >&6; } 27203 if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then : 27204 $as_echo_n "(cached) " >&6 27205 else 27206 if test -n "$ac_ct_OBJCOPY"; then 27207 ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. 27208 else 27209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27210 for as_dir in $PATH 27211 do 27212 IFS=$as_save_IFS 27213 test -z "$as_dir" && as_dir=. 27214 for ac_exec_ext in '' $ac_executable_extensions; do 27215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27216 ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" 27217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27218 break 2 27219 fi 27220 done 27221 done 27222 IFS=$as_save_IFS 27223 27224 fi 27225 fi 27226 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY 27227 if test -n "$ac_ct_OBJCOPY"; then 27228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 27229 $as_echo "$ac_ct_OBJCOPY" >&6; } 27230 else 27231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27232 $as_echo "no" >&6; } 27233 fi 27234 27235 27236 test -n "$ac_ct_OBJCOPY" && break 27237 done 27238 27239 if test "x$ac_ct_OBJCOPY" = x; then 27240 OBJCOPY="" 27241 else 27242 case $cross_compiling:$ac_tool_warned in 27243 yes:) 27244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27245 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27246 ac_tool_warned=yes ;; 27247 esac 27248 OBJCOPY=$ac_ct_OBJCOPY 27249 fi 27250 fi 27251 27252 # Only call fixup if objcopy was found. 27253 if test -n "$OBJCOPY"; then 27254 27255 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27256 27257 # First separate the path from the arguments. This will split at the first 27258 # space. 27259 complete="$OBJCOPY" 27260 path="${complete%% *}" 27261 tmp="$complete EOL" 27262 arguments="${tmp#* }" 27263 27264 # Input might be given as Windows format, start by converting to 27265 # unix format. 27266 new_path=`$CYGPATH -u "$path"` 27267 27268 # Now try to locate executable using which 27269 new_path=`$WHICH "$new_path" 2> /dev/null` 27270 # bat and cmd files are not always considered executable in cygwin causing which 27271 # to not find them 27272 if test "x$new_path" = x \ 27273 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27274 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27275 new_path=`$CYGPATH -u "$path"` 27276 fi 27277 if test "x$new_path" = x; then 27278 # Oops. Which didn't find the executable. 27279 # The splitting of arguments from the executable at a space might have been incorrect, 27280 # since paths with space are more likely in Windows. Give it another try with the whole 27281 # argument. 27282 path="$complete" 27283 arguments="EOL" 27284 new_path=`$CYGPATH -u "$path"` 27285 new_path=`$WHICH "$new_path" 2> /dev/null` 27286 # bat and cmd files are not always considered executable in cygwin causing which 27287 # to not find them 27288 if test "x$new_path" = x \ 27289 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27290 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27291 new_path=`$CYGPATH -u "$path"` 27292 fi 27293 if test "x$new_path" = x; then 27294 # It's still not found. Now this is an unrecoverable error. 27295 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27296 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27297 has_space=`$ECHO "$complete" | $GREP " "` 27298 if test "x$has_space" != x; then 27299 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27300 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27301 fi 27302 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27303 fi 27304 fi 27305 27306 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27307 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27308 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27309 # "foo.exe" is OK but "foo" is an error. 27310 # 27311 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27312 # It is also a way to make sure we got the proper file name for the real test later on. 27313 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27314 if test "x$test_shortpath" = x; then 27315 # Short path failed, file does not exist as specified. 27316 # Try adding .exe or .cmd 27317 if test -f "${new_path}.exe"; then 27318 input_to_shortpath="${new_path}.exe" 27319 elif test -f "${new_path}.cmd"; then 27320 input_to_shortpath="${new_path}.cmd" 27321 else 27322 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5 27323 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;} 27324 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27325 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27326 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27327 fi 27328 else 27329 input_to_shortpath="$new_path" 27330 fi 27331 27332 # Call helper function which possibly converts this using DOS-style short mode. 27333 # If so, the updated path is stored in $new_path. 27334 new_path="$input_to_shortpath" 27335 27336 input_path="$input_to_shortpath" 27337 # Check if we need to convert this using DOS-style short mode. If the path 27338 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27339 # take no chances and rewrite it. 27340 # Note: m4 eats our [], so we need to use [ and ] instead. 27341 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27342 if test "x$has_forbidden_chars" != x; then 27343 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27344 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27345 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27346 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27347 # Going to short mode and back again did indeed matter. Since short mode is 27348 # case insensitive, let's make it lowercase to improve readability. 27349 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27350 # Now convert it back to Unix-stile (cygpath) 27351 input_path=`$CYGPATH -u "$shortmode_path"` 27352 new_path="$input_path" 27353 fi 27354 fi 27355 27356 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27357 if test "x$test_cygdrive_prefix" = x; then 27358 # As a simple fix, exclude /usr/bin since it's not a real path. 27359 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27360 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27361 # a path prefixed by /cygdrive for fixpath to work. 27362 new_path="$CYGWIN_ROOT_PATH$input_path" 27363 fi 27364 fi 27365 27366 # remove trailing .exe if any 27367 new_path="${new_path/%.exe/}" 27368 27369 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27370 27371 # First separate the path from the arguments. This will split at the first 27372 # space. 27373 complete="$OBJCOPY" 27374 path="${complete%% *}" 27375 tmp="$complete EOL" 27376 arguments="${tmp#* }" 27377 27378 # Input might be given as Windows format, start by converting to 27379 # unix format. 27380 new_path="$path" 27381 27382 windows_path="$new_path" 27383 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27384 unix_path=`$CYGPATH -u "$windows_path"` 27385 new_path="$unix_path" 27386 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27387 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27388 new_path="$unix_path" 27389 fi 27390 27391 27392 # Now try to locate executable using which 27393 new_path=`$WHICH "$new_path" 2> /dev/null` 27394 27395 if test "x$new_path" = x; then 27396 # Oops. Which didn't find the executable. 27397 # The splitting of arguments from the executable at a space might have been incorrect, 27398 # since paths with space are more likely in Windows. Give it another try with the whole 27399 # argument. 27400 path="$complete" 27401 arguments="EOL" 27402 new_path="$path" 27403 27404 windows_path="$new_path" 27405 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27406 unix_path=`$CYGPATH -u "$windows_path"` 27407 new_path="$unix_path" 27408 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27409 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27410 new_path="$unix_path" 27411 fi 27412 27413 27414 new_path=`$WHICH "$new_path" 2> /dev/null` 27415 27416 if test "x$new_path" = x; then 27417 # It's still not found. Now this is an unrecoverable error. 27418 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27419 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27420 has_space=`$ECHO "$complete" | $GREP " "` 27421 if test "x$has_space" != x; then 27422 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27424 fi 27425 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27426 fi 27427 fi 27428 27429 # Now new_path has a complete unix path to the binary 27430 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27431 # Keep paths in /bin as-is, but remove trailing .exe if any 27432 new_path="${new_path/%.exe/}" 27433 # Do not save /bin paths to all_fixpath_prefixes! 27434 else 27435 # Not in mixed or Windows style, start by that. 27436 new_path=`cmd //c echo $new_path` 27437 27438 input_path="$new_path" 27439 # Check if we need to convert this using DOS-style short mode. If the path 27440 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27441 # take no chances and rewrite it. 27442 # Note: m4 eats our [], so we need to use [ and ] instead. 27443 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27444 if test "x$has_forbidden_chars" != x; then 27445 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27446 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27447 fi 27448 27449 # Output is in $new_path 27450 27451 windows_path="$new_path" 27452 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27453 unix_path=`$CYGPATH -u "$windows_path"` 27454 new_path="$unix_path" 27455 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27456 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27457 new_path="$unix_path" 27458 fi 27459 27460 # remove trailing .exe if any 27461 new_path="${new_path/%.exe/}" 27462 27463 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27464 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27465 fi 27466 27467 else 27468 # We're on a posix platform. Hooray! :) 27469 # First separate the path from the arguments. This will split at the first 27470 # space. 27471 complete="$OBJCOPY" 27472 path="${complete%% *}" 27473 tmp="$complete EOL" 27474 arguments="${tmp#* }" 27475 27476 # Cannot rely on the command "which" here since it doesn't always work. 27477 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27478 if test -z "$is_absolute_path"; then 27479 # Path to executable is not absolute. Find it. 27480 IFS_save="$IFS" 27481 IFS=: 27482 for p in $PATH; do 27483 if test -f "$p/$path" && test -x "$p/$path"; then 27484 new_path="$p/$path" 27485 break 27486 fi 27487 done 27488 IFS="$IFS_save" 27489 else 27490 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5 27491 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;} 27492 new_path="$path" 27493 fi 27494 27495 if test "x$new_path" = x; then 27496 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27497 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27498 has_space=`$ECHO "$complete" | $GREP " "` 27499 if test "x$has_space" != x; then 27500 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27501 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27502 fi 27503 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27504 fi 27505 fi 27506 27507 # Now join together the path and the arguments once again 27508 if test "x$arguments" != xEOL; then 27509 new_complete="$new_path ${arguments% *}" 27510 else 27511 new_complete="$new_path" 27512 fi 27513 27514 if test "x$complete" != "x$new_complete"; then 27515 OBJCOPY="$new_complete" 27516 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5 27517 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;} 27518 fi 27519 27520 fi 27521 fi 27522 27523 if test -n "$ac_tool_prefix"; then 27524 for ac_prog in gobjdump objdump 27525 do 27526 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 27527 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 27528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27529 $as_echo_n "checking for $ac_word... " >&6; } 27530 if test "${ac_cv_prog_OBJDUMP+set}" = set; then : 27531 $as_echo_n "(cached) " >&6 27532 else 27533 if test -n "$OBJDUMP"; then 27534 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. 27535 else 27536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27537 for as_dir in $PATH 27538 do 27539 IFS=$as_save_IFS 27540 test -z "$as_dir" && as_dir=. 27541 for ac_exec_ext in '' $ac_executable_extensions; do 27542 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27543 ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" 27544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27545 break 2 27546 fi 27547 done 27548 done 27549 IFS=$as_save_IFS 27550 27551 fi 27552 fi 27553 OBJDUMP=$ac_cv_prog_OBJDUMP 27554 if test -n "$OBJDUMP"; then 27555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 27556 $as_echo "$OBJDUMP" >&6; } 27557 else 27558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27559 $as_echo "no" >&6; } 27560 fi 27561 27562 27563 test -n "$OBJDUMP" && break 27564 done 27565 fi 27566 if test -z "$OBJDUMP"; then 27567 ac_ct_OBJDUMP=$OBJDUMP 27568 for ac_prog in gobjdump objdump 27569 do 27570 # Extract the first word of "$ac_prog", so it can be a program name with args. 27571 set dummy $ac_prog; ac_word=$2 27572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27573 $as_echo_n "checking for $ac_word... " >&6; } 27574 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : 27575 $as_echo_n "(cached) " >&6 27576 else 27577 if test -n "$ac_ct_OBJDUMP"; then 27578 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. 27579 else 27580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27581 for as_dir in $PATH 27582 do 27583 IFS=$as_save_IFS 27584 test -z "$as_dir" && as_dir=. 27585 for ac_exec_ext in '' $ac_executable_extensions; do 27586 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27587 ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" 27588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27589 break 2 27590 fi 27591 done 27592 done 27593 IFS=$as_save_IFS 27594 27595 fi 27596 fi 27597 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP 27598 if test -n "$ac_ct_OBJDUMP"; then 27599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 27600 $as_echo "$ac_ct_OBJDUMP" >&6; } 27601 else 27602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27603 $as_echo "no" >&6; } 27604 fi 27605 27606 27607 test -n "$ac_ct_OBJDUMP" && break 27608 done 27609 27610 if test "x$ac_ct_OBJDUMP" = x; then 27611 OBJDUMP="" 27612 else 27613 case $cross_compiling:$ac_tool_warned in 27614 yes:) 27615 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27616 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27617 ac_tool_warned=yes ;; 27618 esac 27619 OBJDUMP=$ac_ct_OBJDUMP 27620 fi 27621 fi 27622 27623 if test "x$OBJDUMP" != x; then 27624 # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing. 27625 27626 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27627 27628 # First separate the path from the arguments. This will split at the first 27629 # space. 27630 complete="$OBJDUMP" 27631 path="${complete%% *}" 27632 tmp="$complete EOL" 27633 arguments="${tmp#* }" 27634 27635 # Input might be given as Windows format, start by converting to 27636 # unix format. 27637 new_path=`$CYGPATH -u "$path"` 27638 27639 # Now try to locate executable using which 27640 new_path=`$WHICH "$new_path" 2> /dev/null` 27641 # bat and cmd files are not always considered executable in cygwin causing which 27642 # to not find them 27643 if test "x$new_path" = x \ 27644 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27645 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27646 new_path=`$CYGPATH -u "$path"` 27647 fi 27648 if test "x$new_path" = x; then 27649 # Oops. Which didn't find the executable. 27650 # The splitting of arguments from the executable at a space might have been incorrect, 27651 # since paths with space are more likely in Windows. Give it another try with the whole 27652 # argument. 27653 path="$complete" 27654 arguments="EOL" 27655 new_path=`$CYGPATH -u "$path"` 27656 new_path=`$WHICH "$new_path" 2> /dev/null` 27657 # bat and cmd files are not always considered executable in cygwin causing which 27658 # to not find them 27659 if test "x$new_path" = x \ 27660 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27661 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27662 new_path=`$CYGPATH -u "$path"` 27663 fi 27664 if test "x$new_path" = x; then 27665 # It's still not found. Now this is an unrecoverable error. 27666 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 27667 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 27668 has_space=`$ECHO "$complete" | $GREP " "` 27669 if test "x$has_space" != x; then 27670 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27672 fi 27673 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27674 fi 27675 fi 27676 27677 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27678 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27679 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27680 # "foo.exe" is OK but "foo" is an error. 27681 # 27682 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27683 # It is also a way to make sure we got the proper file name for the real test later on. 27684 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27685 if test "x$test_shortpath" = x; then 27686 # Short path failed, file does not exist as specified. 27687 # Try adding .exe or .cmd 27688 if test -f "${new_path}.exe"; then 27689 input_to_shortpath="${new_path}.exe" 27690 elif test -f "${new_path}.cmd"; then 27691 input_to_shortpath="${new_path}.cmd" 27692 else 27693 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5 27694 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;} 27695 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27696 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27697 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27698 fi 27699 else 27700 input_to_shortpath="$new_path" 27701 fi 27702 27703 # Call helper function which possibly converts this using DOS-style short mode. 27704 # If so, the updated path is stored in $new_path. 27705 new_path="$input_to_shortpath" 27706 27707 input_path="$input_to_shortpath" 27708 # Check if we need to convert this using DOS-style short mode. If the path 27709 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27710 # take no chances and rewrite it. 27711 # Note: m4 eats our [], so we need to use [ and ] instead. 27712 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27713 if test "x$has_forbidden_chars" != x; then 27714 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27715 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27716 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27717 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27718 # Going to short mode and back again did indeed matter. Since short mode is 27719 # case insensitive, let's make it lowercase to improve readability. 27720 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27721 # Now convert it back to Unix-stile (cygpath) 27722 input_path=`$CYGPATH -u "$shortmode_path"` 27723 new_path="$input_path" 27724 fi 27725 fi 27726 27727 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27728 if test "x$test_cygdrive_prefix" = x; then 27729 # As a simple fix, exclude /usr/bin since it's not a real path. 27730 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27731 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27732 # a path prefixed by /cygdrive for fixpath to work. 27733 new_path="$CYGWIN_ROOT_PATH$input_path" 27734 fi 27735 fi 27736 27737 # remove trailing .exe if any 27738 new_path="${new_path/%.exe/}" 27739 27740 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27741 27742 # First separate the path from the arguments. This will split at the first 27743 # space. 27744 complete="$OBJDUMP" 27745 path="${complete%% *}" 27746 tmp="$complete EOL" 27747 arguments="${tmp#* }" 27748 27749 # Input might be given as Windows format, start by converting to 27750 # unix format. 27751 new_path="$path" 27752 27753 windows_path="$new_path" 27754 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27755 unix_path=`$CYGPATH -u "$windows_path"` 27756 new_path="$unix_path" 27757 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27758 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27759 new_path="$unix_path" 27760 fi 27761 27762 27763 # Now try to locate executable using which 27764 new_path=`$WHICH "$new_path" 2> /dev/null` 27765 27766 if test "x$new_path" = x; then 27767 # Oops. Which didn't find the executable. 27768 # The splitting of arguments from the executable at a space might have been incorrect, 27769 # since paths with space are more likely in Windows. Give it another try with the whole 27770 # argument. 27771 path="$complete" 27772 arguments="EOL" 27773 new_path="$path" 27774 27775 windows_path="$new_path" 27776 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27777 unix_path=`$CYGPATH -u "$windows_path"` 27778 new_path="$unix_path" 27779 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27780 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27781 new_path="$unix_path" 27782 fi 27783 27784 27785 new_path=`$WHICH "$new_path" 2> /dev/null` 27786 27787 if test "x$new_path" = x; then 27788 # It's still not found. Now this is an unrecoverable error. 27789 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 27790 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 27791 has_space=`$ECHO "$complete" | $GREP " "` 27792 if test "x$has_space" != x; then 27793 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27794 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27795 fi 27796 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27797 fi 27798 fi 27799 27800 # Now new_path has a complete unix path to the binary 27801 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27802 # Keep paths in /bin as-is, but remove trailing .exe if any 27803 new_path="${new_path/%.exe/}" 27804 # Do not save /bin paths to all_fixpath_prefixes! 27805 else 27806 # Not in mixed or Windows style, start by that. 27807 new_path=`cmd //c echo $new_path` 27808 27809 input_path="$new_path" 27810 # Check if we need to convert this using DOS-style short mode. If the path 27811 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27812 # take no chances and rewrite it. 27813 # Note: m4 eats our [], so we need to use [ and ] instead. 27814 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27815 if test "x$has_forbidden_chars" != x; then 27816 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27817 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27818 fi 27819 27820 # Output is in $new_path 27821 27822 windows_path="$new_path" 27823 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27824 unix_path=`$CYGPATH -u "$windows_path"` 27825 new_path="$unix_path" 27826 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27827 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27828 new_path="$unix_path" 27829 fi 27830 27831 # remove trailing .exe if any 27832 new_path="${new_path/%.exe/}" 27833 27834 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27835 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27836 fi 27837 27838 else 27839 # We're on a posix platform. Hooray! :) 27840 # First separate the path from the arguments. This will split at the first 27841 # space. 27842 complete="$OBJDUMP" 27843 path="${complete%% *}" 27844 tmp="$complete EOL" 27845 arguments="${tmp#* }" 27846 27847 # Cannot rely on the command "which" here since it doesn't always work. 27848 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27849 if test -z "$is_absolute_path"; then 27850 # Path to executable is not absolute. Find it. 27851 IFS_save="$IFS" 27852 IFS=: 27853 for p in $PATH; do 27854 if test -f "$p/$path" && test -x "$p/$path"; then 27855 new_path="$p/$path" 27856 break 27857 fi 27858 done 27859 IFS="$IFS_save" 27860 else 27861 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5 27862 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;} 27863 new_path="$path" 27864 fi 27865 27866 if test "x$new_path" = x; then 27867 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 27868 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 27869 has_space=`$ECHO "$complete" | $GREP " "` 27870 if test "x$has_space" != x; then 27871 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27872 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27873 fi 27874 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27875 fi 27876 fi 27877 27878 # Now join together the path and the arguments once again 27879 if test "x$arguments" != xEOL; then 27880 new_complete="$new_path ${arguments% *}" 27881 else 27882 new_complete="$new_path" 27883 fi 27884 27885 if test "x$complete" != "x$new_complete"; then 27886 OBJDUMP="$new_complete" 27887 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 27888 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} 27889 fi 27890 27891 fi 27892 27893 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 27894 # Extract the first word of "lipo", so it can be a program name with args. 27895 set dummy lipo; ac_word=$2 27896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27897 $as_echo_n "checking for $ac_word... " >&6; } 27898 if test "${ac_cv_path_LIPO+set}" = set; then : 27899 $as_echo_n "(cached) " >&6 27900 else 27901 case $LIPO in 27902 [\\/]* | ?:[\\/]*) 27903 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. 27904 ;; 27905 *) 27906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27907 for as_dir in $PATH 27908 do 27909 IFS=$as_save_IFS 27910 test -z "$as_dir" && as_dir=. 27911 for ac_exec_ext in '' $ac_executable_extensions; do 27912 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27913 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" 27914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27915 break 2 27916 fi 27917 done 27918 done 27919 IFS=$as_save_IFS 27920 27921 ;; 27922 esac 27923 fi 27924 LIPO=$ac_cv_path_LIPO 27925 if test -n "$LIPO"; then 27926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 27927 $as_echo "$LIPO" >&6; } 27928 else 27929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27930 $as_echo "no" >&6; } 27931 fi 27932 27933 27934 27935 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27936 27937 # First separate the path from the arguments. This will split at the first 27938 # space. 27939 complete="$LIPO" 27940 path="${complete%% *}" 27941 tmp="$complete EOL" 27942 arguments="${tmp#* }" 27943 27944 # Input might be given as Windows format, start by converting to 27945 # unix format. 27946 new_path=`$CYGPATH -u "$path"` 27947 27948 # Now try to locate executable using which 27949 new_path=`$WHICH "$new_path" 2> /dev/null` 27950 # bat and cmd files are not always considered executable in cygwin causing which 27951 # to not find them 27952 if test "x$new_path" = x \ 27953 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27954 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27955 new_path=`$CYGPATH -u "$path"` 27956 fi 27957 if test "x$new_path" = x; then 27958 # Oops. Which didn't find the executable. 27959 # The splitting of arguments from the executable at a space might have been incorrect, 27960 # since paths with space are more likely in Windows. Give it another try with the whole 27961 # argument. 27962 path="$complete" 27963 arguments="EOL" 27964 new_path=`$CYGPATH -u "$path"` 27965 new_path=`$WHICH "$new_path" 2> /dev/null` 27966 # bat and cmd files are not always considered executable in cygwin causing which 27967 # to not find them 27968 if test "x$new_path" = x \ 27969 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27970 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27971 new_path=`$CYGPATH -u "$path"` 27972 fi 27973 if test "x$new_path" = x; then 27974 # It's still not found. Now this is an unrecoverable error. 27975 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 27976 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 27977 has_space=`$ECHO "$complete" | $GREP " "` 27978 if test "x$has_space" != x; then 27979 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27980 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27981 fi 27982 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 27983 fi 27984 fi 27985 27986 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27987 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27988 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27989 # "foo.exe" is OK but "foo" is an error. 27990 # 27991 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27992 # It is also a way to make sure we got the proper file name for the real test later on. 27993 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27994 if test "x$test_shortpath" = x; then 27995 # Short path failed, file does not exist as specified. 27996 # Try adding .exe or .cmd 27997 if test -f "${new_path}.exe"; then 27998 input_to_shortpath="${new_path}.exe" 27999 elif test -f "${new_path}.cmd"; then 28000 input_to_shortpath="${new_path}.cmd" 28001 else 28002 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5 28003 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;} 28004 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 28005 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 28006 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28007 fi 28008 else 28009 input_to_shortpath="$new_path" 28010 fi 28011 28012 # Call helper function which possibly converts this using DOS-style short mode. 28013 # If so, the updated path is stored in $new_path. 28014 new_path="$input_to_shortpath" 28015 28016 input_path="$input_to_shortpath" 28017 # Check if we need to convert this using DOS-style short mode. If the path 28018 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28019 # take no chances and rewrite it. 28020 # Note: m4 eats our [], so we need to use [ and ] instead. 28021 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 28022 if test "x$has_forbidden_chars" != x; then 28023 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28024 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 28025 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 28026 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 28027 # Going to short mode and back again did indeed matter. Since short mode is 28028 # case insensitive, let's make it lowercase to improve readability. 28029 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28030 # Now convert it back to Unix-stile (cygpath) 28031 input_path=`$CYGPATH -u "$shortmode_path"` 28032 new_path="$input_path" 28033 fi 28034 fi 28035 28036 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 28037 if test "x$test_cygdrive_prefix" = x; then 28038 # As a simple fix, exclude /usr/bin since it's not a real path. 28039 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 28040 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 28041 # a path prefixed by /cygdrive for fixpath to work. 28042 new_path="$CYGWIN_ROOT_PATH$input_path" 28043 fi 28044 fi 28045 28046 # remove trailing .exe if any 28047 new_path="${new_path/%.exe/}" 28048 28049 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28050 28051 # First separate the path from the arguments. This will split at the first 28052 # space. 28053 complete="$LIPO" 28054 path="${complete%% *}" 28055 tmp="$complete EOL" 28056 arguments="${tmp#* }" 28057 28058 # Input might be given as Windows format, start by converting to 28059 # unix format. 28060 new_path="$path" 28061 28062 windows_path="$new_path" 28063 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28064 unix_path=`$CYGPATH -u "$windows_path"` 28065 new_path="$unix_path" 28066 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28067 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28068 new_path="$unix_path" 28069 fi 28070 28071 28072 # Now try to locate executable using which 28073 new_path=`$WHICH "$new_path" 2> /dev/null` 28074 28075 if test "x$new_path" = x; then 28076 # Oops. Which didn't find the executable. 28077 # The splitting of arguments from the executable at a space might have been incorrect, 28078 # since paths with space are more likely in Windows. Give it another try with the whole 28079 # argument. 28080 path="$complete" 28081 arguments="EOL" 28082 new_path="$path" 28083 28084 windows_path="$new_path" 28085 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28086 unix_path=`$CYGPATH -u "$windows_path"` 28087 new_path="$unix_path" 28088 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28089 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28090 new_path="$unix_path" 28091 fi 28092 28093 28094 new_path=`$WHICH "$new_path" 2> /dev/null` 28095 28096 if test "x$new_path" = x; then 28097 # It's still not found. Now this is an unrecoverable error. 28098 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28099 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28100 has_space=`$ECHO "$complete" | $GREP " "` 28101 if test "x$has_space" != x; then 28102 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28103 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28104 fi 28105 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28106 fi 28107 fi 28108 28109 # Now new_path has a complete unix path to the binary 28110 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 28111 # Keep paths in /bin as-is, but remove trailing .exe if any 28112 new_path="${new_path/%.exe/}" 28113 # Do not save /bin paths to all_fixpath_prefixes! 28114 else 28115 # Not in mixed or Windows style, start by that. 28116 new_path=`cmd //c echo $new_path` 28117 28118 input_path="$new_path" 28119 # Check if we need to convert this using DOS-style short mode. If the path 28120 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28121 # take no chances and rewrite it. 28122 # Note: m4 eats our [], so we need to use [ and ] instead. 28123 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 28124 if test "x$has_forbidden_chars" != x; then 28125 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28126 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28127 fi 28128 28129 # Output is in $new_path 28130 28131 windows_path="$new_path" 28132 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28133 unix_path=`$CYGPATH -u "$windows_path"` 28134 new_path="$unix_path" 28135 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28136 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28137 new_path="$unix_path" 28138 fi 28139 28140 # remove trailing .exe if any 28141 new_path="${new_path/%.exe/}" 28142 28143 # Save the first 10 bytes of this path to the storage, so fixpath can work. 28144 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 28145 fi 28146 28147 else 28148 # We're on a posix platform. Hooray! :) 28149 # First separate the path from the arguments. This will split at the first 28150 # space. 28151 complete="$LIPO" 28152 path="${complete%% *}" 28153 tmp="$complete EOL" 28154 arguments="${tmp#* }" 28155 28156 # Cannot rely on the command "which" here since it doesn't always work. 28157 is_absolute_path=`$ECHO "$path" | $GREP ^/` 28158 if test -z "$is_absolute_path"; then 28159 # Path to executable is not absolute. Find it. 28160 IFS_save="$IFS" 28161 IFS=: 28162 for p in $PATH; do 28163 if test -f "$p/$path" && test -x "$p/$path"; then 28164 new_path="$p/$path" 28165 break 28166 fi 28167 done 28168 IFS="$IFS_save" 28169 else 28170 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5 28171 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;} 28172 new_path="$path" 28173 fi 28174 28175 if test "x$new_path" = x; then 28176 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28177 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28178 has_space=`$ECHO "$complete" | $GREP " "` 28179 if test "x$has_space" != x; then 28180 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 28181 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 28182 fi 28183 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28184 fi 28185 fi 28186 28187 # Now join together the path and the arguments once again 28188 if test "x$arguments" != xEOL; then 28189 new_complete="$new_path ${arguments% *}" 28190 else 28191 new_complete="$new_path" 28192 fi 28193 28194 if test "x$complete" != "x$new_complete"; then 28195 LIPO="$new_complete" 28196 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 28197 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} 28198 fi 28199 28200 fi 28201 28202 # Restore old path without tools dir 28203 PATH="$OLD_PATH" 28204 28205 28206 # FIXME: Currently we must test this after paths but before flags. Fix! 28207 28208 # And we can test some aspects on the target using configure macros. 28209 28210 28211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 28212 $as_echo_n "checking for ANSI C header files... " >&6; } 28213 if test "${ac_cv_header_stdc+set}" = set; then : 28214 $as_echo_n "(cached) " >&6 28215 else 28216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28217 /* end confdefs.h. */ 28218 #include <stdlib.h> 28219 #include <stdarg.h> 28220 #include <string.h> 28221 #include <float.h> 28222 28223 int 28224 main () 28225 { 28226 28227 ; 28228 return 0; 28229 } 28230 _ACEOF 28231 if ac_fn_cxx_try_compile "$LINENO"; then : 28232 ac_cv_header_stdc=yes 28233 else 28234 ac_cv_header_stdc=no 28235 fi 28236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28237 28238 if test $ac_cv_header_stdc = yes; then 28239 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 28240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28241 /* end confdefs.h. */ 28242 #include <string.h> 28243 28244 _ACEOF 28245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28246 $EGREP "memchr" >/dev/null 2>&1; then : 28247 28248 else 28249 ac_cv_header_stdc=no 28250 fi 28251 rm -f conftest* 28252 28253 fi 28254 28255 if test $ac_cv_header_stdc = yes; then 28256 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 28257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28258 /* end confdefs.h. */ 28259 #include <stdlib.h> 28260 28261 _ACEOF 28262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28263 $EGREP "free" >/dev/null 2>&1; then : 28264 28265 else 28266 ac_cv_header_stdc=no 28267 fi 28268 rm -f conftest* 28269 28270 fi 28271 28272 if test $ac_cv_header_stdc = yes; then 28273 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 28274 if test "$cross_compiling" = yes; then : 28275 : 28276 else 28277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28278 /* end confdefs.h. */ 28279 #include <ctype.h> 28280 #include <stdlib.h> 28281 #if ((' ' & 0x0FF) == 0x020) 28282 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 28283 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 28284 #else 28285 # define ISLOWER(c) \ 28286 (('a' <= (c) && (c) <= 'i') \ 28287 || ('j' <= (c) && (c) <= 'r') \ 28288 || ('s' <= (c) && (c) <= 'z')) 28289 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 28290 #endif 28291 28292 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 28293 int 28294 main () 28295 { 28296 int i; 28297 for (i = 0; i < 256; i++) 28298 if (XOR (islower (i), ISLOWER (i)) 28299 || toupper (i) != TOUPPER (i)) 28300 return 2; 28301 return 0; 28302 } 28303 _ACEOF 28304 if ac_fn_cxx_try_run "$LINENO"; then : 28305 28306 else 28307 ac_cv_header_stdc=no 28308 fi 28309 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28310 conftest.$ac_objext conftest.beam conftest.$ac_ext 28311 fi 28312 28313 fi 28314 fi 28315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 28316 $as_echo "$ac_cv_header_stdc" >&6; } 28317 if test $ac_cv_header_stdc = yes; then 28318 28319 $as_echo "#define STDC_HEADERS 1" >>confdefs.h 28320 28321 fi 28322 28323 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 28324 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 28325 inttypes.h stdint.h unistd.h 28326 do : 28327 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 28328 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 28329 " 28330 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 28331 cat >>confdefs.h <<_ACEOF 28332 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 28333 _ACEOF 28334 28335 fi 28336 28337 done 28338 28339 28340 28341 ############################################################################### 28342 # 28343 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. 28344 # (The JVM can use 32 or 64 bit Java pointers but that decision 28345 # is made at runtime.) 28346 # 28347 28348 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 28349 # Always specify -m flags on Solaris 28350 28351 # keep track of c/cxx flags that we added outselves... 28352 # to prevent emitting warning... 28353 ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28354 ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28355 ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28356 28357 CFLAGS="${CFLAGS}${ADDED_CFLAGS}" 28358 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" 28359 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" 28360 28361 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" 28362 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" 28363 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" 28364 28365 elif test "x$COMPILE_TYPE" = xreduced; then 28366 if test "x$OPENJDK_TARGET_OS" != xwindows; then 28367 # Specify -m if running reduced on other Posix platforms 28368 28369 # keep track of c/cxx flags that we added outselves... 28370 # to prevent emitting warning... 28371 ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28372 ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28373 ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28374 28375 CFLAGS="${CFLAGS}${ADDED_CFLAGS}" 28376 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" 28377 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" 28378 28379 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" 28380 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" 28381 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" 28382 28383 fi 28384 fi 28385 28386 # Make compilation sanity check 28387 for ac_header in stdio.h 28388 do : 28389 ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" 28390 if test "x$ac_cv_header_stdio_h" = x""yes; then : 28391 cat >>confdefs.h <<_ACEOF 28392 #define HAVE_STDIO_H 1 28393 _ACEOF 28394 28395 else 28396 28397 { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5 28398 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;} 28399 if test "x$COMPILE_TYPE" = xreduced; then 28400 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5 28401 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;} 28402 elif test "x$COMPILE_TYPE" = xcross; then 28403 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5 28404 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;} 28405 fi 28406 as_fn_error $? "Cannot continue." "$LINENO" 5 28407 28408 fi 28409 28410 done 28411 28412 28413 # The cast to long int works around a bug in the HP C Compiler 28414 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 28415 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 28416 # This bug is HP SR number 8606223364. 28417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5 28418 $as_echo_n "checking size of int *... " >&6; } 28419 if test "${ac_cv_sizeof_int_p+set}" = set; then : 28420 $as_echo_n "(cached) " >&6 28421 else 28422 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then : 28423 28424 else 28425 if test "$ac_cv_type_int_p" = yes; then 28426 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 28427 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 28428 as_fn_error 77 "cannot compute sizeof (int *) 28429 See \`config.log' for more details" "$LINENO" 5 ; } 28430 else 28431 ac_cv_sizeof_int_p=0 28432 fi 28433 fi 28434 28435 fi 28436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5 28437 $as_echo "$ac_cv_sizeof_int_p" >&6; } 28438 28439 28440 28441 cat >>confdefs.h <<_ACEOF 28442 #define SIZEOF_INT_P $ac_cv_sizeof_int_p 28443 _ACEOF 28444 28445 28446 28447 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then 28448 # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html 28449 SIZEOF_INT_P="$ac_cv_sizeof_int_p" 28450 fi 28451 28452 if test "x$SIZEOF_INT_P" = x; then 28453 # The test failed, lets stick to the assumed value. 28454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5 28455 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;} 28456 else 28457 TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P` 28458 28459 if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then 28460 as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5 28461 fi 28462 fi 28463 28464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5 28465 $as_echo_n "checking for target address size... " >&6; } 28466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5 28467 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; } 28468 28469 28470 ############################################################################### 28471 # 28472 # Is the target little of big endian? 28473 # 28474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 28475 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } 28476 if test "${ac_cv_c_bigendian+set}" = set; then : 28477 $as_echo_n "(cached) " >&6 28478 else 28479 ac_cv_c_bigendian=unknown 28480 # See if we're dealing with a universal compiler. 28481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28482 /* end confdefs.h. */ 28483 #ifndef __APPLE_CC__ 28484 not a universal capable compiler 28485 #endif 28486 typedef int dummy; 28487 28488 _ACEOF 28489 if ac_fn_cxx_try_compile "$LINENO"; then : 28490 28491 # Check for potential -arch flags. It is not universal unless 28492 # there are at least two -arch flags with different values. 28493 ac_arch= 28494 ac_prev= 28495 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 28496 if test -n "$ac_prev"; then 28497 case $ac_word in 28498 i?86 | x86_64 | ppc | ppc64) 28499 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 28500 ac_arch=$ac_word 28501 else 28502 ac_cv_c_bigendian=universal 28503 break 28504 fi 28505 ;; 28506 esac 28507 ac_prev= 28508 elif test "x$ac_word" = "x-arch"; then 28509 ac_prev=arch 28510 fi 28511 done 28512 fi 28513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28514 if test $ac_cv_c_bigendian = unknown; then 28515 # See if sys/param.h defines the BYTE_ORDER macro. 28516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28517 /* end confdefs.h. */ 28518 #include <sys/types.h> 28519 #include <sys/param.h> 28520 28521 int 28522 main () 28523 { 28524 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 28525 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 28526 && LITTLE_ENDIAN) 28527 bogus endian macros 28528 #endif 28529 28530 ; 28531 return 0; 28532 } 28533 _ACEOF 28534 if ac_fn_cxx_try_compile "$LINENO"; then : 28535 # It does; now see whether it defined to BIG_ENDIAN or not. 28536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28537 /* end confdefs.h. */ 28538 #include <sys/types.h> 28539 #include <sys/param.h> 28540 28541 int 28542 main () 28543 { 28544 #if BYTE_ORDER != BIG_ENDIAN 28545 not big endian 28546 #endif 28547 28548 ; 28549 return 0; 28550 } 28551 _ACEOF 28552 if ac_fn_cxx_try_compile "$LINENO"; then : 28553 ac_cv_c_bigendian=yes 28554 else 28555 ac_cv_c_bigendian=no 28556 fi 28557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28558 fi 28559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28560 fi 28561 if test $ac_cv_c_bigendian = unknown; then 28562 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 28563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28564 /* end confdefs.h. */ 28565 #include <limits.h> 28566 28567 int 28568 main () 28569 { 28570 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 28571 bogus endian macros 28572 #endif 28573 28574 ; 28575 return 0; 28576 } 28577 _ACEOF 28578 if ac_fn_cxx_try_compile "$LINENO"; then : 28579 # It does; now see whether it defined to _BIG_ENDIAN or not. 28580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28581 /* end confdefs.h. */ 28582 #include <limits.h> 28583 28584 int 28585 main () 28586 { 28587 #ifndef _BIG_ENDIAN 28588 not big endian 28589 #endif 28590 28591 ; 28592 return 0; 28593 } 28594 _ACEOF 28595 if ac_fn_cxx_try_compile "$LINENO"; then : 28596 ac_cv_c_bigendian=yes 28597 else 28598 ac_cv_c_bigendian=no 28599 fi 28600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28601 fi 28602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28603 fi 28604 if test $ac_cv_c_bigendian = unknown; then 28605 # Compile a test program. 28606 if test "$cross_compiling" = yes; then : 28607 # Try to guess by grepping values from an object file. 28608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28609 /* end confdefs.h. */ 28610 short int ascii_mm[] = 28611 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 28612 short int ascii_ii[] = 28613 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 28614 int use_ascii (int i) { 28615 return ascii_mm[i] + ascii_ii[i]; 28616 } 28617 short int ebcdic_ii[] = 28618 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 28619 short int ebcdic_mm[] = 28620 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 28621 int use_ebcdic (int i) { 28622 return ebcdic_mm[i] + ebcdic_ii[i]; 28623 } 28624 extern int foo; 28625 28626 int 28627 main () 28628 { 28629 return use_ascii (foo) == use_ebcdic (foo); 28630 ; 28631 return 0; 28632 } 28633 _ACEOF 28634 if ac_fn_cxx_try_compile "$LINENO"; then : 28635 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 28636 ac_cv_c_bigendian=yes 28637 fi 28638 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 28639 if test "$ac_cv_c_bigendian" = unknown; then 28640 ac_cv_c_bigendian=no 28641 else 28642 # finding both strings is unlikely to happen, but who knows? 28643 ac_cv_c_bigendian=unknown 28644 fi 28645 fi 28646 fi 28647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28648 else 28649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28650 /* end confdefs.h. */ 28651 $ac_includes_default 28652 int 28653 main () 28654 { 28655 28656 /* Are we little or big endian? From Harbison&Steele. */ 28657 union 28658 { 28659 long int l; 28660 char c[sizeof (long int)]; 28661 } u; 28662 u.l = 1; 28663 return u.c[sizeof (long int) - 1] == 1; 28664 28665 ; 28666 return 0; 28667 } 28668 _ACEOF 28669 if ac_fn_cxx_try_run "$LINENO"; then : 28670 ac_cv_c_bigendian=no 28671 else 28672 ac_cv_c_bigendian=yes 28673 fi 28674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28675 conftest.$ac_objext conftest.beam conftest.$ac_ext 28676 fi 28677 28678 fi 28679 fi 28680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 28681 $as_echo "$ac_cv_c_bigendian" >&6; } 28682 case $ac_cv_c_bigendian in #( 28683 yes) 28684 ENDIAN="big";; #( 28685 no) 28686 ENDIAN="little" ;; #( 28687 universal) 28688 ENDIAN="universal_endianness" 28689 ;; #( 28690 *) 28691 ENDIAN="unknown" ;; 28692 esac 28693 28694 28695 if test "x$ENDIAN" = xuniversal_endianness; then 28696 as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5 28697 fi 28698 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then 28699 as_fn_error $? "The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" "$LINENO" 5 28700 fi 28701 28702 28703 # Configure flags for the tools 28704 28705 28706 ############################################################################### 28707 # 28708 # How to compile shared libraries. 28709 # 28710 28711 if test "x$GCC" = xyes; then 28712 COMPILER_NAME=gcc 28713 PICFLAG="-fPIC" 28714 LIBRARY_PREFIX=lib 28715 SHARED_LIBRARY='lib$1.so' 28716 STATIC_LIBRARY='lib$1.a' 28717 SHARED_LIBRARY_FLAGS="-shared" 28718 SHARED_LIBRARY_SUFFIX='.so' 28719 STATIC_LIBRARY_SUFFIX='.a' 28720 OBJ_SUFFIX='.o' 28721 EXE_SUFFIX='' 28722 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1' 28723 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1' 28724 C_FLAG_REORDER='' 28725 CXX_FLAG_REORDER='' 28726 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1' 28727 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1' 28728 LD="$CC" 28729 LDEXE="$CC" 28730 LDCXX="$CXX" 28731 LDEXECXX="$CXX" 28732 POST_STRIP_CMD="$STRIP -g" 28733 28734 # Linking is different on MacOSX 28735 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 28736 # Might change in the future to clang. 28737 COMPILER_NAME=gcc 28738 SHARED_LIBRARY='lib$1.dylib' 28739 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" 28740 SHARED_LIBRARY_SUFFIX='.dylib' 28741 EXE_SUFFIX='' 28742 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1' 28743 SET_SHARED_LIBRARY_MAPFILE='' 28744 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' 28745 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 28746 POST_STRIP_CMD="$STRIP -S" 28747 fi 28748 else 28749 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 28750 # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler 28751 COMPILER_NAME=ossc 28752 PICFLAG="-KPIC" 28753 LIBRARY_PREFIX=lib 28754 SHARED_LIBRARY='lib$1.so' 28755 STATIC_LIBRARY='lib$1.a' 28756 SHARED_LIBRARY_FLAGS="-G" 28757 SHARED_LIBRARY_SUFFIX='.so' 28758 STATIC_LIBRARY_SUFFIX='.a' 28759 OBJ_SUFFIX='.o' 28760 EXE_SUFFIX='' 28761 SET_SHARED_LIBRARY_NAME='' 28762 SET_SHARED_LIBRARY_MAPFILE='-M$1' 28763 C_FLAG_REORDER='-xF' 28764 CXX_FLAG_REORDER='-xF' 28765 SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1' 28766 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 28767 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" 28768 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" 28769 CFLAGS_JDKLIB_EXTRA='-xstrconst' 28770 POST_STRIP_CMD="$STRIP -x" 28771 POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" 28772 fi 28773 if test "x$OPENJDK_TARGET_OS" = xwindows; then 28774 # If it is not gcc, then assume it is the MS Visual Studio compiler 28775 COMPILER_NAME=cl 28776 PICFLAG="" 28777 LIBRARY_PREFIX= 28778 SHARED_LIBRARY='$1.dll' 28779 STATIC_LIBRARY='$1.lib' 28780 SHARED_LIBRARY_FLAGS="-LD" 28781 SHARED_LIBRARY_SUFFIX='.dll' 28782 STATIC_LIBRARY_SUFFIX='.lib' 28783 OBJ_SUFFIX='.obj' 28784 EXE_SUFFIX='.exe' 28785 SET_SHARED_LIBRARY_NAME='' 28786 SET_SHARED_LIBRARY_MAPFILE='' 28787 SET_SHARED_LIBRARY_ORIGIN='' 28788 SET_EXECUTABLE_ORIGIN='' 28789 fi 28790 fi 28791 28792 28793 28794 28795 28796 28797 28798 28799 28800 28801 28802 28803 28804 28805 28806 28807 28808 28809 28810 # The (cross) compiler is now configured, we can now test capabilities 28811 # of the target platform. 28812 28813 28814 28815 ############################################################################### 28816 # 28817 # Setup the opt flags for different compilers 28818 # and different operating systems. 28819 # 28820 28821 # 28822 # NOTE: check for -mstackrealign needs to be below potential addition of -m32 28823 # 28824 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then 28825 # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. 28826 # While waiting for a better solution, the current workaround is to use -mstackrealign. 28827 CFLAGS="$CFLAGS -mstackrealign" 28828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5 28829 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; } 28830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28831 /* end confdefs.h. */ 28832 int main() { return 0; } 28833 _ACEOF 28834 if ac_fn_cxx_try_link "$LINENO"; then : 28835 28836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 28837 $as_echo "yes" >&6; } 28838 28839 else 28840 28841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 28842 $as_echo "no" >&6; } 28843 as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5 28844 28845 fi 28846 rm -f core conftest.err conftest.$ac_objext \ 28847 conftest$ac_exeext conftest.$ac_ext 28848 fi 28849 28850 C_FLAG_DEPS="-MMD -MF" 28851 CXX_FLAG_DEPS="-MMD -MF" 28852 28853 case $COMPILER_TYPE in 28854 CC ) 28855 D_FLAG="-g" 28856 case $COMPILER_NAME in 28857 gcc ) 28858 case $OPENJDK_TARGET_OS in 28859 macosx ) 28860 # On MacOSX we optimize for size, something 28861 # we should do for all platforms? 28862 C_O_FLAG_HI="-Os" 28863 C_O_FLAG_NORM="-Os" 28864 C_O_FLAG_NONE="" 28865 ;; 28866 *) 28867 C_O_FLAG_HI="-O3" 28868 C_O_FLAG_NORM="-O2" 28869 C_O_FLAG_NONE="-O0" 28870 CFLAGS_DEBUG_SYMBOLS="-g" 28871 CXXFLAGS_DEBUG_SYMBOLS="-g" 28872 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then 28873 CFLAGS_DEBUG_SYMBOLS="-g1" 28874 CXXFLAGS_DEBUG_SYMBOLS="-g1" 28875 fi 28876 ;; 28877 esac 28878 CXX_O_FLAG_HI="$C_O_FLAG_HI" 28879 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 28880 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 28881 ;; 28882 ossc ) 28883 # 28884 # Forte has different names for this with their C++ compiler... 28885 # 28886 C_FLAG_DEPS="-xMMD -xMF" 28887 CXX_FLAG_DEPS="-xMMD -xMF" 28888 28889 # Extra options used with HIGHEST 28890 # 28891 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be 28892 # done with care, there are some assumptions below that need to 28893 # be understood about the use of pointers, and IEEE behavior. 28894 # 28895 # Use non-standard floating point mode (not IEEE 754) 28896 CC_HIGHEST="$CC_HIGHEST -fns" 28897 # Do some simplification of floating point arithmetic (not IEEE 754) 28898 CC_HIGHEST="$CC_HIGHEST -fsimple" 28899 # Use single precision floating point with 'float' 28900 CC_HIGHEST="$CC_HIGHEST -fsingle" 28901 # Assume memory references via basic pointer types do not alias 28902 # (Source with excessing pointer casting and data access with mixed 28903 # pointer types are not recommended) 28904 CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" 28905 # Use intrinsic or inline versions for math/std functions 28906 # (If you expect perfect errno behavior, do not use this) 28907 CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all" 28908 # Loop data dependency optimizations (need -xO3 or higher) 28909 CC_HIGHEST="$CC_HIGHEST -xdepend" 28910 # Pointer parameters to functions do not overlap 28911 # (Similar to -xalias_level=basic usage, but less obvious sometimes. 28912 # If you pass in multiple pointers to the same data, do not use this) 28913 CC_HIGHEST="$CC_HIGHEST -xrestrict" 28914 # Inline some library routines 28915 # (If you expect perfect errno behavior, do not use this) 28916 CC_HIGHEST="$CC_HIGHEST -xlibmil" 28917 # Use optimized math routines 28918 # (If you expect perfect errno behavior, do not use this) 28919 # Can cause undefined external on Solaris 8 X86 on __sincos, removing for now 28920 #CC_HIGHEST="$CC_HIGHEST -xlibmopt" 28921 28922 if test "x$OPENJDK_TARGET_CPU" = xsparc; then 28923 CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" 28924 CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" 28925 fi 28926 28927 case $OPENJDK_TARGET_CPU_ARCH in 28928 x86) 28929 C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr" 28930 C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr" 28931 C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr" 28932 C_O_FLAG_NONE="-xregs=no%frameptr" 28933 CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr" 28934 CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr" 28935 CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr" 28936 CXX_O_FLAG_NONE="-xregs=no%frameptr" 28937 if test "x$OPENJDK_TARGET_CPU" = xx86; then 28938 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium" 28939 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium" 28940 fi 28941 ;; 28942 sparc) 28943 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 28944 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 28945 C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 28946 C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" 28947 C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" 28948 C_O_FLAG_NONE="" 28949 CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 28950 CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 28951 CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 28952 CXX_O_FLAG_NONE="" 28953 ;; 28954 esac 28955 28956 CFLAGS_DEBUG_SYMBOLS="-g -xs" 28957 CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" 28958 esac 28959 ;; 28960 CL ) 28961 D_FLAG= 28962 C_O_FLAG_HIGHEST="-O2" 28963 C_O_FLAG_HI="-O1" 28964 C_O_FLAG_NORM="-O1" 28965 C_O_FLAG_NONE="-Od" 28966 CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" 28967 CXX_O_FLAG_HI="$C_O_FLAG_HI" 28968 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 28969 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 28970 ;; 28971 esac 28972 28973 if test -z "$C_O_FLAG_HIGHEST"; then 28974 C_O_FLAG_HIGHEST="$C_O_FLAG_HI" 28975 fi 28976 28977 if test -z "$CXX_O_FLAG_HIGHEST"; then 28978 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" 28979 fi 28980 28981 28982 28983 28984 28985 28986 28987 28988 28989 28990 28991 28992 28993 28994 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then 28995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5 28996 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;} 28997 fi 28998 28999 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then 29000 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5 29001 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;} 29002 fi 29003 29004 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then 29005 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5 29006 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;} 29007 fi 29008 29009 29010 # Check whether --with-extra-cflags was given. 29011 if test "${with_extra_cflags+set}" = set; then : 29012 withval=$with_extra_cflags; 29013 fi 29014 29015 29016 29017 # Check whether --with-extra-cxxflags was given. 29018 if test "${with_extra_cxxflags+set}" = set; then : 29019 withval=$with_extra_cxxflags; 29020 fi 29021 29022 29023 29024 # Check whether --with-extra-ldflags was given. 29025 if test "${with_extra_ldflags+set}" = set; then : 29026 withval=$with_extra_ldflags; 29027 fi 29028 29029 29030 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" 29031 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" 29032 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" 29033 29034 # Hotspot needs these set in their legacy form 29035 LEGACY_EXTRA_CFLAGS=$with_extra_cflags 29036 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags 29037 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags 29038 29039 29040 29041 29042 29043 ############################################################################### 29044 # 29045 # Now setup the CFLAGS and LDFLAGS for the JDK build. 29046 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. 29047 # 29048 case $COMPILER_NAME in 29049 gcc ) 29050 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ 29051 -pipe \ 29052 -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" 29053 case $OPENJDK_TARGET_CPU_ARCH in 29054 arm ) 29055 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing 29056 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 29057 ;; 29058 ppc ) 29059 # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing 29060 ;; 29061 * ) 29062 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" 29063 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 29064 ;; 29065 esac 29066 ;; 29067 ossc ) 29068 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" 29069 case $OPENJDK_TARGET_CPU_ARCH in 29070 x86 ) 29071 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" 29072 CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" 29073 ;; 29074 esac 29075 29076 CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal" 29077 CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib" 29078 29079 LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext" 29080 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" 29081 ;; 29082 cl ) 29083 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ 29084 -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ 29085 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ 29086 -DWIN32 -DIAL" 29087 case $OPENJDK_TARGET_CPU in 29088 x86 ) 29089 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" 29090 ;; 29091 x86_64 ) 29092 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" 29093 ;; 29094 esac 29095 ;; 29096 esac 29097 29098 ############################################################################### 29099 29100 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" 29101 29102 # The package path is used only on macosx? 29103 PACKAGE_PATH=/opt/local 29104 29105 29106 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then 29107 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the 29108 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN 29109 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). 29110 # Note: -Dmacro is the same as #define macro 1 29111 # -Dmacro= is the same as #define macro 29112 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29113 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN=" 29114 else 29115 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" 29116 fi 29117 else 29118 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" 29119 fi 29120 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29121 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" 29122 fi 29123 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29124 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" 29125 fi 29126 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29127 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" 29128 fi 29129 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29130 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" 29131 # Setting these parameters makes it an error to link to macosx APIs that are 29132 # newer than the given OS version and makes the linked binaries compatible even 29133 # if built on a newer version of the OS. 29134 # The expected format is X.Y.Z 29135 MACOSX_VERSION_MIN=10.7.0 29136 29137 # The macro takes the version with no dots, ex: 1070 29138 # Let the flags variables get resolved in make for easier override on make 29139 # command line. 29140 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" 29141 LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" 29142 fi 29143 if test "x$OPENJDK_TARGET_OS" = xbsd; then 29144 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" 29145 fi 29146 if test "x$DEBUG_LEVEL" = xrelease; then 29147 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" 29148 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29149 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" 29150 fi 29151 else 29152 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" 29153 fi 29154 29155 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" 29156 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" 29157 29158 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ 29159 -I${JDK_OUTPUTDIR}/include \ 29160 -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ 29161 -I${JDK_TOPDIR}/src/share/javavm/export \ 29162 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \ 29163 -I${JDK_TOPDIR}/src/share/native/common \ 29164 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common" 29165 29166 # The shared libraries are compiled using the picflag. 29167 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" 29168 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA " 29169 29170 # Executable flags 29171 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" 29172 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" 29173 29174 # Now this is odd. The JDK native libraries have to link against libjvm.so 29175 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server. 29176 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library 29177 # is identical for client and server? Yes. Which is picked at runtime (client or server)? 29178 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following 29179 # libraries will link to whatever is in memory. Yuck. 29180 # 29181 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. 29182 if test "x$COMPILER_NAME" = xcl; then 29183 LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" 29184 if test "x$OPENJDK_TARGET_CPU" = xx86; then 29185 LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" 29186 fi 29187 # TODO: make -debug optional "--disable-full-debug-symbols" 29188 LDFLAGS_JDK="$LDFLAGS_JDK -debug" 29189 LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib" 29190 LDFLAGS_JDKLIB_SUFFIX="" 29191 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 29192 LDFLAGS_STACK_SIZE=1048576 29193 else 29194 LDFLAGS_STACK_SIZE=327680 29195 fi 29196 LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" 29197 else 29198 if test "x$COMPILER_NAME" = xgcc; then 29199 # If this is a --hash-style=gnu system, use --hash-style=both, why? 29200 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` 29201 if test -n "$HAS_GNU_HASH"; then 29202 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " 29203 fi 29204 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29205 # And since we now know that the linker is gnu, then add -z defs, to forbid 29206 # undefined symbols in object files. 29207 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" 29208 if test "x$DEBUG_LEVEL" = "xrelease"; then 29209 # When building release libraries, tell the linker optimize them. 29210 # Should this be supplied to the OSS linker as well? 29211 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1" 29212 fi 29213 fi 29214 fi 29215 LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \ 29216 -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}" 29217 29218 # On some platforms (mac) the linker warns about non existing -L dirs. 29219 # Add server first if available. Linking aginst client does not always produce the same results. 29220 # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1. 29221 # Default to server for other variants. 29222 if test "x$JVM_VARIANT_SERVER" = xtrue; then 29223 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 29224 elif test "x$JVM_VARIANT_CLIENT" = xtrue; then 29225 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client" 29226 elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 29227 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal" 29228 else 29229 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 29230 fi 29231 29232 LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm" 29233 if test "x$COMPILER_NAME" = xossc; then 29234 LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" 29235 fi 29236 29237 LDFLAGS_JDKEXE="${LDFLAGS_JDK}" 29238 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29239 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined" 29240 fi 29241 fi 29242 29243 # Adjust flags according to debug level. 29244 case $DEBUG_LEVEL in 29245 fastdebug ) 29246 CFLAGS="$CFLAGS $D_FLAG" 29247 JAVAC_FLAGS="$JAVAC_FLAGS -g" 29248 ;; 29249 slowdebug ) 29250 CFLAGS="$CFLAGS $D_FLAG" 29251 C_O_FLAG_HI="$C_O_FLAG_NONE" 29252 C_O_FLAG_NORM="$C_O_FLAG_NONE" 29253 CXX_O_FLAG_HI="$CXX_O_FLAG_NONE" 29254 CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" 29255 JAVAC_FLAGS="$JAVAC_FLAGS -g" 29256 ;; 29257 esac 29258 29259 29260 29261 29262 29263 29264 29265 29266 29267 29268 29269 29270 29271 29272 29273 29274 # Some Zero and Shark settings. 29275 # ZERO_ARCHFLAG tells the compiler which mode to build for 29276 case "${OPENJDK_TARGET_CPU}" in 29277 s390) 29278 ZERO_ARCHFLAG="-m31" 29279 ;; 29280 *) 29281 ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}" 29282 esac 29283 29284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5 29285 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; } 29286 supports=yes 29287 29288 saved_cflags="$CFLAGS" 29289 CFLAGS="$CFLAGS $ZERO_ARCHFLAG" 29290 ac_ext=c 29291 ac_cpp='$CPP $CPPFLAGS' 29292 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29293 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29294 ac_compiler_gnu=$ac_cv_c_compiler_gnu 29295 29296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29297 /* end confdefs.h. */ 29298 29299 int i; 29300 29301 _ACEOF 29302 if ac_fn_c_try_compile "$LINENO"; then : 29303 29304 else 29305 supports=no 29306 fi 29307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29308 ac_ext=cpp 29309 ac_cpp='$CXXCPP $CPPFLAGS' 29310 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29311 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29312 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29313 29314 CFLAGS="$saved_cflags" 29315 29316 saved_cxxflags="$CXXFLAGS" 29317 CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG" 29318 ac_ext=cpp 29319 ac_cpp='$CXXCPP $CPPFLAGS' 29320 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29321 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29322 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29323 29324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29325 /* end confdefs.h. */ 29326 29327 int i; 29328 29329 _ACEOF 29330 if ac_fn_cxx_try_compile "$LINENO"; then : 29331 29332 else 29333 supports=no 29334 fi 29335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29336 ac_ext=cpp 29337 ac_cpp='$CXXCPP $CPPFLAGS' 29338 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29339 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29340 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29341 29342 CXXFLAGS="$saved_cxxflags" 29343 29344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 29345 $as_echo "$supports" >&6; } 29346 if test "x$supports" = "xyes" ; then 29347 : 29348 else 29349 ZERO_ARCHFLAG="" 29350 fi 29351 29352 29353 29354 # Check that the compiler supports -mX flags 29355 # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does 29356 29357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5 29358 $as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; } 29359 supports=yes 29360 29361 saved_cflags="$CFLAGS" 29362 CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}" 29363 ac_ext=c 29364 ac_cpp='$CPP $CPPFLAGS' 29365 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29366 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29367 ac_compiler_gnu=$ac_cv_c_compiler_gnu 29368 29369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29370 /* end confdefs.h. */ 29371 29372 int i; 29373 29374 _ACEOF 29375 if ac_fn_c_try_compile "$LINENO"; then : 29376 29377 else 29378 supports=no 29379 fi 29380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29381 ac_ext=cpp 29382 ac_cpp='$CXXCPP $CPPFLAGS' 29383 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29384 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29385 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29386 29387 CFLAGS="$saved_cflags" 29388 29389 saved_cxxflags="$CXXFLAGS" 29390 CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}" 29391 ac_ext=cpp 29392 ac_cpp='$CXXCPP $CPPFLAGS' 29393 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29394 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29395 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29396 29397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29398 /* end confdefs.h. */ 29399 29400 int i; 29401 29402 _ACEOF 29403 if ac_fn_cxx_try_compile "$LINENO"; then : 29404 29405 else 29406 supports=no 29407 fi 29408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29409 ac_ext=cpp 29410 ac_cpp='$CXXCPP $CPPFLAGS' 29411 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29412 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29413 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29414 29415 CXXFLAGS="$saved_cxxflags" 29416 29417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 29418 $as_echo "$supports" >&6; } 29419 if test "x$supports" = "xyes" ; then 29420 COMPILER_SUPPORTS_TARGET_BITS_FLAG=true 29421 else 29422 COMPILER_SUPPORTS_TARGET_BITS_FLAG=false 29423 fi 29424 29425 29426 29427 29428 # Setup debug symbols (need objcopy from the toolchain for that) 29429 29430 # 29431 # ENABLE_DEBUG_SYMBOLS 29432 # This must be done after the toolchain is setup, since we're looking at objcopy. 29433 # 29434 # Check whether --enable-debug-symbols was given. 29435 if test "${enable_debug_symbols+set}" = set; then : 29436 enableval=$enable_debug_symbols; 29437 fi 29438 29439 29440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5 29441 $as_echo_n "checking if we should generate debug symbols... " >&6; } 29442 29443 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then 29444 # explicit enabling of enable-debug-symbols and can't find objcopy 29445 # this is an error 29446 as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5 29447 fi 29448 29449 if test "x$enable_debug_symbols" = "xyes"; then 29450 ENABLE_DEBUG_SYMBOLS=true 29451 elif test "x$enable_debug_symbols" = "xno"; then 29452 ENABLE_DEBUG_SYMBOLS=false 29453 else 29454 # default on macosx is false 29455 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29456 ENABLE_DEBUG_SYMBOLS=false 29457 # Default is on if objcopy is found, otherwise off 29458 elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then 29459 ENABLE_DEBUG_SYMBOLS=true 29460 else 29461 ENABLE_DEBUG_SYMBOLS=false 29462 fi 29463 fi 29464 29465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5 29466 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; } 29467 29468 # 29469 # ZIP_DEBUGINFO_FILES 29470 # 29471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5 29472 $as_echo_n "checking if we should zip debug-info files... " >&6; } 29473 # Check whether --enable-zip-debug-info was given. 29474 if test "${enable_zip_debug_info+set}" = set; then : 29475 enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}" 29476 else 29477 enable_zip_debug_info="yes" 29478 fi 29479 29480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5 29481 $as_echo "${enable_zip_debug_info}" >&6; } 29482 29483 if test "x${enable_zip_debug_info}" = "xno"; then 29484 ZIP_DEBUGINFO_FILES=false 29485 else 29486 ZIP_DEBUGINFO_FILES=true 29487 fi 29488 29489 29490 29491 29492 29493 29494 29495 ############################################################################### 29496 # 29497 # Check dependencies for external and internal libraries. 29498 # 29499 ############################################################################### 29500 29501 29502 29503 ############################################################################### 29504 # 29505 # OS specific settings that we never will need to probe. 29506 # 29507 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5 29509 $as_echo_n "checking what is not needed on Linux?... " >&6; } 29510 PULSE_NOT_NEEDED=yes 29511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5 29512 $as_echo "pulse" >&6; } 29513 fi 29514 29515 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5 29517 $as_echo_n "checking what is not needed on Solaris?... " >&6; } 29518 ALSA_NOT_NEEDED=yes 29519 PULSE_NOT_NEEDED=yes 29520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 29521 $as_echo "alsa pulse" >&6; } 29522 fi 29523 29524 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5 29526 $as_echo_n "checking what is not needed on Windows?... " >&6; } 29527 CUPS_NOT_NEEDED=yes 29528 ALSA_NOT_NEEDED=yes 29529 PULSE_NOT_NEEDED=yes 29530 X11_NOT_NEEDED=yes 29531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5 29532 $as_echo "alsa cups pulse x11" >&6; } 29533 fi 29534 29535 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5 29537 $as_echo_n "checking what is not needed on MacOSX?... " >&6; } 29538 ALSA_NOT_NEEDED=yes 29539 PULSE_NOT_NEEDED=yes 29540 X11_NOT_NEEDED=yes 29541 FREETYPE2_NOT_NEEDED=yes 29542 # If the java runtime framework is disabled, then we need X11. 29543 # This will be adjusted below. 29544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5 29545 $as_echo "alsa pulse x11" >&6; } 29546 fi 29547 29548 if test "x$OPENJDK_TARGET_OS" = xbsd; then 29549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5 29550 $as_echo_n "checking what is not needed on bsd?... " >&6; } 29551 ALSA_NOT_NEEDED=yes 29552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5 29553 $as_echo "alsa" >&6; } 29554 fi 29555 29556 if test "x$OPENJDK" = "xfalse"; then 29557 FREETYPE2_NOT_NEEDED=yes 29558 fi 29559 29560 if test "x$SUPPORT_HEADFUL" = xno; then 29561 X11_NOT_NEEDED=yes 29562 fi 29563 29564 ############################################################################### 29565 # 29566 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM 29567 # that uses this API. 29568 # 29569 # Check whether --enable-macosx-runtime-support was given. 29570 if test "${enable_macosx_runtime_support+set}" = set; then : 29571 enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}" 29572 else 29573 MACOSX_RUNTIME_SUPPORT="no" 29574 fi 29575 29576 29577 USE_MACOSX_RUNTIME_SUPPORT=no 29578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5 29579 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; } 29580 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 29581 if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then 29582 MACOSX_RUNTIME_SUPPORT=yes 29583 USE_MACOSX_RUNTIME_SUPPORT=yes 29584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5 29585 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; } 29586 else 29587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5 29588 $as_echo "yes, but explicitly disabled." >&6; } 29589 fi 29590 else 29591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 29592 $as_echo "no" >&6; } 29593 fi 29594 29595 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then 29596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5 29597 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; } 29598 X11_NOT_NEEDED= 29599 FREETYPE2_NOT_NEEDED= 29600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 29601 $as_echo "alsa pulse" >&6; } 29602 fi 29603 29604 29605 29606 ############################################################################### 29607 # 29608 # Check for X Windows 29609 # 29610 29611 # Check if the user has specified sysroot, but not --x-includes or --x-libraries. 29612 # Make a simple check for the libraries at the sysroot, and setup --x-includes and 29613 # --x-libraries for the sysroot, if that seems to be correct. 29614 if test "x$SYS_ROOT" != "x/"; then 29615 if test "x$x_includes" = xNONE; then 29616 if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then 29617 x_includes="$SYS_ROOT/usr/X11R6/include" 29618 fi 29619 fi 29620 if test "x$x_libraries" = xNONE; then 29621 if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then 29622 x_libraries="$SYS_ROOT/usr/X11R6/lib" 29623 fi 29624 fi 29625 fi 29626 29627 # Now let autoconf do it's magic 29628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 29629 $as_echo_n "checking for X... " >&6; } 29630 29631 29632 # Check whether --with-x was given. 29633 if test "${with_x+set}" = set; then : 29634 withval=$with_x; 29635 fi 29636 29637 # $have_x is `yes', `no', `disabled', or empty when we do not yet know. 29638 if test "x$with_x" = xno; then 29639 # The user explicitly disabled X. 29640 have_x=disabled 29641 else 29642 case $x_includes,$x_libraries in #( 29643 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( 29644 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : 29645 $as_echo_n "(cached) " >&6 29646 else 29647 # One or both of the vars are not set, and there is no cached value. 29648 ac_x_includes=no ac_x_libraries=no 29649 rm -f -r conftest.dir 29650 if mkdir conftest.dir; then 29651 cd conftest.dir 29652 cat >Imakefile <<'_ACEOF' 29653 incroot: 29654 @echo incroot='${INCROOT}' 29655 usrlibdir: 29656 @echo usrlibdir='${USRLIBDIR}' 29657 libdir: 29658 @echo libdir='${LIBDIR}' 29659 _ACEOF 29660 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then 29661 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 29662 for ac_var in incroot usrlibdir libdir; do 29663 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" 29664 done 29665 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. 29666 for ac_extension in a so sl dylib la dll; do 29667 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && 29668 test -f "$ac_im_libdir/libX11.$ac_extension"; then 29669 ac_im_usrlibdir=$ac_im_libdir; break 29670 fi 29671 done 29672 # Screen out bogus values from the imake configuration. They are 29673 # bogus both because they are the default anyway, and because 29674 # using them would break gcc on systems where it needs fixed includes. 29675 case $ac_im_incroot in 29676 /usr/include) ac_x_includes= ;; 29677 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; 29678 esac 29679 case $ac_im_usrlibdir in 29680 /usr/lib | /usr/lib64 | /lib | /lib64) ;; 29681 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; 29682 esac 29683 fi 29684 cd .. 29685 rm -f -r conftest.dir 29686 fi 29687 29688 # Standard set of common directories for X headers. 29689 # Check X11 before X11Rn because it is often a symlink to the current release. 29690 ac_x_header_dirs=' 29691 /usr/X11/include 29692 /usr/X11R7/include 29693 /usr/X11R6/include 29694 /usr/X11R5/include 29695 /usr/X11R4/include 29696 29697 /usr/include/X11 29698 /usr/include/X11R7 29699 /usr/include/X11R6 29700 /usr/include/X11R5 29701 /usr/include/X11R4 29702 29703 /usr/local/X11/include 29704 /usr/local/X11R7/include 29705 /usr/local/X11R6/include 29706 /usr/local/X11R5/include 29707 /usr/local/X11R4/include 29708 29709 /usr/local/include/X11 29710 /usr/local/include/X11R7 29711 /usr/local/include/X11R6 29712 /usr/local/include/X11R5 29713 /usr/local/include/X11R4 29714 29715 /usr/X386/include 29716 /usr/x386/include 29717 /usr/XFree86/include/X11 29718 29719 /usr/include 29720 /usr/local/include 29721 /usr/unsupported/include 29722 /usr/athena/include 29723 /usr/local/x11r5/include 29724 /usr/lpp/Xamples/include 29725 29726 /usr/openwin/include 29727 /usr/openwin/share/include' 29728 29729 if test "$ac_x_includes" = no; then 29730 # Guess where to find include files, by looking for Xlib.h. 29731 # First, try using that file with no special directory specified. 29732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29733 /* end confdefs.h. */ 29734 #include <X11/Xlib.h> 29735 _ACEOF 29736 if ac_fn_cxx_try_cpp "$LINENO"; then : 29737 # We can compile using X headers with no special include directory. 29738 ac_x_includes= 29739 else 29740 for ac_dir in $ac_x_header_dirs; do 29741 if test -r "$ac_dir/X11/Xlib.h"; then 29742 ac_x_includes=$ac_dir 29743 break 29744 fi 29745 done 29746 fi 29747 rm -f conftest.err conftest.i conftest.$ac_ext 29748 fi # $ac_x_includes = no 29749 29750 if test "$ac_x_libraries" = no; then 29751 # Check for the libraries. 29752 # See if we find them without any special options. 29753 # Don't add to $LIBS permanently. 29754 ac_save_LIBS=$LIBS 29755 LIBS="-lX11 $LIBS" 29756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29757 /* end confdefs.h. */ 29758 #include <X11/Xlib.h> 29759 int 29760 main () 29761 { 29762 XrmInitialize () 29763 ; 29764 return 0; 29765 } 29766 _ACEOF 29767 if ac_fn_cxx_try_link "$LINENO"; then : 29768 LIBS=$ac_save_LIBS 29769 # We can link X programs with no special library path. 29770 ac_x_libraries= 29771 else 29772 LIBS=$ac_save_LIBS 29773 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` 29774 do 29775 # Don't even attempt the hair of trying to link an X program! 29776 for ac_extension in a so sl dylib la dll; do 29777 if test -r "$ac_dir/libX11.$ac_extension"; then 29778 ac_x_libraries=$ac_dir 29779 break 2 29780 fi 29781 done 29782 done 29783 fi 29784 rm -f core conftest.err conftest.$ac_objext \ 29785 conftest$ac_exeext conftest.$ac_ext 29786 fi # $ac_x_libraries = no 29787 29788 case $ac_x_includes,$ac_x_libraries in #( 29789 no,* | *,no | *\'*) 29790 # Didn't find X, or a directory has "'" in its name. 29791 ac_cv_have_x="have_x=no";; #( 29792 *) 29793 # Record where we found X for the cache. 29794 ac_cv_have_x="have_x=yes\ 29795 ac_x_includes='$ac_x_includes'\ 29796 ac_x_libraries='$ac_x_libraries'" 29797 esac 29798 fi 29799 ;; #( 29800 *) have_x=yes;; 29801 esac 29802 eval "$ac_cv_have_x" 29803 fi # $with_x != no 29804 29805 if test "$have_x" != yes; then 29806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 29807 $as_echo "$have_x" >&6; } 29808 no_x=yes 29809 else 29810 # If each of the values was on the command line, it overrides each guess. 29811 test "x$x_includes" = xNONE && x_includes=$ac_x_includes 29812 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries 29813 # Update the cache value to reflect the command line values. 29814 ac_cv_have_x="have_x=yes\ 29815 ac_x_includes='$x_includes'\ 29816 ac_x_libraries='$x_libraries'" 29817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 29818 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } 29819 fi 29820 29821 if test "$no_x" = yes; then 29822 # Not all programs may use this symbol, but it does not hurt to define it. 29823 29824 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h 29825 29826 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= 29827 else 29828 if test -n "$x_includes"; then 29829 X_CFLAGS="$X_CFLAGS -I$x_includes" 29830 fi 29831 29832 # It would also be nice to do this for all -L options, not just this one. 29833 if test -n "$x_libraries"; then 29834 X_LIBS="$X_LIBS -L$x_libraries" 29835 # For Solaris; some versions of Sun CC require a space after -R and 29836 # others require no space. Words are not sufficient . . . . 29837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 29838 $as_echo_n "checking whether -R must be followed by a space... " >&6; } 29839 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" 29840 ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag 29841 ac_cxx_werror_flag=yes 29842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29843 /* end confdefs.h. */ 29844 29845 int 29846 main () 29847 { 29848 29849 ; 29850 return 0; 29851 } 29852 _ACEOF 29853 if ac_fn_cxx_try_link "$LINENO"; then : 29854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 29855 $as_echo "no" >&6; } 29856 X_LIBS="$X_LIBS -R$x_libraries" 29857 else 29858 LIBS="$ac_xsave_LIBS -R $x_libraries" 29859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29860 /* end confdefs.h. */ 29861 29862 int 29863 main () 29864 { 29865 29866 ; 29867 return 0; 29868 } 29869 _ACEOF 29870 if ac_fn_cxx_try_link "$LINENO"; then : 29871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 29872 $as_echo "yes" >&6; } 29873 X_LIBS="$X_LIBS -R $x_libraries" 29874 else 29875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 29876 $as_echo "neither works" >&6; } 29877 fi 29878 rm -f core conftest.err conftest.$ac_objext \ 29879 conftest$ac_exeext conftest.$ac_ext 29880 fi 29881 rm -f core conftest.err conftest.$ac_objext \ 29882 conftest$ac_exeext conftest.$ac_ext 29883 ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag 29884 LIBS=$ac_xsave_LIBS 29885 fi 29886 29887 # Check for system-dependent libraries X programs must link with. 29888 # Do this before checking for the system-independent R6 libraries 29889 # (-lICE), since we may need -lsocket or whatever for X linking. 29890 29891 if test "$ISC" = yes; then 29892 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" 29893 else 29894 # Martyn Johnson says this is needed for Ultrix, if the X 29895 # libraries were built with DECnet support. And Karl Berry says 29896 # the Alpha needs dnet_stub (dnet does not exist). 29897 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" 29898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29899 /* end confdefs.h. */ 29900 29901 /* Override any GCC internal prototype to avoid an error. 29902 Use char because int might match the return type of a GCC 29903 builtin and then its argument prototype would still apply. */ 29904 #ifdef __cplusplus 29905 extern "C" 29906 #endif 29907 char XOpenDisplay (); 29908 int 29909 main () 29910 { 29911 return XOpenDisplay (); 29912 ; 29913 return 0; 29914 } 29915 _ACEOF 29916 if ac_fn_cxx_try_link "$LINENO"; then : 29917 29918 else 29919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 29920 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } 29921 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : 29922 $as_echo_n "(cached) " >&6 29923 else 29924 ac_check_lib_save_LIBS=$LIBS 29925 LIBS="-ldnet $LIBS" 29926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29927 /* end confdefs.h. */ 29928 29929 /* Override any GCC internal prototype to avoid an error. 29930 Use char because int might match the return type of a GCC 29931 builtin and then its argument prototype would still apply. */ 29932 #ifdef __cplusplus 29933 extern "C" 29934 #endif 29935 char dnet_ntoa (); 29936 int 29937 main () 29938 { 29939 return dnet_ntoa (); 29940 ; 29941 return 0; 29942 } 29943 _ACEOF 29944 if ac_fn_cxx_try_link "$LINENO"; then : 29945 ac_cv_lib_dnet_dnet_ntoa=yes 29946 else 29947 ac_cv_lib_dnet_dnet_ntoa=no 29948 fi 29949 rm -f core conftest.err conftest.$ac_objext \ 29950 conftest$ac_exeext conftest.$ac_ext 29951 LIBS=$ac_check_lib_save_LIBS 29952 fi 29953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 29954 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } 29955 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : 29956 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" 29957 fi 29958 29959 if test $ac_cv_lib_dnet_dnet_ntoa = no; then 29960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 29961 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } 29962 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : 29963 $as_echo_n "(cached) " >&6 29964 else 29965 ac_check_lib_save_LIBS=$LIBS 29966 LIBS="-ldnet_stub $LIBS" 29967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29968 /* end confdefs.h. */ 29969 29970 /* Override any GCC internal prototype to avoid an error. 29971 Use char because int might match the return type of a GCC 29972 builtin and then its argument prototype would still apply. */ 29973 #ifdef __cplusplus 29974 extern "C" 29975 #endif 29976 char dnet_ntoa (); 29977 int 29978 main () 29979 { 29980 return dnet_ntoa (); 29981 ; 29982 return 0; 29983 } 29984 _ACEOF 29985 if ac_fn_cxx_try_link "$LINENO"; then : 29986 ac_cv_lib_dnet_stub_dnet_ntoa=yes 29987 else 29988 ac_cv_lib_dnet_stub_dnet_ntoa=no 29989 fi 29990 rm -f core conftest.err conftest.$ac_objext \ 29991 conftest$ac_exeext conftest.$ac_ext 29992 LIBS=$ac_check_lib_save_LIBS 29993 fi 29994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 29995 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } 29996 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : 29997 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" 29998 fi 29999 30000 fi 30001 fi 30002 rm -f core conftest.err conftest.$ac_objext \ 30003 conftest$ac_exeext conftest.$ac_ext 30004 LIBS="$ac_xsave_LIBS" 30005 30006 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, 30007 # to get the SysV transport functions. 30008 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) 30009 # needs -lnsl. 30010 # The nsl library prevents programs from opening the X display 30011 # on Irix 5.2, according to T.E. Dickey. 30012 # The functions gethostbyname, getservbyname, and inet_addr are 30013 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. 30014 ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" 30015 if test "x$ac_cv_func_gethostbyname" = x""yes; then : 30016 30017 fi 30018 30019 if test $ac_cv_func_gethostbyname = no; then 30020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 30021 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } 30022 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : 30023 $as_echo_n "(cached) " >&6 30024 else 30025 ac_check_lib_save_LIBS=$LIBS 30026 LIBS="-lnsl $LIBS" 30027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30028 /* end confdefs.h. */ 30029 30030 /* Override any GCC internal prototype to avoid an error. 30031 Use char because int might match the return type of a GCC 30032 builtin and then its argument prototype would still apply. */ 30033 #ifdef __cplusplus 30034 extern "C" 30035 #endif 30036 char gethostbyname (); 30037 int 30038 main () 30039 { 30040 return gethostbyname (); 30041 ; 30042 return 0; 30043 } 30044 _ACEOF 30045 if ac_fn_cxx_try_link "$LINENO"; then : 30046 ac_cv_lib_nsl_gethostbyname=yes 30047 else 30048 ac_cv_lib_nsl_gethostbyname=no 30049 fi 30050 rm -f core conftest.err conftest.$ac_objext \ 30051 conftest$ac_exeext conftest.$ac_ext 30052 LIBS=$ac_check_lib_save_LIBS 30053 fi 30054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 30055 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } 30056 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : 30057 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" 30058 fi 30059 30060 if test $ac_cv_lib_nsl_gethostbyname = no; then 30061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 30062 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } 30063 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : 30064 $as_echo_n "(cached) " >&6 30065 else 30066 ac_check_lib_save_LIBS=$LIBS 30067 LIBS="-lbsd $LIBS" 30068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30069 /* end confdefs.h. */ 30070 30071 /* Override any GCC internal prototype to avoid an error. 30072 Use char because int might match the return type of a GCC 30073 builtin and then its argument prototype would still apply. */ 30074 #ifdef __cplusplus 30075 extern "C" 30076 #endif 30077 char gethostbyname (); 30078 int 30079 main () 30080 { 30081 return gethostbyname (); 30082 ; 30083 return 0; 30084 } 30085 _ACEOF 30086 if ac_fn_cxx_try_link "$LINENO"; then : 30087 ac_cv_lib_bsd_gethostbyname=yes 30088 else 30089 ac_cv_lib_bsd_gethostbyname=no 30090 fi 30091 rm -f core conftest.err conftest.$ac_objext \ 30092 conftest$ac_exeext conftest.$ac_ext 30093 LIBS=$ac_check_lib_save_LIBS 30094 fi 30095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 30096 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } 30097 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : 30098 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" 30099 fi 30100 30101 fi 30102 fi 30103 30104 # lieder@skyler.mavd.honeywell.com says without -lsocket, 30105 # socket/setsockopt and other routines are undefined under SCO ODT 30106 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary 30107 # on later versions), says Simon Leinen: it contains gethostby* 30108 # variants that don't use the name server (or something). -lsocket 30109 # must be given before -lnsl if both are needed. We assume that 30110 # if connect needs -lnsl, so does gethostbyname. 30111 ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" 30112 if test "x$ac_cv_func_connect" = x""yes; then : 30113 30114 fi 30115 30116 if test $ac_cv_func_connect = no; then 30117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 30118 $as_echo_n "checking for connect in -lsocket... " >&6; } 30119 if test "${ac_cv_lib_socket_connect+set}" = set; then : 30120 $as_echo_n "(cached) " >&6 30121 else 30122 ac_check_lib_save_LIBS=$LIBS 30123 LIBS="-lsocket $X_EXTRA_LIBS $LIBS" 30124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30125 /* end confdefs.h. */ 30126 30127 /* Override any GCC internal prototype to avoid an error. 30128 Use char because int might match the return type of a GCC 30129 builtin and then its argument prototype would still apply. */ 30130 #ifdef __cplusplus 30131 extern "C" 30132 #endif 30133 char connect (); 30134 int 30135 main () 30136 { 30137 return connect (); 30138 ; 30139 return 0; 30140 } 30141 _ACEOF 30142 if ac_fn_cxx_try_link "$LINENO"; then : 30143 ac_cv_lib_socket_connect=yes 30144 else 30145 ac_cv_lib_socket_connect=no 30146 fi 30147 rm -f core conftest.err conftest.$ac_objext \ 30148 conftest$ac_exeext conftest.$ac_ext 30149 LIBS=$ac_check_lib_save_LIBS 30150 fi 30151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 30152 $as_echo "$ac_cv_lib_socket_connect" >&6; } 30153 if test "x$ac_cv_lib_socket_connect" = x""yes; then : 30154 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" 30155 fi 30156 30157 fi 30158 30159 # Guillermo Gomez says -lposix is necessary on A/UX. 30160 ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" 30161 if test "x$ac_cv_func_remove" = x""yes; then : 30162 30163 fi 30164 30165 if test $ac_cv_func_remove = no; then 30166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 30167 $as_echo_n "checking for remove in -lposix... " >&6; } 30168 if test "${ac_cv_lib_posix_remove+set}" = set; then : 30169 $as_echo_n "(cached) " >&6 30170 else 30171 ac_check_lib_save_LIBS=$LIBS 30172 LIBS="-lposix $LIBS" 30173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30174 /* end confdefs.h. */ 30175 30176 /* Override any GCC internal prototype to avoid an error. 30177 Use char because int might match the return type of a GCC 30178 builtin and then its argument prototype would still apply. */ 30179 #ifdef __cplusplus 30180 extern "C" 30181 #endif 30182 char remove (); 30183 int 30184 main () 30185 { 30186 return remove (); 30187 ; 30188 return 0; 30189 } 30190 _ACEOF 30191 if ac_fn_cxx_try_link "$LINENO"; then : 30192 ac_cv_lib_posix_remove=yes 30193 else 30194 ac_cv_lib_posix_remove=no 30195 fi 30196 rm -f core conftest.err conftest.$ac_objext \ 30197 conftest$ac_exeext conftest.$ac_ext 30198 LIBS=$ac_check_lib_save_LIBS 30199 fi 30200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 30201 $as_echo "$ac_cv_lib_posix_remove" >&6; } 30202 if test "x$ac_cv_lib_posix_remove" = x""yes; then : 30203 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" 30204 fi 30205 30206 fi 30207 30208 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. 30209 ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" 30210 if test "x$ac_cv_func_shmat" = x""yes; then : 30211 30212 fi 30213 30214 if test $ac_cv_func_shmat = no; then 30215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 30216 $as_echo_n "checking for shmat in -lipc... " >&6; } 30217 if test "${ac_cv_lib_ipc_shmat+set}" = set; then : 30218 $as_echo_n "(cached) " >&6 30219 else 30220 ac_check_lib_save_LIBS=$LIBS 30221 LIBS="-lipc $LIBS" 30222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30223 /* end confdefs.h. */ 30224 30225 /* Override any GCC internal prototype to avoid an error. 30226 Use char because int might match the return type of a GCC 30227 builtin and then its argument prototype would still apply. */ 30228 #ifdef __cplusplus 30229 extern "C" 30230 #endif 30231 char shmat (); 30232 int 30233 main () 30234 { 30235 return shmat (); 30236 ; 30237 return 0; 30238 } 30239 _ACEOF 30240 if ac_fn_cxx_try_link "$LINENO"; then : 30241 ac_cv_lib_ipc_shmat=yes 30242 else 30243 ac_cv_lib_ipc_shmat=no 30244 fi 30245 rm -f core conftest.err conftest.$ac_objext \ 30246 conftest$ac_exeext conftest.$ac_ext 30247 LIBS=$ac_check_lib_save_LIBS 30248 fi 30249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 30250 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } 30251 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : 30252 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" 30253 fi 30254 30255 fi 30256 fi 30257 30258 # Check for libraries that X11R6 Xt/Xaw programs need. 30259 ac_save_LDFLAGS=$LDFLAGS 30260 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" 30261 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to 30262 # check for ICE first), but we must link in the order -lSM -lICE or 30263 # we get undefined symbols. So assume we have SM if we have ICE. 30264 # These have to be linked with before -lX11, unlike the other 30265 # libraries we check for below, so use a different variable. 30266 # John Interrante, Karl Berry 30267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 30268 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } 30269 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : 30270 $as_echo_n "(cached) " >&6 30271 else 30272 ac_check_lib_save_LIBS=$LIBS 30273 LIBS="-lICE $X_EXTRA_LIBS $LIBS" 30274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30275 /* end confdefs.h. */ 30276 30277 /* Override any GCC internal prototype to avoid an error. 30278 Use char because int might match the return type of a GCC 30279 builtin and then its argument prototype would still apply. */ 30280 #ifdef __cplusplus 30281 extern "C" 30282 #endif 30283 char IceConnectionNumber (); 30284 int 30285 main () 30286 { 30287 return IceConnectionNumber (); 30288 ; 30289 return 0; 30290 } 30291 _ACEOF 30292 if ac_fn_cxx_try_link "$LINENO"; then : 30293 ac_cv_lib_ICE_IceConnectionNumber=yes 30294 else 30295 ac_cv_lib_ICE_IceConnectionNumber=no 30296 fi 30297 rm -f core conftest.err conftest.$ac_objext \ 30298 conftest$ac_exeext conftest.$ac_ext 30299 LIBS=$ac_check_lib_save_LIBS 30300 fi 30301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 30302 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } 30303 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : 30304 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" 30305 fi 30306 30307 LDFLAGS=$ac_save_LDFLAGS 30308 30309 fi 30310 30311 30312 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling 30313 # this doesn't make sense so we remove it. 30314 if test "x$COMPILE_TYPE" = xcross; then 30315 X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'` 30316 fi 30317 30318 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 30319 30320 # Print a helpful message on how to acquire the necessary build dependency. 30321 # x11 is the help tag: freetyp2, cups, pulse, alsa etc 30322 MISSING_DEPENDENCY=x11 30323 PKGHANDLER_COMMAND= 30324 30325 case $PKGHANDLER in 30326 apt-get) 30327 apt_help $MISSING_DEPENDENCY ;; 30328 yum) 30329 yum_help $MISSING_DEPENDENCY ;; 30330 port) 30331 port_help $MISSING_DEPENDENCY ;; 30332 pkgutil) 30333 pkgutil_help $MISSING_DEPENDENCY ;; 30334 pkgadd) 30335 pkgadd_help $MISSING_DEPENDENCY ;; 30336 * ) 30337 break ;; 30338 esac 30339 30340 if test "x$PKGHANDLER_COMMAND" != x; then 30341 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30342 fi 30343 30344 as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5 30345 fi 30346 30347 # Some of the old makefiles require a setting of OPENWIN_HOME 30348 # Since the X11R6 directory has disappeared on later Linuxes, 30349 # we need to probe for it. 30350 if test "x$OPENJDK_TARGET_OS" = xlinux; then 30351 if test -d "$SYS_ROOT/usr/X11R6"; then 30352 OPENWIN_HOME="$SYS_ROOT/usr/X11R6" 30353 fi 30354 if test -d "$SYS_ROOT/usr/include/X11"; then 30355 OPENWIN_HOME="$SYS_ROOT/usr" 30356 fi 30357 fi 30358 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 30359 OPENWIN_HOME="/usr/openwin" 30360 fi 30361 30362 30363 30364 # 30365 # Weird Sol10 something check...TODO change to try compile 30366 # 30367 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then 30368 if test "`uname -r`" = "5.10"; then 30369 if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then 30370 X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" 30371 fi 30372 fi 30373 fi 30374 30375 ac_ext=c 30376 ac_cpp='$CPP $CPPFLAGS' 30377 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 30378 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 30379 ac_compiler_gnu=$ac_cv_c_compiler_gnu 30380 30381 OLD_CFLAGS="$CFLAGS" 30382 CFLAGS="$CFLAGS $X_CFLAGS" 30383 30384 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 30385 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h 30386 do : 30387 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 30388 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h> 30389 # include <X11/Xutil.h> 30390 30391 " 30392 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 30393 cat >>confdefs.h <<_ACEOF 30394 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 30395 _ACEOF 30396 X11_A_OK=yes 30397 else 30398 X11_A_OK=no; break 30399 fi 30400 30401 done 30402 30403 30404 CFLAGS="$OLD_CFLAGS" 30405 ac_ext=cpp 30406 ac_cpp='$CXXCPP $CPPFLAGS' 30407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 30408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 30409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 30410 30411 30412 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 30413 30414 # Print a helpful message on how to acquire the necessary build dependency. 30415 # x11 is the help tag: freetyp2, cups, pulse, alsa etc 30416 MISSING_DEPENDENCY=x11 30417 PKGHANDLER_COMMAND= 30418 30419 case $PKGHANDLER in 30420 apt-get) 30421 apt_help $MISSING_DEPENDENCY ;; 30422 yum) 30423 yum_help $MISSING_DEPENDENCY ;; 30424 port) 30425 port_help $MISSING_DEPENDENCY ;; 30426 pkgutil) 30427 pkgutil_help $MISSING_DEPENDENCY ;; 30428 pkgadd) 30429 pkgadd_help $MISSING_DEPENDENCY ;; 30430 * ) 30431 break ;; 30432 esac 30433 30434 if test "x$PKGHANDLER_COMMAND" != x; then 30435 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30436 fi 30437 30438 as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5 30439 fi 30440 30441 30442 30443 30444 30445 30446 ############################################################################### 30447 # 30448 # The common unix printing system cups is used to print from java. 30449 # 30450 30451 # Check whether --with-cups was given. 30452 if test "${with_cups+set}" = set; then : 30453 withval=$with_cups; 30454 fi 30455 30456 30457 # Check whether --with-cups-include was given. 30458 if test "${with_cups_include+set}" = set; then : 30459 withval=$with_cups_include; 30460 fi 30461 30462 30463 if test "x$CUPS_NOT_NEEDED" = xyes; then 30464 if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then 30465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5 30466 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;} 30467 fi 30468 CUPS_CFLAGS= 30469 else 30470 CUPS_FOUND=no 30471 30472 if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then 30473 as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5 30474 fi 30475 30476 if test "x${with_cups}" != x; then 30477 CUPS_CFLAGS="-I${with_cups}/include" 30478 CUPS_FOUND=yes 30479 fi 30480 if test "x${with_cups_include}" != x; then 30481 CUPS_CFLAGS="-I${with_cups_include}" 30482 CUPS_FOUND=yes 30483 fi 30484 if test "x$CUPS_FOUND" = xno; then 30485 30486 30487 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 30488 # Source the builddeps file again, to make sure it uses the latest variables! 30489 . $builddepsfile 30490 # Look for a target and build machine specific resource! 30491 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 30492 if test "x$resource" = x; then 30493 # Ok, lets instead look for a target specific resource 30494 eval resource=\${builddep_cups_TARGET_${rewritten_target_var}} 30495 fi 30496 if test "x$resource" = x; then 30497 # Ok, lets instead look for a build specific resource 30498 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}} 30499 fi 30500 if test "x$resource" = x; then 30501 # Ok, lets instead look for a generic resource 30502 # (The cups comes from M4 and not the shell, thus no need for eval here.) 30503 resource=${builddep_cups} 30504 fi 30505 if test "x$resource" != x; then 30506 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5 30507 $as_echo "$as_me: Using builddeps $resource for cups" >&6;} 30508 # If the resource in the builddeps.conf file is an existing directory, 30509 # for example /java/linux/cups 30510 if test -d ${resource}; then 30511 depdir=${resource} 30512 else 30513 30514 # cups is for example mymodule 30515 # $resource is for example libs/general/libmymod_1_2_3.zip 30516 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 30517 # $with_builddeps_dir is for example /localhome/builddeps 30518 # depdir is the name of the variable into which we store the depdir, eg MYMOD 30519 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 30520 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 30521 filename=`basename $resource` 30522 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 30523 filebase=${filename%%.*} 30524 extension=${filename#*.} 30525 installdir=$with_builddeps_dir/$filebase 30526 if test ! -f $installdir/$filename.unpacked; then 30527 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5 30528 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;} 30529 if test ! -d $installdir; then 30530 mkdir -p $installdir 30531 fi 30532 if test ! -d $installdir; then 30533 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 30534 fi 30535 tmpfile=`mktemp $installdir/cups.XXXXXXXXX` 30536 touch $tmpfile 30537 if test ! -f $tmpfile; then 30538 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 30539 fi 30540 30541 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 30542 # $tmpfile is the local file name for the downloaded file. 30543 VALID_TOOL=no 30544 if test "x$BDEPS_FTP" = xwget; then 30545 VALID_TOOL=yes 30546 wget -O $tmpfile $with_builddeps_server/$resource 30547 fi 30548 if test "x$BDEPS_FTP" = xlftp; then 30549 VALID_TOOL=yes 30550 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 30551 fi 30552 if test "x$BDEPS_FTP" = xftp; then 30553 VALID_TOOL=yes 30554 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 30555 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 30556 FTPUSERPWD=${FTPSERVER%%@*} 30557 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 30558 FTPUSER=${userpwd%%:*} 30559 FTPPWD=${userpwd#*@} 30560 FTPSERVER=${FTPSERVER#*@} 30561 else 30562 FTPUSER=ftp 30563 FTPPWD=ftp 30564 fi 30565 # the "pass" command does not work on some 30566 # ftp clients (read ftp.exe) but if it works, 30567 # passive mode is better! 30568 (\ 30569 echo "user $FTPUSER $FTPPWD" ;\ 30570 echo "pass" ;\ 30571 echo "bin" ;\ 30572 echo "get $FTPPATH $tmpfile" ;\ 30573 ) | ftp -in $FTPSERVER 30574 fi 30575 if test "x$VALID_TOOL" != xyes; then 30576 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 30577 fi 30578 30579 mv $tmpfile $installdir/$filename 30580 if test ! -s $installdir/$filename; then 30581 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 30582 fi 30583 case "$extension" in 30584 zip) echo "Unzipping $installdir/$filename..." 30585 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 30586 ;; 30587 tar.gz) echo "Untaring $installdir/$filename..." 30588 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30589 ;; 30590 tgz) echo "Untaring $installdir/$filename..." 30591 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30592 ;; 30593 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 30594 ;; 30595 esac 30596 fi 30597 if test -f $installdir/$filename.unpacked; then 30598 depdir=$installdir 30599 fi 30600 30601 fi 30602 # Source the builddeps file again, because in the previous command, the depdir 30603 # was updated to point at the current build dependency install directory. 30604 . $builddepsfile 30605 # Now extract variables from the builddeps.conf files. 30606 theroot=${builddep_cups_ROOT} 30607 thecflags=${builddep_cups_CFLAGS} 30608 thelibs=${builddep_cups_LIBS} 30609 if test "x$depdir" = x; then 30610 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5 30611 fi 30612 CUPS=$depdir 30613 if test "x$theroot" != x; then 30614 CUPS="$theroot" 30615 fi 30616 if test "x$thecflags" != x; then 30617 CUPS_CFLAGS="$thecflags" 30618 fi 30619 if test "x$thelibs" != x; then 30620 CUPS_LIBS="$thelibs" 30621 fi 30622 CUPS_FOUND=yes 30623 30624 fi 30625 30626 fi 30627 30628 fi 30629 if test "x$CUPS_FOUND" = xno; then 30630 # Are the cups headers installed in the default /usr/include location? 30631 for ac_header in cups/cups.h cups/ppd.h 30632 do : 30633 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 30634 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 30635 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 30636 cat >>confdefs.h <<_ACEOF 30637 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 30638 _ACEOF 30639 CUPS_FOUND=yes 30640 CUPS_CFLAGS= 30641 DEFAULT_CUPS=yes 30642 fi 30643 30644 done 30645 30646 fi 30647 if test "x$CUPS_FOUND" = xno; then 30648 # Getting nervous now? Lets poke around for standard Solaris third-party 30649 # package installation locations. 30650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5 30651 $as_echo_n "checking for cups headers... " >&6; } 30652 if test -s /opt/sfw/cups/include/cups/cups.h; then 30653 # An SFW package seems to be installed! 30654 CUPS_FOUND=yes 30655 CUPS_CFLAGS="-I/opt/sfw/cups/include" 30656 elif test -s /opt/csw/include/cups/cups.h; then 30657 # A CSW package seems to be installed! 30658 CUPS_FOUND=yes 30659 CUPS_CFLAGS="-I/opt/csw/include" 30660 fi 30661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 30662 $as_echo "$CUPS_FOUND" >&6; } 30663 fi 30664 if test "x$CUPS_FOUND" = xno; then 30665 30666 # Print a helpful message on how to acquire the necessary build dependency. 30667 # cups is the help tag: freetyp2, cups, pulse, alsa etc 30668 MISSING_DEPENDENCY=cups 30669 PKGHANDLER_COMMAND= 30670 30671 case $PKGHANDLER in 30672 apt-get) 30673 apt_help $MISSING_DEPENDENCY ;; 30674 yum) 30675 yum_help $MISSING_DEPENDENCY ;; 30676 port) 30677 port_help $MISSING_DEPENDENCY ;; 30678 pkgutil) 30679 pkgutil_help $MISSING_DEPENDENCY ;; 30680 pkgadd) 30681 pkgadd_help $MISSING_DEPENDENCY ;; 30682 * ) 30683 break ;; 30684 esac 30685 30686 if test "x$PKGHANDLER_COMMAND" != x; then 30687 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30688 fi 30689 30690 as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5 30691 fi 30692 fi 30693 30694 30695 30696 30697 30698 30699 ############################################################################### 30700 # 30701 # The ubiquitous freetype2 library is used to render fonts. 30702 # 30703 30704 # Check whether --with-freetype was given. 30705 if test "${with_freetype+set}" = set; then : 30706 withval=$with_freetype; 30707 fi 30708 30709 30710 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree 30711 USING_SYSTEM_FT_LIB=false 30712 30713 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then 30714 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 30715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5 30716 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;} 30717 fi 30718 FREETYPE2_CFLAGS= 30719 FREETYPE2_LIBS= 30720 FREETYPE2_LIB_PATH= 30721 else 30722 FREETYPE2_FOUND=no 30723 30724 if test "x$with_freetype" != x; then 30725 30726 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 30727 30728 # Input might be given as Windows format, start by converting to 30729 # unix format. 30730 path="$with_freetype" 30731 new_path=`$CYGPATH -u "$path"` 30732 30733 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 30734 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 30735 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 30736 # "foo.exe" is OK but "foo" is an error. 30737 # 30738 # This test is therefore slightly more accurate than "test -f" to check for file precense. 30739 # It is also a way to make sure we got the proper file name for the real test later on. 30740 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 30741 if test "x$test_shortpath" = x; then 30742 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 30743 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 30744 as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5 30745 fi 30746 30747 # Call helper function which possibly converts this using DOS-style short mode. 30748 # If so, the updated path is stored in $new_path. 30749 30750 input_path="$new_path" 30751 # Check if we need to convert this using DOS-style short mode. If the path 30752 # contains just simple characters, use it. Otherwise (spaces, weird characters), 30753 # take no chances and rewrite it. 30754 # Note: m4 eats our [], so we need to use [ and ] instead. 30755 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 30756 if test "x$has_forbidden_chars" != x; then 30757 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 30758 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 30759 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 30760 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 30761 # Going to short mode and back again did indeed matter. Since short mode is 30762 # case insensitive, let's make it lowercase to improve readability. 30763 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 30764 # Now convert it back to Unix-stile (cygpath) 30765 input_path=`$CYGPATH -u "$shortmode_path"` 30766 new_path="$input_path" 30767 fi 30768 fi 30769 30770 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 30771 if test "x$test_cygdrive_prefix" = x; then 30772 # As a simple fix, exclude /usr/bin since it's not a real path. 30773 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 30774 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 30775 # a path prefixed by /cygdrive for fixpath to work. 30776 new_path="$CYGWIN_ROOT_PATH$input_path" 30777 fi 30778 fi 30779 30780 30781 if test "x$path" != "x$new_path"; then 30782 with_freetype="$new_path" 30783 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 30784 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 30785 fi 30786 30787 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 30788 30789 path="$with_freetype" 30790 has_colon=`$ECHO $path | $GREP ^.:` 30791 new_path="$path" 30792 if test "x$has_colon" = x; then 30793 # Not in mixed or Windows style, start by that. 30794 new_path=`cmd //c echo $path` 30795 fi 30796 30797 30798 input_path="$new_path" 30799 # Check if we need to convert this using DOS-style short mode. If the path 30800 # contains just simple characters, use it. Otherwise (spaces, weird characters), 30801 # take no chances and rewrite it. 30802 # Note: m4 eats our [], so we need to use [ and ] instead. 30803 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 30804 if test "x$has_forbidden_chars" != x; then 30805 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 30806 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 30807 fi 30808 30809 30810 windows_path="$new_path" 30811 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 30812 unix_path=`$CYGPATH -u "$windows_path"` 30813 new_path="$unix_path" 30814 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 30815 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 30816 new_path="$unix_path" 30817 fi 30818 30819 if test "x$path" != "x$new_path"; then 30820 with_freetype="$new_path" 30821 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 30822 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 30823 fi 30824 30825 # Save the first 10 bytes of this path to the storage, so fixpath can work. 30826 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 30827 30828 else 30829 # We're on a posix platform. Hooray! :) 30830 path="$with_freetype" 30831 30832 if test ! -f "$path" && test ! -d "$path"; then 30833 as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5 30834 fi 30835 30836 has_space=`$ECHO "$path" | $GREP " "` 30837 if test "x$has_space" != x; then 30838 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 30839 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 30840 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 30841 fi 30842 fi 30843 30844 FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" 30845 FREETYPE2_LIB_PATH="$with_freetype/lib" 30846 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then 30847 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype" 30848 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64" 30849 fi 30850 if test "x$OPENJDK_TARGET_OS" = xwindows; then 30851 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" 30852 fi 30853 FREETYPE2_CFLAGS="-I$with_freetype/include" 30854 if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then 30855 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" 30856 fi 30857 FREETYPE2_FOUND=yes 30858 if test "x$FREETYPE2_FOUND" = xyes; then 30859 # Verify that the directories exist 30860 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then 30861 as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5 30862 fi 30863 # List the contents of the lib. 30864 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` 30865 if test "x$FREETYPELIB" = x; then 30866 as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5 30867 fi 30868 # Check one h-file 30869 if ! test -s "$with_freetype/include/ft2build.h"; then 30870 as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5 30871 fi 30872 fi 30873 fi 30874 if test "x$FREETYPE2_FOUND" = xno; then 30875 30876 30877 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 30878 # Source the builddeps file again, to make sure it uses the latest variables! 30879 . $builddepsfile 30880 # Look for a target and build machine specific resource! 30881 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 30882 if test "x$resource" = x; then 30883 # Ok, lets instead look for a target specific resource 30884 eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}} 30885 fi 30886 if test "x$resource" = x; then 30887 # Ok, lets instead look for a build specific resource 30888 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}} 30889 fi 30890 if test "x$resource" = x; then 30891 # Ok, lets instead look for a generic resource 30892 # (The freetype2 comes from M4 and not the shell, thus no need for eval here.) 30893 resource=${builddep_freetype2} 30894 fi 30895 if test "x$resource" != x; then 30896 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5 30897 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;} 30898 # If the resource in the builddeps.conf file is an existing directory, 30899 # for example /java/linux/cups 30900 if test -d ${resource}; then 30901 depdir=${resource} 30902 else 30903 30904 # freetype2 is for example mymodule 30905 # $resource is for example libs/general/libmymod_1_2_3.zip 30906 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 30907 # $with_builddeps_dir is for example /localhome/builddeps 30908 # depdir is the name of the variable into which we store the depdir, eg MYMOD 30909 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 30910 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 30911 filename=`basename $resource` 30912 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 30913 filebase=${filename%%.*} 30914 extension=${filename#*.} 30915 installdir=$with_builddeps_dir/$filebase 30916 if test ! -f $installdir/$filename.unpacked; then 30917 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5 30918 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;} 30919 if test ! -d $installdir; then 30920 mkdir -p $installdir 30921 fi 30922 if test ! -d $installdir; then 30923 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 30924 fi 30925 tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX` 30926 touch $tmpfile 30927 if test ! -f $tmpfile; then 30928 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 30929 fi 30930 30931 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 30932 # $tmpfile is the local file name for the downloaded file. 30933 VALID_TOOL=no 30934 if test "x$BDEPS_FTP" = xwget; then 30935 VALID_TOOL=yes 30936 wget -O $tmpfile $with_builddeps_server/$resource 30937 fi 30938 if test "x$BDEPS_FTP" = xlftp; then 30939 VALID_TOOL=yes 30940 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 30941 fi 30942 if test "x$BDEPS_FTP" = xftp; then 30943 VALID_TOOL=yes 30944 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 30945 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 30946 FTPUSERPWD=${FTPSERVER%%@*} 30947 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 30948 FTPUSER=${userpwd%%:*} 30949 FTPPWD=${userpwd#*@} 30950 FTPSERVER=${FTPSERVER#*@} 30951 else 30952 FTPUSER=ftp 30953 FTPPWD=ftp 30954 fi 30955 # the "pass" command does not work on some 30956 # ftp clients (read ftp.exe) but if it works, 30957 # passive mode is better! 30958 (\ 30959 echo "user $FTPUSER $FTPPWD" ;\ 30960 echo "pass" ;\ 30961 echo "bin" ;\ 30962 echo "get $FTPPATH $tmpfile" ;\ 30963 ) | ftp -in $FTPSERVER 30964 fi 30965 if test "x$VALID_TOOL" != xyes; then 30966 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 30967 fi 30968 30969 mv $tmpfile $installdir/$filename 30970 if test ! -s $installdir/$filename; then 30971 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 30972 fi 30973 case "$extension" in 30974 zip) echo "Unzipping $installdir/$filename..." 30975 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 30976 ;; 30977 tar.gz) echo "Untaring $installdir/$filename..." 30978 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30979 ;; 30980 tgz) echo "Untaring $installdir/$filename..." 30981 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30982 ;; 30983 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 30984 ;; 30985 esac 30986 fi 30987 if test -f $installdir/$filename.unpacked; then 30988 depdir=$installdir 30989 fi 30990 30991 fi 30992 # Source the builddeps file again, because in the previous command, the depdir 30993 # was updated to point at the current build dependency install directory. 30994 . $builddepsfile 30995 # Now extract variables from the builddeps.conf files. 30996 theroot=${builddep_freetype2_ROOT} 30997 thecflags=${builddep_freetype2_CFLAGS} 30998 thelibs=${builddep_freetype2_LIBS} 30999 if test "x$depdir" = x; then 31000 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5 31001 fi 31002 FREETYPE2=$depdir 31003 if test "x$theroot" != x; then 31004 FREETYPE2="$theroot" 31005 fi 31006 if test "x$thecflags" != x; then 31007 FREETYPE2_CFLAGS="$thecflags" 31008 fi 31009 if test "x$thelibs" != x; then 31010 FREETYPE2_LIBS="$thelibs" 31011 fi 31012 FREETYPE2_FOUND=yes 31013 else FREETYPE2_FOUND=no 31014 31015 fi 31016 else FREETYPE2_FOUND=no 31017 31018 fi 31019 31020 USING_SYSTEM_FT_LIB=true 31021 fi 31022 if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then 31023 FREETYPELOCATION="$PROGRAMFILES/GnuWin32" 31024 31025 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31026 31027 # Input might be given as Windows format, start by converting to 31028 # unix format. 31029 path="$FREETYPELOCATION" 31030 new_path=`$CYGPATH -u "$path"` 31031 31032 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 31033 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 31034 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 31035 # "foo.exe" is OK but "foo" is an error. 31036 # 31037 # This test is therefore slightly more accurate than "test -f" to check for file precense. 31038 # It is also a way to make sure we got the proper file name for the real test later on. 31039 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 31040 if test "x$test_shortpath" = x; then 31041 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 31042 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 31043 as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5 31044 fi 31045 31046 # Call helper function which possibly converts this using DOS-style short mode. 31047 # If so, the updated path is stored in $new_path. 31048 31049 input_path="$new_path" 31050 # Check if we need to convert this using DOS-style short mode. If the path 31051 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31052 # take no chances and rewrite it. 31053 # Note: m4 eats our [], so we need to use [ and ] instead. 31054 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 31055 if test "x$has_forbidden_chars" != x; then 31056 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31057 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 31058 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 31059 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 31060 # Going to short mode and back again did indeed matter. Since short mode is 31061 # case insensitive, let's make it lowercase to improve readability. 31062 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31063 # Now convert it back to Unix-stile (cygpath) 31064 input_path=`$CYGPATH -u "$shortmode_path"` 31065 new_path="$input_path" 31066 fi 31067 fi 31068 31069 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 31070 if test "x$test_cygdrive_prefix" = x; then 31071 # As a simple fix, exclude /usr/bin since it's not a real path. 31072 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 31073 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 31074 # a path prefixed by /cygdrive for fixpath to work. 31075 new_path="$CYGWIN_ROOT_PATH$input_path" 31076 fi 31077 fi 31078 31079 31080 if test "x$path" != "x$new_path"; then 31081 FREETYPELOCATION="$new_path" 31082 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 31083 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 31084 fi 31085 31086 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31087 31088 path="$FREETYPELOCATION" 31089 has_colon=`$ECHO $path | $GREP ^.:` 31090 new_path="$path" 31091 if test "x$has_colon" = x; then 31092 # Not in mixed or Windows style, start by that. 31093 new_path=`cmd //c echo $path` 31094 fi 31095 31096 31097 input_path="$new_path" 31098 # Check if we need to convert this using DOS-style short mode. If the path 31099 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31100 # take no chances and rewrite it. 31101 # Note: m4 eats our [], so we need to use [ and ] instead. 31102 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 31103 if test "x$has_forbidden_chars" != x; then 31104 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31105 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31106 fi 31107 31108 31109 windows_path="$new_path" 31110 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31111 unix_path=`$CYGPATH -u "$windows_path"` 31112 new_path="$unix_path" 31113 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31114 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 31115 new_path="$unix_path" 31116 fi 31117 31118 if test "x$path" != "x$new_path"; then 31119 FREETYPELOCATION="$new_path" 31120 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 31121 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 31122 fi 31123 31124 # Save the first 10 bytes of this path to the storage, so fixpath can work. 31125 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 31126 31127 else 31128 # We're on a posix platform. Hooray! :) 31129 path="$FREETYPELOCATION" 31130 31131 if test ! -f "$path" && test ! -d "$path"; then 31132 as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5 31133 fi 31134 31135 has_space=`$ECHO "$path" | $GREP " "` 31136 if test "x$has_space" != x; then 31137 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 31138 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 31139 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 31140 fi 31141 fi 31142 31143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5 31144 $as_echo_n "checking for freetype in some standard windows locations... " >&6; } 31145 if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then 31146 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include" 31147 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib" 31148 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib" 31149 if ! test -s "$FREETYPE2_LIBS"; then 31150 as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5 31151 fi 31152 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then 31153 as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5 31154 fi 31155 USING_SYSTEM_FT_LIB=true 31156 FREETYPE2_FOUND=yes 31157 fi 31158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 31159 $as_echo "$FREETYPE2_FOUND" >&6; } 31160 fi 31161 if test "x$FREETYPE2_FOUND" = xno; then 31162 31163 pkg_failed=no 31164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5 31165 $as_echo_n "checking for FREETYPE2... " >&6; } 31166 31167 if test -n "$FREETYPE2_CFLAGS"; then 31168 pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS" 31169 elif test -n "$PKG_CONFIG"; then 31170 if test -n "$PKG_CONFIG" && \ 31171 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 31172 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 31173 ac_status=$? 31174 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31175 test $ac_status = 0; }; then 31176 pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` 31177 else 31178 pkg_failed=yes 31179 fi 31180 else 31181 pkg_failed=untried 31182 fi 31183 if test -n "$FREETYPE2_LIBS"; then 31184 pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS" 31185 elif test -n "$PKG_CONFIG"; then 31186 if test -n "$PKG_CONFIG" && \ 31187 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 31188 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 31189 ac_status=$? 31190 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31191 test $ac_status = 0; }; then 31192 pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` 31193 else 31194 pkg_failed=yes 31195 fi 31196 else 31197 pkg_failed=untried 31198 fi 31199 31200 31201 31202 if test $pkg_failed = yes; then 31203 31204 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 31205 _pkg_short_errors_supported=yes 31206 else 31207 _pkg_short_errors_supported=no 31208 fi 31209 if test $_pkg_short_errors_supported = yes; then 31210 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1` 31211 else 31212 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1` 31213 fi 31214 # Put the nasty error message in config.log where it belongs 31215 echo "$FREETYPE2_PKG_ERRORS" >&5 31216 31217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 31218 $as_echo "no" >&6; } 31219 FREETYPE2_FOUND=no 31220 elif test $pkg_failed = untried; then 31221 FREETYPE2_FOUND=no 31222 else 31223 FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS 31224 FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS 31225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 31226 $as_echo "yes" >&6; } 31227 FREETYPE2_FOUND=yes 31228 fi 31229 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. 31230 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` 31231 USING_SYSTEM_FT_LIB=true 31232 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 31233 if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 31234 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'` 31235 fi 31236 fi 31237 if test "x$FREETYPE2_FOUND" = xno; then 31238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5 31239 $as_echo_n "checking for freetype in some standard locations... " >&6; } 31240 31241 if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then 31242 DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include" 31243 DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype" 31244 fi 31245 if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then 31246 DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2" 31247 DEFAULT_FREETYPE_LIBS="-lfreetype" 31248 fi 31249 31250 PREV_CXXCFLAGS="$CXXFLAGS" 31251 PREV_LDFLAGS="$LDFLAGS" 31252 CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" 31253 LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" 31254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31255 /* end confdefs.h. */ 31256 #include<ft2build.h> 31257 #include FT_FREETYPE_H 31258 int main() { return 0; } 31259 31260 _ACEOF 31261 if ac_fn_cxx_try_link "$LINENO"; then : 31262 31263 # Yes, the default cflags and libs did the trick. 31264 FREETYPE2_FOUND=yes 31265 FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" 31266 FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" 31267 31268 else 31269 31270 FREETYPE2_FOUND=no 31271 31272 fi 31273 rm -f core conftest.err conftest.$ac_objext \ 31274 conftest$ac_exeext conftest.$ac_ext 31275 CXXCFLAGS="$PREV_CXXFLAGS" 31276 LDFLAGS="$PREV_LDFLAGS" 31277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 31278 $as_echo "$FREETYPE2_FOUND" >&6; } 31279 USING_SYSTEM_FT_LIB=true 31280 fi 31281 if test "x$FREETYPE2_FOUND" = xno; then 31282 31283 # Print a helpful message on how to acquire the necessary build dependency. 31284 # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc 31285 MISSING_DEPENDENCY=freetype2 31286 PKGHANDLER_COMMAND= 31287 31288 case $PKGHANDLER in 31289 apt-get) 31290 apt_help $MISSING_DEPENDENCY ;; 31291 yum) 31292 yum_help $MISSING_DEPENDENCY ;; 31293 port) 31294 port_help $MISSING_DEPENDENCY ;; 31295 pkgutil) 31296 pkgutil_help $MISSING_DEPENDENCY ;; 31297 pkgadd) 31298 pkgadd_help $MISSING_DEPENDENCY ;; 31299 * ) 31300 break ;; 31301 esac 31302 31303 if test "x$PKGHANDLER_COMMAND" != x; then 31304 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 31305 fi 31306 31307 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 31308 fi 31309 31310 if test "x$OPENJDK_TARGET_OS" != xwindows; then 31311 # AC_CHECK_LIB does not support use of cl.exe 31312 PREV_LDFLAGS="$LDFLAGS" 31313 LDFLAGS="$FREETYPE2_LIBS" 31314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5 31315 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; } 31316 if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then : 31317 $as_echo_n "(cached) " >&6 31318 else 31319 ac_check_lib_save_LIBS=$LIBS 31320 LIBS="-lfreetype $LIBS" 31321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31322 /* end confdefs.h. */ 31323 31324 /* Override any GCC internal prototype to avoid an error. 31325 Use char because int might match the return type of a GCC 31326 builtin and then its argument prototype would still apply. */ 31327 #ifdef __cplusplus 31328 extern "C" 31329 #endif 31330 char FT_Init_FreeType (); 31331 int 31332 main () 31333 { 31334 return FT_Init_FreeType (); 31335 ; 31336 return 0; 31337 } 31338 _ACEOF 31339 if ac_fn_cxx_try_link "$LINENO"; then : 31340 ac_cv_lib_freetype_FT_Init_FreeType=yes 31341 else 31342 ac_cv_lib_freetype_FT_Init_FreeType=no 31343 fi 31344 rm -f core conftest.err conftest.$ac_objext \ 31345 conftest$ac_exeext conftest.$ac_ext 31346 LIBS=$ac_check_lib_save_LIBS 31347 fi 31348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 31349 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; } 31350 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then : 31351 FREETYPE2_FOUND=true 31352 else 31353 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 31354 fi 31355 31356 LDFLAGS="$PREV_LDFLAGS" 31357 fi 31358 fi 31359 31360 31361 31362 31363 31364 31365 31366 31367 31368 ############################################################################### 31369 # 31370 # Check for alsa headers and libraries. Used on Linux/GNU systems. 31371 # 31372 31373 # Check whether --with-alsa was given. 31374 if test "${with_alsa+set}" = set; then : 31375 withval=$with_alsa; 31376 fi 31377 31378 31379 # Check whether --with-alsa-include was given. 31380 if test "${with_alsa_include+set}" = set; then : 31381 withval=$with_alsa_include; 31382 fi 31383 31384 31385 # Check whether --with-alsa-lib was given. 31386 if test "${with_alsa_lib+set}" = set; then : 31387 withval=$with_alsa_lib; 31388 fi 31389 31390 31391 if test "x$ALSA_NOT_NEEDED" = xyes; then 31392 if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then 31393 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5 31394 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;} 31395 fi 31396 ALSA_CFLAGS= 31397 ALSA_LIBS= 31398 else 31399 ALSA_FOUND=no 31400 31401 if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then 31402 as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5 31403 fi 31404 31405 if test "x${with_alsa}" != x; then 31406 ALSA_LIBS="-L${with_alsa}/lib -lalsa" 31407 ALSA_CFLAGS="-I${with_alsa}/include" 31408 ALSA_FOUND=yes 31409 fi 31410 if test "x${with_alsa_include}" != x; then 31411 ALSA_CFLAGS="-I${with_alsa_include}" 31412 ALSA_FOUND=yes 31413 fi 31414 if test "x${with_alsa_lib}" != x; then 31415 ALSA_LIBS="-L${with_alsa_lib} -lalsa" 31416 ALSA_FOUND=yes 31417 fi 31418 if test "x$ALSA_FOUND" = xno; then 31419 31420 31421 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 31422 # Source the builddeps file again, to make sure it uses the latest variables! 31423 . $builddepsfile 31424 # Look for a target and build machine specific resource! 31425 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 31426 if test "x$resource" = x; then 31427 # Ok, lets instead look for a target specific resource 31428 eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}} 31429 fi 31430 if test "x$resource" = x; then 31431 # Ok, lets instead look for a build specific resource 31432 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}} 31433 fi 31434 if test "x$resource" = x; then 31435 # Ok, lets instead look for a generic resource 31436 # (The alsa comes from M4 and not the shell, thus no need for eval here.) 31437 resource=${builddep_alsa} 31438 fi 31439 if test "x$resource" != x; then 31440 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5 31441 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;} 31442 # If the resource in the builddeps.conf file is an existing directory, 31443 # for example /java/linux/cups 31444 if test -d ${resource}; then 31445 depdir=${resource} 31446 else 31447 31448 # alsa is for example mymodule 31449 # $resource is for example libs/general/libmymod_1_2_3.zip 31450 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 31451 # $with_builddeps_dir is for example /localhome/builddeps 31452 # depdir is the name of the variable into which we store the depdir, eg MYMOD 31453 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 31454 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 31455 filename=`basename $resource` 31456 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 31457 filebase=${filename%%.*} 31458 extension=${filename#*.} 31459 installdir=$with_builddeps_dir/$filebase 31460 if test ! -f $installdir/$filename.unpacked; then 31461 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5 31462 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;} 31463 if test ! -d $installdir; then 31464 mkdir -p $installdir 31465 fi 31466 if test ! -d $installdir; then 31467 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 31468 fi 31469 tmpfile=`mktemp $installdir/alsa.XXXXXXXXX` 31470 touch $tmpfile 31471 if test ! -f $tmpfile; then 31472 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 31473 fi 31474 31475 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 31476 # $tmpfile is the local file name for the downloaded file. 31477 VALID_TOOL=no 31478 if test "x$BDEPS_FTP" = xwget; then 31479 VALID_TOOL=yes 31480 wget -O $tmpfile $with_builddeps_server/$resource 31481 fi 31482 if test "x$BDEPS_FTP" = xlftp; then 31483 VALID_TOOL=yes 31484 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 31485 fi 31486 if test "x$BDEPS_FTP" = xftp; then 31487 VALID_TOOL=yes 31488 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 31489 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 31490 FTPUSERPWD=${FTPSERVER%%@*} 31491 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 31492 FTPUSER=${userpwd%%:*} 31493 FTPPWD=${userpwd#*@} 31494 FTPSERVER=${FTPSERVER#*@} 31495 else 31496 FTPUSER=ftp 31497 FTPPWD=ftp 31498 fi 31499 # the "pass" command does not work on some 31500 # ftp clients (read ftp.exe) but if it works, 31501 # passive mode is better! 31502 (\ 31503 echo "user $FTPUSER $FTPPWD" ;\ 31504 echo "pass" ;\ 31505 echo "bin" ;\ 31506 echo "get $FTPPATH $tmpfile" ;\ 31507 ) | ftp -in $FTPSERVER 31508 fi 31509 if test "x$VALID_TOOL" != xyes; then 31510 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 31511 fi 31512 31513 mv $tmpfile $installdir/$filename 31514 if test ! -s $installdir/$filename; then 31515 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 31516 fi 31517 case "$extension" in 31518 zip) echo "Unzipping $installdir/$filename..." 31519 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 31520 ;; 31521 tar.gz) echo "Untaring $installdir/$filename..." 31522 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31523 ;; 31524 tgz) echo "Untaring $installdir/$filename..." 31525 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31526 ;; 31527 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 31528 ;; 31529 esac 31530 fi 31531 if test -f $installdir/$filename.unpacked; then 31532 depdir=$installdir 31533 fi 31534 31535 fi 31536 # Source the builddeps file again, because in the previous command, the depdir 31537 # was updated to point at the current build dependency install directory. 31538 . $builddepsfile 31539 # Now extract variables from the builddeps.conf files. 31540 theroot=${builddep_alsa_ROOT} 31541 thecflags=${builddep_alsa_CFLAGS} 31542 thelibs=${builddep_alsa_LIBS} 31543 if test "x$depdir" = x; then 31544 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5 31545 fi 31546 ALSA=$depdir 31547 if test "x$theroot" != x; then 31548 ALSA="$theroot" 31549 fi 31550 if test "x$thecflags" != x; then 31551 ALSA_CFLAGS="$thecflags" 31552 fi 31553 if test "x$thelibs" != x; then 31554 ALSA_LIBS="$thelibs" 31555 fi 31556 ALSA_FOUND=yes 31557 else ALSA_FOUND=no 31558 31559 fi 31560 else ALSA_FOUND=no 31561 31562 fi 31563 31564 fi 31565 if test "x$ALSA_FOUND" = xno; then 31566 31567 pkg_failed=no 31568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5 31569 $as_echo_n "checking for ALSA... " >&6; } 31570 31571 if test -n "$ALSA_CFLAGS"; then 31572 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" 31573 elif test -n "$PKG_CONFIG"; then 31574 if test -n "$PKG_CONFIG" && \ 31575 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 31576 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 31577 ac_status=$? 31578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31579 test $ac_status = 0; }; then 31580 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` 31581 else 31582 pkg_failed=yes 31583 fi 31584 else 31585 pkg_failed=untried 31586 fi 31587 if test -n "$ALSA_LIBS"; then 31588 pkg_cv_ALSA_LIBS="$ALSA_LIBS" 31589 elif test -n "$PKG_CONFIG"; then 31590 if test -n "$PKG_CONFIG" && \ 31591 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 31592 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 31593 ac_status=$? 31594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31595 test $ac_status = 0; }; then 31596 pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` 31597 else 31598 pkg_failed=yes 31599 fi 31600 else 31601 pkg_failed=untried 31602 fi 31603 31604 31605 31606 if test $pkg_failed = yes; then 31607 31608 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 31609 _pkg_short_errors_supported=yes 31610 else 31611 _pkg_short_errors_supported=no 31612 fi 31613 if test $_pkg_short_errors_supported = yes; then 31614 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1` 31615 else 31616 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1` 31617 fi 31618 # Put the nasty error message in config.log where it belongs 31619 echo "$ALSA_PKG_ERRORS" >&5 31620 31621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 31622 $as_echo "no" >&6; } 31623 ALSA_FOUND=no 31624 elif test $pkg_failed = untried; then 31625 ALSA_FOUND=no 31626 else 31627 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS 31628 ALSA_LIBS=$pkg_cv_ALSA_LIBS 31629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 31630 $as_echo "yes" >&6; } 31631 ALSA_FOUND=yes 31632 fi 31633 fi 31634 if test "x$ALSA_FOUND" = xno; then 31635 for ac_header in alsa/asoundlib.h 31636 do : 31637 ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default" 31638 if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then : 31639 cat >>confdefs.h <<_ACEOF 31640 #define HAVE_ALSA_ASOUNDLIB_H 1 31641 _ACEOF 31642 ALSA_FOUND=yes 31643 ALSA_CFLAGS=-Iignoreme 31644 ALSA_LIBS=-lasound 31645 DEFAULT_ALSA=yes 31646 else 31647 ALSA_FOUND=no 31648 fi 31649 31650 done 31651 31652 fi 31653 if test "x$ALSA_FOUND" = xno; then 31654 31655 # Print a helpful message on how to acquire the necessary build dependency. 31656 # alsa is the help tag: freetyp2, cups, pulse, alsa etc 31657 MISSING_DEPENDENCY=alsa 31658 PKGHANDLER_COMMAND= 31659 31660 case $PKGHANDLER in 31661 apt-get) 31662 apt_help $MISSING_DEPENDENCY ;; 31663 yum) 31664 yum_help $MISSING_DEPENDENCY ;; 31665 port) 31666 port_help $MISSING_DEPENDENCY ;; 31667 pkgutil) 31668 pkgutil_help $MISSING_DEPENDENCY ;; 31669 pkgadd) 31670 pkgadd_help $MISSING_DEPENDENCY ;; 31671 * ) 31672 break ;; 31673 esac 31674 31675 if test "x$PKGHANDLER_COMMAND" != x; then 31676 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 31677 fi 31678 31679 as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5 31680 fi 31681 fi 31682 31683 31684 31685 31686 31687 31688 31689 ############################################################################### 31690 # 31691 # Check for the jpeg library 31692 # 31693 31694 USE_EXTERNAL_LIBJPEG=true 31695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 31696 $as_echo_n "checking for main in -ljpeg... " >&6; } 31697 if test "${ac_cv_lib_jpeg_main+set}" = set; then : 31698 $as_echo_n "(cached) " >&6 31699 else 31700 ac_check_lib_save_LIBS=$LIBS 31701 LIBS="-ljpeg $LIBS" 31702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31703 /* end confdefs.h. */ 31704 31705 31706 int 31707 main () 31708 { 31709 return main (); 31710 ; 31711 return 0; 31712 } 31713 _ACEOF 31714 if ac_fn_cxx_try_link "$LINENO"; then : 31715 ac_cv_lib_jpeg_main=yes 31716 else 31717 ac_cv_lib_jpeg_main=no 31718 fi 31719 rm -f core conftest.err conftest.$ac_objext \ 31720 conftest$ac_exeext conftest.$ac_ext 31721 LIBS=$ac_check_lib_save_LIBS 31722 fi 31723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5 31724 $as_echo "$ac_cv_lib_jpeg_main" >&6; } 31725 if test "x$ac_cv_lib_jpeg_main" = x""yes; then : 31726 cat >>confdefs.h <<_ACEOF 31727 #define HAVE_LIBJPEG 1 31728 _ACEOF 31729 31730 LIBS="-ljpeg $LIBS" 31731 31732 else 31733 USE_EXTERNAL_LIBJPEG=false 31734 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5 31735 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;} 31736 31737 fi 31738 31739 31740 31741 ############################################################################### 31742 # 31743 # Check for the gif library 31744 # 31745 31746 31747 # Check whether --with-giflib was given. 31748 if test "${with_giflib+set}" = set; then : 31749 withval=$with_giflib; 31750 fi 31751 31752 31753 31754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5 31755 $as_echo_n "checking for which giflib to use... " >&6; } 31756 31757 # default is bundled 31758 DEFAULT_GIFLIB=bundled 31759 31760 # 31761 # if user didn't specify, use DEFAULT_GIFLIB 31762 # 31763 if test "x${with_giflib}" = "x"; then 31764 with_giflib=${DEFAULT_GIFLIB} 31765 fi 31766 31767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5 31768 $as_echo "${with_giflib}" >&6; } 31769 31770 if test "x${with_giflib}" = "xbundled"; then 31771 USE_EXTERNAL_LIBGIF=false 31772 elif test "x${with_giflib}" = "xsystem"; then 31773 ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" 31774 if test "x$ac_cv_header_gif_lib_h" = x""yes; then : 31775 31776 else 31777 as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5 31778 fi 31779 31780 31781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5 31782 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; } 31783 if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then : 31784 $as_echo_n "(cached) " >&6 31785 else 31786 ac_check_lib_save_LIBS=$LIBS 31787 LIBS="-lgif $LIBS" 31788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31789 /* end confdefs.h. */ 31790 31791 /* Override any GCC internal prototype to avoid an error. 31792 Use char because int might match the return type of a GCC 31793 builtin and then its argument prototype would still apply. */ 31794 #ifdef __cplusplus 31795 extern "C" 31796 #endif 31797 char DGifGetCode (); 31798 int 31799 main () 31800 { 31801 return DGifGetCode (); 31802 ; 31803 return 0; 31804 } 31805 _ACEOF 31806 if ac_fn_cxx_try_link "$LINENO"; then : 31807 ac_cv_lib_gif_DGifGetCode=yes 31808 else 31809 ac_cv_lib_gif_DGifGetCode=no 31810 fi 31811 rm -f core conftest.err conftest.$ac_objext \ 31812 conftest$ac_exeext conftest.$ac_ext 31813 LIBS=$ac_check_lib_save_LIBS 31814 fi 31815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5 31816 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; } 31817 if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then : 31818 cat >>confdefs.h <<_ACEOF 31819 #define HAVE_LIBGIF 1 31820 _ACEOF 31821 31822 LIBS="-lgif $LIBS" 31823 31824 else 31825 as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5 31826 fi 31827 31828 31829 USE_EXTERNAL_LIBGIF=true 31830 else 31831 as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5 31832 fi 31833 31834 31835 ############################################################################### 31836 # 31837 # Check for the zlib library 31838 # 31839 31840 31841 # Check whether --with-zlib was given. 31842 if test "${with_zlib+set}" = set; then : 31843 withval=$with_zlib; 31844 fi 31845 31846 31847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 31848 $as_echo_n "checking for compress in -lz... " >&6; } 31849 if test "${ac_cv_lib_z_compress+set}" = set; then : 31850 $as_echo_n "(cached) " >&6 31851 else 31852 ac_check_lib_save_LIBS=$LIBS 31853 LIBS="-lz $LIBS" 31854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31855 /* end confdefs.h. */ 31856 31857 /* Override any GCC internal prototype to avoid an error. 31858 Use char because int might match the return type of a GCC 31859 builtin and then its argument prototype would still apply. */ 31860 #ifdef __cplusplus 31861 extern "C" 31862 #endif 31863 char compress (); 31864 int 31865 main () 31866 { 31867 return compress (); 31868 ; 31869 return 0; 31870 } 31871 _ACEOF 31872 if ac_fn_cxx_try_link "$LINENO"; then : 31873 ac_cv_lib_z_compress=yes 31874 else 31875 ac_cv_lib_z_compress=no 31876 fi 31877 rm -f core conftest.err conftest.$ac_objext \ 31878 conftest$ac_exeext conftest.$ac_ext 31879 LIBS=$ac_check_lib_save_LIBS 31880 fi 31881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 31882 $as_echo "$ac_cv_lib_z_compress" >&6; } 31883 if test "x$ac_cv_lib_z_compress" = x""yes; then : 31884 ZLIB_FOUND=yes 31885 else 31886 ZLIB_FOUND=no 31887 fi 31888 31889 31890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5 31891 $as_echo_n "checking for which zlib to use... " >&6; } 31892 31893 DEFAULT_ZLIB=bundled 31894 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 31895 # 31896 # On macosx default is system...on others default is 31897 # 31898 DEFAULT_ZLIB=system 31899 fi 31900 31901 if test "x${ZLIB_FOUND}" != "xyes"; then 31902 # 31903 # If we don't find any system...set default to bundled 31904 # 31905 DEFAULT_ZLIB=bundled 31906 fi 31907 31908 # 31909 # If user didn't specify, use DEFAULT_ZLIB 31910 # 31911 if test "x${with_zlib}" = "x"; then 31912 with_zlib=${DEFAULT_ZLIB} 31913 fi 31914 31915 if test "x${with_zlib}" = "xbundled"; then 31916 USE_EXTERNAL_LIBZ=false 31917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5 31918 $as_echo "bundled" >&6; } 31919 elif test "x${with_zlib}" = "xsystem"; then 31920 if test "x${ZLIB_FOUND}" = "xyes"; then 31921 USE_EXTERNAL_LIBZ=true 31922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 31923 $as_echo "system" >&6; } 31924 else 31925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5 31926 $as_echo "system not found" >&6; } 31927 as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5 31928 fi 31929 else 31930 as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5 31931 fi 31932 31933 31934 31935 ############################################################################### 31936 LIBZIP_CAN_USE_MMAP=true 31937 31938 31939 31940 ############################################################################### 31941 # 31942 # Check if altzone exists in time.h 31943 # 31944 31945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31946 /* end confdefs.h. */ 31947 #include <time.h> 31948 int 31949 main () 31950 { 31951 return (int)altzone; 31952 ; 31953 return 0; 31954 } 31955 _ACEOF 31956 if ac_fn_cxx_try_link "$LINENO"; then : 31957 has_altzone=yes 31958 else 31959 has_altzone=no 31960 fi 31961 rm -f core conftest.err conftest.$ac_objext \ 31962 conftest$ac_exeext conftest.$ac_ext 31963 if test "x$has_altzone" = xyes; then 31964 31965 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h 31966 31967 fi 31968 31969 ############################################################################### 31970 # 31971 # Check the maths library 31972 # 31973 31974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 31975 $as_echo_n "checking for cos in -lm... " >&6; } 31976 if test "${ac_cv_lib_m_cos+set}" = set; then : 31977 $as_echo_n "(cached) " >&6 31978 else 31979 ac_check_lib_save_LIBS=$LIBS 31980 LIBS="-lm $LIBS" 31981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31982 /* end confdefs.h. */ 31983 31984 /* Override any GCC internal prototype to avoid an error. 31985 Use char because int might match the return type of a GCC 31986 builtin and then its argument prototype would still apply. */ 31987 #ifdef __cplusplus 31988 extern "C" 31989 #endif 31990 char cos (); 31991 int 31992 main () 31993 { 31994 return cos (); 31995 ; 31996 return 0; 31997 } 31998 _ACEOF 31999 if ac_fn_cxx_try_link "$LINENO"; then : 32000 ac_cv_lib_m_cos=yes 32001 else 32002 ac_cv_lib_m_cos=no 32003 fi 32004 rm -f core conftest.err conftest.$ac_objext \ 32005 conftest$ac_exeext conftest.$ac_ext 32006 LIBS=$ac_check_lib_save_LIBS 32007 fi 32008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 32009 $as_echo "$ac_cv_lib_m_cos" >&6; } 32010 if test "x$ac_cv_lib_m_cos" = x""yes; then : 32011 cat >>confdefs.h <<_ACEOF 32012 #define HAVE_LIBM 1 32013 _ACEOF 32014 32015 LIBS="-lm $LIBS" 32016 32017 else 32018 32019 { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5 32020 $as_echo "$as_me: Maths library was not found" >&6;} 32021 32022 fi 32023 32024 32025 32026 ############################################################################### 32027 # 32028 # Check for libdl.so 32029 32030 save_LIBS="$LIBS" 32031 LIBS="" 32032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 32033 $as_echo_n "checking for dlopen in -ldl... " >&6; } 32034 if test "${ac_cv_lib_dl_dlopen+set}" = set; then : 32035 $as_echo_n "(cached) " >&6 32036 else 32037 ac_check_lib_save_LIBS=$LIBS 32038 LIBS="-ldl $LIBS" 32039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32040 /* end confdefs.h. */ 32041 32042 /* Override any GCC internal prototype to avoid an error. 32043 Use char because int might match the return type of a GCC 32044 builtin and then its argument prototype would still apply. */ 32045 #ifdef __cplusplus 32046 extern "C" 32047 #endif 32048 char dlopen (); 32049 int 32050 main () 32051 { 32052 return dlopen (); 32053 ; 32054 return 0; 32055 } 32056 _ACEOF 32057 if ac_fn_cxx_try_link "$LINENO"; then : 32058 ac_cv_lib_dl_dlopen=yes 32059 else 32060 ac_cv_lib_dl_dlopen=no 32061 fi 32062 rm -f core conftest.err conftest.$ac_objext \ 32063 conftest$ac_exeext conftest.$ac_ext 32064 LIBS=$ac_check_lib_save_LIBS 32065 fi 32066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 32067 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } 32068 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : 32069 cat >>confdefs.h <<_ACEOF 32070 #define HAVE_LIBDL 1 32071 _ACEOF 32072 32073 LIBS="-ldl $LIBS" 32074 32075 fi 32076 32077 LIBDL="$LIBS" 32078 32079 LIBS="$save_LIBS" 32080 32081 32082 32083 ############################################################################### 32084 # 32085 # statically link libstdc++ before C++ ABI is stablized on Linux unless 32086 # dynamic build is configured on command line. 32087 # 32088 32089 # Check whether --with-stdc++lib was given. 32090 if test "${with_stdc__lib+set}" = set; then : 32091 withval=$with_stdc__lib; 32092 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ 32093 && test "x$with_stdc__lib" != xdefault; then 32094 as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5 32095 fi 32096 32097 else 32098 with_stdc__lib=default 32099 32100 fi 32101 32102 32103 if test "x$OPENJDK_TARGET_OS" = xlinux; then 32104 # Test if -lstdc++ works. 32105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5 32106 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; } 32107 ac_ext=cpp 32108 ac_cpp='$CXXCPP $CPPFLAGS' 32109 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32110 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32111 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32112 32113 OLD_CXXFLAGS="$CXXFLAGS" 32114 CXXFLAGS="$CXXFLAGS -lstdc++" 32115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32116 /* end confdefs.h. */ 32117 32118 int 32119 main () 32120 { 32121 return 0; 32122 ; 32123 return 0; 32124 } 32125 _ACEOF 32126 if ac_fn_cxx_try_link "$LINENO"; then : 32127 has_dynamic_libstdcxx=yes 32128 else 32129 has_dynamic_libstdcxx=no 32130 fi 32131 rm -f core conftest.err conftest.$ac_objext \ 32132 conftest$ac_exeext conftest.$ac_ext 32133 CXXFLAGS="$OLD_CXXFLAGS" 32134 ac_ext=cpp 32135 ac_cpp='$CXXCPP $CPPFLAGS' 32136 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32137 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32138 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32139 32140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5 32141 $as_echo "$has_dynamic_libstdcxx" >&6; } 32142 32143 # Test if stdc++ can be linked statically. 32144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5 32145 $as_echo_n "checking if static link of stdc++ is possible... " >&6; } 32146 STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" 32147 ac_ext=cpp 32148 ac_cpp='$CXXCPP $CPPFLAGS' 32149 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32150 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32151 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32152 32153 OLD_LIBS="$LIBS" 32154 OLD_CXX="$CXX" 32155 LIBS="$STATIC_STDCXX_FLAGS" 32156 CXX="$CC" 32157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32158 /* end confdefs.h. */ 32159 32160 int 32161 main () 32162 { 32163 return 0; 32164 ; 32165 return 0; 32166 } 32167 _ACEOF 32168 if ac_fn_cxx_try_link "$LINENO"; then : 32169 has_static_libstdcxx=yes 32170 else 32171 has_static_libstdcxx=no 32172 fi 32173 rm -f core conftest.err conftest.$ac_objext \ 32174 conftest$ac_exeext conftest.$ac_ext 32175 LIBS="$OLD_LIBS" 32176 CXX="$OLD_CXX" 32177 ac_ext=cpp 32178 ac_cpp='$CXXCPP $CPPFLAGS' 32179 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32180 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32181 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32182 32183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5 32184 $as_echo "$has_static_libstdcxx" >&6; } 32185 32186 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then 32187 as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5 32188 fi 32189 32190 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then 32191 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5 32192 fi 32193 32194 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then 32195 as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5 32196 fi 32197 32198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5 32199 $as_echo_n "checking how to link with libstdc++... " >&6; } 32200 # If dynamic was requested, it's available since it would fail above otherwise. 32201 # If dynamic wasn't requested, go with static unless it isn't available. 32202 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32203 LIBCXX="$LIBCXX -lstdc++" 32204 LDCXX="$CXX" 32205 STATIC_CXX_SETTING="STATIC_CXX=false" 32206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5 32207 $as_echo "dynamic" >&6; } 32208 else 32209 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" 32210 LDCXX="$CC" 32211 STATIC_CXX_SETTING="STATIC_CXX=true" 32212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 32213 $as_echo "static" >&6; } 32214 fi 32215 fi 32216 32217 32218 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32219 # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS 32220 32221 pkg_failed=no 32222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5 32223 $as_echo_n "checking for LIBFFI... " >&6; } 32224 32225 if test -n "$LIBFFI_CFLAGS"; then 32226 pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS" 32227 elif test -n "$PKG_CONFIG"; then 32228 if test -n "$PKG_CONFIG" && \ 32229 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 32230 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 32231 ac_status=$? 32232 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32233 test $ac_status = 0; }; then 32234 pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null` 32235 else 32236 pkg_failed=yes 32237 fi 32238 else 32239 pkg_failed=untried 32240 fi 32241 if test -n "$LIBFFI_LIBS"; then 32242 pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS" 32243 elif test -n "$PKG_CONFIG"; then 32244 if test -n "$PKG_CONFIG" && \ 32245 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 32246 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 32247 ac_status=$? 32248 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32249 test $ac_status = 0; }; then 32250 pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null` 32251 else 32252 pkg_failed=yes 32253 fi 32254 else 32255 pkg_failed=untried 32256 fi 32257 32258 32259 32260 if test $pkg_failed = yes; then 32261 32262 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 32263 _pkg_short_errors_supported=yes 32264 else 32265 _pkg_short_errors_supported=no 32266 fi 32267 if test $_pkg_short_errors_supported = yes; then 32268 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1` 32269 else 32270 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1` 32271 fi 32272 # Put the nasty error message in config.log where it belongs 32273 echo "$LIBFFI_PKG_ERRORS" >&5 32274 32275 as_fn_error $? "Package requirements (libffi) were not met: 32276 32277 $LIBFFI_PKG_ERRORS 32278 32279 Consider adjusting the PKG_CONFIG_PATH environment variable if you 32280 installed software in a non-standard prefix. 32281 32282 Alternatively, you may set the environment variables LIBFFI_CFLAGS 32283 and LIBFFI_LIBS to avoid the need to call pkg-config. 32284 See the pkg-config man page for more details. 32285 " "$LINENO" 5 32286 elif test $pkg_failed = untried; then 32287 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 32288 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 32289 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 32290 is in your PATH or set the PKG_CONFIG environment variable to the full 32291 path to pkg-config. 32292 32293 Alternatively, you may set the environment variables LIBFFI_CFLAGS 32294 and LIBFFI_LIBS to avoid the need to call pkg-config. 32295 See the pkg-config man page for more details. 32296 32297 To get pkg-config, see <http://pkg-config.freedesktop.org/>. 32298 See \`config.log' for more details" "$LINENO" 5 ; } 32299 else 32300 LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS 32301 LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS 32302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32303 $as_echo "yes" >&6; } 32304 : 32305 fi 32306 32307 fi 32308 32309 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32310 # Extract the first word of "llvm-config", so it can be a program name with args. 32311 set dummy llvm-config; ac_word=$2 32312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 32313 $as_echo_n "checking for $ac_word... " >&6; } 32314 if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then : 32315 $as_echo_n "(cached) " >&6 32316 else 32317 if test -n "$LLVM_CONFIG"; then 32318 ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test. 32319 else 32320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 32321 for as_dir in $PATH 32322 do 32323 IFS=$as_save_IFS 32324 test -z "$as_dir" && as_dir=. 32325 for ac_exec_ext in '' $ac_executable_extensions; do 32326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 32327 ac_cv_prog_LLVM_CONFIG="llvm-config" 32328 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 32329 break 2 32330 fi 32331 done 32332 done 32333 IFS=$as_save_IFS 32334 32335 fi 32336 fi 32337 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG 32338 if test -n "$LLVM_CONFIG"; then 32339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5 32340 $as_echo "$LLVM_CONFIG" >&6; } 32341 else 32342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32343 $as_echo "no" >&6; } 32344 fi 32345 32346 32347 32348 if test "x$LLVM_CONFIG" != xllvm-config; then 32349 as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5 32350 fi 32351 32352 llvm_components="jit mcjit engine nativecodegen native" 32353 unset LLVM_CFLAGS 32354 for flag in $("$LLVM_CONFIG" --cxxflags); do 32355 if echo "${flag}" | grep -q '^-[ID]'; then 32356 if test "${flag}" != "-D_DEBUG" ; then 32357 if test "${LLVM_CFLAGS}" != "" ; then 32358 LLVM_CFLAGS="${LLVM_CFLAGS} " 32359 fi 32360 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" 32361 fi 32362 fi 32363 done 32364 llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') 32365 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" 32366 32367 unset LLVM_LDFLAGS 32368 for flag in $("${LLVM_CONFIG}" --ldflags); do 32369 if echo "${flag}" | grep -q '^-L'; then 32370 if test "${LLVM_LDFLAGS}" != ""; then 32371 LLVM_LDFLAGS="${LLVM_LDFLAGS} " 32372 fi 32373 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" 32374 fi 32375 done 32376 32377 unset LLVM_LIBS 32378 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do 32379 if echo "${flag}" | grep -q '^-l'; then 32380 if test "${LLVM_LIBS}" != ""; then 32381 LLVM_LIBS="${LLVM_LIBS} " 32382 fi 32383 LLVM_LIBS="${LLVM_LIBS}${flag}" 32384 fi 32385 done 32386 32387 32388 32389 32390 fi 32391 32392 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) 32393 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then 32394 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" 32395 fi 32396 32397 # TODO better (platform agnostic) test 32398 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then 32399 LIBCXX="-lstdc++" 32400 fi 32401 32402 32403 32404 32405 32406 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper 32407 32408 # When using cygwin or msys, we need a wrapper binary that renames 32409 # /cygdrive/c/ arguments into c:/ arguments and peeks into 32410 # @files and rewrites these too! This wrapper binary is 32411 # called fixpath. 32412 FIXPATH= 32413 if test "x$OPENJDK_BUILD_OS" = xwindows; then 32414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5 32415 $as_echo_n "checking if fixpath can be created... " >&6; } 32416 FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" 32417 FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe" 32418 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 32419 FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC` 32420 FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN` 32421 # Important to keep the .exe suffix on Cygwin for Hotspot makefiles 32422 FIXPATH="$OUTPUT_ROOT/fixpath.exe -c" 32423 elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then 32424 FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC` 32425 FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN` 32426 32427 # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line 32428 # @ was chosen as separator to minimize risk of other tools messing around with it 32429 all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq` 32430 fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` 32431 32432 FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list" 32433 fi 32434 rm -f $OUTPUT_ROOT/fixpath* 32435 cd $OUTPUT_ROOT 32436 $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1 32437 cd $CURDIR 32438 32439 if test ! -x $OUTPUT_ROOT/fixpath.exe; then 32440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32441 $as_echo "no" >&6; } 32442 cat $OUTPUT_ROOT/fixpath1.log 32443 as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5 32444 fi 32445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32446 $as_echo "yes" >&6; } 32447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5 32448 $as_echo_n "checking if fixpath.exe works... " >&6; } 32449 cd $OUTPUT_ROOT 32450 $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 32451 cd $CURDIR 32452 if test ! -x $OUTPUT_ROOT/fixpath2.exe; then 32453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32454 $as_echo "no" >&6; } 32455 cat $OUTPUT_ROOT/fixpath2.log 32456 as_fn_error $? "fixpath did not work!" "$LINENO" 5 32457 fi 32458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32459 $as_echo "yes" >&6; } 32460 rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj 32461 fi 32462 32463 32464 32465 32466 ############################################################################### 32467 # 32468 # We need to do some final tweaking, when everything else is done. 32469 # 32470 ############################################################################### 32471 32472 32473 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" 32474 32475 32476 # The name of the Service Agent jar. 32477 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" 32478 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 32479 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" 32480 fi 32481 32482 32483 32484 32485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5 32486 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; } 32487 32488 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then 32489 ENABLE_INTREE_EC=yes 32490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32491 $as_echo "yes" >&6; } 32492 else 32493 ENABLE_INTREE_EC=no 32494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32495 $as_echo "no" >&6; } 32496 fi 32497 32498 32499 32500 32501 ############################################################################### 32502 # 32503 # Configure parts of the build that only affect the build performance, 32504 # not the result. 32505 # 32506 ############################################################################### 32507 32508 32509 # How many cores do we have on this build system? 32510 32511 # Check whether --with-num-cores was given. 32512 if test "${with_num_cores+set}" = set; then : 32513 withval=$with_num_cores; 32514 fi 32515 32516 if test "x$with_num_cores" = x; then 32517 # The number of cores were not specified, try to probe them. 32518 32519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5 32520 $as_echo_n "checking for number of cores... " >&6; } 32521 NUM_CORES=1 32522 FOUND_CORES=no 32523 32524 if test -f /proc/cpuinfo; then 32525 # Looks like a Linux (or cygwin) system 32526 NUM_CORES=`cat /proc/cpuinfo | grep -c processor` 32527 FOUND_CORES=yes 32528 elif test -x /usr/sbin/psrinfo; then 32529 # Looks like a Solaris system 32530 NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line` 32531 FOUND_CORES=yes 32532 elif test -x /usr/sbin/system_profiler; then 32533 # Looks like a MacOSX system 32534 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'` 32535 FOUND_CORES=yes 32536 elif test -n "$NUMBER_OF_PROCESSORS"; then 32537 # On windows, look in the env 32538 NUM_CORES=$NUMBER_OF_PROCESSORS 32539 FOUND_CORES=yes 32540 fi 32541 32542 if test "x$FOUND_CORES" = xyes; then 32543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5 32544 $as_echo "$NUM_CORES" >&6; } 32545 else 32546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5 32547 $as_echo "could not detect number of cores, defaulting to 1" >&6; } 32548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5 32549 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;} 32550 fi 32551 32552 32553 else 32554 NUM_CORES=$with_num_cores 32555 fi 32556 32557 32558 32559 # How much memory do we have on this build system? 32560 32561 # Check whether --with-memory-size was given. 32562 if test "${with_memory_size+set}" = set; then : 32563 withval=$with_memory_size; 32564 fi 32565 32566 if test "x$with_memory_size" = x; then 32567 # The memory size was not specified, try to probe it. 32568 32569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5 32570 $as_echo_n "checking for memory size... " >&6; } 32571 # Default to 1024 MB 32572 MEMORY_SIZE=1024 32573 FOUND_MEM=no 32574 32575 if test -f /proc/meminfo; then 32576 # Looks like a Linux (or cygwin) system 32577 MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'` 32578 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024` 32579 FOUND_MEM=yes 32580 elif test -x /usr/sbin/prtconf; then 32581 # Looks like a Solaris system 32582 MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'` 32583 FOUND_MEM=yes 32584 elif test -x /usr/sbin/system_profiler; then 32585 # Looks like a MacOSX system 32586 MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'` 32587 MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024` 32588 FOUND_MEM=yes 32589 elif test "x$OPENJDK_BUILD_OS" = xwindows; then 32590 # Windows, but without cygwin 32591 MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-` 32592 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024` 32593 FOUND_MEM=yes 32594 fi 32595 32596 if test "x$FOUND_MEM" = xyes; then 32597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5 32598 $as_echo "$MEMORY_SIZE MB" >&6; } 32599 else 32600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5 32601 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; } 32602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5 32603 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;} 32604 fi 32605 32606 else 32607 MEMORY_SIZE=$with_memory_size 32608 fi 32609 32610 32611 32612 # Provide a decent default number of parallel jobs for make depending on 32613 # number of cores, amount of memory and machine architecture. 32614 32615 # Check whether --with-jobs was given. 32616 if test "${with_jobs+set}" = set; then : 32617 withval=$with_jobs; 32618 fi 32619 32620 if test "x$with_jobs" = x; then 32621 # Number of jobs was not specified, calculate. 32622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5 32623 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; } 32624 # Approximate memory in GB, rounding up a bit. 32625 memory_gb=`expr $MEMORY_SIZE / 1100` 32626 # Pick the lowest of memory in gb and number of cores. 32627 if test "$memory_gb" -lt "$NUM_CORES"; then 32628 JOBS="$memory_gb" 32629 else 32630 JOBS="$NUM_CORES" 32631 # On bigger machines, leave some room for other processes to run 32632 if test "$JOBS" -gt "4"; then 32633 JOBS=`expr $JOBS '*' 90 / 100` 32634 fi 32635 fi 32636 # Cap number of jobs to 16 32637 if test "$JOBS" -gt "16"; then 32638 JOBS=16 32639 fi 32640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5 32641 $as_echo "$JOBS" >&6; } 32642 else 32643 JOBS=$with_jobs 32644 fi 32645 32646 32647 32648 # Setup smart javac (after cores and memory have been setup) 32649 32650 32651 # Check whether --with-sjavac-server-java was given. 32652 if test "${with_sjavac_server_java+set}" = set; then : 32653 withval=$with_sjavac_server_java; 32654 fi 32655 32656 32657 if test "x$with_sjavac_server_java" != x; then 32658 SJAVAC_SERVER_JAVA="$with_sjavac_server_java" 32659 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""` 32660 if test "x$FOUND_VERSION" = x; then 32661 as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5 32662 fi 32663 else 32664 SJAVAC_SERVER_JAVA="" 32665 # Hotspot specific options. 32666 32667 # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 32668 # If so, then append -verbosegc to SJAVAC_SERVER_JAVA 32669 FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn` 32670 FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""` 32671 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32672 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc" 32673 fi 32674 32675 # JRockit specific options. 32676 32677 # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 32678 # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA 32679 FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn` 32680 FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""` 32681 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32682 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc" 32683 fi 32684 32685 SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA" 32686 fi 32687 32688 32689 32690 # Check whether --with-sjavac-server-cores was given. 32691 if test "${with_sjavac_server_cores+set}" = set; then : 32692 withval=$with_sjavac_server_cores; 32693 fi 32694 32695 if test "x$with_sjavac_server_cores" != x; then 32696 SJAVAC_SERVER_CORES="$with_sjavac_server_cores" 32697 else 32698 if test "$NUM_CORES" -gt 16; then 32699 # We set this arbitrary limit because we want to limit the heap 32700 # size of the javac server. 32701 # In the future we will make the javac compilers in the server 32702 # share more and more state, thus enabling us to use more and 32703 # more concurrent threads in the server. 32704 SJAVAC_SERVER_CORES="16" 32705 else 32706 SJAVAC_SERVER_CORES="$NUM_CORES" 32707 fi 32708 32709 if test "$MEMORY_SIZE" -gt "17000"; then 32710 MAX_HEAP_MEM=10000 32711 32712 # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32713 # If so, then append -d64 to SJAVAC_SERVER_JAVA 32714 FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn` 32715 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""` 32716 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32717 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" 32718 fi 32719 32720 32721 # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32722 # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA 32723 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn` 32724 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""` 32725 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32726 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G" 32727 fi 32728 32729 elif test "$MEMORY_SIZE" -gt "10000"; then 32730 MAX_HEAP_MEM=6000 32731 32732 # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32733 # If so, then append -d64 to SJAVAC_SERVER_JAVA 32734 FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn` 32735 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""` 32736 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32737 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" 32738 fi 32739 32740 32741 # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32742 # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA 32743 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn` 32744 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""` 32745 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32746 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G" 32747 fi 32748 32749 elif test "$MEMORY_SIZE" -gt "5000"; then 32750 MAX_HEAP_MEM=3000 32751 32752 # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32753 # If so, then append -d64 to SJAVAC_SERVER_JAVA 32754 FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn` 32755 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""` 32756 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32757 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" 32758 fi 32759 32760 32761 # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32762 # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA 32763 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn` 32764 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""` 32765 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32766 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G" 32767 fi 32768 32769 elif test "$MEMORY_SIZE" -gt "3800"; then 32770 MAX_HEAP_MEM=2500 32771 32772 # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32773 # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA 32774 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn` 32775 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""` 32776 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32777 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M" 32778 fi 32779 32780 elif test "$MEMORY_SIZE" -gt "1900"; then 32781 MAX_HEAP_MEM=1200 32782 32783 # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32784 # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA 32785 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn` 32786 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""` 32787 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32788 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M" 32789 fi 32790 32791 elif test "$MEMORY_SIZE" -gt "1000"; then 32792 MAX_HEAP_MEM=900 32793 32794 # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32795 # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA 32796 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn` 32797 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""` 32798 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32799 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M" 32800 fi 32801 32802 else 32803 MAX_HEAP_MEM=512 32804 32805 # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32806 # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA 32807 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn` 32808 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""` 32809 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32810 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M" 32811 fi 32812 32813 fi 32814 32815 32816 # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32817 # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA 32818 FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn` 32819 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""` 32820 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32821 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m" 32822 fi 32823 32824 32825 # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32826 # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA 32827 FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn` 32828 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""` 32829 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32830 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m" 32831 fi 32832 32833 32834 # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32835 # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA 32836 FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn` 32837 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""` 32838 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32839 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE" 32840 fi 32841 32842 32843 MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501` 32844 if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then 32845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5 32846 $as_echo_n "checking if number of server cores must be reduced... " >&6; } 32847 SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP" 32848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5 32849 $as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; } 32850 fi 32851 fi 32852 32853 32854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5 32855 $as_echo_n "checking whether to use sjavac... " >&6; } 32856 # Check whether --enable-sjavac was given. 32857 if test "${enable_sjavac+set}" = set; then : 32858 enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}" 32859 else 32860 ENABLE_SJAVAC='no' 32861 fi 32862 32863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5 32864 $as_echo "$ENABLE_SJAVAC" >&6; } 32865 32866 32867 if test "x$ENABLE_SJAVAC" = xyes; then 32868 SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers" 32869 else 32870 SJAVAC_SERVER_DIR= 32871 fi 32872 32873 32874 32875 32876 # Can the C/C++ compiler use precompiled headers? 32877 32878 32879 ############################################################################### 32880 # 32881 # Can the C/C++ compiler use precompiled headers? 32882 # 32883 # Check whether --enable-precompiled-headers was given. 32884 if test "${enable_precompiled_headers+set}" = set; then : 32885 enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers} 32886 else 32887 ENABLE_PRECOMPH=yes 32888 fi 32889 32890 32891 USE_PRECOMPILED_HEADER=1 32892 if test "x$ENABLE_PRECOMPH" = xno; then 32893 USE_PRECOMPILED_HEADER=0 32894 fi 32895 32896 if test "x$ENABLE_PRECOMPH" = xyes; then 32897 # Check that the compiler actually supports precomp headers. 32898 if test "x$GCC" = xyes; then 32899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5 32900 $as_echo_n "checking that precompiled headers work... " >&6; } 32901 echo "int alfa();" > conftest.h 32902 $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5 32903 if test ! -f conftest.hpp.gch; then 32904 USE_PRECOMPILED_HEADER=0 32905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32906 $as_echo "no" >&6; } 32907 else 32908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32909 $as_echo "yes" >&6; } 32910 fi 32911 rm -f conftest.h conftest.hpp.gch 32912 fi 32913 fi 32914 32915 32916 32917 32918 # Setup use of ccache, if available 32919 32920 # Check whether --enable-ccache was given. 32921 if test "${enable_ccache+set}" = set; then : 32922 enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache} 32923 else 32924 ENABLE_CCACHE=yes 32925 fi 32926 32927 if test "x$ENABLE_CCACHE" = xyes; then 32928 # Extract the first word of "ccache", so it can be a program name with args. 32929 set dummy ccache; ac_word=$2 32930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 32931 $as_echo_n "checking for $ac_word... " >&6; } 32932 if test "${ac_cv_path_CCACHE+set}" = set; then : 32933 $as_echo_n "(cached) " >&6 32934 else 32935 case $CCACHE in 32936 [\\/]* | ?:[\\/]*) 32937 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path. 32938 ;; 32939 *) 32940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 32941 for as_dir in $PATH 32942 do 32943 IFS=$as_save_IFS 32944 test -z "$as_dir" && as_dir=. 32945 for ac_exec_ext in '' $ac_executable_extensions; do 32946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 32947 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" 32948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 32949 break 2 32950 fi 32951 done 32952 done 32953 IFS=$as_save_IFS 32954 32955 ;; 32956 esac 32957 fi 32958 CCACHE=$ac_cv_path_CCACHE 32959 if test -n "$CCACHE"; then 32960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5 32961 $as_echo "$CCACHE" >&6; } 32962 else 32963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32964 $as_echo "no" >&6; } 32965 fi 32966 32967 32968 else 32969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5 32970 $as_echo_n "checking for ccache... " >&6; } 32971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5 32972 $as_echo "explicitly disabled" >&6; } 32973 CCACHE= 32974 fi 32975 32976 32977 32978 # Check whether --with-ccache-dir was given. 32979 if test "${with_ccache_dir+set}" = set; then : 32980 withval=$with_ccache_dir; 32981 fi 32982 32983 32984 if test "x$with_ccache_dir" != x; then 32985 # When using a non home ccache directory, assume the use is to share ccache files 32986 # with other users. Thus change the umask. 32987 SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002" 32988 fi 32989 CCACHE_FOUND="" 32990 if test "x$CCACHE" != x; then 32991 32992 if test "x$CCACHE" != x; then 32993 CCACHE_FOUND="true" 32994 # Only use ccache if it is 3.1.4 or later, which supports 32995 # precompiled headers. 32996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5 32997 $as_echo_n "checking if ccache supports precompiled headers... " >&6; } 32998 HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null` 32999 if test "x$HAS_GOOD_CCACHE" = x; then 33000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5 33001 $as_echo "no, disabling ccache" >&6; } 33002 CCACHE= 33003 else 33004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 33005 $as_echo "yes" >&6; } 33006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5 33007 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; } 33008 PUSHED_FLAGS="$CXXFLAGS" 33009 CXXFLAGS="-fpch-preprocess $CXXFLAGS" 33010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 33011 /* end confdefs.h. */ 33012 33013 int 33014 main () 33015 { 33016 33017 ; 33018 return 0; 33019 } 33020 _ACEOF 33021 if ac_fn_cxx_try_compile "$LINENO"; then : 33022 CC_KNOWS_CCACHE_TRICK=yes 33023 else 33024 CC_KNOWS_CCACHE_TRICK=no 33025 fi 33026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 33027 CXXFLAGS="$PUSHED_FLAGS" 33028 if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then 33029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 33030 $as_echo "yes" >&6; } 33031 else 33032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5 33033 $as_echo "no, disabling ccaching of precompiled headers" >&6; } 33034 CCACHE= 33035 fi 33036 fi 33037 fi 33038 33039 if test "x$CCACHE" != x; then 33040 CCACHE_SLOPPINESS=time_macros 33041 CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" 33042 CCACHE_FLAGS=-fpch-preprocess 33043 33044 if test "x$SET_CCACHE_DIR" != x; then 33045 mkdir -p $CCACHE_DIR > /dev/null 2>&1 33046 chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 33047 fi 33048 fi 33049 33050 fi 33051 33052 33053 ############################################################################### 33054 # 33055 # And now the finish... 33056 # 33057 ############################################################################### 33058 33059 # Check for some common pitfalls 33060 33061 if test x"$OPENJDK_BUILD_OS" = xwindows; then 33062 file_to_test="$SRC_ROOT/LICENSE" 33063 if test `$STAT -c '%a' "$file_to_test"` -lt 400; then 33064 as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5 33065 fi 33066 fi 33067 33068 33069 33070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5 33071 $as_echo_n "checking if build directory is on local disk... " >&6; } 33072 33073 # df -l lists only local disks; if the given directory is not found then 33074 # a non-zero exit code is given 33075 if test "x$DF" = x; then 33076 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 33077 # msys does not have df; use Windows "net use" instead. 33078 IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:` 33079 if test "x$IS_NETWORK_DISK" = x; then 33080 OUTPUT_DIR_IS_LOCAL="yes" 33081 else 33082 OUTPUT_DIR_IS_LOCAL="no" 33083 fi 33084 else 33085 # No df here, say it's local 33086 OUTPUT_DIR_IS_LOCAL="yes" 33087 fi 33088 else 33089 if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then 33090 OUTPUT_DIR_IS_LOCAL="yes" 33091 else 33092 OUTPUT_DIR_IS_LOCAL="no" 33093 fi 33094 fi 33095 33096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5 33097 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; } 33098 33099 33100 33101 # Check if the user has any old-style ALT_ variables set. 33102 FOUND_ALT_VARIABLES=`env | grep ^ALT_` 33103 33104 # Before generating output files, test if they exist. If they do, this is a reconfigure. 33105 # Since we can't properly handle the dependencies for this, warn the user about the situation 33106 if test -e $OUTPUT_ROOT/spec.gmk; then 33107 IS_RECONFIGURE=yes 33108 else 33109 IS_RECONFIGURE=no 33110 fi 33111 33112 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then 33113 HIDE_PERFORMANCE_HINTS=yes 33114 else 33115 HIDE_PERFORMANCE_HINTS=no 33116 # Hide it the next time around... 33117 $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1 33118 fi 33119 33120 33121 33122 # At the end, call the custom hook. (Dummy macro if no custom sources available) 33123 33124 33125 # We're messing a bit with internal autoconf variables to put the config.status 33126 # in the output directory instead of the current directory. 33127 CONFIG_STATUS="$OUTPUT_ROOT/config.status" 33128 # Create the actual output files. Now the main work of configure is done. 33129 cat >confcache <<\_ACEOF 33130 # This file is a shell script that caches the results of configure 33131 # tests run on this system so they can be shared between configure 33132 # scripts and configure runs, see configure's option --config-cache. 33133 # It is not useful on other systems. If it contains results you don't 33134 # want to keep, you may remove or edit it. 33135 # 33136 # config.status only pays attention to the cache file if you give it 33137 # the --recheck option to rerun configure. 33138 # 33139 # `ac_cv_env_foo' variables (set or unset) will be overridden when 33140 # loading this file, other *unset* `ac_cv_foo' will be assigned the 33141 # following values. 33142 33143 _ACEOF 33144 33145 # The following way of writing the cache mishandles newlines in values, 33146 # but we know of no workaround that is simple, portable, and efficient. 33147 # So, we kill variables containing newlines. 33148 # Ultrix sh set writes to stderr and can't be redirected directly, 33149 # and sets the high bit in the cache file unless we assign to the vars. 33150 ( 33151 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 33152 eval ac_val=\$$ac_var 33153 case $ac_val in #( 33154 *${as_nl}*) 33155 case $ac_var in #( 33156 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 33157 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 33158 esac 33159 case $ac_var in #( 33160 _ | IFS | as_nl) ;; #( 33161 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 33162 *) { eval $ac_var=; unset $ac_var;} ;; 33163 esac ;; 33164 esac 33165 done 33166 33167 (set) 2>&1 | 33168 case $as_nl`(ac_space=' '; set) 2>&1` in #( 33169 *${as_nl}ac_space=\ *) 33170 # `set' does not quote correctly, so add quotes: double-quote 33171 # substitution turns \\\\ into \\, and sed turns \\ into \. 33172 sed -n \ 33173 "s/'/'\\\\''/g; 33174 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 33175 ;; #( 33176 *) 33177 # `set' quotes correctly as required by POSIX, so do not add quotes. 33178 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 33179 ;; 33180 esac | 33181 sort 33182 ) | 33183 sed ' 33184 /^ac_cv_env_/b end 33185 t clear 33186 :clear 33187 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 33188 t end 33189 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 33190 :end' >>confcache 33191 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 33192 if test -w "$cache_file"; then 33193 test "x$cache_file" != "x/dev/null" && 33194 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 33195 $as_echo "$as_me: updating cache $cache_file" >&6;} 33196 cat confcache >$cache_file 33197 else 33198 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 33199 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 33200 fi 33201 fi 33202 rm -f confcache 33203 33204 test "x$prefix" = xNONE && prefix=$ac_default_prefix 33205 # Let make expand exec_prefix. 33206 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 33207 33208 DEFS=-DHAVE_CONFIG_H 33209 33210 ac_libobjs= 33211 ac_ltlibobjs= 33212 U= 33213 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 33214 # 1. Remove the extension, and $U if already installed. 33215 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 33216 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 33217 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 33218 # will be set to the directory where LIBOBJS objects are built. 33219 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 33220 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 33221 done 33222 LIBOBJS=$ac_libobjs 33223 33224 LTLIBOBJS=$ac_ltlibobjs 33225 33226 33227 33228 : ${CONFIG_STATUS=./config.status} 33229 ac_write_fail=0 33230 ac_clean_files_save=$ac_clean_files 33231 ac_clean_files="$ac_clean_files $CONFIG_STATUS" 33232 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 33233 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 33234 as_write_fail=0 33235 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 33236 #! $SHELL 33237 # Generated by $as_me. 33238 # Run this file to recreate the current configuration. 33239 # Compiler output produced by configure, useful for debugging 33240 # configure, is in config.log if it exists. 33241 33242 debug=false 33243 ac_cs_recheck=false 33244 ac_cs_silent=false 33245 33246 SHELL=\${CONFIG_SHELL-$SHELL} 33247 export SHELL 33248 _ASEOF 33249 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 33250 ## -------------------- ## 33251 ## M4sh Initialization. ## 33252 ## -------------------- ## 33253 33254 # Be more Bourne compatible 33255 DUALCASE=1; export DUALCASE # for MKS sh 33256 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 33257 emulate sh 33258 NULLCMD=: 33259 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 33260 # is contrary to our usage. Disable this feature. 33261 alias -g '${1+"$@"}'='"$@"' 33262 setopt NO_GLOB_SUBST 33263 else 33264 case `(set -o) 2>/dev/null` in #( 33265 *posix*) : 33266 set -o posix ;; #( 33267 *) : 33268 ;; 33269 esac 33270 fi 33271 33272 33273 as_nl=' 33274 ' 33275 export as_nl 33276 # Printing a long string crashes Solaris 7 /usr/bin/printf. 33277 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 33278 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 33279 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 33280 # Prefer a ksh shell builtin over an external printf program on Solaris, 33281 # but without wasting forks for bash or zsh. 33282 if test -z "$BASH_VERSION$ZSH_VERSION" \ 33283 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 33284 as_echo='print -r --' 33285 as_echo_n='print -rn --' 33286 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 33287 as_echo='printf %s\n' 33288 as_echo_n='printf %s' 33289 else 33290 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 33291 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 33292 as_echo_n='/usr/ucb/echo -n' 33293 else 33294 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 33295 as_echo_n_body='eval 33296 arg=$1; 33297 case $arg in #( 33298 *"$as_nl"*) 33299 expr "X$arg" : "X\\(.*\\)$as_nl"; 33300 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 33301 esac; 33302 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 33303 ' 33304 export as_echo_n_body 33305 as_echo_n='sh -c $as_echo_n_body as_echo' 33306 fi 33307 export as_echo_body 33308 as_echo='sh -c $as_echo_body as_echo' 33309 fi 33310 33311 # The user is always right. 33312 if test "${PATH_SEPARATOR+set}" != set; then 33313 PATH_SEPARATOR=: 33314 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 33315 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 33316 PATH_SEPARATOR=';' 33317 } 33318 fi 33319 33320 33321 # IFS 33322 # We need space, tab and new line, in precisely that order. Quoting is 33323 # there to prevent editors from complaining about space-tab. 33324 # (If _AS_PATH_WALK were called with IFS unset, it would disable word 33325 # splitting by setting IFS to empty value.) 33326 IFS=" "" $as_nl" 33327 33328 # Find who we are. Look in the path if we contain no directory separator. 33329 case $0 in #(( 33330 *[\\/]* ) as_myself=$0 ;; 33331 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 33332 for as_dir in $PATH 33333 do 33334 IFS=$as_save_IFS 33335 test -z "$as_dir" && as_dir=. 33336 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 33337 done 33338 IFS=$as_save_IFS 33339 33340 ;; 33341 esac 33342 # We did not find ourselves, most probably we were run as `sh COMMAND' 33343 # in which case we are not to be found in the path. 33344 if test "x$as_myself" = x; then 33345 as_myself=$0 33346 fi 33347 if test ! -f "$as_myself"; then 33348 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 33349 exit 1 33350 fi 33351 33352 # Unset variables that we do not need and which cause bugs (e.g. in 33353 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 33354 # suppresses any "Segmentation fault" message there. '((' could 33355 # trigger a bug in pdksh 5.2.14. 33356 for as_var in BASH_ENV ENV MAIL MAILPATH 33357 do eval test x\${$as_var+set} = xset \ 33358 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 33359 done 33360 PS1='$ ' 33361 PS2='> ' 33362 PS4='+ ' 33363 33364 # NLS nuisances. 33365 LC_ALL=C 33366 export LC_ALL 33367 LANGUAGE=C 33368 export LANGUAGE 33369 33370 # CDPATH. 33371 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 33372 33373 33374 # as_fn_error STATUS ERROR [LINENO LOG_FD] 33375 # ---------------------------------------- 33376 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 33377 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 33378 # script with STATUS, using 1 if that was 0. 33379 as_fn_error () 33380 { 33381 as_status=$1; test $as_status -eq 0 && as_status=1 33382 if test "$4"; then 33383 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 33384 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 33385 fi 33386 $as_echo "$as_me: error: $2" >&2 33387 as_fn_exit $as_status 33388 } # as_fn_error 33389 33390 33391 # as_fn_set_status STATUS 33392 # ----------------------- 33393 # Set $? to STATUS, without forking. 33394 as_fn_set_status () 33395 { 33396 return $1 33397 } # as_fn_set_status 33398 33399 # as_fn_exit STATUS 33400 # ----------------- 33401 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 33402 as_fn_exit () 33403 { 33404 set +e 33405 as_fn_set_status $1 33406 exit $1 33407 } # as_fn_exit 33408 33409 # as_fn_unset VAR 33410 # --------------- 33411 # Portably unset VAR. 33412 as_fn_unset () 33413 { 33414 { eval $1=; unset $1;} 33415 } 33416 as_unset=as_fn_unset 33417 # as_fn_append VAR VALUE 33418 # ---------------------- 33419 # Append the text in VALUE to the end of the definition contained in VAR. Take 33420 # advantage of any shell optimizations that allow amortized linear growth over 33421 # repeated appends, instead of the typical quadratic growth present in naive 33422 # implementations. 33423 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 33424 eval 'as_fn_append () 33425 { 33426 eval $1+=\$2 33427 }' 33428 else 33429 as_fn_append () 33430 { 33431 eval $1=\$$1\$2 33432 } 33433 fi # as_fn_append 33434 33435 # as_fn_arith ARG... 33436 # ------------------ 33437 # Perform arithmetic evaluation on the ARGs, and store the result in the 33438 # global $as_val. Take advantage of shells that can avoid forks. The arguments 33439 # must be portable across $(()) and expr. 33440 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 33441 eval 'as_fn_arith () 33442 { 33443 as_val=$(( $* )) 33444 }' 33445 else 33446 as_fn_arith () 33447 { 33448 as_val=`expr "$@" || test $? -eq 1` 33449 } 33450 fi # as_fn_arith 33451 33452 33453 if expr a : '\(a\)' >/dev/null 2>&1 && 33454 test "X`expr 00001 : '.*\(...\)'`" = X001; then 33455 as_expr=expr 33456 else 33457 as_expr=false 33458 fi 33459 33460 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 33461 as_basename=basename 33462 else 33463 as_basename=false 33464 fi 33465 33466 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 33467 as_dirname=dirname 33468 else 33469 as_dirname=false 33470 fi 33471 33472 as_me=`$as_basename -- "$0" || 33473 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 33474 X"$0" : 'X\(//\)$' \| \ 33475 X"$0" : 'X\(/\)' \| . 2>/dev/null || 33476 $as_echo X/"$0" | 33477 sed '/^.*\/\([^/][^/]*\)\/*$/{ 33478 s//\1/ 33479 q 33480 } 33481 /^X\/\(\/\/\)$/{ 33482 s//\1/ 33483 q 33484 } 33485 /^X\/\(\/\).*/{ 33486 s//\1/ 33487 q 33488 } 33489 s/.*/./; q'` 33490 33491 # Avoid depending upon Character Ranges. 33492 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 33493 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 33494 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 33495 as_cr_digits='0123456789' 33496 as_cr_alnum=$as_cr_Letters$as_cr_digits 33497 33498 ECHO_C= ECHO_N= ECHO_T= 33499 case `echo -n x` in #((((( 33500 -n*) 33501 case `echo 'xy\c'` in 33502 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 33503 xy) ECHO_C='\c';; 33504 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 33505 ECHO_T=' ';; 33506 esac;; 33507 *) 33508 ECHO_N='-n';; 33509 esac 33510 33511 rm -f conf$$ conf$$.exe conf$$.file 33512 if test -d conf$$.dir; then 33513 rm -f conf$$.dir/conf$$.file 33514 else 33515 rm -f conf$$.dir 33516 mkdir conf$$.dir 2>/dev/null 33517 fi 33518 if (echo >conf$$.file) 2>/dev/null; then 33519 if ln -s conf$$.file conf$$ 2>/dev/null; then 33520 as_ln_s='ln -s' 33521 # ... but there are two gotchas: 33522 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 33523 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 33524 # In both cases, we have to default to `cp -p'. 33525 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 33526 as_ln_s='cp -p' 33527 elif ln conf$$.file conf$$ 2>/dev/null; then 33528 as_ln_s=ln 33529 else 33530 as_ln_s='cp -p' 33531 fi 33532 else 33533 as_ln_s='cp -p' 33534 fi 33535 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 33536 rmdir conf$$.dir 2>/dev/null 33537 33538 33539 # as_fn_mkdir_p 33540 # ------------- 33541 # Create "$as_dir" as a directory, including parents if necessary. 33542 as_fn_mkdir_p () 33543 { 33544 33545 case $as_dir in #( 33546 -*) as_dir=./$as_dir;; 33547 esac 33548 test -d "$as_dir" || eval $as_mkdir_p || { 33549 as_dirs= 33550 while :; do 33551 case $as_dir in #( 33552 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 33553 *) as_qdir=$as_dir;; 33554 esac 33555 as_dirs="'$as_qdir' $as_dirs" 33556 as_dir=`$as_dirname -- "$as_dir" || 33557 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 33558 X"$as_dir" : 'X\(//\)[^/]' \| \ 33559 X"$as_dir" : 'X\(//\)$' \| \ 33560 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 33561 $as_echo X"$as_dir" | 33562 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 33563 s//\1/ 33564 q 33565 } 33566 /^X\(\/\/\)[^/].*/{ 33567 s//\1/ 33568 q 33569 } 33570 /^X\(\/\/\)$/{ 33571 s//\1/ 33572 q 33573 } 33574 /^X\(\/\).*/{ 33575 s//\1/ 33576 q 33577 } 33578 s/.*/./; q'` 33579 test -d "$as_dir" && break 33580 done 33581 test -z "$as_dirs" || eval "mkdir $as_dirs" 33582 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 33583 33584 33585 } # as_fn_mkdir_p 33586 if mkdir -p . 2>/dev/null; then 33587 as_mkdir_p='mkdir -p "$as_dir"' 33588 else 33589 test -d ./-p && rmdir ./-p 33590 as_mkdir_p=false 33591 fi 33592 33593 if test -x / >/dev/null 2>&1; then 33594 as_test_x='test -x' 33595 else 33596 if ls -dL / >/dev/null 2>&1; then 33597 as_ls_L_option=L 33598 else 33599 as_ls_L_option= 33600 fi 33601 as_test_x=' 33602 eval sh -c '\'' 33603 if test -d "$1"; then 33604 test -d "$1/."; 33605 else 33606 case $1 in #( 33607 -*)set "./$1";; 33608 esac; 33609 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 33610 ???[sx]*):;;*)false;;esac;fi 33611 '\'' sh 33612 ' 33613 fi 33614 as_executable_p=$as_test_x 33615 33616 # Sed expression to map a string onto a valid CPP name. 33617 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 33618 33619 # Sed expression to map a string onto a valid variable name. 33620 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 33621 33622 33623 exec 6>&1 33624 ## ----------------------------------- ## 33625 ## Main body of $CONFIG_STATUS script. ## 33626 ## ----------------------------------- ## 33627 _ASEOF 33628 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 33629 33630 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33631 # Save the log message, to keep $0 and so on meaningful, and to 33632 # report actual input values of CONFIG_FILES etc. instead of their 33633 # values after options handling. 33634 ac_log=" 33635 This file was extended by OpenJDK $as_me jdk8, which was 33636 generated by GNU Autoconf 2.67. Invocation command line was 33637 33638 CONFIG_FILES = $CONFIG_FILES 33639 CONFIG_HEADERS = $CONFIG_HEADERS 33640 CONFIG_LINKS = $CONFIG_LINKS 33641 CONFIG_COMMANDS = $CONFIG_COMMANDS 33642 $ $0 $@ 33643 33644 on `(hostname || uname -n) 2>/dev/null | sed 1q` 33645 " 33646 33647 _ACEOF 33648 33649 case $ac_config_files in *" 33650 "*) set x $ac_config_files; shift; ac_config_files=$*;; 33651 esac 33652 33653 case $ac_config_headers in *" 33654 "*) set x $ac_config_headers; shift; ac_config_headers=$*;; 33655 esac 33656 33657 33658 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33659 # Files that config.status was made for. 33660 config_files="$ac_config_files" 33661 config_headers="$ac_config_headers" 33662 33663 _ACEOF 33664 33665 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33666 ac_cs_usage="\ 33667 \`$as_me' instantiates files and other configuration actions 33668 from templates according to the current configuration. Unless the files 33669 and actions are specified as TAGs, all are instantiated by default. 33670 33671 Usage: $0 [OPTION]... [TAG]... 33672 33673 -h, --help print this help, then exit 33674 -V, --version print version number and configuration settings, then exit 33675 --config print configuration, then exit 33676 -q, --quiet, --silent 33677 do not print progress messages 33678 -d, --debug don't remove temporary files 33679 --recheck update $as_me by reconfiguring in the same conditions 33680 --file=FILE[:TEMPLATE] 33681 instantiate the configuration file FILE 33682 --header=FILE[:TEMPLATE] 33683 instantiate the configuration header FILE 33684 33685 Configuration files: 33686 $config_files 33687 33688 Configuration headers: 33689 $config_headers 33690 33691 Report bugs to <build-dev@openjdk.java.net>. 33692 OpenJDK home page: <http://openjdk.java.net>." 33693 33694 _ACEOF 33695 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33696 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 33697 ac_cs_version="\\ 33698 OpenJDK config.status jdk8 33699 configured by $0, generated by GNU Autoconf 2.67, 33700 with options \\"\$ac_cs_config\\" 33701 33702 Copyright (C) 2010 Free Software Foundation, Inc. 33703 This config.status script is free software; the Free Software Foundation 33704 gives unlimited permission to copy, distribute and modify it." 33705 33706 ac_pwd='$ac_pwd' 33707 srcdir='$srcdir' 33708 AWK='$AWK' 33709 test -n "\$AWK" || AWK=awk 33710 _ACEOF 33711 33712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33713 # The default lists apply if the user does not specify any file. 33714 ac_need_defaults=: 33715 while test $# != 0 33716 do 33717 case $1 in 33718 --*=?*) 33719 ac_option=`expr "X$1" : 'X\([^=]*\)='` 33720 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 33721 ac_shift=: 33722 ;; 33723 --*=) 33724 ac_option=`expr "X$1" : 'X\([^=]*\)='` 33725 ac_optarg= 33726 ac_shift=: 33727 ;; 33728 *) 33729 ac_option=$1 33730 ac_optarg=$2 33731 ac_shift=shift 33732 ;; 33733 esac 33734 33735 case $ac_option in 33736 # Handling of the options. 33737 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 33738 ac_cs_recheck=: ;; 33739 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 33740 $as_echo "$ac_cs_version"; exit ;; 33741 --config | --confi | --conf | --con | --co | --c ) 33742 $as_echo "$ac_cs_config"; exit ;; 33743 --debug | --debu | --deb | --de | --d | -d ) 33744 debug=: ;; 33745 --file | --fil | --fi | --f ) 33746 $ac_shift 33747 case $ac_optarg in 33748 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 33749 '') as_fn_error $? "missing file argument" ;; 33750 esac 33751 as_fn_append CONFIG_FILES " '$ac_optarg'" 33752 ac_need_defaults=false;; 33753 --header | --heade | --head | --hea ) 33754 $ac_shift 33755 case $ac_optarg in 33756 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 33757 esac 33758 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 33759 ac_need_defaults=false;; 33760 --he | --h) 33761 # Conflict between --help and --header 33762 as_fn_error $? "ambiguous option: \`$1' 33763 Try \`$0 --help' for more information.";; 33764 --help | --hel | -h ) 33765 $as_echo "$ac_cs_usage"; exit ;; 33766 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 33767 | -silent | --silent | --silen | --sile | --sil | --si | --s) 33768 ac_cs_silent=: ;; 33769 33770 # This is an error. 33771 -*) as_fn_error $? "unrecognized option: \`$1' 33772 Try \`$0 --help' for more information." ;; 33773 33774 *) as_fn_append ac_config_targets " $1" 33775 ac_need_defaults=false ;; 33776 33777 esac 33778 shift 33779 done 33780 33781 ac_configure_extra_args= 33782 33783 if $ac_cs_silent; then 33784 exec 6>/dev/null 33785 ac_configure_extra_args="$ac_configure_extra_args --silent" 33786 fi 33787 33788 _ACEOF 33789 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33790 if \$ac_cs_recheck; then 33791 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 33792 shift 33793 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 33794 CONFIG_SHELL='$SHELL' 33795 export CONFIG_SHELL 33796 exec "\$@" 33797 fi 33798 33799 _ACEOF 33800 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33801 exec 5>>config.log 33802 { 33803 echo 33804 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 33805 ## Running $as_me. ## 33806 _ASBOX 33807 $as_echo "$ac_log" 33808 } >&5 33809 33810 _ACEOF 33811 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33812 _ACEOF 33813 33814 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33815 33816 # Handling of arguments. 33817 for ac_config_target in $ac_config_targets 33818 do 33819 case $ac_config_target in 33820 "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;; 33821 "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;; 33822 "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;; 33823 "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;; 33824 "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;; 33825 "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;; 33826 "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;; 33827 33828 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; 33829 esac 33830 done 33831 33832 33833 # If the user did not use the arguments to specify the items to instantiate, 33834 # then the envvar interface is used. Set only those that are not. 33835 # We use the long form for the default assignment because of an extremely 33836 # bizarre bug on SunOS 4.1.3. 33837 if $ac_need_defaults; then 33838 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 33839 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 33840 fi 33841 33842 # Have a temporary directory for convenience. Make it in the build tree 33843 # simply because there is no reason against having it here, and in addition, 33844 # creating and moving files from /tmp can sometimes cause problems. 33845 # Hook for its removal unless debugging. 33846 # Note that there is a small window in which the directory will not be cleaned: 33847 # after its creation but before its name has been assigned to `$tmp'. 33848 $debug || 33849 { 33850 tmp= 33851 trap 'exit_status=$? 33852 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status 33853 ' 0 33854 trap 'as_fn_exit 1' 1 2 13 15 33855 } 33856 # Create a (secure) tmp directory for tmp files. 33857 33858 { 33859 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 33860 test -n "$tmp" && test -d "$tmp" 33861 } || 33862 { 33863 tmp=./conf$$-$RANDOM 33864 (umask 077 && mkdir "$tmp") 33865 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 33866 33867 # Set up the scripts for CONFIG_FILES section. 33868 # No need to generate them if there are no CONFIG_FILES. 33869 # This happens for instance with `./config.status config.h'. 33870 if test -n "$CONFIG_FILES"; then 33871 33872 33873 ac_cr=`echo X | tr X '\015'` 33874 # On cygwin, bash can eat \r inside `` if the user requested igncr. 33875 # But we know of no other shell where ac_cr would be empty at this 33876 # point, so we can use a bashism as a fallback. 33877 if test "x$ac_cr" = x; then 33878 eval ac_cr=\$\'\\r\' 33879 fi 33880 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 33881 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 33882 ac_cs_awk_cr='\\r' 33883 else 33884 ac_cs_awk_cr=$ac_cr 33885 fi 33886 33887 echo 'BEGIN {' >"$tmp/subs1.awk" && 33888 _ACEOF 33889 33890 33891 { 33892 echo "cat >conf$$subs.awk <<_ACEOF" && 33893 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 33894 echo "_ACEOF" 33895 } >conf$$subs.sh || 33896 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 33897 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 33898 ac_delim='%!_!# ' 33899 for ac_last_try in false false false false false :; do 33900 . ./conf$$subs.sh || 33901 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 33902 33903 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 33904 if test $ac_delim_n = $ac_delim_num; then 33905 break 33906 elif $ac_last_try; then 33907 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 33908 else 33909 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 33910 fi 33911 done 33912 rm -f conf$$subs.sh 33913 33914 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33915 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && 33916 _ACEOF 33917 sed -n ' 33918 h 33919 s/^/S["/; s/!.*/"]=/ 33920 p 33921 g 33922 s/^[^!]*!// 33923 :repl 33924 t repl 33925 s/'"$ac_delim"'$// 33926 t delim 33927 :nl 33928 h 33929 s/\(.\{148\}\)..*/\1/ 33930 t more1 33931 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 33932 p 33933 n 33934 b repl 33935 :more1 33936 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 33937 p 33938 g 33939 s/.\{148\}// 33940 t nl 33941 :delim 33942 h 33943 s/\(.\{148\}\)..*/\1/ 33944 t more2 33945 s/["\\]/\\&/g; s/^/"/; s/$/"/ 33946 p 33947 b 33948 :more2 33949 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 33950 p 33951 g 33952 s/.\{148\}// 33953 t delim 33954 ' <conf$$subs.awk | sed ' 33955 /^[^""]/{ 33956 N 33957 s/\n// 33958 } 33959 ' >>$CONFIG_STATUS || ac_write_fail=1 33960 rm -f conf$$subs.awk 33961 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33962 _ACAWK 33963 cat >>"\$tmp/subs1.awk" <<_ACAWK && 33964 for (key in S) S_is_set[key] = 1 33965 FS = "" 33966 33967 } 33968 { 33969 line = $ 0 33970 nfields = split(line, field, "@") 33971 substed = 0 33972 len = length(field[1]) 33973 for (i = 2; i < nfields; i++) { 33974 key = field[i] 33975 keylen = length(key) 33976 if (S_is_set[key]) { 33977 value = S[key] 33978 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 33979 len += length(value) + length(field[++i]) 33980 substed = 1 33981 } else 33982 len += 1 + keylen 33983 } 33984 33985 print line 33986 } 33987 33988 _ACAWK 33989 _ACEOF 33990 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33991 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 33992 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 33993 else 33994 cat 33995 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ 33996 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 33997 _ACEOF 33998 33999 # VPATH may cause trouble with some makes, so we remove sole $(srcdir), 34000 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 34001 # trailing colons and then remove the whole line if VPATH becomes empty 34002 # (actually we leave an empty line to preserve line numbers). 34003 if test "x$srcdir" = x.; then 34004 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 34005 h 34006 s/// 34007 s/^/:/ 34008 s/[ ]*$/:/ 34009 s/:\$(srcdir):/:/g 34010 s/:\${srcdir}:/:/g 34011 s/:@srcdir@:/:/g 34012 s/^:*// 34013 s/:*$// 34014 x 34015 s/\(=[ ]*\).*/\1/ 34016 G 34017 s/\n// 34018 s/^[^=]*=[ ]*$// 34019 }' 34020 fi 34021 34022 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34023 fi # test -n "$CONFIG_FILES" 34024 34025 # Set up the scripts for CONFIG_HEADERS section. 34026 # No need to generate them if there are no CONFIG_HEADERS. 34027 # This happens for instance with `./config.status Makefile'. 34028 if test -n "$CONFIG_HEADERS"; then 34029 cat >"$tmp/defines.awk" <<\_ACAWK || 34030 BEGIN { 34031 _ACEOF 34032 34033 # Transform confdefs.h into an awk script `defines.awk', embedded as 34034 # here-document in config.status, that substitutes the proper values into 34035 # config.h.in to produce config.h. 34036 34037 # Create a delimiter string that does not exist in confdefs.h, to ease 34038 # handling of long lines. 34039 ac_delim='%!_!# ' 34040 for ac_last_try in false false :; do 34041 ac_t=`sed -n "/$ac_delim/p" confdefs.h` 34042 if test -z "$ac_t"; then 34043 break 34044 elif $ac_last_try; then 34045 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 34046 else 34047 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 34048 fi 34049 done 34050 34051 # For the awk script, D is an array of macro values keyed by name, 34052 # likewise P contains macro parameters if any. Preserve backslash 34053 # newline sequences. 34054 34055 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 34056 sed -n ' 34057 s/.\{148\}/&'"$ac_delim"'/g 34058 t rset 34059 :rset 34060 s/^[ ]*#[ ]*define[ ][ ]*/ / 34061 t def 34062 d 34063 :def 34064 s/\\$// 34065 t bsnl 34066 s/["\\]/\\&/g 34067 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 34068 D["\1"]=" \3"/p 34069 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 34070 d 34071 :bsnl 34072 s/["\\]/\\&/g 34073 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 34074 D["\1"]=" \3\\\\\\n"\\/p 34075 t cont 34076 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 34077 t cont 34078 d 34079 :cont 34080 n 34081 s/.\{148\}/&'"$ac_delim"'/g 34082 t clear 34083 :clear 34084 s/\\$// 34085 t bsnlc 34086 s/["\\]/\\&/g; s/^/"/; s/$/"/p 34087 d 34088 :bsnlc 34089 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 34090 b cont 34091 ' <confdefs.h | sed ' 34092 s/'"$ac_delim"'/"\\\ 34093 "/g' >>$CONFIG_STATUS || ac_write_fail=1 34094 34095 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34096 for (key in D) D_is_set[key] = 1 34097 FS = "" 34098 } 34099 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 34100 line = \$ 0 34101 split(line, arg, " ") 34102 if (arg[1] == "#") { 34103 defundef = arg[2] 34104 mac1 = arg[3] 34105 } else { 34106 defundef = substr(arg[1], 2) 34107 mac1 = arg[2] 34108 } 34109 split(mac1, mac2, "(") #) 34110 macro = mac2[1] 34111 prefix = substr(line, 1, index(line, defundef) - 1) 34112 if (D_is_set[macro]) { 34113 # Preserve the white space surrounding the "#". 34114 print prefix "define", macro P[macro] D[macro] 34115 next 34116 } else { 34117 # Replace #undef with comments. This is necessary, for example, 34118 # in the case of _POSIX_SOURCE, which is predefined and required 34119 # on some systems where configure will not decide to define it. 34120 if (defundef == "undef") { 34121 print "/*", prefix defundef, macro, "*/" 34122 next 34123 } 34124 } 34125 } 34126 { print } 34127 _ACAWK 34128 _ACEOF 34129 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34130 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 34131 fi # test -n "$CONFIG_HEADERS" 34132 34133 34134 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " 34135 shift 34136 for ac_tag 34137 do 34138 case $ac_tag in 34139 :[FHLC]) ac_mode=$ac_tag; continue;; 34140 esac 34141 case $ac_mode$ac_tag in 34142 :[FHL]*:*);; 34143 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; 34144 :[FH]-) ac_tag=-:-;; 34145 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 34146 esac 34147 ac_save_IFS=$IFS 34148 IFS=: 34149 set x $ac_tag 34150 IFS=$ac_save_IFS 34151 shift 34152 ac_file=$1 34153 shift 34154 34155 case $ac_mode in 34156 :L) ac_source=$1;; 34157 :[FH]) 34158 ac_file_inputs= 34159 for ac_f 34160 do 34161 case $ac_f in 34162 -) ac_f="$tmp/stdin";; 34163 *) # Look for the file first in the build tree, then in the source tree 34164 # (if the path is not absolute). The absolute path cannot be DOS-style, 34165 # because $ac_f cannot contain `:'. 34166 test -f "$ac_f" || 34167 case $ac_f in 34168 [\\/$]*) false;; 34169 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 34170 esac || 34171 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; 34172 esac 34173 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 34174 as_fn_append ac_file_inputs " '$ac_f'" 34175 done 34176 34177 # Let's still pretend it is `configure' which instantiates (i.e., don't 34178 # use $as_me), people would be surprised to read: 34179 # /* config.h. Generated by config.status. */ 34180 configure_input='Generated from '` 34181 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 34182 `' by configure.' 34183 if test x"$ac_file" != x-; then 34184 configure_input="$ac_file. $configure_input" 34185 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 34186 $as_echo "$as_me: creating $ac_file" >&6;} 34187 fi 34188 # Neutralize special characters interpreted by sed in replacement strings. 34189 case $configure_input in #( 34190 *\&* | *\|* | *\\* ) 34191 ac_sed_conf_input=`$as_echo "$configure_input" | 34192 sed 's/[\\\\&|]/\\\\&/g'`;; #( 34193 *) ac_sed_conf_input=$configure_input;; 34194 esac 34195 34196 case $ac_tag in 34197 *:-:* | *:-) cat >"$tmp/stdin" \ 34198 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 34199 esac 34200 ;; 34201 esac 34202 34203 ac_dir=`$as_dirname -- "$ac_file" || 34204 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 34205 X"$ac_file" : 'X\(//\)[^/]' \| \ 34206 X"$ac_file" : 'X\(//\)$' \| \ 34207 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 34208 $as_echo X"$ac_file" | 34209 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 34210 s//\1/ 34211 q 34212 } 34213 /^X\(\/\/\)[^/].*/{ 34214 s//\1/ 34215 q 34216 } 34217 /^X\(\/\/\)$/{ 34218 s//\1/ 34219 q 34220 } 34221 /^X\(\/\).*/{ 34222 s//\1/ 34223 q 34224 } 34225 s/.*/./; q'` 34226 as_dir="$ac_dir"; as_fn_mkdir_p 34227 ac_builddir=. 34228 34229 case "$ac_dir" in 34230 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 34231 *) 34232 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 34233 # A ".." for each directory in $ac_dir_suffix. 34234 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 34235 case $ac_top_builddir_sub in 34236 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 34237 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 34238 esac ;; 34239 esac 34240 ac_abs_top_builddir=$ac_pwd 34241 ac_abs_builddir=$ac_pwd$ac_dir_suffix 34242 # for backward compatibility: 34243 ac_top_builddir=$ac_top_build_prefix 34244 34245 case $srcdir in 34246 .) # We are building in place. 34247 ac_srcdir=. 34248 ac_top_srcdir=$ac_top_builddir_sub 34249 ac_abs_top_srcdir=$ac_pwd ;; 34250 [\\/]* | ?:[\\/]* ) # Absolute name. 34251 ac_srcdir=$srcdir$ac_dir_suffix; 34252 ac_top_srcdir=$srcdir 34253 ac_abs_top_srcdir=$srcdir ;; 34254 *) # Relative name. 34255 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 34256 ac_top_srcdir=$ac_top_build_prefix$srcdir 34257 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 34258 esac 34259 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 34260 34261 34262 case $ac_mode in 34263 :F) 34264 # 34265 # CONFIG_FILE 34266 # 34267 34268 _ACEOF 34269 34270 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34271 # If the template does not know about datarootdir, expand it. 34272 # FIXME: This hack should be removed a few years after 2.60. 34273 ac_datarootdir_hack=; ac_datarootdir_seen= 34274 ac_sed_dataroot=' 34275 /datarootdir/ { 34276 p 34277 q 34278 } 34279 /@datadir@/p 34280 /@docdir@/p 34281 /@infodir@/p 34282 /@localedir@/p 34283 /@mandir@/p' 34284 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 34285 *datarootdir*) ac_datarootdir_seen=yes;; 34286 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 34287 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 34288 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 34289 _ACEOF 34290 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34291 ac_datarootdir_hack=' 34292 s&@datadir@&$datadir&g 34293 s&@docdir@&$docdir&g 34294 s&@infodir@&$infodir&g 34295 s&@localedir@&$localedir&g 34296 s&@mandir@&$mandir&g 34297 s&\\\${datarootdir}&$datarootdir&g' ;; 34298 esac 34299 _ACEOF 34300 34301 # Neutralize VPATH when `$srcdir' = `.'. 34302 # Shell code in configure.ac might set extrasub. 34303 # FIXME: do we really want to maintain this feature? 34304 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34305 ac_sed_extra="$ac_vpsub 34306 $extrasub 34307 _ACEOF 34308 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34309 :t 34310 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 34311 s|@configure_input@|$ac_sed_conf_input|;t t 34312 s&@top_builddir@&$ac_top_builddir_sub&;t t 34313 s&@top_build_prefix@&$ac_top_build_prefix&;t t 34314 s&@srcdir@&$ac_srcdir&;t t 34315 s&@abs_srcdir@&$ac_abs_srcdir&;t t 34316 s&@top_srcdir@&$ac_top_srcdir&;t t 34317 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 34318 s&@builddir@&$ac_builddir&;t t 34319 s&@abs_builddir@&$ac_abs_builddir&;t t 34320 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 34321 $ac_datarootdir_hack 34322 " 34323 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ 34324 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34325 34326 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 34327 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && 34328 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && 34329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 34330 which seems to be undefined. Please make sure it is defined" >&5 34331 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 34332 which seems to be undefined. Please make sure it is defined" >&2;} 34333 34334 rm -f "$tmp/stdin" 34335 case $ac_file in 34336 -) cat "$tmp/out" && rm -f "$tmp/out";; 34337 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; 34338 esac \ 34339 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34340 ;; 34341 :H) 34342 # 34343 # CONFIG_HEADER 34344 # 34345 if test x"$ac_file" != x-; then 34346 { 34347 $as_echo "/* $configure_input */" \ 34348 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" 34349 } >"$tmp/config.h" \ 34350 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34351 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then 34352 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 34353 $as_echo "$as_me: $ac_file is unchanged" >&6;} 34354 else 34355 rm -f "$ac_file" 34356 mv "$tmp/config.h" "$ac_file" \ 34357 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34358 fi 34359 else 34360 $as_echo "/* $configure_input */" \ 34361 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ 34362 || as_fn_error $? "could not create -" "$LINENO" 5 34363 fi 34364 ;; 34365 34366 34367 esac 34368 34369 done # for ac_tag 34370 34371 34372 as_fn_exit 0 34373 _ACEOF 34374 ac_clean_files=$ac_clean_files_save 34375 34376 test $ac_write_fail = 0 || 34377 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 34378 34379 34380 # configure is writing to config.log, and then calls config.status. 34381 # config.status does its own redirection, appending to config.log. 34382 # Unfortunately, on DOS this fails, as config.log is still kept open 34383 # by configure, so config.status won't be able to write to it; its 34384 # output is simply discarded. So we exec the FD to /dev/null, 34385 # effectively closing config.log, so it can be properly (re)opened and 34386 # appended to by config.status. When coming back to configure, we 34387 # need to make the FD available again. 34388 if test "$no_create" != yes; then 34389 ac_cs_success=: 34390 ac_config_status_args= 34391 test "$silent" = yes && 34392 ac_config_status_args="$ac_config_status_args --quiet" 34393 exec 5>/dev/null 34394 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 34395 exec 5>>config.log 34396 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 34397 # would make configure fail if this is the last instruction. 34398 $ac_cs_success || as_fn_exit 1 34399 fi 34400 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 34401 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 34402 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 34403 fi 34404 34405 34406 # Make the compare script executable 34407 $CHMOD +x $OUTPUT_ROOT/compare.sh 34408 34409 # Finally output some useful information to the user 34410 34411 # Finally output some useful information to the user 34412 34413 if test "x$CCACHE_FOUND" != x; then 34414 if test "x$HAS_GOOD_CCACHE" = x; then 34415 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" 34416 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." 34417 else 34418 CCACHE_STATUS="installed and in use" 34419 fi 34420 else 34421 if test "x$GCC" = xyes; then 34422 CCACHE_STATUS="not installed (consider installing)" 34423 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." 34424 else 34425 CCACHE_STATUS="not available for your system" 34426 fi 34427 fi 34428 34429 printf "\n" 34430 printf "====================================================\n" 34431 printf "A new configuration has been successfully created in\n" 34432 printf "$OUTPUT_ROOT\n" 34433 if test "x$CONFIGURE_COMMAND_LINE" != x; then 34434 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" 34435 else 34436 printf "using default settings.\n" 34437 fi 34438 34439 printf "\n" 34440 printf "Configuration summary:\n" 34441 printf "* Debug level: $DEBUG_LEVEL\n" 34442 printf "* JDK variant: $JDK_VARIANT\n" 34443 printf "* JVM variants: $with_jvm_variants\n" 34444 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" 34445 34446 printf "\n" 34447 printf "Tools summary:\n" 34448 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 34449 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" 34450 fi 34451 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" 34452 printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" 34453 printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" 34454 34455 printf "\n" 34456 printf "Build performance summary:\n" 34457 printf "* Cores to use: $JOBS\n" 34458 printf "* Memory limit: $MEMORY_SIZE MB\n" 34459 printf "* ccache status: $CCACHE_STATUS\n" 34460 printf "\n" 34461 34462 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then 34463 printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" 34464 printf "$CCACHE_HELP_MSG\n" 34465 34466 # Print a helpful message on how to acquire the necessary build dependency. 34467 # ccache is the help tag: freetyp2, cups, pulse, alsa etc 34468 MISSING_DEPENDENCY=ccache 34469 PKGHANDLER_COMMAND= 34470 34471 case $PKGHANDLER in 34472 apt-get) 34473 apt_help $MISSING_DEPENDENCY ;; 34474 yum) 34475 yum_help $MISSING_DEPENDENCY ;; 34476 port) 34477 port_help $MISSING_DEPENDENCY ;; 34478 pkgutil) 34479 pkgutil_help $MISSING_DEPENDENCY ;; 34480 pkgadd) 34481 pkgadd_help $MISSING_DEPENDENCY ;; 34482 * ) 34483 break ;; 34484 esac 34485 34486 if test "x$PKGHANDLER_COMMAND" != x; then 34487 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 34488 fi 34489 34490 printf "$HELP_MSG\n" 34491 printf "\n" 34492 fi 34493 34494 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then 34495 printf "NOTE: You have requested to build more than one version of the JVM, which\n" 34496 printf "will result in longer build times.\n" 34497 printf "\n" 34498 fi 34499 34500 if test "x$FOUND_ALT_VARIABLES" != "x"; then 34501 printf "WARNING: You have old-style ALT_ environment variables set.\n" 34502 printf "These are not respected, and will be ignored. It is recommended\n" 34503 printf "that you clean your environment. The following variables are set:\n" 34504 printf "$FOUND_ALT_VARIABLES\n" 34505 printf "\n" 34506 fi 34507 34508 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then 34509 printf "WARNING: Your build output directory is not on a local disk.\n" 34510 printf "This will severely degrade build performance!\n" 34511 printf "It is recommended that you create an output directory on a local disk,\n" 34512 printf "and run the configure script again from that directory.\n" 34513 printf "\n" 34514 fi 34515 34516 if test "x$IS_RECONFIGURE" = "xyes"; then 34517 printf "WARNING: The result of this configuration has overridden an older\n" 34518 printf "configuration. You *should* run 'make clean' to make sure you get a\n" 34519 printf "proper build. Failure to do so might result in strange build problems.\n" 34520 printf "\n" 34521 fi 34522