1 #! /bin/sh 2 # Guess values for system-dependent variables and create Makefiles. 3 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8. 4 # 5 # Report bugs to <build-dev@openjdk.java.net>. 6 # 7 # 8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. 9 # 10 # 11 # This configure script is free software; the Free Software Foundation 12 # gives unlimited permission to copy, distribute and modify it. 13 ## -------------------- ## 14 ## M4sh Initialization. ## 15 ## -------------------- ## 16 17 # Be more Bourne compatible 18 DUALCASE=1; export DUALCASE # for MKS sh 19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 20 emulate sh 21 NULLCMD=: 22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 23 # is contrary to our usage. Disable this feature. 24 alias -g '${1+"$@"}'='"$@"' 25 setopt NO_GLOB_SUBST 26 else 27 case `(set -o) 2>/dev/null` in #( 28 *posix*) : 29 set -o posix ;; #( 30 *) : 31 ;; 32 esac 33 fi 34 35 36 as_nl=' 37 ' 38 export as_nl 39 # Printing a long string crashes Solaris 7 /usr/bin/printf. 40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 43 # Prefer a ksh shell builtin over an external printf program on Solaris, 44 # but without wasting forks for bash or zsh. 45 if test -z "$BASH_VERSION$ZSH_VERSION" \ 46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 47 as_echo='print -r --' 48 as_echo_n='print -rn --' 49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 50 as_echo='printf %s\n' 51 as_echo_n='printf %s' 52 else 53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 55 as_echo_n='/usr/ucb/echo -n' 56 else 57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 58 as_echo_n_body='eval 59 arg=$1; 60 case $arg in #( 61 *"$as_nl"*) 62 expr "X$arg" : "X\\(.*\\)$as_nl"; 63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 64 esac; 65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 66 ' 67 export as_echo_n_body 68 as_echo_n='sh -c $as_echo_n_body as_echo' 69 fi 70 export as_echo_body 71 as_echo='sh -c $as_echo_body as_echo' 72 fi 73 74 # The user is always right. 75 if test "${PATH_SEPARATOR+set}" != set; then 76 PATH_SEPARATOR=: 77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 79 PATH_SEPARATOR=';' 80 } 81 fi 82 83 84 # IFS 85 # We need space, tab and new line, in precisely that order. Quoting is 86 # there to prevent editors from complaining about space-tab. 87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word 88 # splitting by setting IFS to empty value.) 89 IFS=" "" $as_nl" 90 91 # Find who we are. Look in the path if we contain no directory separator. 92 as_myself= 93 case $0 in #(( 94 *[\\/]* ) as_myself=$0 ;; 95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 96 for as_dir in $PATH 97 do 98 IFS=$as_save_IFS 99 test -z "$as_dir" && as_dir=. 100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 101 done 102 IFS=$as_save_IFS 103 104 ;; 105 esac 106 # We did not find ourselves, most probably we were run as `sh COMMAND' 107 # in which case we are not to be found in the path. 108 if test "x$as_myself" = x; then 109 as_myself=$0 110 fi 111 if test ! -f "$as_myself"; then 112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 113 exit 1 114 fi 115 116 # Unset variables that we do not need and which cause bugs (e.g. in 117 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 118 # suppresses any "Segmentation fault" message there. '((' could 119 # trigger a bug in pdksh 5.2.14. 120 for as_var in BASH_ENV ENV MAIL MAILPATH 121 do eval test x\${$as_var+set} = xset \ 122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 123 done 124 PS1='$ ' 125 PS2='> ' 126 PS4='+ ' 127 128 # NLS nuisances. 129 LC_ALL=C 130 export LC_ALL 131 LANGUAGE=C 132 export LANGUAGE 133 134 # CDPATH. 135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 136 137 # Use a proper internal environment variable to ensure we don't fall 138 # into an infinite loop, continuously re-executing ourselves. 139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then 140 _as_can_reexec=no; export _as_can_reexec; 141 # We cannot yet assume a decent shell, so we have to provide a 142 # neutralization value for shells without unset; and this also 143 # works around shells that cannot unset nonexistent variables. 144 # Preserve -v and -x to the replacement shell. 145 BASH_ENV=/dev/null 146 ENV=/dev/null 147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 148 case $- in # (((( 149 *v*x* | *x*v* ) as_opts=-vx ;; 150 *v* ) as_opts=-v ;; 151 *x* ) as_opts=-x ;; 152 * ) as_opts= ;; 153 esac 154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 155 # Admittedly, this is quite paranoid, since all the known shells bail 156 # out after a failed `exec'. 157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 158 as_fn_exit 255 159 fi 160 # We don't want this to propagate to other subprocesses. 161 { _as_can_reexec=; unset _as_can_reexec;} 162 if test "x$CONFIG_SHELL" = x; then 163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 164 emulate sh 165 NULLCMD=: 166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 167 # is contrary to our usage. Disable this feature. 168 alias -g '\${1+\"\$@\"}'='\"\$@\"' 169 setopt NO_GLOB_SUBST 170 else 171 case \`(set -o) 2>/dev/null\` in #( 172 *posix*) : 173 set -o posix ;; #( 174 *) : 175 ;; 176 esac 177 fi 178 " 179 as_required="as_fn_return () { (exit \$1); } 180 as_fn_success () { as_fn_return 0; } 181 as_fn_failure () { as_fn_return 1; } 182 as_fn_ret_success () { return 0; } 183 as_fn_ret_failure () { return 1; } 184 185 exitcode=0 186 as_fn_success || { exitcode=1; echo as_fn_success failed.; } 187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 191 192 else 193 exitcode=1; echo positional parameters were not saved. 194 fi 195 test x\$exitcode = x0 || exit 1 196 test -x / || exit 1" 197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 201 test \$(( 1 + 1 )) = 2 || exit 1" 202 if (eval "$as_required") 2>/dev/null; then : 203 as_have_required=yes 204 else 205 as_have_required=no 206 fi 207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 208 209 else 210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 211 as_found=false 212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 213 do 214 IFS=$as_save_IFS 215 test -z "$as_dir" && as_dir=. 216 as_found=: 217 case $as_dir in #( 218 /*) 219 for as_base in sh bash ksh sh5; do 220 # Try only shells that exist, to save several forks. 221 as_shell=$as_dir/$as_base 222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 224 CONFIG_SHELL=$as_shell as_have_required=yes 225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 226 break 2 227 fi 228 fi 229 done;; 230 esac 231 as_found=false 232 done 233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 235 CONFIG_SHELL=$SHELL as_have_required=yes 236 fi; } 237 IFS=$as_save_IFS 238 239 240 if test "x$CONFIG_SHELL" != x; then : 241 export CONFIG_SHELL 242 # We cannot yet assume a decent shell, so we have to provide a 243 # neutralization value for shells without unset; and this also 244 # works around shells that cannot unset nonexistent variables. 245 # Preserve -v and -x to the replacement shell. 246 BASH_ENV=/dev/null 247 ENV=/dev/null 248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 249 case $- in # (((( 250 *v*x* | *x*v* ) as_opts=-vx ;; 251 *v* ) as_opts=-v ;; 252 *x* ) as_opts=-x ;; 253 * ) as_opts= ;; 254 esac 255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 256 # Admittedly, this is quite paranoid, since all the known shells bail 257 # out after a failed `exec'. 258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 259 exit 255 260 fi 261 262 if test x$as_have_required = xno; then : 263 $as_echo "$0: This script requires a shell more modern than all" 264 $as_echo "$0: the shells that I found on your system." 265 if test x${ZSH_VERSION+set} = xset ; then 266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 267 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 268 else 269 $as_echo "$0: Please tell bug-autoconf@gnu.org and 270 $0: build-dev@openjdk.java.net about your system, including 271 $0: any error possibly output before this message. Then 272 $0: install a modern shell, or manually run the script 273 $0: under such a shell if you do have one." 274 fi 275 exit 1 276 fi 277 fi 278 fi 279 SHELL=${CONFIG_SHELL-/bin/sh} 280 export SHELL 281 # Unset more variables known to interfere with behavior of common tools. 282 CLICOLOR_FORCE= GREP_OPTIONS= 283 unset CLICOLOR_FORCE GREP_OPTIONS 284 285 ## --------------------- ## 286 ## M4sh Shell Functions. ## 287 ## --------------------- ## 288 # as_fn_unset VAR 289 # --------------- 290 # Portably unset VAR. 291 as_fn_unset () 292 { 293 { eval $1=; unset $1;} 294 } 295 as_unset=as_fn_unset 296 297 # as_fn_set_status STATUS 298 # ----------------------- 299 # Set $? to STATUS, without forking. 300 as_fn_set_status () 301 { 302 return $1 303 } # as_fn_set_status 304 305 # as_fn_exit STATUS 306 # ----------------- 307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 308 as_fn_exit () 309 { 310 set +e 311 as_fn_set_status $1 312 exit $1 313 } # as_fn_exit 314 315 # as_fn_mkdir_p 316 # ------------- 317 # Create "$as_dir" as a directory, including parents if necessary. 318 as_fn_mkdir_p () 319 { 320 321 case $as_dir in #( 322 -*) as_dir=./$as_dir;; 323 esac 324 test -d "$as_dir" || eval $as_mkdir_p || { 325 as_dirs= 326 while :; do 327 case $as_dir in #( 328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 329 *) as_qdir=$as_dir;; 330 esac 331 as_dirs="'$as_qdir' $as_dirs" 332 as_dir=`$as_dirname -- "$as_dir" || 333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 334 X"$as_dir" : 'X\(//\)[^/]' \| \ 335 X"$as_dir" : 'X\(//\)$' \| \ 336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 337 $as_echo X"$as_dir" | 338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 339 s//\1/ 340 q 341 } 342 /^X\(\/\/\)[^/].*/{ 343 s//\1/ 344 q 345 } 346 /^X\(\/\/\)$/{ 347 s//\1/ 348 q 349 } 350 /^X\(\/\).*/{ 351 s//\1/ 352 q 353 } 354 s/.*/./; q'` 355 test -d "$as_dir" && break 356 done 357 test -z "$as_dirs" || eval "mkdir $as_dirs" 358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 359 360 361 } # as_fn_mkdir_p 362 363 # as_fn_executable_p FILE 364 # ----------------------- 365 # Test if FILE is an executable regular file. 366 as_fn_executable_p () 367 { 368 test -f "$1" && test -x "$1" 369 } # as_fn_executable_p 370 # as_fn_append VAR VALUE 371 # ---------------------- 372 # Append the text in VALUE to the end of the definition contained in VAR. Take 373 # advantage of any shell optimizations that allow amortized linear growth over 374 # repeated appends, instead of the typical quadratic growth present in naive 375 # implementations. 376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 377 eval 'as_fn_append () 378 { 379 eval $1+=\$2 380 }' 381 else 382 as_fn_append () 383 { 384 eval $1=\$$1\$2 385 } 386 fi # as_fn_append 387 388 # as_fn_arith ARG... 389 # ------------------ 390 # Perform arithmetic evaluation on the ARGs, and store the result in the 391 # global $as_val. Take advantage of shells that can avoid forks. The arguments 392 # must be portable across $(()) and expr. 393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 394 eval 'as_fn_arith () 395 { 396 as_val=$(( $* )) 397 }' 398 else 399 as_fn_arith () 400 { 401 as_val=`expr "$@" || test $? -eq 1` 402 } 403 fi # as_fn_arith 404 405 406 # as_fn_error STATUS ERROR [LINENO LOG_FD] 407 # ---------------------------------------- 408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 410 # script with STATUS, using 1 if that was 0. 411 as_fn_error () 412 { 413 as_status=$1; test $as_status -eq 0 && as_status=1 414 if test "$4"; then 415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 417 fi 418 $as_echo "$as_me: error: $2" >&2 419 as_fn_exit $as_status 420 } # as_fn_error 421 422 if expr a : '\(a\)' >/dev/null 2>&1 && 423 test "X`expr 00001 : '.*\(...\)'`" = X001; then 424 as_expr=expr 425 else 426 as_expr=false 427 fi 428 429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 430 as_basename=basename 431 else 432 as_basename=false 433 fi 434 435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 436 as_dirname=dirname 437 else 438 as_dirname=false 439 fi 440 441 as_me=`$as_basename -- "$0" || 442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 443 X"$0" : 'X\(//\)$' \| \ 444 X"$0" : 'X\(/\)' \| . 2>/dev/null || 445 $as_echo X/"$0" | 446 sed '/^.*\/\([^/][^/]*\)\/*$/{ 447 s//\1/ 448 q 449 } 450 /^X\/\(\/\/\)$/{ 451 s//\1/ 452 q 453 } 454 /^X\/\(\/\).*/{ 455 s//\1/ 456 q 457 } 458 s/.*/./; q'` 459 460 # Avoid depending upon Character Ranges. 461 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 464 as_cr_digits='0123456789' 465 as_cr_alnum=$as_cr_Letters$as_cr_digits 466 467 468 as_lineno_1=$LINENO as_lineno_1a=$LINENO 469 as_lineno_2=$LINENO as_lineno_2a=$LINENO 470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 473 sed -n ' 474 p 475 /[$]LINENO/= 476 ' <$as_myself | 477 sed ' 478 s/[$]LINENO.*/&-/ 479 t lineno 480 b 481 :lineno 482 N 483 :loop 484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 485 t loop 486 s/-\n.*// 487 ' >$as_me.lineno && 488 chmod +x "$as_me.lineno" || 489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 490 491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 492 # already done that, so ensure we don't try to do so again and fall 493 # in an infinite loop. This has already happened in practice. 494 _as_can_reexec=no; export _as_can_reexec 495 # Don't try to exec as it changes $[0], causing all sort of problems 496 # (the dirname of $[0] is not the place where we might find the 497 # original and so on. Autoconf is especially sensitive to this). 498 . "./$as_me.lineno" 499 # Exit status is that of the last command. 500 exit 501 } 502 503 ECHO_C= ECHO_N= ECHO_T= 504 case `echo -n x` in #((((( 505 -n*) 506 case `echo 'xy\c'` in 507 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 508 xy) ECHO_C='\c';; 509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 510 ECHO_T=' ';; 511 esac;; 512 *) 513 ECHO_N='-n';; 514 esac 515 516 rm -f conf$$ conf$$.exe conf$$.file 517 if test -d conf$$.dir; then 518 rm -f conf$$.dir/conf$$.file 519 else 520 rm -f conf$$.dir 521 mkdir conf$$.dir 2>/dev/null 522 fi 523 if (echo >conf$$.file) 2>/dev/null; then 524 if ln -s conf$$.file conf$$ 2>/dev/null; then 525 as_ln_s='ln -s' 526 # ... but there are two gotchas: 527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 529 # In both cases, we have to default to `cp -pR'. 530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 531 as_ln_s='cp -pR' 532 elif ln conf$$.file conf$$ 2>/dev/null; then 533 as_ln_s=ln 534 else 535 as_ln_s='cp -pR' 536 fi 537 else 538 as_ln_s='cp -pR' 539 fi 540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 541 rmdir conf$$.dir 2>/dev/null 542 543 if mkdir -p . 2>/dev/null; then 544 as_mkdir_p='mkdir -p "$as_dir"' 545 else 546 test -d ./-p && rmdir ./-p 547 as_mkdir_p=false 548 fi 549 550 as_test_x='test -x' 551 as_executable_p=as_fn_executable_p 552 553 # Sed expression to map a string onto a valid CPP name. 554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 555 556 # Sed expression to map a string onto a valid variable name. 557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 558 559 560 test -n "$DJDIR" || exec 7<&0 </dev/null 561 exec 6>&1 562 563 # Name of the host. 564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 565 # so uname gets run too. 566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 567 568 # 569 # Initializations. 570 # 571 ac_default_prefix=/usr/local 572 ac_clean_files= 573 ac_config_libobj_dir=. 574 LIBOBJS= 575 cross_compiling=no 576 subdirs= 577 MFLAGS= 578 MAKEFLAGS= 579 580 # Identity of this package. 581 PACKAGE_NAME='OpenJDK' 582 PACKAGE_TARNAME='openjdk' 583 PACKAGE_VERSION='jdk8' 584 PACKAGE_STRING='OpenJDK jdk8' 585 PACKAGE_BUGREPORT='build-dev@openjdk.java.net' 586 PACKAGE_URL='http://openjdk.java.net' 587 588 # Factoring default headers for most tests. 589 ac_includes_default="\ 590 #include <stdio.h> 591 #ifdef HAVE_SYS_TYPES_H 592 # include <sys/types.h> 593 #endif 594 #ifdef HAVE_SYS_STAT_H 595 # include <sys/stat.h> 596 #endif 597 #ifdef STDC_HEADERS 598 # include <stdlib.h> 599 # include <stddef.h> 600 #else 601 # ifdef HAVE_STDLIB_H 602 # include <stdlib.h> 603 # endif 604 #endif 605 #ifdef HAVE_STRING_H 606 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H 607 # include <memory.h> 608 # endif 609 # include <string.h> 610 #endif 611 #ifdef HAVE_STRINGS_H 612 # include <strings.h> 613 #endif 614 #ifdef HAVE_INTTYPES_H 615 # include <inttypes.h> 616 #endif 617 #ifdef HAVE_STDINT_H 618 # include <stdint.h> 619 #endif 620 #ifdef HAVE_UNISTD_H 621 # include <unistd.h> 622 #endif" 623 624 ac_subst_vars='LTLIBOBJS 625 LIBOBJS 626 CCACHE 627 USE_PRECOMPILED_HEADER 628 SJAVAC_SERVER_DIR 629 ENABLE_SJAVAC 630 SJAVAC_SERVER_JAVA 631 JOBS 632 MEMORY_SIZE 633 NUM_CORES 634 ENABLE_INTREE_EC 635 SALIB_NAME 636 HOTSPOT_MAKE_ARGS 637 FIXPATH 638 LIBCXX 639 LLVM_LIBS 640 LLVM_LDFLAGS 641 LLVM_CFLAGS 642 LLVM_CONFIG 643 LIBFFI_LIBS 644 LIBFFI_CFLAGS 645 STATIC_CXX_SETTING 646 LIBDL 647 LIBM 648 LIBZIP_CAN_USE_MMAP 649 USE_EXTERNAL_LIBZ 650 USE_EXTERNAL_LIBGIF 651 USE_EXTERNAL_LIBJPEG 652 ALSA_LIBS 653 ALSA_CFLAGS 654 FREETYPE2_LIB_PATH 655 USING_SYSTEM_FT_LIB 656 FREETYPE2_LIBS 657 FREETYPE2_CFLAGS 658 CUPS_CFLAGS 659 OPENWIN_HOME 660 X_EXTRA_LIBS 661 X_LIBS 662 X_PRE_LIBS 663 X_CFLAGS 664 XMKMF 665 CXXFLAGS_DEBUG_SYMBOLS 666 CFLAGS_DEBUG_SYMBOLS 667 ZIP_DEBUGINFO_FILES 668 ENABLE_DEBUG_SYMBOLS 669 COMPILER_SUPPORTS_TARGET_BITS_FLAG 670 ZERO_ARCHFLAG 671 LDFLAGS_CXX_JDK 672 LDFLAGS_JDKEXE_SUFFIX 673 LDFLAGS_JDKLIB_SUFFIX 674 LDFLAGS_JDKEXE 675 LDFLAGS_JDKLIB 676 CXXFLAGS_JDKEXE 677 CXXFLAGS_JDKLIB 678 CFLAGS_JDKEXE 679 CFLAGS_JDKLIB 680 MACOSX_VERSION_MIN 681 PACKAGE_PATH 682 LEGACY_EXTRA_LDFLAGS 683 LEGACY_EXTRA_CXXFLAGS 684 LEGACY_EXTRA_CFLAGS 685 CXX_FLAG_DEPS 686 C_FLAG_DEPS 687 CXX_O_FLAG_NONE 688 CXX_O_FLAG_NORM 689 CXX_O_FLAG_HI 690 CXX_O_FLAG_HIGHEST 691 C_O_FLAG_NONE 692 C_O_FLAG_NORM 693 C_O_FLAG_HI 694 C_O_FLAG_HIGHEST 695 POST_MCS_CMD 696 POST_STRIP_CMD 697 SET_EXECUTABLE_ORIGIN 698 SET_SHARED_LIBRARY_ORIGIN 699 CXX_FLAG_REORDER 700 C_FLAG_REORDER 701 SET_SHARED_LIBRARY_MAPFILE 702 SET_SHARED_LIBRARY_NAME 703 SHARED_LIBRARY_FLAGS 704 EXE_SUFFIX 705 STATIC_LIBRARY_SUFFIX 706 SHARED_LIBRARY_SUFFIX 707 LIBRARY_PREFIX 708 STATIC_LIBRARY 709 SHARED_LIBRARY 710 OBJ_SUFFIX 711 COMPILER_NAME 712 TARGET_BITS_FLAG 713 JT_HOME 714 JTREGEXE 715 LIPO 716 ac_ct_OBJDUMP 717 OBJDUMP 718 ac_ct_OBJCOPY 719 OBJCOPY 720 MCS 721 STRIP 722 GNM 723 NM 724 AS 725 CXXCPP 726 CPP 727 COMPILER_TYPE 728 RC_FLAGS 729 DUMPBIN 730 WINAR 731 HOTSPOT_RC 732 HOTSPOT_MT 733 RC 734 MT 735 WINLD 736 HOTSPOT_LD 737 HOTSPOT_CXX 738 ARFLAGS 739 AR 740 LDEXECXX 741 LDCXX 742 LDEXE 743 LD 744 ac_ct_OBJC 745 OBJCFLAGS 746 OBJC 747 ac_ct_CXX 748 CXXFLAGS 749 CXX 750 ac_ct_PROPER_COMPILER_CXX 751 PROPER_COMPILER_CXX 752 POTENTIAL_CXX 753 TOOLS_DIR_CXX 754 OBJEXT 755 EXEEXT 756 ac_ct_CC 757 CPPFLAGS 758 LDFLAGS 759 CFLAGS 760 CC 761 ac_ct_PROPER_COMPILER_CC 762 PROPER_COMPILER_CC 763 POTENTIAL_CC 764 TOOLS_DIR_CC 765 BUILD_LD 766 BUILD_CXX 767 BUILD_CC 768 MSVCR_DLL 769 DXSDK_INCLUDE_PATH 770 DXSDK_LIB_PATH 771 VS_PATH 772 VS_LIB 773 VS_INCLUDE 774 CYGWIN_LINK 775 AR_OUT_OPTION 776 LD_OUT_OPTION 777 EXE_OUT_OPTION 778 CC_OUT_OPTION 779 BUILD_HOTSPOT 780 HOTSPOT_DIST 781 BUILD_OUTPUT 782 OVERRIDE_SRC_ROOT 783 ADD_SRC_ROOT 784 JDK_TOPDIR 785 NASHORN_TOPDIR 786 HOTSPOT_TOPDIR 787 JAXWS_TOPDIR 788 JAXP_TOPDIR 789 CORBA_TOPDIR 790 LANGTOOLS_TOPDIR 791 BOOT_JDK_JVMARGS 792 JAVAC_FLAGS 793 BOOT_JDK_SOURCETARGET 794 BOOT_JDK 795 BOOT_TOOLSJAR 796 BOOT_RTJAR 797 JAVA_CHECK 798 JAVAC_CHECK 799 COOKED_BUILD_NUMBER 800 JDK_VERSION 801 COPYRIGHT_YEAR 802 MACOSX_BUNDLE_ID_BASE 803 MACOSX_BUNDLE_NAME_BASE 804 COMPANY_NAME 805 JDK_RC_PLATFORM_NAME 806 PRODUCT_SUFFIX 807 PRODUCT_NAME 808 LAUNCHER_NAME 809 MILESTONE 810 JDK_BUILD_NUMBER 811 JDK_UPDATE_VERSION 812 JDK_MICRO_VERSION 813 JDK_MINOR_VERSION 814 JDK_MAJOR_VERSION 815 USER_RELEASE_SUFFIX 816 COMPRESS_JARS 817 UNLIMITED_CRYPTO 818 CACERTS_FILE 819 TEST_IN_BUILD 820 BUILD_HEADLESS 821 SUPPORT_HEADFUL 822 SUPPORT_HEADLESS 823 BDEPS_FTP 824 BDEPS_UNZIP 825 OS_VERSION_MICRO 826 OS_VERSION_MINOR 827 OS_VERSION_MAJOR 828 PKG_CONFIG 829 CODESIGN 830 XATTR 831 IS_GNU_TIME 832 TIME 833 STAT 834 HG 835 READELF 836 OTOOL 837 LDD 838 ZIP 839 UNZIP 840 FIND_DELETE 841 MAKE 842 CHECK_TOOLSDIR_MAKE 843 CHECK_TOOLSDIR_GMAKE 844 CHECK_MAKE 845 CHECK_GMAKE 846 PKGHANDLER 847 OUTPUT_ROOT 848 CONF_NAME 849 SPEC 850 BUILD_VARIANT_RELEASE 851 DEBUG_CLASSFILES 852 FASTDEBUG 853 VARIANT 854 DEBUG_LEVEL 855 MACOSX_UNIVERSAL 856 INCLUDE_SA 857 JVM_VARIANT_ZEROSHARK 858 JVM_VARIANT_ZERO 859 JVM_VARIANT_KERNEL 860 JVM_VARIANT_MINIMAL1 861 JVM_VARIANT_CLIENT 862 JVM_VARIANT_SERVER 863 JVM_VARIANTS 864 JDK_VARIANT 865 SET_OPENJDK 866 BUILD_LOG_WRAPPER 867 BUILD_LOG_PREVIOUS 868 BUILD_LOG 869 SYS_ROOT 870 PATH_SEP 871 SRC_ROOT 872 ZERO_ARCHDEF 873 DEFINE_CROSS_COMPILE_ARCH 874 LP64 875 OPENJDK_TARGET_OS_API_DIR 876 OPENJDK_TARGET_CPU_JLI_CFLAGS 877 OPENJDK_TARGET_CPU_OSARCH 878 OPENJDK_TARGET_CPU_ISADIR 879 OPENJDK_TARGET_CPU_LIBDIR 880 OPENJDK_TARGET_CPU_LEGACY_LIB 881 OPENJDK_TARGET_CPU_LEGACY 882 REQUIRED_OS_VERSION 883 REQUIRED_OS_NAME 884 COMPILE_TYPE 885 OPENJDK_TARGET_CPU_ENDIAN 886 OPENJDK_TARGET_CPU_BITS 887 OPENJDK_TARGET_CPU_ARCH 888 OPENJDK_TARGET_CPU 889 OPENJDK_TARGET_OS_API 890 OPENJDK_TARGET_OS 891 OPENJDK_BUILD_CPU_ENDIAN 892 OPENJDK_BUILD_CPU_BITS 893 OPENJDK_BUILD_CPU_ARCH 894 OPENJDK_BUILD_CPU 895 OPENJDK_BUILD_OS_API 896 OPENJDK_BUILD_OS 897 OPENJDK_BUILD_AUTOCONF_NAME 898 OPENJDK_TARGET_AUTOCONF_NAME 899 target_os 900 target_vendor 901 target_cpu 902 target 903 host_os 904 host_vendor 905 host_cpu 906 host 907 build_os 908 build_vendor 909 build_cpu 910 build 911 SETFILE 912 DF 913 READLINK 914 CYGPATH 915 NAWK 916 SED 917 FGREP 918 EGREP 919 GREP 920 AWK 921 XARGS 922 WHICH 923 WC 924 UNIQ 925 UNAME 926 TR 927 TOUCH 928 TEE 929 TAR 930 TAIL 931 SORT 932 SH 933 RM 934 PRINTF 935 MV 936 MKTEMP 937 MKDIR 938 LS 939 LN 940 HEAD 941 FIND 942 FILE 943 EXPR 944 ECHO 945 DIRNAME 946 DIFF 947 DATE 948 CUT 949 CPIO 950 CP 951 COMM 952 CMP 953 CHMOD 954 CAT 955 BASH 956 BASENAME 957 DATE_WHEN_CONFIGURED 958 CONFIGURE_COMMAND_LINE 959 CUSTOM_MAKE_DIR 960 target_alias 961 host_alias 962 build_alias 963 LIBS 964 ECHO_T 965 ECHO_N 966 ECHO_C 967 DEFS 968 mandir 969 localedir 970 libdir 971 psdir 972 pdfdir 973 dvidir 974 htmldir 975 infodir 976 docdir 977 oldincludedir 978 includedir 979 localstatedir 980 sharedstatedir 981 sysconfdir 982 datadir 983 datarootdir 984 libexecdir 985 sbindir 986 bindir 987 program_transform_name 988 prefix 989 exec_prefix 990 PACKAGE_URL 991 PACKAGE_BUGREPORT 992 PACKAGE_STRING 993 PACKAGE_VERSION 994 PACKAGE_TARNAME 995 PACKAGE_NAME 996 PATH_SEPARATOR 997 SHELL' 998 ac_subst_files='' 999 ac_user_opts=' 1000 enable_option_checking 1001 with_custom_make_dir 1002 with_target_bits 1003 with_sys_root 1004 with_tools_dir 1005 with_devkit 1006 enable_openjdk_only 1007 with_jdk_variant 1008 with_jvm_variants 1009 enable_debug 1010 with_debug_level 1011 with_conf_name 1012 with_builddeps_conf 1013 with_builddeps_server 1014 with_builddeps_dir 1015 with_builddeps_group 1016 enable_headful 1017 enable_hotspot_test_in_build 1018 with_cacerts_file 1019 enable_unlimited_crypto 1020 with_milestone 1021 with_update_version 1022 with_build_number 1023 with_user_release_suffix 1024 with_boot_jdk 1025 with_boot_jdk_jvmargs 1026 with_add_source_root 1027 with_override_source_root 1028 with_adds_and_overrides 1029 with_override_langtools 1030 with_override_corba 1031 with_override_jaxp 1032 with_override_jaxws 1033 with_override_hotspot 1034 with_override_jdk 1035 with_import_hotspot 1036 with_msvcr_dll 1037 with_dxsdk 1038 with_dxsdk_lib 1039 with_dxsdk_include 1040 with_jtreg 1041 with_extra_cflags 1042 with_extra_cxxflags 1043 with_extra_ldflags 1044 enable_debug_symbols 1045 enable_zip_debug_info 1046 enable_macosx_runtime_support 1047 with_x 1048 with_cups 1049 with_cups_include 1050 with_freetype 1051 with_alsa 1052 with_alsa_include 1053 with_alsa_lib 1054 with_giflib 1055 with_zlib 1056 with_stdc__lib 1057 with_num_cores 1058 with_memory_size 1059 with_jobs 1060 with_sjavac_server_java 1061 enable_sjavac 1062 enable_precompiled_headers 1063 enable_ccache 1064 with_ccache_dir 1065 ' 1066 ac_precious_vars='build_alias 1067 host_alias 1068 target_alias 1069 PKG_CONFIG 1070 CC 1071 CFLAGS 1072 LDFLAGS 1073 LIBS 1074 CPPFLAGS 1075 CXX 1076 CXXFLAGS 1077 CCC 1078 OBJC 1079 OBJCFLAGS 1080 CPP 1081 CXXCPP 1082 XMKMF 1083 FREETYPE2_CFLAGS 1084 FREETYPE2_LIBS 1085 ALSA_CFLAGS 1086 ALSA_LIBS 1087 LIBFFI_CFLAGS 1088 LIBFFI_LIBS' 1089 1090 1091 # Initialize some variables set by options. 1092 ac_init_help= 1093 ac_init_version=false 1094 ac_unrecognized_opts= 1095 ac_unrecognized_sep= 1096 # The variables have the same names as the options, with 1097 # dashes changed to underlines. 1098 cache_file=/dev/null 1099 exec_prefix=NONE 1100 no_create= 1101 no_recursion= 1102 prefix=NONE 1103 program_prefix=NONE 1104 program_suffix=NONE 1105 program_transform_name=s,x,x, 1106 silent= 1107 site= 1108 srcdir= 1109 verbose= 1110 x_includes=NONE 1111 x_libraries=NONE 1112 1113 # Installation directory options. 1114 # These are left unexpanded so users can "make install exec_prefix=/foo" 1115 # and all the variables that are supposed to be based on exec_prefix 1116 # by default will actually change. 1117 # Use braces instead of parens because sh, perl, etc. also accept them. 1118 # (The list follows the same order as the GNU Coding Standards.) 1119 bindir='${exec_prefix}/bin' 1120 sbindir='${exec_prefix}/sbin' 1121 libexecdir='${exec_prefix}/libexec' 1122 datarootdir='${prefix}/share' 1123 datadir='${datarootdir}' 1124 sysconfdir='${prefix}/etc' 1125 sharedstatedir='${prefix}/com' 1126 localstatedir='${prefix}/var' 1127 includedir='${prefix}/include' 1128 oldincludedir='/usr/include' 1129 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 1130 infodir='${datarootdir}/info' 1131 htmldir='${docdir}' 1132 dvidir='${docdir}' 1133 pdfdir='${docdir}' 1134 psdir='${docdir}' 1135 libdir='${exec_prefix}/lib' 1136 localedir='${datarootdir}/locale' 1137 mandir='${datarootdir}/man' 1138 1139 ac_prev= 1140 ac_dashdash= 1141 for ac_option 1142 do 1143 # If the previous option needs an argument, assign it. 1144 if test -n "$ac_prev"; then 1145 eval $ac_prev=\$ac_option 1146 ac_prev= 1147 continue 1148 fi 1149 1150 case $ac_option in 1151 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 1152 *=) ac_optarg= ;; 1153 *) ac_optarg=yes ;; 1154 esac 1155 1156 # Accept the important Cygnus configure options, so we can diagnose typos. 1157 1158 case $ac_dashdash$ac_option in 1159 --) 1160 ac_dashdash=yes ;; 1161 1162 -bindir | --bindir | --bindi | --bind | --bin | --bi) 1163 ac_prev=bindir ;; 1164 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 1165 bindir=$ac_optarg ;; 1166 1167 -build | --build | --buil | --bui | --bu) 1168 ac_prev=build_alias ;; 1169 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 1170 build_alias=$ac_optarg ;; 1171 1172 -cache-file | --cache-file | --cache-fil | --cache-fi \ 1173 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 1174 ac_prev=cache_file ;; 1175 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 1176 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 1177 cache_file=$ac_optarg ;; 1178 1179 --config-cache | -C) 1180 cache_file=config.cache ;; 1181 1182 -datadir | --datadir | --datadi | --datad) 1183 ac_prev=datadir ;; 1184 -datadir=* | --datadir=* | --datadi=* | --datad=*) 1185 datadir=$ac_optarg ;; 1186 1187 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 1188 | --dataroo | --dataro | --datar) 1189 ac_prev=datarootdir ;; 1190 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 1191 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 1192 datarootdir=$ac_optarg ;; 1193 1194 -disable-* | --disable-*) 1195 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 1196 # Reject names that are not valid shell variable names. 1197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1198 as_fn_error $? "invalid feature name: $ac_useropt" 1199 ac_useropt_orig=$ac_useropt 1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1201 case $ac_user_opts in 1202 *" 1203 "enable_$ac_useropt" 1204 "*) ;; 1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 1206 ac_unrecognized_sep=', ';; 1207 esac 1208 eval enable_$ac_useropt=no ;; 1209 1210 -docdir | --docdir | --docdi | --doc | --do) 1211 ac_prev=docdir ;; 1212 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 1213 docdir=$ac_optarg ;; 1214 1215 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 1216 ac_prev=dvidir ;; 1217 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 1218 dvidir=$ac_optarg ;; 1219 1220 -enable-* | --enable-*) 1221 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 1222 # Reject names that are not valid shell variable names. 1223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1224 as_fn_error $? "invalid feature name: $ac_useropt" 1225 ac_useropt_orig=$ac_useropt 1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1227 case $ac_user_opts in 1228 *" 1229 "enable_$ac_useropt" 1230 "*) ;; 1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 1232 ac_unrecognized_sep=', ';; 1233 esac 1234 eval enable_$ac_useropt=\$ac_optarg ;; 1235 1236 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 1237 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 1238 | --exec | --exe | --ex) 1239 ac_prev=exec_prefix ;; 1240 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 1241 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 1242 | --exec=* | --exe=* | --ex=*) 1243 exec_prefix=$ac_optarg ;; 1244 1245 -gas | --gas | --ga | --g) 1246 # Obsolete; use --with-gas. 1247 with_gas=yes ;; 1248 1249 -help | --help | --hel | --he | -h) 1250 ac_init_help=long ;; 1251 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 1252 ac_init_help=recursive ;; 1253 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 1254 ac_init_help=short ;; 1255 1256 -host | --host | --hos | --ho) 1257 ac_prev=host_alias ;; 1258 -host=* | --host=* | --hos=* | --ho=*) 1259 host_alias=$ac_optarg ;; 1260 1261 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 1262 ac_prev=htmldir ;; 1263 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 1264 | --ht=*) 1265 htmldir=$ac_optarg ;; 1266 1267 -includedir | --includedir | --includedi | --included | --include \ 1268 | --includ | --inclu | --incl | --inc) 1269 ac_prev=includedir ;; 1270 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 1271 | --includ=* | --inclu=* | --incl=* | --inc=*) 1272 includedir=$ac_optarg ;; 1273 1274 -infodir | --infodir | --infodi | --infod | --info | --inf) 1275 ac_prev=infodir ;; 1276 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 1277 infodir=$ac_optarg ;; 1278 1279 -libdir | --libdir | --libdi | --libd) 1280 ac_prev=libdir ;; 1281 -libdir=* | --libdir=* | --libdi=* | --libd=*) 1282 libdir=$ac_optarg ;; 1283 1284 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 1285 | --libexe | --libex | --libe) 1286 ac_prev=libexecdir ;; 1287 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 1288 | --libexe=* | --libex=* | --libe=*) 1289 libexecdir=$ac_optarg ;; 1290 1291 -localedir | --localedir | --localedi | --localed | --locale) 1292 ac_prev=localedir ;; 1293 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 1294 localedir=$ac_optarg ;; 1295 1296 -localstatedir | --localstatedir | --localstatedi | --localstated \ 1297 | --localstate | --localstat | --localsta | --localst | --locals) 1298 ac_prev=localstatedir ;; 1299 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 1300 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 1301 localstatedir=$ac_optarg ;; 1302 1303 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 1304 ac_prev=mandir ;; 1305 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 1306 mandir=$ac_optarg ;; 1307 1308 -nfp | --nfp | --nf) 1309 # Obsolete; use --without-fp. 1310 with_fp=no ;; 1311 1312 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 1313 | --no-cr | --no-c | -n) 1314 no_create=yes ;; 1315 1316 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 1317 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 1318 no_recursion=yes ;; 1319 1320 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 1321 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 1322 | --oldin | --oldi | --old | --ol | --o) 1323 ac_prev=oldincludedir ;; 1324 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 1325 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 1326 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 1327 oldincludedir=$ac_optarg ;; 1328 1329 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 1330 ac_prev=prefix ;; 1331 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 1332 prefix=$ac_optarg ;; 1333 1334 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 1335 | --program-pre | --program-pr | --program-p) 1336 ac_prev=program_prefix ;; 1337 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 1338 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 1339 program_prefix=$ac_optarg ;; 1340 1341 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 1342 | --program-suf | --program-su | --program-s) 1343 ac_prev=program_suffix ;; 1344 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 1345 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 1346 program_suffix=$ac_optarg ;; 1347 1348 -program-transform-name | --program-transform-name \ 1349 | --program-transform-nam | --program-transform-na \ 1350 | --program-transform-n | --program-transform- \ 1351 | --program-transform | --program-transfor \ 1352 | --program-transfo | --program-transf \ 1353 | --program-trans | --program-tran \ 1354 | --progr-tra | --program-tr | --program-t) 1355 ac_prev=program_transform_name ;; 1356 -program-transform-name=* | --program-transform-name=* \ 1357 | --program-transform-nam=* | --program-transform-na=* \ 1358 | --program-transform-n=* | --program-transform-=* \ 1359 | --program-transform=* | --program-transfor=* \ 1360 | --program-transfo=* | --program-transf=* \ 1361 | --program-trans=* | --program-tran=* \ 1362 | --progr-tra=* | --program-tr=* | --program-t=*) 1363 program_transform_name=$ac_optarg ;; 1364 1365 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 1366 ac_prev=pdfdir ;; 1367 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 1368 pdfdir=$ac_optarg ;; 1369 1370 -psdir | --psdir | --psdi | --psd | --ps) 1371 ac_prev=psdir ;; 1372 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 1373 psdir=$ac_optarg ;; 1374 1375 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1376 | -silent | --silent | --silen | --sile | --sil) 1377 silent=yes ;; 1378 1379 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1380 ac_prev=sbindir ;; 1381 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 1382 | --sbi=* | --sb=*) 1383 sbindir=$ac_optarg ;; 1384 1385 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 1386 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 1387 | --sharedst | --shareds | --shared | --share | --shar \ 1388 | --sha | --sh) 1389 ac_prev=sharedstatedir ;; 1390 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 1391 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 1392 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 1393 | --sha=* | --sh=*) 1394 sharedstatedir=$ac_optarg ;; 1395 1396 -site | --site | --sit) 1397 ac_prev=site ;; 1398 -site=* | --site=* | --sit=*) 1399 site=$ac_optarg ;; 1400 1401 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 1402 ac_prev=srcdir ;; 1403 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 1404 srcdir=$ac_optarg ;; 1405 1406 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 1407 | --syscon | --sysco | --sysc | --sys | --sy) 1408 ac_prev=sysconfdir ;; 1409 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 1410 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 1411 sysconfdir=$ac_optarg ;; 1412 1413 -target | --target | --targe | --targ | --tar | --ta | --t) 1414 ac_prev=target_alias ;; 1415 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 1416 target_alias=$ac_optarg ;; 1417 1418 -v | -verbose | --verbose | --verbos | --verbo | --verb) 1419 verbose=yes ;; 1420 1421 -version | --version | --versio | --versi | --vers | -V) 1422 ac_init_version=: ;; 1423 1424 -with-* | --with-*) 1425 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1426 # Reject names that are not valid shell variable names. 1427 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1428 as_fn_error $? "invalid package name: $ac_useropt" 1429 ac_useropt_orig=$ac_useropt 1430 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1431 case $ac_user_opts in 1432 *" 1433 "with_$ac_useropt" 1434 "*) ;; 1435 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 1436 ac_unrecognized_sep=', ';; 1437 esac 1438 eval with_$ac_useropt=\$ac_optarg ;; 1439 1440 -without-* | --without-*) 1441 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1442 # Reject names that are not valid shell variable names. 1443 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1444 as_fn_error $? "invalid package name: $ac_useropt" 1445 ac_useropt_orig=$ac_useropt 1446 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1447 case $ac_user_opts in 1448 *" 1449 "with_$ac_useropt" 1450 "*) ;; 1451 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1452 ac_unrecognized_sep=', ';; 1453 esac 1454 eval with_$ac_useropt=no ;; 1455 1456 --x) 1457 # Obsolete; use --with-x. 1458 with_x=yes ;; 1459 1460 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1461 | --x-incl | --x-inc | --x-in | --x-i) 1462 ac_prev=x_includes ;; 1463 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1464 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1465 x_includes=$ac_optarg ;; 1466 1467 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1468 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1469 ac_prev=x_libraries ;; 1470 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1471 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1472 x_libraries=$ac_optarg ;; 1473 1474 -*) as_fn_error $? "unrecognized option: \`$ac_option' 1475 Try \`$0 --help' for more information" 1476 ;; 1477 1478 *=*) 1479 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1480 # Reject names that are not valid shell variable names. 1481 case $ac_envvar in #( 1482 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1483 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1484 esac 1485 eval $ac_envvar=\$ac_optarg 1486 export $ac_envvar ;; 1487 1488 *) 1489 # FIXME: should be removed in autoconf 3.0. 1490 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1491 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1492 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1493 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 1494 ;; 1495 1496 esac 1497 done 1498 1499 if test -n "$ac_prev"; then 1500 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1501 as_fn_error $? "missing argument to $ac_option" 1502 fi 1503 1504 if test -n "$ac_unrecognized_opts"; then 1505 case $enable_option_checking in 1506 no) ;; 1507 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1508 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1509 esac 1510 fi 1511 1512 # Check all directory arguments for consistency. 1513 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1514 datadir sysconfdir sharedstatedir localstatedir includedir \ 1515 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1516 libdir localedir mandir 1517 do 1518 eval ac_val=\$$ac_var 1519 # Remove trailing slashes. 1520 case $ac_val in 1521 */ ) 1522 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1523 eval $ac_var=\$ac_val;; 1524 esac 1525 # Be sure to have absolute directory names. 1526 case $ac_val in 1527 [\\/$]* | ?:[\\/]* ) continue;; 1528 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1529 esac 1530 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1531 done 1532 1533 # There might be people who depend on the old broken behavior: `$host' 1534 # used to hold the argument of --host etc. 1535 # FIXME: To remove some day. 1536 build=$build_alias 1537 host=$host_alias 1538 target=$target_alias 1539 1540 # FIXME: To remove some day. 1541 if test "x$host_alias" != x; then 1542 if test "x$build_alias" = x; then 1543 cross_compiling=maybe 1544 elif test "x$build_alias" != "x$host_alias"; then 1545 cross_compiling=yes 1546 fi 1547 fi 1548 1549 ac_tool_prefix= 1550 test -n "$host_alias" && ac_tool_prefix=$host_alias- 1551 1552 test "$silent" = yes && exec 6>/dev/null 1553 1554 1555 ac_pwd=`pwd` && test -n "$ac_pwd" && 1556 ac_ls_di=`ls -di .` && 1557 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1558 as_fn_error $? "working directory cannot be determined" 1559 test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1560 as_fn_error $? "pwd does not report name of working directory" 1561 1562 1563 # Find the source files, if location was not specified. 1564 if test -z "$srcdir"; then 1565 ac_srcdir_defaulted=yes 1566 # Try the directory containing this script, then the parent directory. 1567 ac_confdir=`$as_dirname -- "$as_myself" || 1568 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1569 X"$as_myself" : 'X\(//\)[^/]' \| \ 1570 X"$as_myself" : 'X\(//\)$' \| \ 1571 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1572 $as_echo X"$as_myself" | 1573 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1574 s//\1/ 1575 q 1576 } 1577 /^X\(\/\/\)[^/].*/{ 1578 s//\1/ 1579 q 1580 } 1581 /^X\(\/\/\)$/{ 1582 s//\1/ 1583 q 1584 } 1585 /^X\(\/\).*/{ 1586 s//\1/ 1587 q 1588 } 1589 s/.*/./; q'` 1590 srcdir=$ac_confdir 1591 if test ! -r "$srcdir/$ac_unique_file"; then 1592 srcdir=.. 1593 fi 1594 else 1595 ac_srcdir_defaulted=no 1596 fi 1597 if test ! -r "$srcdir/$ac_unique_file"; then 1598 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1599 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1600 fi 1601 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1602 ac_abs_confdir=`( 1603 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1604 pwd)` 1605 # When building in place, set srcdir=. 1606 if test "$ac_abs_confdir" = "$ac_pwd"; then 1607 srcdir=. 1608 fi 1609 # Remove unnecessary trailing slashes from srcdir. 1610 # Double slashes in file names in object file debugging info 1611 # mess up M-x gdb in Emacs. 1612 case $srcdir in 1613 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1614 esac 1615 for ac_var in $ac_precious_vars; do 1616 eval ac_env_${ac_var}_set=\${${ac_var}+set} 1617 eval ac_env_${ac_var}_value=\$${ac_var} 1618 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1619 eval ac_cv_env_${ac_var}_value=\$${ac_var} 1620 done 1621 1622 # 1623 # Report the --help message. 1624 # 1625 if test "$ac_init_help" = "long"; then 1626 # Omit some internal or obsolete options to make the list less imposing. 1627 # This message is too long to be a string in the A/UX 3.1 sh. 1628 cat <<_ACEOF 1629 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems. 1630 1631 Usage: $0 [OPTION]... [VAR=VALUE]... 1632 1633 To assign environment variables (e.g., CC, CFLAGS...), specify them as 1634 VAR=VALUE. See below for descriptions of some of the useful variables. 1635 1636 Defaults for the options are specified in brackets. 1637 1638 Configuration: 1639 -h, --help display this help and exit 1640 --help=short display options specific to this package 1641 --help=recursive display the short help of all the included packages 1642 -V, --version display version information and exit 1643 -q, --quiet, --silent do not print \`checking ...' messages 1644 --cache-file=FILE cache test results in FILE [disabled] 1645 -C, --config-cache alias for \`--cache-file=config.cache' 1646 -n, --no-create do not create output files 1647 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1648 1649 Installation directories: 1650 --prefix=PREFIX install architecture-independent files in PREFIX 1651 [$ac_default_prefix] 1652 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1653 [PREFIX] 1654 1655 By default, \`make install' will install all the files in 1656 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1657 an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1658 for instance \`--prefix=\$HOME'. 1659 1660 For better control, use the options below. 1661 1662 Fine tuning of the installation directories: 1663 --bindir=DIR user executables [EPREFIX/bin] 1664 --sbindir=DIR system admin executables [EPREFIX/sbin] 1665 --libexecdir=DIR program executables [EPREFIX/libexec] 1666 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1667 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1668 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1669 --libdir=DIR object code libraries [EPREFIX/lib] 1670 --includedir=DIR C header files [PREFIX/include] 1671 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1672 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1673 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1674 --infodir=DIR info documentation [DATAROOTDIR/info] 1675 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1676 --mandir=DIR man documentation [DATAROOTDIR/man] 1677 --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk] 1678 --htmldir=DIR html documentation [DOCDIR] 1679 --dvidir=DIR dvi documentation [DOCDIR] 1680 --pdfdir=DIR pdf documentation [DOCDIR] 1681 --psdir=DIR ps documentation [DOCDIR] 1682 _ACEOF 1683 1684 cat <<\_ACEOF 1685 1686 X features: 1687 --x-includes=DIR X include files are in DIR 1688 --x-libraries=DIR X library files are in DIR 1689 1690 System types: 1691 --build=BUILD configure for building on BUILD [guessed] 1692 --host=HOST cross-compile to build programs to run on HOST [BUILD] 1693 --target=TARGET configure for building compilers for TARGET [HOST] 1694 _ACEOF 1695 fi 1696 1697 if test -n "$ac_init_help"; then 1698 case $ac_init_help in 1699 short | recursive ) echo "Configuration of OpenJDK jdk8:";; 1700 esac 1701 cat <<\_ACEOF 1702 1703 Optional Features: 1704 --disable-option-checking ignore unrecognized --enable/--with options 1705 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1706 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1707 --enable-openjdk-only suppress building custom source even if present 1708 [disabled] 1709 --enable-debug set the debug level to fastdebug (shorthand for 1710 --with-debug-level=fastdebug) [disabled] 1711 --disable-headful disable building headful support (graphical UI 1712 support) [enabled] 1713 --enable-hotspot-test-in-build 1714 run the Queens test after Hotspot build [disabled] 1715 --enable-unlimited-crypto 1716 Enable unlimited crypto policy [disabled] 1717 --disable-debug-symbols disable generation of debug symbols [enabled] 1718 --disable-zip-debug-info 1719 disable zipping of debug-info files [enabled] 1720 --disable-macosx-runtime-support 1721 disable the use of MacOSX Java runtime support 1722 framework [enabled] 1723 --enable-sjavac use sjavac to do fast incremental compiles 1724 [disabled] 1725 --disable-precompiled-headers 1726 disable using precompiled headers when compiling C++ 1727 [enabled] 1728 --disable-ccache disable using ccache to speed up recompilations 1729 [enabled] 1730 1731 Optional Packages: 1732 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1733 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1734 --with-custom-make-dir use this directory for custom build/make files 1735 --with-target-bits build 32-bit or 64-bit binaries (for platforms that 1736 support it), e.g. --with-target-bits=32 [guessed] 1737 --with-sys-root pass this sys-root to the compilers and tools (for 1738 cross-compiling) 1739 --with-tools-dir search this directory for compilers and tools (for 1740 cross-compiling) 1741 --with-devkit use this directory as base for tools-dir and 1742 sys-root (for cross-compiling) 1743 --with-jdk-variant JDK variant to build (normal) [normal] 1744 --with-jvm-variants JVM variants (separated by commas) to build (server, 1745 client, minimal1, kernel, zero, zeroshark) [server] 1746 --with-debug-level set the debug level (release, fastdebug, slowdebug) 1747 [release] 1748 --with-conf-name use this as the name of the configuration [generated 1749 from important configuration options] 1750 --with-builddeps-conf use this configuration file for the builddeps 1751 --with-builddeps-server download and use build dependencies from this server 1752 url 1753 --with-builddeps-dir store downloaded build dependencies here 1754 [/localhome/builddeps] 1755 --with-builddeps-group chgrp the downloaded build dependencies to this 1756 group 1757 --with-cacerts-file specify alternative cacerts file 1758 --with-milestone Set milestone value for build [internal] 1759 --with-update-version Set update version value for build [b00] 1760 --with-build-number Set build number value for build [b00] 1761 --with-user-release-suffix 1762 Add a custom string to the version string if build 1763 number isn't set.[username_builddateb00] 1764 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed] 1765 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all 1766 invocations of the Boot JDK, overriding the default 1767 values, e.g --with-boot-jdk-jvmargs="-Xmx8G 1768 -enableassertions" 1769 --with-add-source-root for each and every source directory, look in this 1770 additional source root for the same directory; if it 1771 exists and have files in it, include it in the build 1772 --with-override-source-root 1773 for each and every source directory, look in this 1774 override source root for the same directory; if it 1775 exists, use that directory instead and ignore the 1776 directory in the original source root 1777 --with-adds-and-overrides 1778 use the subdirs 'adds' and 'overrides' in the 1779 specified directory as add-source-root and 1780 override-source-root 1781 --with-override-langtools 1782 use this langtools dir for the build 1783 --with-override-corba use this corba dir for the build 1784 --with-override-jaxp use this jaxp dir for the build 1785 --with-override-jaxws use this jaxws dir for the build 1786 --with-override-hotspot use this hotspot dir for the build 1787 --with-override-jdk use this jdk dir for the build 1788 --with-import-hotspot import hotspot binaries from this jdk image or 1789 hotspot build dist dir instead of building from 1790 source 1791 --with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows 1792 only) [probed] 1793 --with-dxsdk the DirectX SDK (Windows only) [probed] 1794 --with-dxsdk-lib the DirectX SDK lib directory (Windows only) 1795 [probed] 1796 --with-dxsdk-include the DirectX SDK include directory (Windows only) 1797 [probed] 1798 --with-jtreg Regression Test Harness [probed] 1799 --with-extra-cflags extra flags to be used when compiling jdk c-files 1800 --with-extra-cxxflags extra flags to be used when compiling jdk c++-files 1801 --with-extra-ldflags extra flags to be used when linking jdk 1802 --with-x use the X Window System 1803 --with-cups specify prefix directory for the cups package 1804 (expecting the headers under PATH/include) 1805 --with-cups-include specify directory for the cups include files 1806 --with-freetype specify prefix directory for the freetype2 package 1807 (expecting the libraries under PATH/lib and the 1808 headers under PATH/include) 1809 --with-alsa specify prefix directory for the alsa package 1810 (expecting the libraries under PATH/lib and the 1811 headers under PATH/include) 1812 --with-alsa-include specify directory for the alsa include files 1813 --with-alsa-lib specify directory for the alsa library 1814 --with-giflib use giflib from build system or OpenJDK source 1815 (system, bundled) [bundled] 1816 --with-zlib use zlib from build system or OpenJDK source 1817 (system, bundled) [bundled] 1818 --with-stdc++lib=<static>,<dynamic>,<default> 1819 force linking of the C++ runtime on Linux to either 1820 static or dynamic, default is static with dynamic as 1821 fallback 1822 --with-num-cores number of cores in the build system, e.g. 1823 --with-num-cores=8 [probed] 1824 --with-memory-size memory (in MB) available in the build system, e.g. 1825 --with-memory-size=1024 [probed] 1826 --with-jobs number of parallel jobs to let make run [calculated 1827 based on cores and memory] 1828 --with-sjavac-server-java 1829 use this java binary for running the sjavac 1830 background server [Boot JDK java] 1831 --with-ccache-dir where to store ccache files [~/.ccache] 1832 1833 Some influential environment variables: 1834 PKG_CONFIG path to pkg-config utility 1835 CC C compiler command 1836 CFLAGS C compiler flags 1837 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 1838 nonstandard directory <lib dir> 1839 LIBS libraries to pass to the linker, e.g. -l<library> 1840 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 1841 you have headers in a nonstandard directory <include dir> 1842 CXX C++ compiler command 1843 CXXFLAGS C++ compiler flags 1844 OBJC Objective C compiler command 1845 OBJCFLAGS Objective C compiler flags 1846 CPP C preprocessor 1847 CXXCPP C++ preprocessor 1848 XMKMF Path to xmkmf, Makefile generator for X Window System 1849 FREETYPE2_CFLAGS 1850 C compiler flags for FREETYPE2, overriding pkg-config 1851 FREETYPE2_LIBS 1852 linker flags for FREETYPE2, overriding pkg-config 1853 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config 1854 ALSA_LIBS linker flags for ALSA, overriding pkg-config 1855 LIBFFI_CFLAGS 1856 C compiler flags for LIBFFI, overriding pkg-config 1857 LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config 1858 1859 Use these variables to override the choices made by `configure' or to help 1860 it to find libraries and programs with nonstandard names/locations. 1861 1862 Report bugs to <build-dev@openjdk.java.net>. 1863 OpenJDK home page: <http://openjdk.java.net>. 1864 _ACEOF 1865 ac_status=$? 1866 fi 1867 1868 if test "$ac_init_help" = "recursive"; then 1869 # If there are subdirs, report their specific --help. 1870 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1871 test -d "$ac_dir" || 1872 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1873 continue 1874 ac_builddir=. 1875 1876 case "$ac_dir" in 1877 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1878 *) 1879 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1880 # A ".." for each directory in $ac_dir_suffix. 1881 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1882 case $ac_top_builddir_sub in 1883 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1884 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1885 esac ;; 1886 esac 1887 ac_abs_top_builddir=$ac_pwd 1888 ac_abs_builddir=$ac_pwd$ac_dir_suffix 1889 # for backward compatibility: 1890 ac_top_builddir=$ac_top_build_prefix 1891 1892 case $srcdir in 1893 .) # We are building in place. 1894 ac_srcdir=. 1895 ac_top_srcdir=$ac_top_builddir_sub 1896 ac_abs_top_srcdir=$ac_pwd ;; 1897 [\\/]* | ?:[\\/]* ) # Absolute name. 1898 ac_srcdir=$srcdir$ac_dir_suffix; 1899 ac_top_srcdir=$srcdir 1900 ac_abs_top_srcdir=$srcdir ;; 1901 *) # Relative name. 1902 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1903 ac_top_srcdir=$ac_top_build_prefix$srcdir 1904 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1905 esac 1906 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1907 1908 cd "$ac_dir" || { ac_status=$?; continue; } 1909 # Check for guested configure. 1910 if test -f "$ac_srcdir/configure.gnu"; then 1911 echo && 1912 $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1913 elif test -f "$ac_srcdir/configure"; then 1914 echo && 1915 $SHELL "$ac_srcdir/configure" --help=recursive 1916 else 1917 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1918 fi || ac_status=$? 1919 cd "$ac_pwd" || { ac_status=$?; break; } 1920 done 1921 fi 1922 1923 test -n "$ac_init_help" && exit $ac_status 1924 if $ac_init_version; then 1925 cat <<\_ACEOF 1926 OpenJDK configure jdk8 1927 generated by GNU Autoconf 2.69 1928 1929 Copyright (C) 2012 Free Software Foundation, Inc. 1930 This configure script is free software; the Free Software Foundation 1931 gives unlimited permission to copy, distribute and modify it. 1932 _ACEOF 1933 exit 1934 fi 1935 1936 ## ------------------------ ## 1937 ## Autoconf initialization. ## 1938 ## ------------------------ ## 1939 1940 # ac_fn_c_try_compile LINENO 1941 # -------------------------- 1942 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1943 ac_fn_c_try_compile () 1944 { 1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1946 rm -f conftest.$ac_objext 1947 if { { ac_try="$ac_compile" 1948 case "(($ac_try" in 1949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1950 *) ac_try_echo=$ac_try;; 1951 esac 1952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1953 $as_echo "$ac_try_echo"; } >&5 1954 (eval "$ac_compile") 2>conftest.err 1955 ac_status=$? 1956 if test -s conftest.err; then 1957 grep -v '^ *+' conftest.err >conftest.er1 1958 cat conftest.er1 >&5 1959 mv -f conftest.er1 conftest.err 1960 fi 1961 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1962 test $ac_status = 0; } && { 1963 test -z "$ac_c_werror_flag" || 1964 test ! -s conftest.err 1965 } && test -s conftest.$ac_objext; then : 1966 ac_retval=0 1967 else 1968 $as_echo "$as_me: failed program was:" >&5 1969 sed 's/^/| /' conftest.$ac_ext >&5 1970 1971 ac_retval=1 1972 fi 1973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1974 as_fn_set_status $ac_retval 1975 1976 } # ac_fn_c_try_compile 1977 1978 # ac_fn_cxx_try_compile LINENO 1979 # ---------------------------- 1980 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1981 ac_fn_cxx_try_compile () 1982 { 1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1984 rm -f conftest.$ac_objext 1985 if { { ac_try="$ac_compile" 1986 case "(($ac_try" in 1987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1988 *) ac_try_echo=$ac_try;; 1989 esac 1990 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1991 $as_echo "$ac_try_echo"; } >&5 1992 (eval "$ac_compile") 2>conftest.err 1993 ac_status=$? 1994 if test -s conftest.err; then 1995 grep -v '^ *+' conftest.err >conftest.er1 1996 cat conftest.er1 >&5 1997 mv -f conftest.er1 conftest.err 1998 fi 1999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2000 test $ac_status = 0; } && { 2001 test -z "$ac_cxx_werror_flag" || 2002 test ! -s conftest.err 2003 } && test -s conftest.$ac_objext; then : 2004 ac_retval=0 2005 else 2006 $as_echo "$as_me: failed program was:" >&5 2007 sed 's/^/| /' conftest.$ac_ext >&5 2008 2009 ac_retval=1 2010 fi 2011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2012 as_fn_set_status $ac_retval 2013 2014 } # ac_fn_cxx_try_compile 2015 2016 # ac_fn_objc_try_compile LINENO 2017 # ----------------------------- 2018 # Try to compile conftest.$ac_ext, and return whether this succeeded. 2019 ac_fn_objc_try_compile () 2020 { 2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2022 rm -f conftest.$ac_objext 2023 if { { ac_try="$ac_compile" 2024 case "(($ac_try" in 2025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2026 *) ac_try_echo=$ac_try;; 2027 esac 2028 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2029 $as_echo "$ac_try_echo"; } >&5 2030 (eval "$ac_compile") 2>conftest.err 2031 ac_status=$? 2032 if test -s conftest.err; then 2033 grep -v '^ *+' conftest.err >conftest.er1 2034 cat conftest.er1 >&5 2035 mv -f conftest.er1 conftest.err 2036 fi 2037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2038 test $ac_status = 0; } && { 2039 test -z "$ac_objc_werror_flag" || 2040 test ! -s conftest.err 2041 } && test -s conftest.$ac_objext; then : 2042 ac_retval=0 2043 else 2044 $as_echo "$as_me: failed program was:" >&5 2045 sed 's/^/| /' conftest.$ac_ext >&5 2046 2047 ac_retval=1 2048 fi 2049 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2050 as_fn_set_status $ac_retval 2051 2052 } # ac_fn_objc_try_compile 2053 2054 # ac_fn_c_try_cpp LINENO 2055 # ---------------------- 2056 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2057 ac_fn_c_try_cpp () 2058 { 2059 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2060 if { { ac_try="$ac_cpp conftest.$ac_ext" 2061 case "(($ac_try" in 2062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2063 *) ac_try_echo=$ac_try;; 2064 esac 2065 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2066 $as_echo "$ac_try_echo"; } >&5 2067 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2068 ac_status=$? 2069 if test -s conftest.err; then 2070 grep -v '^ *+' conftest.err >conftest.er1 2071 cat conftest.er1 >&5 2072 mv -f conftest.er1 conftest.err 2073 fi 2074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2075 test $ac_status = 0; } > conftest.i && { 2076 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2077 test ! -s conftest.err 2078 }; then : 2079 ac_retval=0 2080 else 2081 $as_echo "$as_me: failed program was:" >&5 2082 sed 's/^/| /' conftest.$ac_ext >&5 2083 2084 ac_retval=1 2085 fi 2086 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2087 as_fn_set_status $ac_retval 2088 2089 } # ac_fn_c_try_cpp 2090 2091 # ac_fn_cxx_try_cpp LINENO 2092 # ------------------------ 2093 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2094 ac_fn_cxx_try_cpp () 2095 { 2096 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2097 if { { ac_try="$ac_cpp conftest.$ac_ext" 2098 case "(($ac_try" in 2099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2100 *) ac_try_echo=$ac_try;; 2101 esac 2102 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2103 $as_echo "$ac_try_echo"; } >&5 2104 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2105 ac_status=$? 2106 if test -s conftest.err; then 2107 grep -v '^ *+' conftest.err >conftest.er1 2108 cat conftest.er1 >&5 2109 mv -f conftest.er1 conftest.err 2110 fi 2111 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2112 test $ac_status = 0; } > conftest.i && { 2113 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || 2114 test ! -s conftest.err 2115 }; then : 2116 ac_retval=0 2117 else 2118 $as_echo "$as_me: failed program was:" >&5 2119 sed 's/^/| /' conftest.$ac_ext >&5 2120 2121 ac_retval=1 2122 fi 2123 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2124 as_fn_set_status $ac_retval 2125 2126 } # ac_fn_cxx_try_cpp 2127 2128 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES 2129 # --------------------------------------------------------- 2130 # Tests whether HEADER exists, giving a warning if it cannot be compiled using 2131 # the include files in INCLUDES and setting the cache variable VAR 2132 # accordingly. 2133 ac_fn_cxx_check_header_mongrel () 2134 { 2135 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2136 if eval \${$3+:} false; then : 2137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2138 $as_echo_n "checking for $2... " >&6; } 2139 if eval \${$3+:} false; then : 2140 $as_echo_n "(cached) " >&6 2141 fi 2142 eval ac_res=\$$3 2143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2144 $as_echo "$ac_res" >&6; } 2145 else 2146 # Is the header compilable? 2147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 2148 $as_echo_n "checking $2 usability... " >&6; } 2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2150 /* end confdefs.h. */ 2151 $4 2152 #include <$2> 2153 _ACEOF 2154 if ac_fn_cxx_try_compile "$LINENO"; then : 2155 ac_header_compiler=yes 2156 else 2157 ac_header_compiler=no 2158 fi 2159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 2161 $as_echo "$ac_header_compiler" >&6; } 2162 2163 # Is the header present? 2164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 2165 $as_echo_n "checking $2 presence... " >&6; } 2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2167 /* end confdefs.h. */ 2168 #include <$2> 2169 _ACEOF 2170 if ac_fn_cxx_try_cpp "$LINENO"; then : 2171 ac_header_preproc=yes 2172 else 2173 ac_header_preproc=no 2174 fi 2175 rm -f conftest.err conftest.i conftest.$ac_ext 2176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2177 $as_echo "$ac_header_preproc" >&6; } 2178 2179 # So? What about this header? 2180 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( 2181 yes:no: ) 2182 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 2183 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} 2184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2185 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2186 ;; 2187 no:yes:* ) 2188 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 2189 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} 2190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 2191 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} 2192 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 2193 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} 2194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 2195 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} 2196 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2197 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2198 ( $as_echo "## ----------------------------------------- ## 2199 ## Report this to build-dev@openjdk.java.net ## 2200 ## ----------------------------------------- ##" 2201 ) | sed "s/^/$as_me: WARNING: /" >&2 2202 ;; 2203 esac 2204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2205 $as_echo_n "checking for $2... " >&6; } 2206 if eval \${$3+:} false; then : 2207 $as_echo_n "(cached) " >&6 2208 else 2209 eval "$3=\$ac_header_compiler" 2210 fi 2211 eval ac_res=\$$3 2212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2213 $as_echo "$ac_res" >&6; } 2214 fi 2215 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2216 2217 } # ac_fn_cxx_check_header_mongrel 2218 2219 # ac_fn_cxx_try_run LINENO 2220 # ------------------------ 2221 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes 2222 # that executables *can* be run. 2223 ac_fn_cxx_try_run () 2224 { 2225 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2226 if { { ac_try="$ac_link" 2227 case "(($ac_try" in 2228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2229 *) ac_try_echo=$ac_try;; 2230 esac 2231 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2232 $as_echo "$ac_try_echo"; } >&5 2233 (eval "$ac_link") 2>&5 2234 ac_status=$? 2235 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2236 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 2237 { { case "(($ac_try" in 2238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2239 *) ac_try_echo=$ac_try;; 2240 esac 2241 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2242 $as_echo "$ac_try_echo"; } >&5 2243 (eval "$ac_try") 2>&5 2244 ac_status=$? 2245 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2246 test $ac_status = 0; }; }; then : 2247 ac_retval=0 2248 else 2249 $as_echo "$as_me: program exited with status $ac_status" >&5 2250 $as_echo "$as_me: failed program was:" >&5 2251 sed 's/^/| /' conftest.$ac_ext >&5 2252 2253 ac_retval=$ac_status 2254 fi 2255 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2256 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2257 as_fn_set_status $ac_retval 2258 2259 } # ac_fn_cxx_try_run 2260 2261 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES 2262 # --------------------------------------------------------- 2263 # Tests whether HEADER exists and can be compiled using the include files in 2264 # INCLUDES, setting the cache variable VAR accordingly. 2265 ac_fn_cxx_check_header_compile () 2266 { 2267 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2269 $as_echo_n "checking for $2... " >&6; } 2270 if eval \${$3+:} false; then : 2271 $as_echo_n "(cached) " >&6 2272 else 2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2274 /* end confdefs.h. */ 2275 $4 2276 #include <$2> 2277 _ACEOF 2278 if ac_fn_cxx_try_compile "$LINENO"; then : 2279 eval "$3=yes" 2280 else 2281 eval "$3=no" 2282 fi 2283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2284 fi 2285 eval ac_res=\$$3 2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2287 $as_echo "$ac_res" >&6; } 2288 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2289 2290 } # ac_fn_cxx_check_header_compile 2291 2292 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES 2293 # ---------------------------------------------- 2294 # Tries to find the compile-time value of EXPR in a program that includes 2295 # INCLUDES, setting VAR accordingly. Returns whether the value could be 2296 # computed 2297 ac_fn_cxx_compute_int () 2298 { 2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2300 if test "$cross_compiling" = yes; then 2301 # Depending upon the size, compute the lo and hi bounds. 2302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2303 /* end confdefs.h. */ 2304 $4 2305 int 2306 main () 2307 { 2308 static int test_array [1 - 2 * !(($2) >= 0)]; 2309 test_array [0] = 0; 2310 return test_array [0]; 2311 2312 ; 2313 return 0; 2314 } 2315 _ACEOF 2316 if ac_fn_cxx_try_compile "$LINENO"; then : 2317 ac_lo=0 ac_mid=0 2318 while :; do 2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2320 /* end confdefs.h. */ 2321 $4 2322 int 2323 main () 2324 { 2325 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2326 test_array [0] = 0; 2327 return test_array [0]; 2328 2329 ; 2330 return 0; 2331 } 2332 _ACEOF 2333 if ac_fn_cxx_try_compile "$LINENO"; then : 2334 ac_hi=$ac_mid; break 2335 else 2336 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 2337 if test $ac_lo -le $ac_mid; then 2338 ac_lo= ac_hi= 2339 break 2340 fi 2341 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 2342 fi 2343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2344 done 2345 else 2346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2347 /* end confdefs.h. */ 2348 $4 2349 int 2350 main () 2351 { 2352 static int test_array [1 - 2 * !(($2) < 0)]; 2353 test_array [0] = 0; 2354 return test_array [0]; 2355 2356 ; 2357 return 0; 2358 } 2359 _ACEOF 2360 if ac_fn_cxx_try_compile "$LINENO"; then : 2361 ac_hi=-1 ac_mid=-1 2362 while :; do 2363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2364 /* end confdefs.h. */ 2365 $4 2366 int 2367 main () 2368 { 2369 static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 2370 test_array [0] = 0; 2371 return test_array [0]; 2372 2373 ; 2374 return 0; 2375 } 2376 _ACEOF 2377 if ac_fn_cxx_try_compile "$LINENO"; then : 2378 ac_lo=$ac_mid; break 2379 else 2380 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 2381 if test $ac_mid -le $ac_hi; then 2382 ac_lo= ac_hi= 2383 break 2384 fi 2385 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 2386 fi 2387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2388 done 2389 else 2390 ac_lo= ac_hi= 2391 fi 2392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2393 fi 2394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2395 # Binary search between lo and hi bounds. 2396 while test "x$ac_lo" != "x$ac_hi"; do 2397 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 2398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2399 /* end confdefs.h. */ 2400 $4 2401 int 2402 main () 2403 { 2404 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2405 test_array [0] = 0; 2406 return test_array [0]; 2407 2408 ; 2409 return 0; 2410 } 2411 _ACEOF 2412 if ac_fn_cxx_try_compile "$LINENO"; then : 2413 ac_hi=$ac_mid 2414 else 2415 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 2416 fi 2417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2418 done 2419 case $ac_lo in #(( 2420 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 2421 '') ac_retval=1 ;; 2422 esac 2423 else 2424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2425 /* end confdefs.h. */ 2426 $4 2427 static long int longval () { return $2; } 2428 static unsigned long int ulongval () { return $2; } 2429 #include <stdio.h> 2430 #include <stdlib.h> 2431 int 2432 main () 2433 { 2434 2435 FILE *f = fopen ("conftest.val", "w"); 2436 if (! f) 2437 return 1; 2438 if (($2) < 0) 2439 { 2440 long int i = longval (); 2441 if (i != ($2)) 2442 return 1; 2443 fprintf (f, "%ld", i); 2444 } 2445 else 2446 { 2447 unsigned long int i = ulongval (); 2448 if (i != ($2)) 2449 return 1; 2450 fprintf (f, "%lu", i); 2451 } 2452 /* Do not output a trailing newline, as this causes \r\n confusion 2453 on some platforms. */ 2454 return ferror (f) || fclose (f) != 0; 2455 2456 ; 2457 return 0; 2458 } 2459 _ACEOF 2460 if ac_fn_cxx_try_run "$LINENO"; then : 2461 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 2462 else 2463 ac_retval=1 2464 fi 2465 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 2466 conftest.$ac_objext conftest.beam conftest.$ac_ext 2467 rm -f conftest.val 2468 2469 fi 2470 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2471 as_fn_set_status $ac_retval 2472 2473 } # ac_fn_cxx_compute_int 2474 2475 # ac_fn_cxx_try_link LINENO 2476 # ------------------------- 2477 # Try to link conftest.$ac_ext, and return whether this succeeded. 2478 ac_fn_cxx_try_link () 2479 { 2480 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2481 rm -f conftest.$ac_objext conftest$ac_exeext 2482 if { { ac_try="$ac_link" 2483 case "(($ac_try" in 2484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2485 *) ac_try_echo=$ac_try;; 2486 esac 2487 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2488 $as_echo "$ac_try_echo"; } >&5 2489 (eval "$ac_link") 2>conftest.err 2490 ac_status=$? 2491 if test -s conftest.err; then 2492 grep -v '^ *+' conftest.err >conftest.er1 2493 cat conftest.er1 >&5 2494 mv -f conftest.er1 conftest.err 2495 fi 2496 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2497 test $ac_status = 0; } && { 2498 test -z "$ac_cxx_werror_flag" || 2499 test ! -s conftest.err 2500 } && test -s conftest$ac_exeext && { 2501 test "$cross_compiling" = yes || 2502 test -x conftest$ac_exeext 2503 }; then : 2504 ac_retval=0 2505 else 2506 $as_echo "$as_me: failed program was:" >&5 2507 sed 's/^/| /' conftest.$ac_ext >&5 2508 2509 ac_retval=1 2510 fi 2511 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 2512 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 2513 # interfere with the next link command; also delete a directory that is 2514 # left behind by Apple's compiler. We do this before executing the actions. 2515 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2516 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2517 as_fn_set_status $ac_retval 2518 2519 } # ac_fn_cxx_try_link 2520 2521 # ac_fn_cxx_check_func LINENO FUNC VAR 2522 # ------------------------------------ 2523 # Tests whether FUNC exists, setting the cache variable VAR accordingly 2524 ac_fn_cxx_check_func () 2525 { 2526 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2528 $as_echo_n "checking for $2... " >&6; } 2529 if eval \${$3+:} false; then : 2530 $as_echo_n "(cached) " >&6 2531 else 2532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2533 /* end confdefs.h. */ 2534 /* Define $2 to an innocuous variant, in case <limits.h> declares $2. 2535 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 2536 #define $2 innocuous_$2 2537 2538 /* System header to define __stub macros and hopefully few prototypes, 2539 which can conflict with char $2 (); below. 2540 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 2541 <limits.h> exists even on freestanding compilers. */ 2542 2543 #ifdef __STDC__ 2544 # include <limits.h> 2545 #else 2546 # include <assert.h> 2547 #endif 2548 2549 #undef $2 2550 2551 /* Override any GCC internal prototype to avoid an error. 2552 Use char because int might match the return type of a GCC 2553 builtin and then its argument prototype would still apply. */ 2554 #ifdef __cplusplus 2555 extern "C" 2556 #endif 2557 char $2 (); 2558 /* The GNU C library defines this for functions which it implements 2559 to always fail with ENOSYS. Some functions are actually named 2560 something starting with __ and the normal name is an alias. */ 2561 #if defined __stub_$2 || defined __stub___$2 2562 choke me 2563 #endif 2564 2565 int 2566 main () 2567 { 2568 return $2 (); 2569 ; 2570 return 0; 2571 } 2572 _ACEOF 2573 if ac_fn_cxx_try_link "$LINENO"; then : 2574 eval "$3=yes" 2575 else 2576 eval "$3=no" 2577 fi 2578 rm -f core conftest.err conftest.$ac_objext \ 2579 conftest$ac_exeext conftest.$ac_ext 2580 fi 2581 eval ac_res=\$$3 2582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2583 $as_echo "$ac_res" >&6; } 2584 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2585 2586 } # ac_fn_cxx_check_func 2587 2588 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 2589 # ------------------------------------------------------- 2590 # Tests whether HEADER exists and can be compiled using the include files in 2591 # INCLUDES, setting the cache variable VAR accordingly. 2592 ac_fn_c_check_header_compile () 2593 { 2594 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2596 $as_echo_n "checking for $2... " >&6; } 2597 if eval \${$3+:} false; then : 2598 $as_echo_n "(cached) " >&6 2599 else 2600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2601 /* end confdefs.h. */ 2602 $4 2603 #include <$2> 2604 _ACEOF 2605 if ac_fn_c_try_compile "$LINENO"; then : 2606 eval "$3=yes" 2607 else 2608 eval "$3=no" 2609 fi 2610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2611 fi 2612 eval ac_res=\$$3 2613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2614 $as_echo "$ac_res" >&6; } 2615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2616 2617 } # ac_fn_c_check_header_compile 2618 cat >config.log <<_ACEOF 2619 This file contains any messages produced by compilers while 2620 running configure, to aid debugging if configure makes a mistake. 2621 2622 It was created by OpenJDK $as_me jdk8, which was 2623 generated by GNU Autoconf 2.69. Invocation command line was 2624 2625 $ $0 $@ 2626 2627 _ACEOF 2628 exec 5>>config.log 2629 { 2630 cat <<_ASUNAME 2631 ## --------- ## 2632 ## Platform. ## 2633 ## --------- ## 2634 2635 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 2636 uname -m = `(uname -m) 2>/dev/null || echo unknown` 2637 uname -r = `(uname -r) 2>/dev/null || echo unknown` 2638 uname -s = `(uname -s) 2>/dev/null || echo unknown` 2639 uname -v = `(uname -v) 2>/dev/null || echo unknown` 2640 2641 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 2642 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 2643 2644 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 2645 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 2646 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 2647 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 2648 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 2649 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 2650 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 2651 2652 _ASUNAME 2653 2654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2655 for as_dir in $PATH 2656 do 2657 IFS=$as_save_IFS 2658 test -z "$as_dir" && as_dir=. 2659 $as_echo "PATH: $as_dir" 2660 done 2661 IFS=$as_save_IFS 2662 2663 } >&5 2664 2665 cat >&5 <<_ACEOF 2666 2667 2668 ## ----------- ## 2669 ## Core tests. ## 2670 ## ----------- ## 2671 2672 _ACEOF 2673 2674 2675 # Keep a trace of the command line. 2676 # Strip out --no-create and --no-recursion so they do not pile up. 2677 # Strip out --silent because we don't want to record it for future runs. 2678 # Also quote any args containing shell meta-characters. 2679 # Make two passes to allow for proper duplicate-argument suppression. 2680 ac_configure_args= 2681 ac_configure_args0= 2682 ac_configure_args1= 2683 ac_must_keep_next=false 2684 for ac_pass in 1 2 2685 do 2686 for ac_arg 2687 do 2688 case $ac_arg in 2689 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 2690 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2691 | -silent | --silent | --silen | --sile | --sil) 2692 continue ;; 2693 *\'*) 2694 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2695 esac 2696 case $ac_pass in 2697 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2698 2) 2699 as_fn_append ac_configure_args1 " '$ac_arg'" 2700 if test $ac_must_keep_next = true; then 2701 ac_must_keep_next=false # Got value, back to normal. 2702 else 2703 case $ac_arg in 2704 *=* | --config-cache | -C | -disable-* | --disable-* \ 2705 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 2706 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 2707 | -with-* | --with-* | -without-* | --without-* | --x) 2708 case "$ac_configure_args0 " in 2709 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 2710 esac 2711 ;; 2712 -* ) ac_must_keep_next=true ;; 2713 esac 2714 fi 2715 as_fn_append ac_configure_args " '$ac_arg'" 2716 ;; 2717 esac 2718 done 2719 done 2720 { ac_configure_args0=; unset ac_configure_args0;} 2721 { ac_configure_args1=; unset ac_configure_args1;} 2722 2723 # When interrupted or exit'd, cleanup temporary files, and complete 2724 # config.log. We remove comments because anyway the quotes in there 2725 # would cause problems or look ugly. 2726 # WARNING: Use '\'' to represent an apostrophe within the trap. 2727 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 2728 trap 'exit_status=$? 2729 # Save into config.log some information that might help in debugging. 2730 { 2731 echo 2732 2733 $as_echo "## ---------------- ## 2734 ## Cache variables. ## 2735 ## ---------------- ##" 2736 echo 2737 # The following way of writing the cache mishandles newlines in values, 2738 ( 2739 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 2740 eval ac_val=\$$ac_var 2741 case $ac_val in #( 2742 *${as_nl}*) 2743 case $ac_var in #( 2744 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2745 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2746 esac 2747 case $ac_var in #( 2748 _ | IFS | as_nl) ;; #( 2749 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2750 *) { eval $ac_var=; unset $ac_var;} ;; 2751 esac ;; 2752 esac 2753 done 2754 (set) 2>&1 | 2755 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 2756 *${as_nl}ac_space=\ *) 2757 sed -n \ 2758 "s/'\''/'\''\\\\'\'''\''/g; 2759 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 2760 ;; #( 2761 *) 2762 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2763 ;; 2764 esac | 2765 sort 2766 ) 2767 echo 2768 2769 $as_echo "## ----------------- ## 2770 ## Output variables. ## 2771 ## ----------------- ##" 2772 echo 2773 for ac_var in $ac_subst_vars 2774 do 2775 eval ac_val=\$$ac_var 2776 case $ac_val in 2777 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2778 esac 2779 $as_echo "$ac_var='\''$ac_val'\''" 2780 done | sort 2781 echo 2782 2783 if test -n "$ac_subst_files"; then 2784 $as_echo "## ------------------- ## 2785 ## File substitutions. ## 2786 ## ------------------- ##" 2787 echo 2788 for ac_var in $ac_subst_files 2789 do 2790 eval ac_val=\$$ac_var 2791 case $ac_val in 2792 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2793 esac 2794 $as_echo "$ac_var='\''$ac_val'\''" 2795 done | sort 2796 echo 2797 fi 2798 2799 if test -s confdefs.h; then 2800 $as_echo "## ----------- ## 2801 ## confdefs.h. ## 2802 ## ----------- ##" 2803 echo 2804 cat confdefs.h 2805 echo 2806 fi 2807 test "$ac_signal" != 0 && 2808 $as_echo "$as_me: caught signal $ac_signal" 2809 $as_echo "$as_me: exit $exit_status" 2810 } >&5 2811 rm -f core *.core core.conftest.* && 2812 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 2813 exit $exit_status 2814 ' 0 2815 for ac_signal in 1 2 13 15; do 2816 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 2817 done 2818 ac_signal=0 2819 2820 # confdefs.h avoids OS command line length limits that DEFS can exceed. 2821 rm -f -r conftest* confdefs.h 2822 2823 $as_echo "/* confdefs.h */" > confdefs.h 2824 2825 # Predefined preprocessor variables. 2826 2827 cat >>confdefs.h <<_ACEOF 2828 #define PACKAGE_NAME "$PACKAGE_NAME" 2829 _ACEOF 2830 2831 cat >>confdefs.h <<_ACEOF 2832 #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 2833 _ACEOF 2834 2835 cat >>confdefs.h <<_ACEOF 2836 #define PACKAGE_VERSION "$PACKAGE_VERSION" 2837 _ACEOF 2838 2839 cat >>confdefs.h <<_ACEOF 2840 #define PACKAGE_STRING "$PACKAGE_STRING" 2841 _ACEOF 2842 2843 cat >>confdefs.h <<_ACEOF 2844 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 2845 _ACEOF 2846 2847 cat >>confdefs.h <<_ACEOF 2848 #define PACKAGE_URL "$PACKAGE_URL" 2849 _ACEOF 2850 2851 2852 # Let the site file select an alternate cache file if it wants to. 2853 # Prefer an explicitly selected file to automatically selected ones. 2854 ac_site_file1=NONE 2855 ac_site_file2=NONE 2856 if test -n "$CONFIG_SITE"; then 2857 # We do not want a PATH search for config.site. 2858 case $CONFIG_SITE in #(( 2859 -*) ac_site_file1=./$CONFIG_SITE;; 2860 */*) ac_site_file1=$CONFIG_SITE;; 2861 *) ac_site_file1=./$CONFIG_SITE;; 2862 esac 2863 elif test "x$prefix" != xNONE; then 2864 ac_site_file1=$prefix/share/config.site 2865 ac_site_file2=$prefix/etc/config.site 2866 else 2867 ac_site_file1=$ac_default_prefix/share/config.site 2868 ac_site_file2=$ac_default_prefix/etc/config.site 2869 fi 2870 for ac_site_file in "$ac_site_file1" "$ac_site_file2" 2871 do 2872 test "x$ac_site_file" = xNONE && continue 2873 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 2874 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2875 $as_echo "$as_me: loading site script $ac_site_file" >&6;} 2876 sed 's/^/| /' "$ac_site_file" >&5 2877 . "$ac_site_file" \ 2878 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2879 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2880 as_fn_error $? "failed to load site script $ac_site_file 2881 See \`config.log' for more details" "$LINENO" 5; } 2882 fi 2883 done 2884 2885 if test -r "$cache_file"; then 2886 # Some versions of bash will fail to source /dev/null (special files 2887 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 2888 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 2889 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 2890 $as_echo "$as_me: loading cache $cache_file" >&6;} 2891 case $cache_file in 2892 [\\/]* | ?:[\\/]* ) . "$cache_file";; 2893 *) . "./$cache_file";; 2894 esac 2895 fi 2896 else 2897 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 2898 $as_echo "$as_me: creating cache $cache_file" >&6;} 2899 >$cache_file 2900 fi 2901 2902 # Check that the precious variables saved in the cache have kept the same 2903 # value. 2904 ac_cache_corrupted=false 2905 for ac_var in $ac_precious_vars; do 2906 eval ac_old_set=\$ac_cv_env_${ac_var}_set 2907 eval ac_new_set=\$ac_env_${ac_var}_set 2908 eval ac_old_val=\$ac_cv_env_${ac_var}_value 2909 eval ac_new_val=\$ac_env_${ac_var}_value 2910 case $ac_old_set,$ac_new_set in 2911 set,) 2912 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2913 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2914 ac_cache_corrupted=: ;; 2915 ,set) 2916 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 2917 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2918 ac_cache_corrupted=: ;; 2919 ,);; 2920 *) 2921 if test "x$ac_old_val" != "x$ac_new_val"; then 2922 # differences in whitespace do not lead to failure. 2923 ac_old_val_w=`echo x $ac_old_val` 2924 ac_new_val_w=`echo x $ac_new_val` 2925 if test "$ac_old_val_w" != "$ac_new_val_w"; then 2926 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 2927 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2928 ac_cache_corrupted=: 2929 else 2930 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 2931 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 2932 eval $ac_var=\$ac_old_val 2933 fi 2934 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 2935 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 2936 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 2937 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 2938 fi;; 2939 esac 2940 # Pass precious variables to config.status. 2941 if test "$ac_new_set" = set; then 2942 case $ac_new_val in 2943 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2944 *) ac_arg=$ac_var=$ac_new_val ;; 2945 esac 2946 case " $ac_configure_args " in 2947 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2948 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 2949 esac 2950 fi 2951 done 2952 if $ac_cache_corrupted; then 2953 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2954 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2955 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2956 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 2957 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 2958 fi 2959 ## -------------------- ## 2960 ## Main body of script. ## 2961 ## -------------------- ## 2962 2963 ac_ext=c 2964 ac_cpp='$CPP $CPPFLAGS' 2965 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2966 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2967 ac_compiler_gnu=$ac_cv_c_compiler_gnu 2968 2969 2970 2971 ac_aux_dir= 2972 for ac_dir in build-aux "$srcdir"/build-aux; do 2973 if test -f "$ac_dir/install-sh"; then 2974 ac_aux_dir=$ac_dir 2975 ac_install_sh="$ac_aux_dir/install-sh -c" 2976 break 2977 elif test -f "$ac_dir/install.sh"; then 2978 ac_aux_dir=$ac_dir 2979 ac_install_sh="$ac_aux_dir/install.sh -c" 2980 break 2981 elif test -f "$ac_dir/shtool"; then 2982 ac_aux_dir=$ac_dir 2983 ac_install_sh="$ac_aux_dir/shtool install -c" 2984 break 2985 fi 2986 done 2987 if test -z "$ac_aux_dir"; then 2988 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 2989 fi 2990 2991 # These three variables are undocumented and unsupported, 2992 # and are intended to be withdrawn in a future Autoconf release. 2993 # They can cause serious problems if a builder's source tree is in a directory 2994 # whose full name contains unusual characters. 2995 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 2996 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 2997 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 2998 2999 3000 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 3001 3002 # 3003 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 3004 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3005 # 3006 # This code is free software; you can redistribute it and/or modify it 3007 # under the terms of the GNU General Public License version 2 only, as 3008 # published by the Free Software Foundation. Oracle designates this 3009 # particular file as subject to the "Classpath" exception as provided 3010 # by Oracle in the LICENSE file that accompanied this code. 3011 # 3012 # This code is distributed in the hope that it will be useful, but WITHOUT 3013 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3014 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3015 # version 2 for more details (a copy is included in the LICENSE file that 3016 # accompanied this code). 3017 # 3018 # You should have received a copy of the GNU General Public License version 3019 # 2 along with this work; if not, write to the Free Software Foundation, 3020 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3021 # 3022 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3023 # or visit www.oracle.com if you need additional information or have any 3024 # questions. 3025 # 3026 3027 # 3028 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 3029 # 3030 # This program is free software; you can redistribute it and/or modify 3031 # it under the terms of the GNU General Public License as published by 3032 # the Free Software Foundation; either version 2 of the License, or 3033 # (at your option) any later version. 3034 # 3035 # This program is distributed in the hope that it will be useful, but 3036 # WITHOUT ANY WARRANTY; without even the implied warranty of 3037 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3038 # General Public License for more details. 3039 # 3040 # You should have received a copy of the GNU General Public License 3041 # along with this program; if not, write to the Free Software 3042 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 3043 # 3044 # As a special exception to the GNU General Public License, if you 3045 # distribute this file as part of a program that contains a 3046 # configuration script generated by Autoconf, you may include it under 3047 # the same distribution terms that you use for the rest of that program. 3048 3049 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) 3050 # ---------------------------------- 3051 # PKG_PROG_PKG_CONFIG 3052 3053 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 3054 # 3055 # Check to see whether a particular set of modules exists. Similar 3056 # to PKG_CHECK_MODULES(), but does not set variables or print errors. 3057 # 3058 # 3059 # Similar to PKG_CHECK_MODULES, make sure that the first instance of 3060 # this or PKG_CHECK_MODULES is called, or make sure to call 3061 # PKG_CHECK_EXISTS manually 3062 # -------------------------------------------------------------- 3063 3064 3065 3066 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 3067 # --------------------------------------------- 3068 # _PKG_CONFIG 3069 3070 # _PKG_SHORT_ERRORS_SUPPORTED 3071 # ----------------------------- 3072 # _PKG_SHORT_ERRORS_SUPPORTED 3073 3074 3075 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 3076 # [ACTION-IF-NOT-FOUND]) 3077 # 3078 # 3079 # Note that if there is a possibility the first call to 3080 # PKG_CHECK_MODULES might not happen, you should be sure to include an 3081 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 3082 # 3083 # 3084 # -------------------------------------------------------------- 3085 # PKG_CHECK_MODULES 3086 3087 3088 # Include these first... 3089 # 3090 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3091 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3092 # 3093 # This code is free software; you can redistribute it and/or modify it 3094 # under the terms of the GNU General Public License version 2 only, as 3095 # published by the Free Software Foundation. Oracle designates this 3096 # particular file as subject to the "Classpath" exception as provided 3097 # by Oracle in the LICENSE file that accompanied this code. 3098 # 3099 # This code is distributed in the hope that it will be useful, but WITHOUT 3100 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3101 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3102 # version 2 for more details (a copy is included in the LICENSE file that 3103 # accompanied this code). 3104 # 3105 # You should have received a copy of the GNU General Public License version 3106 # 2 along with this work; if not, write to the Free Software Foundation, 3107 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3108 # 3109 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3110 # or visit www.oracle.com if you need additional information or have any 3111 # questions. 3112 # 3113 3114 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) 3115 # If so, then append $1 to $2\ 3116 # Also set JVM_ARG_OK to true/false depending on outcome. 3117 3118 3119 # Appends a string to a path variable, only adding the : when needed. 3120 3121 3122 # This will make sure the given variable points to a full and proper 3123 # path. This means: 3124 # 1) There will be no spaces in the path. On posix platforms, 3125 # spaces in the path will result in an error. On Windows, 3126 # the path will be rewritten using short-style to be space-free. 3127 # 2) The path will be absolute, and it will be in unix-style (on 3128 # cygwin). 3129 # $1: The name of the variable to fix 3130 3131 3132 # This will make sure the given variable points to a executable 3133 # with a full and proper path. This means: 3134 # 1) There will be no spaces in the path. On posix platforms, 3135 # spaces in the path will result in an error. On Windows, 3136 # the path will be rewritten using short-style to be space-free. 3137 # 2) The path will be absolute, and it will be in unix-style (on 3138 # cygwin). 3139 # Any arguments given to the executable is preserved. 3140 # If the input variable does not have a directory specification, then 3141 # it need to be in the PATH. 3142 # $1: The name of the variable to fix 3143 3144 3145 3146 3147 3148 3149 # Test that variable $1 denoting a program is not empty. If empty, exit with an error. 3150 # $1: variable to check 3151 # $2: executable name to print in warning (optional) 3152 3153 3154 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY. 3155 # Arguments as AC_PATH_PROG: 3156 # $1: variable to set 3157 # $2: executable name to look for 3158 3159 3160 # Setup the most fundamental tools that relies on not much else to set up, 3161 # but is used by much of the early bootstrap code. 3162 3163 3164 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3165 3166 3167 3168 3169 3170 3171 3172 #%%% Simple tools %%% 3173 3174 # Check if we have found a usable version of make 3175 # $1: the path to a potential make binary (or empty) 3176 # $2: the description on how we found this 3177 3178 3179 # Goes looking for a usable version of GNU make. 3180 3181 3182 3183 3184 3185 3186 # Check if build directory is on local disk. If not possible to determine, 3187 # we prefer to claim it's local. 3188 # Argument 1: directory to test 3189 # Argument 2: what to do if it is on local disk 3190 # Argument 3: what to do otherwise (remote disk or failure) 3191 3192 3193 # Check that source files have basic read permissions set. This might 3194 # not be the case in cygwin in certain conditions. 3195 3196 3197 3198 3199 # 3200 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3201 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3202 # 3203 # This code is free software; you can redistribute it and/or modify it 3204 # under the terms of the GNU General Public License version 2 only, as 3205 # published by the Free Software Foundation. Oracle designates this 3206 # particular file as subject to the "Classpath" exception as provided 3207 # by Oracle in the LICENSE file that accompanied this code. 3208 # 3209 # This code is distributed in the hope that it will be useful, but WITHOUT 3210 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3211 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3212 # version 2 for more details (a copy is included in the LICENSE file that 3213 # accompanied this code). 3214 # 3215 # You should have received a copy of the GNU General Public License version 3216 # 2 along with this work; if not, write to the Free Software Foundation, 3217 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3218 # 3219 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3220 # or visit www.oracle.com if you need additional information or have any 3221 # questions. 3222 # 3223 3224 3225 3226 3227 3228 # Helper function which possibly converts a path using DOS-style short mode. 3229 # If so, the updated path is stored in $new_path. 3230 # $1: The path to check 3231 3232 3233 # Helper function which possibly converts a path using DOS-style short mode. 3234 # If so, the updated path is stored in $new_path. 3235 # $1: The path to check 3236 3237 3238 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted 3239 # and could probably be heavily simplified. However, all changes in this 3240 # area tend to need lot of testing in different scenarios, and in lack of 3241 # proper unit testing, cleaning this up has not been deemed worth the effort 3242 # at the moment. 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3253 3254 3255 3256 3257 # 3258 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3259 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3260 # 3261 # This code is free software; you can redistribute it and/or modify it 3262 # under the terms of the GNU General Public License version 2 only, as 3263 # published by the Free Software Foundation. Oracle designates this 3264 # particular file as subject to the "Classpath" exception as provided 3265 # by Oracle in the LICENSE file that accompanied this code. 3266 # 3267 # This code is distributed in the hope that it will be useful, but WITHOUT 3268 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3269 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3270 # version 2 for more details (a copy is included in the LICENSE file that 3271 # accompanied this code). 3272 # 3273 # You should have received a copy of the GNU General Public License version 3274 # 2 along with this work; if not, write to the Free Software Foundation, 3275 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3276 # 3277 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3278 # or visit www.oracle.com if you need additional information or have any 3279 # questions. 3280 # 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 # ... then the rest 3293 # 3294 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3295 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3296 # 3297 # This code is free software; you can redistribute it and/or modify it 3298 # under the terms of the GNU General Public License version 2 only, as 3299 # published by the Free Software Foundation. Oracle designates this 3300 # particular file as subject to the "Classpath" exception as provided 3301 # by Oracle in the LICENSE file that accompanied this code. 3302 # 3303 # This code is distributed in the hope that it will be useful, but WITHOUT 3304 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3305 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3306 # version 2 for more details (a copy is included in the LICENSE file that 3307 # accompanied this code). 3308 # 3309 # You should have received a copy of the GNU General Public License version 3310 # 2 along with this work; if not, write to the Free Software Foundation, 3311 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3312 # 3313 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3314 # or visit www.oracle.com if you need additional information or have any 3315 # questions. 3316 # 3317 3318 # Execute the check given as argument, and verify the result 3319 # If the Boot JDK was previously found, do nothing 3320 # $1 A command line (typically autoconf macro) to execute 3321 3322 3323 # Test: Is bootjdk explicitely set by command line arguments? 3324 3325 3326 # Test: Is bootjdk available from builddeps? 3327 3328 3329 # Test: Is $JAVA_HOME set? 3330 3331 3332 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK? 3333 3334 3335 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) 3336 3337 3338 # Look for a jdk in the given path. If there are multiple, try to select the newest. 3339 # If found, set BOOT_JDK and BOOT_JDK_FOUND. 3340 # $1 = Path to directory containing jdk installations. 3341 # $2 = String to append to the found JDK directory to get the proper JDK home 3342 3343 3344 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given 3345 # environmental variable as base for where to look. 3346 # $1 Name of an environmal variable, assumed to point to the Program Files directory. 3347 3348 3349 # Test: Is there a JDK installed in default, well-known locations? 3350 3351 3352 # Check that a command-line tool in the Boot JDK is correct 3353 # $1 = name of variable to assign 3354 # $2 = name of binary 3355 3356 3357 ############################################################################### 3358 # 3359 # We need a Boot JDK to bootstrap the build. 3360 # 3361 3362 3363 3364 3365 3366 # 3367 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3368 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3369 # 3370 # This code is free software; you can redistribute it and/or modify it 3371 # under the terms of the GNU General Public License version 2 only, as 3372 # published by the Free Software Foundation. Oracle designates this 3373 # particular file as subject to the "Classpath" exception as provided 3374 # by Oracle in the LICENSE file that accompanied this code. 3375 # 3376 # This code is distributed in the hope that it will be useful, but WITHOUT 3377 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3378 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3379 # version 2 for more details (a copy is included in the LICENSE file that 3380 # accompanied this code). 3381 # 3382 # You should have received a copy of the GNU General Public License version 3383 # 2 along with this work; if not, write to the Free Software Foundation, 3384 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3385 # 3386 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3387 # or visit www.oracle.com if you need additional information or have any 3388 # questions. 3389 # 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 # 3411 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3412 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3413 # 3414 # This code is free software; you can redistribute it and/or modify it 3415 # under the terms of the GNU General Public License version 2 only, as 3416 # published by the Free Software Foundation. Oracle designates this 3417 # particular file as subject to the "Classpath" exception as provided 3418 # by Oracle in the LICENSE file that accompanied this code. 3419 # 3420 # This code is distributed in the hope that it will be useful, but WITHOUT 3421 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3422 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3423 # version 2 for more details (a copy is included in the LICENSE file that 3424 # accompanied this code). 3425 # 3426 # You should have received a copy of the GNU General Public License version 3427 # 2 along with this work; if not, write to the Free Software Foundation, 3428 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3429 # 3430 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3431 # or visit www.oracle.com if you need additional information or have any 3432 # questions. 3433 # 3434 3435 3436 3437 3438 3439 cygwin_help() { 3440 case $1 in 3441 unzip) 3442 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;; 3443 zip) 3444 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;; 3445 make) 3446 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;; 3447 * ) 3448 break ;; 3449 esac 3450 } 3451 3452 apt_help() { 3453 case $1 in 3454 devkit) 3455 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; 3456 openjdk) 3457 PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; 3458 alsa) 3459 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; 3460 cups) 3461 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; 3462 freetype2) 3463 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; 3464 pulse) 3465 PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; 3466 x11) 3467 PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;; 3468 ccache) 3469 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; 3470 * ) 3471 break ;; 3472 esac 3473 } 3474 3475 yum_help() { 3476 case $1 in 3477 devkit) 3478 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; 3479 openjdk) 3480 PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; 3481 alsa) 3482 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; 3483 cups) 3484 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; 3485 freetype2) 3486 PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;; 3487 pulse) 3488 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; 3489 x11) 3490 PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;; 3491 ccache) 3492 PKGHANDLER_COMMAND="sudo yum install ccache" ;; 3493 * ) 3494 break ;; 3495 esac 3496 } 3497 3498 port_help() { 3499 PKGHANDLER_COMMAND="" 3500 } 3501 3502 pkgutil_help() { 3503 PKGHANDLER_COMMAND="" 3504 } 3505 3506 pkgadd_help() { 3507 PKGHANDLER_COMMAND="" 3508 } 3509 3510 3511 3512 # 3513 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3514 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3515 # 3516 # This code is free software; you can redistribute it and/or modify it 3517 # under the terms of the GNU General Public License version 2 only, as 3518 # published by the Free Software Foundation. Oracle designates this 3519 # particular file as subject to the "Classpath" exception as provided 3520 # by Oracle in the LICENSE file that accompanied this code. 3521 # 3522 # This code is distributed in the hope that it will be useful, but WITHOUT 3523 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3524 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3525 # version 2 for more details (a copy is included in the LICENSE file that 3526 # accompanied this code). 3527 # 3528 # You should have received a copy of the GNU General Public License version 3529 # 2 along with this work; if not, write to the Free Software Foundation, 3530 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3531 # 3532 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3533 # or visit www.oracle.com if you need additional information or have any 3534 # questions. 3535 # 3536 3537 3538 3539 3540 3541 3542 3543 3544 ############################################################################### 3545 # 3546 # Should we build only OpenJDK even if closed sources are present? 3547 # 3548 3549 3550 3551 3552 ############################################################################### 3553 # 3554 # Setup version numbers 3555 # 3556 3557 3558 3559 3560 3561 3562 # Support for customization of the build process. Some build files 3563 # will include counterparts from this location, if they exist. This allows 3564 # for a degree of customization of the build targets and the rules/recipes 3565 # to create them 3566 3567 # Check whether --with-custom-make-dir was given. 3568 if test "${with_custom_make_dir+set}" = set; then : 3569 withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir 3570 fi 3571 3572 3573 3574 # 3575 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3576 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3577 # 3578 # This code is free software; you can redistribute it and/or modify it 3579 # under the terms of the GNU General Public License version 2 only, as 3580 # published by the Free Software Foundation. Oracle designates this 3581 # particular file as subject to the "Classpath" exception as provided 3582 # by Oracle in the LICENSE file that accompanied this code. 3583 # 3584 # This code is distributed in the hope that it will be useful, but WITHOUT 3585 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3586 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3587 # version 2 for more details (a copy is included in the LICENSE file that 3588 # accompanied this code). 3589 # 3590 # You should have received a copy of the GNU General Public License version 3591 # 2 along with this work; if not, write to the Free Software Foundation, 3592 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3593 # 3594 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3595 # or visit www.oracle.com if you need additional information or have any 3596 # questions. 3597 # 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 # 3614 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3615 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3616 # 3617 # This code is free software; you can redistribute it and/or modify it 3618 # under the terms of the GNU General Public License version 2 only, as 3619 # published by the Free Software Foundation. Oracle designates this 3620 # particular file as subject to the "Classpath" exception as provided 3621 # by Oracle in the LICENSE file that accompanied this code. 3622 # 3623 # This code is distributed in the hope that it will be useful, but WITHOUT 3624 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3625 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3626 # version 2 for more details (a copy is included in the LICENSE file that 3627 # accompanied this code). 3628 # 3629 # You should have received a copy of the GNU General Public License version 3630 # 2 along with this work; if not, write to the Free Software Foundation, 3631 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3632 # 3633 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3634 # or visit www.oracle.com if you need additional information or have any 3635 # questions. 3636 # 3637 3638 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3639 # Converts autoconf style CPU name to OpenJDK style, into 3640 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. 3641 3642 3643 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3644 # Converts autoconf style OS name to OpenJDK style, into 3645 # VAR_OS and VAR_OS_API. 3646 3647 3648 # Expects $host_os $host_cpu $build_os and $build_cpu 3649 # and $with_target_bits to have been setup! 3650 # 3651 # Translate the standard triplet(quadruplet) definition 3652 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU, 3653 # OPENJDK_BUILD_OS, etc. 3654 3655 3656 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour 3657 # accordingly. Must be done after setting up build and target system, but before 3658 # doing anything else with these values. 3659 3660 3661 # Setup the legacy variables, for controlling the old makefiles. 3662 # 3663 3664 3665 3666 3667 #%%% Build and target systems %%% 3668 3669 3670 3671 3672 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS. 3673 # Add -mX to various FLAGS variables. 3674 3675 3676 3677 3678 3679 3680 # 3681 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3682 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3683 # 3684 # This code is free software; you can redistribute it and/or modify it 3685 # under the terms of the GNU General Public License version 2 only, as 3686 # published by the Free Software Foundation. Oracle designates this 3687 # particular file as subject to the "Classpath" exception as provided 3688 # by Oracle in the LICENSE file that accompanied this code. 3689 # 3690 # This code is distributed in the hope that it will be useful, but WITHOUT 3691 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3692 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3693 # version 2 for more details (a copy is included in the LICENSE file that 3694 # accompanied this code). 3695 # 3696 # You should have received a copy of the GNU General Public License version 3697 # 2 along with this work; if not, write to the Free Software Foundation, 3698 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3699 # 3700 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3701 # or visit www.oracle.com if you need additional information or have any 3702 # questions. 3703 # 3704 3705 3706 3707 3708 3709 3710 3711 3712 # 3713 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3714 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3715 # 3716 # This code is free software; you can redistribute it and/or modify it 3717 # under the terms of the GNU General Public License version 2 only, as 3718 # published by the Free Software Foundation. Oracle designates this 3719 # particular file as subject to the "Classpath" exception as provided 3720 # by Oracle in the LICENSE file that accompanied this code. 3721 # 3722 # This code is distributed in the hope that it will be useful, but WITHOUT 3723 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3724 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3725 # version 2 for more details (a copy is included in the LICENSE file that 3726 # accompanied this code). 3727 # 3728 # You should have received a copy of the GNU General Public License version 3729 # 2 along with this work; if not, write to the Free Software Foundation, 3730 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3731 # 3732 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3733 # or visit www.oracle.com if you need additional information or have any 3734 # questions. 3735 # 3736 3737 # $1 = compiler to test (CC or CXX) 3738 # $2 = human readable name of compiler (C or C++) 3739 3740 3741 3742 3743 3744 # $1 = compiler to test (CC or CXX) 3745 # $2 = human readable name of compiler (C or C++) 3746 # $3 = list of compiler names to search for 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE], 3761 # [RUN-IF-FALSE]) 3762 # ------------------------------------------------------------ 3763 # Check that the c and c++ compilers support an argument 3764 3765 3766 3767 3768 # Setup the JTREG paths 3769 3770 3771 # 3772 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3773 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3774 # 3775 # This code is free software; you can redistribute it and/or modify it 3776 # under the terms of the GNU General Public License version 2 only, as 3777 # published by the Free Software Foundation. Oracle designates this 3778 # particular file as subject to the "Classpath" exception as provided 3779 # by Oracle in the LICENSE file that accompanied this code. 3780 # 3781 # This code is distributed in the hope that it will be useful, but WITHOUT 3782 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3783 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3784 # version 2 for more details (a copy is included in the LICENSE file that 3785 # accompanied this code). 3786 # 3787 # You should have received a copy of the GNU General Public License version 3788 # 2 along with this work; if not, write to the Free Software Foundation, 3789 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3790 # 3791 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3792 # or visit www.oracle.com if you need additional information or have any 3793 # questions. 3794 # 3795 3796 3797 3798 3799 3800 3801 3802 # Check if the VS env variables were setup prior to running configure. 3803 # If not, then find vcvarsall.bat and run it automatically, and integrate 3804 # the set env variables into the spec file. 3805 3806 3807 3808 # Setup the DXSDK paths 3809 3810 3811 3812 3813 3814 3815 # This line needs to be here, verbatim, after all includes and the dummy hook 3816 # definitions. It is replaced with custom functionality when building 3817 # custom sources. 3818 #CUSTOM_AUTOCONF_INCLUDE 3819 3820 # Do not change or remove the following line, it is needed for consistency checks: 3821 DATE_WHEN_GENERATED=1377781439 3822 3823 ############################################################################### 3824 # 3825 # Initialization / Boot-strapping 3826 # 3827 # The bootstrapping process needs to solve the "chicken or the egg" problem, 3828 # thus it jumps back and forth, each time gaining something needed later on. 3829 # 3830 ############################################################################### 3831 3832 # Basic initialization that must happen first of all 3833 3834 # Save the original command line. This is passed to us by the wrapper configure script. 3835 3836 DATE_WHEN_CONFIGURED=`LANG=C date` 3837 3838 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5 3839 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;} 3840 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5 3841 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;} 3842 3843 3844 3845 # Start with tools that do not need have cross compilation support 3846 # and can be expected to be found in the default PATH. These tools are 3847 # used by configure. Nor are these tools expected to be found in the 3848 # devkit from the builddeps server either, since they are 3849 # needed to download the devkit. 3850 3851 # First are all the simple required tools. 3852 3853 for ac_prog in basename 3854 do 3855 # Extract the first word of "$ac_prog", so it can be a program name with args. 3856 set dummy $ac_prog; ac_word=$2 3857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3858 $as_echo_n "checking for $ac_word... " >&6; } 3859 if ${ac_cv_path_BASENAME+:} false; then : 3860 $as_echo_n "(cached) " >&6 3861 else 3862 case $BASENAME in 3863 [\\/]* | ?:[\\/]*) 3864 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path. 3865 ;; 3866 *) 3867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3868 for as_dir in $PATH 3869 do 3870 IFS=$as_save_IFS 3871 test -z "$as_dir" && as_dir=. 3872 for ac_exec_ext in '' $ac_executable_extensions; do 3873 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3874 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext" 3875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3876 break 2 3877 fi 3878 done 3879 done 3880 IFS=$as_save_IFS 3881 3882 ;; 3883 esac 3884 fi 3885 BASENAME=$ac_cv_path_BASENAME 3886 if test -n "$BASENAME"; then 3887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 3888 $as_echo "$BASENAME" >&6; } 3889 else 3890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3891 $as_echo "no" >&6; } 3892 fi 3893 3894 3895 test -n "$BASENAME" && break 3896 done 3897 3898 3899 if test "x$BASENAME" = x; then 3900 if test "xbasename" = x; then 3901 PROG_NAME=basename 3902 else 3903 PROG_NAME=basename 3904 fi 3905 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3906 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3907 as_fn_error $? "Cannot continue" "$LINENO" 5 3908 fi 3909 3910 3911 3912 for ac_prog in bash 3913 do 3914 # Extract the first word of "$ac_prog", so it can be a program name with args. 3915 set dummy $ac_prog; ac_word=$2 3916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3917 $as_echo_n "checking for $ac_word... " >&6; } 3918 if ${ac_cv_path_BASH+:} false; then : 3919 $as_echo_n "(cached) " >&6 3920 else 3921 case $BASH in 3922 [\\/]* | ?:[\\/]*) 3923 ac_cv_path_BASH="$BASH" # Let the user override the test with a path. 3924 ;; 3925 *) 3926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3927 for as_dir in $PATH 3928 do 3929 IFS=$as_save_IFS 3930 test -z "$as_dir" && as_dir=. 3931 for ac_exec_ext in '' $ac_executable_extensions; do 3932 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3933 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" 3934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3935 break 2 3936 fi 3937 done 3938 done 3939 IFS=$as_save_IFS 3940 3941 ;; 3942 esac 3943 fi 3944 BASH=$ac_cv_path_BASH 3945 if test -n "$BASH"; then 3946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 3947 $as_echo "$BASH" >&6; } 3948 else 3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3950 $as_echo "no" >&6; } 3951 fi 3952 3953 3954 test -n "$BASH" && break 3955 done 3956 3957 3958 if test "x$BASH" = x; then 3959 if test "xbash" = x; then 3960 PROG_NAME=bash 3961 else 3962 PROG_NAME=bash 3963 fi 3964 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3965 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3966 as_fn_error $? "Cannot continue" "$LINENO" 5 3967 fi 3968 3969 3970 3971 for ac_prog in cat 3972 do 3973 # Extract the first word of "$ac_prog", so it can be a program name with args. 3974 set dummy $ac_prog; ac_word=$2 3975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3976 $as_echo_n "checking for $ac_word... " >&6; } 3977 if ${ac_cv_path_CAT+:} false; then : 3978 $as_echo_n "(cached) " >&6 3979 else 3980 case $CAT in 3981 [\\/]* | ?:[\\/]*) 3982 ac_cv_path_CAT="$CAT" # Let the user override the test with a path. 3983 ;; 3984 *) 3985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3986 for as_dir in $PATH 3987 do 3988 IFS=$as_save_IFS 3989 test -z "$as_dir" && as_dir=. 3990 for ac_exec_ext in '' $ac_executable_extensions; do 3991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3992 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" 3993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3994 break 2 3995 fi 3996 done 3997 done 3998 IFS=$as_save_IFS 3999 4000 ;; 4001 esac 4002 fi 4003 CAT=$ac_cv_path_CAT 4004 if test -n "$CAT"; then 4005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5 4006 $as_echo "$CAT" >&6; } 4007 else 4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4009 $as_echo "no" >&6; } 4010 fi 4011 4012 4013 test -n "$CAT" && break 4014 done 4015 4016 4017 if test "x$CAT" = x; then 4018 if test "xcat" = x; then 4019 PROG_NAME=cat 4020 else 4021 PROG_NAME=cat 4022 fi 4023 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4024 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4025 as_fn_error $? "Cannot continue" "$LINENO" 5 4026 fi 4027 4028 4029 4030 for ac_prog in chmod 4031 do 4032 # Extract the first word of "$ac_prog", so it can be a program name with args. 4033 set dummy $ac_prog; ac_word=$2 4034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4035 $as_echo_n "checking for $ac_word... " >&6; } 4036 if ${ac_cv_path_CHMOD+:} false; then : 4037 $as_echo_n "(cached) " >&6 4038 else 4039 case $CHMOD in 4040 [\\/]* | ?:[\\/]*) 4041 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. 4042 ;; 4043 *) 4044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4045 for as_dir in $PATH 4046 do 4047 IFS=$as_save_IFS 4048 test -z "$as_dir" && as_dir=. 4049 for ac_exec_ext in '' $ac_executable_extensions; do 4050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4051 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext" 4052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4053 break 2 4054 fi 4055 done 4056 done 4057 IFS=$as_save_IFS 4058 4059 ;; 4060 esac 4061 fi 4062 CHMOD=$ac_cv_path_CHMOD 4063 if test -n "$CHMOD"; then 4064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5 4065 $as_echo "$CHMOD" >&6; } 4066 else 4067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4068 $as_echo "no" >&6; } 4069 fi 4070 4071 4072 test -n "$CHMOD" && break 4073 done 4074 4075 4076 if test "x$CHMOD" = x; then 4077 if test "xchmod" = x; then 4078 PROG_NAME=chmod 4079 else 4080 PROG_NAME=chmod 4081 fi 4082 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4083 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4084 as_fn_error $? "Cannot continue" "$LINENO" 5 4085 fi 4086 4087 4088 4089 for ac_prog in cmp 4090 do 4091 # Extract the first word of "$ac_prog", so it can be a program name with args. 4092 set dummy $ac_prog; ac_word=$2 4093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4094 $as_echo_n "checking for $ac_word... " >&6; } 4095 if ${ac_cv_path_CMP+:} false; then : 4096 $as_echo_n "(cached) " >&6 4097 else 4098 case $CMP in 4099 [\\/]* | ?:[\\/]*) 4100 ac_cv_path_CMP="$CMP" # Let the user override the test with a path. 4101 ;; 4102 *) 4103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4104 for as_dir in $PATH 4105 do 4106 IFS=$as_save_IFS 4107 test -z "$as_dir" && as_dir=. 4108 for ac_exec_ext in '' $ac_executable_extensions; do 4109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4110 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" 4111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4112 break 2 4113 fi 4114 done 4115 done 4116 IFS=$as_save_IFS 4117 4118 ;; 4119 esac 4120 fi 4121 CMP=$ac_cv_path_CMP 4122 if test -n "$CMP"; then 4123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5 4124 $as_echo "$CMP" >&6; } 4125 else 4126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4127 $as_echo "no" >&6; } 4128 fi 4129 4130 4131 test -n "$CMP" && break 4132 done 4133 4134 4135 if test "x$CMP" = x; then 4136 if test "xcmp" = x; then 4137 PROG_NAME=cmp 4138 else 4139 PROG_NAME=cmp 4140 fi 4141 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4142 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4143 as_fn_error $? "Cannot continue" "$LINENO" 5 4144 fi 4145 4146 4147 4148 for ac_prog in comm 4149 do 4150 # Extract the first word of "$ac_prog", so it can be a program name with args. 4151 set dummy $ac_prog; ac_word=$2 4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4153 $as_echo_n "checking for $ac_word... " >&6; } 4154 if ${ac_cv_path_COMM+:} false; then : 4155 $as_echo_n "(cached) " >&6 4156 else 4157 case $COMM in 4158 [\\/]* | ?:[\\/]*) 4159 ac_cv_path_COMM="$COMM" # Let the user override the test with a path. 4160 ;; 4161 *) 4162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4163 for as_dir in $PATH 4164 do 4165 IFS=$as_save_IFS 4166 test -z "$as_dir" && as_dir=. 4167 for ac_exec_ext in '' $ac_executable_extensions; do 4168 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4169 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext" 4170 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4171 break 2 4172 fi 4173 done 4174 done 4175 IFS=$as_save_IFS 4176 4177 ;; 4178 esac 4179 fi 4180 COMM=$ac_cv_path_COMM 4181 if test -n "$COMM"; then 4182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5 4183 $as_echo "$COMM" >&6; } 4184 else 4185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4186 $as_echo "no" >&6; } 4187 fi 4188 4189 4190 test -n "$COMM" && break 4191 done 4192 4193 4194 if test "x$COMM" = x; then 4195 if test "xcomm" = x; then 4196 PROG_NAME=comm 4197 else 4198 PROG_NAME=comm 4199 fi 4200 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4201 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4202 as_fn_error $? "Cannot continue" "$LINENO" 5 4203 fi 4204 4205 4206 4207 for ac_prog in cp 4208 do 4209 # Extract the first word of "$ac_prog", so it can be a program name with args. 4210 set dummy $ac_prog; ac_word=$2 4211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4212 $as_echo_n "checking for $ac_word... " >&6; } 4213 if ${ac_cv_path_CP+:} false; then : 4214 $as_echo_n "(cached) " >&6 4215 else 4216 case $CP in 4217 [\\/]* | ?:[\\/]*) 4218 ac_cv_path_CP="$CP" # Let the user override the test with a path. 4219 ;; 4220 *) 4221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4222 for as_dir in $PATH 4223 do 4224 IFS=$as_save_IFS 4225 test -z "$as_dir" && as_dir=. 4226 for ac_exec_ext in '' $ac_executable_extensions; do 4227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4228 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" 4229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4230 break 2 4231 fi 4232 done 4233 done 4234 IFS=$as_save_IFS 4235 4236 ;; 4237 esac 4238 fi 4239 CP=$ac_cv_path_CP 4240 if test -n "$CP"; then 4241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 4242 $as_echo "$CP" >&6; } 4243 else 4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4245 $as_echo "no" >&6; } 4246 fi 4247 4248 4249 test -n "$CP" && break 4250 done 4251 4252 4253 if test "x$CP" = x; then 4254 if test "xcp" = x; then 4255 PROG_NAME=cp 4256 else 4257 PROG_NAME=cp 4258 fi 4259 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4260 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4261 as_fn_error $? "Cannot continue" "$LINENO" 5 4262 fi 4263 4264 4265 4266 for ac_prog in cpio 4267 do 4268 # Extract the first word of "$ac_prog", so it can be a program name with args. 4269 set dummy $ac_prog; ac_word=$2 4270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4271 $as_echo_n "checking for $ac_word... " >&6; } 4272 if ${ac_cv_path_CPIO+:} false; then : 4273 $as_echo_n "(cached) " >&6 4274 else 4275 case $CPIO in 4276 [\\/]* | ?:[\\/]*) 4277 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path. 4278 ;; 4279 *) 4280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4281 for as_dir in $PATH 4282 do 4283 IFS=$as_save_IFS 4284 test -z "$as_dir" && as_dir=. 4285 for ac_exec_ext in '' $ac_executable_extensions; do 4286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4287 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext" 4288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4289 break 2 4290 fi 4291 done 4292 done 4293 IFS=$as_save_IFS 4294 4295 ;; 4296 esac 4297 fi 4298 CPIO=$ac_cv_path_CPIO 4299 if test -n "$CPIO"; then 4300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5 4301 $as_echo "$CPIO" >&6; } 4302 else 4303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4304 $as_echo "no" >&6; } 4305 fi 4306 4307 4308 test -n "$CPIO" && break 4309 done 4310 4311 4312 if test "x$CPIO" = x; then 4313 if test "xcpio" = x; then 4314 PROG_NAME=cpio 4315 else 4316 PROG_NAME=cpio 4317 fi 4318 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4319 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4320 as_fn_error $? "Cannot continue" "$LINENO" 5 4321 fi 4322 4323 4324 4325 for ac_prog in cut 4326 do 4327 # Extract the first word of "$ac_prog", so it can be a program name with args. 4328 set dummy $ac_prog; ac_word=$2 4329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4330 $as_echo_n "checking for $ac_word... " >&6; } 4331 if ${ac_cv_path_CUT+:} false; then : 4332 $as_echo_n "(cached) " >&6 4333 else 4334 case $CUT in 4335 [\\/]* | ?:[\\/]*) 4336 ac_cv_path_CUT="$CUT" # Let the user override the test with a path. 4337 ;; 4338 *) 4339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4340 for as_dir in $PATH 4341 do 4342 IFS=$as_save_IFS 4343 test -z "$as_dir" && as_dir=. 4344 for ac_exec_ext in '' $ac_executable_extensions; do 4345 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4346 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext" 4347 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4348 break 2 4349 fi 4350 done 4351 done 4352 IFS=$as_save_IFS 4353 4354 ;; 4355 esac 4356 fi 4357 CUT=$ac_cv_path_CUT 4358 if test -n "$CUT"; then 4359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5 4360 $as_echo "$CUT" >&6; } 4361 else 4362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4363 $as_echo "no" >&6; } 4364 fi 4365 4366 4367 test -n "$CUT" && break 4368 done 4369 4370 4371 if test "x$CUT" = x; then 4372 if test "xcut" = x; then 4373 PROG_NAME=cut 4374 else 4375 PROG_NAME=cut 4376 fi 4377 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4378 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4379 as_fn_error $? "Cannot continue" "$LINENO" 5 4380 fi 4381 4382 4383 4384 for ac_prog in date 4385 do 4386 # Extract the first word of "$ac_prog", so it can be a program name with args. 4387 set dummy $ac_prog; ac_word=$2 4388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4389 $as_echo_n "checking for $ac_word... " >&6; } 4390 if ${ac_cv_path_DATE+:} false; then : 4391 $as_echo_n "(cached) " >&6 4392 else 4393 case $DATE in 4394 [\\/]* | ?:[\\/]*) 4395 ac_cv_path_DATE="$DATE" # Let the user override the test with a path. 4396 ;; 4397 *) 4398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4399 for as_dir in $PATH 4400 do 4401 IFS=$as_save_IFS 4402 test -z "$as_dir" && as_dir=. 4403 for ac_exec_ext in '' $ac_executable_extensions; do 4404 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4405 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext" 4406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4407 break 2 4408 fi 4409 done 4410 done 4411 IFS=$as_save_IFS 4412 4413 ;; 4414 esac 4415 fi 4416 DATE=$ac_cv_path_DATE 4417 if test -n "$DATE"; then 4418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5 4419 $as_echo "$DATE" >&6; } 4420 else 4421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4422 $as_echo "no" >&6; } 4423 fi 4424 4425 4426 test -n "$DATE" && break 4427 done 4428 4429 4430 if test "x$DATE" = x; then 4431 if test "xdate" = x; then 4432 PROG_NAME=date 4433 else 4434 PROG_NAME=date 4435 fi 4436 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4437 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4438 as_fn_error $? "Cannot continue" "$LINENO" 5 4439 fi 4440 4441 4442 4443 for ac_prog in gdiff diff 4444 do 4445 # Extract the first word of "$ac_prog", so it can be a program name with args. 4446 set dummy $ac_prog; ac_word=$2 4447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4448 $as_echo_n "checking for $ac_word... " >&6; } 4449 if ${ac_cv_path_DIFF+:} false; then : 4450 $as_echo_n "(cached) " >&6 4451 else 4452 case $DIFF in 4453 [\\/]* | ?:[\\/]*) 4454 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. 4455 ;; 4456 *) 4457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4458 for as_dir in $PATH 4459 do 4460 IFS=$as_save_IFS 4461 test -z "$as_dir" && as_dir=. 4462 for ac_exec_ext in '' $ac_executable_extensions; do 4463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4464 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" 4465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4466 break 2 4467 fi 4468 done 4469 done 4470 IFS=$as_save_IFS 4471 4472 ;; 4473 esac 4474 fi 4475 DIFF=$ac_cv_path_DIFF 4476 if test -n "$DIFF"; then 4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 4478 $as_echo "$DIFF" >&6; } 4479 else 4480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4481 $as_echo "no" >&6; } 4482 fi 4483 4484 4485 test -n "$DIFF" && break 4486 done 4487 4488 4489 if test "x$DIFF" = x; then 4490 if test "xgdiff diff" = x; then 4491 PROG_NAME=diff 4492 else 4493 PROG_NAME=gdiff diff 4494 fi 4495 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4496 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4497 as_fn_error $? "Cannot continue" "$LINENO" 5 4498 fi 4499 4500 4501 4502 for ac_prog in dirname 4503 do 4504 # Extract the first word of "$ac_prog", so it can be a program name with args. 4505 set dummy $ac_prog; ac_word=$2 4506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4507 $as_echo_n "checking for $ac_word... " >&6; } 4508 if ${ac_cv_path_DIRNAME+:} false; then : 4509 $as_echo_n "(cached) " >&6 4510 else 4511 case $DIRNAME in 4512 [\\/]* | ?:[\\/]*) 4513 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path. 4514 ;; 4515 *) 4516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4517 for as_dir in $PATH 4518 do 4519 IFS=$as_save_IFS 4520 test -z "$as_dir" && as_dir=. 4521 for ac_exec_ext in '' $ac_executable_extensions; do 4522 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4523 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext" 4524 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4525 break 2 4526 fi 4527 done 4528 done 4529 IFS=$as_save_IFS 4530 4531 ;; 4532 esac 4533 fi 4534 DIRNAME=$ac_cv_path_DIRNAME 4535 if test -n "$DIRNAME"; then 4536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5 4537 $as_echo "$DIRNAME" >&6; } 4538 else 4539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4540 $as_echo "no" >&6; } 4541 fi 4542 4543 4544 test -n "$DIRNAME" && break 4545 done 4546 4547 4548 if test "x$DIRNAME" = x; then 4549 if test "xdirname" = x; then 4550 PROG_NAME=dirname 4551 else 4552 PROG_NAME=dirname 4553 fi 4554 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4555 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4556 as_fn_error $? "Cannot continue" "$LINENO" 5 4557 fi 4558 4559 4560 4561 for ac_prog in echo 4562 do 4563 # Extract the first word of "$ac_prog", so it can be a program name with args. 4564 set dummy $ac_prog; ac_word=$2 4565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4566 $as_echo_n "checking for $ac_word... " >&6; } 4567 if ${ac_cv_path_ECHO+:} false; then : 4568 $as_echo_n "(cached) " >&6 4569 else 4570 case $ECHO in 4571 [\\/]* | ?:[\\/]*) 4572 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path. 4573 ;; 4574 *) 4575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4576 for as_dir in $PATH 4577 do 4578 IFS=$as_save_IFS 4579 test -z "$as_dir" && as_dir=. 4580 for ac_exec_ext in '' $ac_executable_extensions; do 4581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4582 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" 4583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4584 break 2 4585 fi 4586 done 4587 done 4588 IFS=$as_save_IFS 4589 4590 ;; 4591 esac 4592 fi 4593 ECHO=$ac_cv_path_ECHO 4594 if test -n "$ECHO"; then 4595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5 4596 $as_echo "$ECHO" >&6; } 4597 else 4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4599 $as_echo "no" >&6; } 4600 fi 4601 4602 4603 test -n "$ECHO" && break 4604 done 4605 4606 4607 if test "x$ECHO" = x; then 4608 if test "xecho" = x; then 4609 PROG_NAME=echo 4610 else 4611 PROG_NAME=echo 4612 fi 4613 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4614 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4615 as_fn_error $? "Cannot continue" "$LINENO" 5 4616 fi 4617 4618 4619 4620 for ac_prog in expr 4621 do 4622 # Extract the first word of "$ac_prog", so it can be a program name with args. 4623 set dummy $ac_prog; ac_word=$2 4624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4625 $as_echo_n "checking for $ac_word... " >&6; } 4626 if ${ac_cv_path_EXPR+:} false; then : 4627 $as_echo_n "(cached) " >&6 4628 else 4629 case $EXPR in 4630 [\\/]* | ?:[\\/]*) 4631 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path. 4632 ;; 4633 *) 4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4635 for as_dir in $PATH 4636 do 4637 IFS=$as_save_IFS 4638 test -z "$as_dir" && as_dir=. 4639 for ac_exec_ext in '' $ac_executable_extensions; do 4640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4641 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext" 4642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4643 break 2 4644 fi 4645 done 4646 done 4647 IFS=$as_save_IFS 4648 4649 ;; 4650 esac 4651 fi 4652 EXPR=$ac_cv_path_EXPR 4653 if test -n "$EXPR"; then 4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5 4655 $as_echo "$EXPR" >&6; } 4656 else 4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4658 $as_echo "no" >&6; } 4659 fi 4660 4661 4662 test -n "$EXPR" && break 4663 done 4664 4665 4666 if test "x$EXPR" = x; then 4667 if test "xexpr" = x; then 4668 PROG_NAME=expr 4669 else 4670 PROG_NAME=expr 4671 fi 4672 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4673 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4674 as_fn_error $? "Cannot continue" "$LINENO" 5 4675 fi 4676 4677 4678 4679 for ac_prog in file 4680 do 4681 # Extract the first word of "$ac_prog", so it can be a program name with args. 4682 set dummy $ac_prog; ac_word=$2 4683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4684 $as_echo_n "checking for $ac_word... " >&6; } 4685 if ${ac_cv_path_FILE+:} false; then : 4686 $as_echo_n "(cached) " >&6 4687 else 4688 case $FILE in 4689 [\\/]* | ?:[\\/]*) 4690 ac_cv_path_FILE="$FILE" # Let the user override the test with a path. 4691 ;; 4692 *) 4693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4694 for as_dir in $PATH 4695 do 4696 IFS=$as_save_IFS 4697 test -z "$as_dir" && as_dir=. 4698 for ac_exec_ext in '' $ac_executable_extensions; do 4699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4700 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext" 4701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4702 break 2 4703 fi 4704 done 4705 done 4706 IFS=$as_save_IFS 4707 4708 ;; 4709 esac 4710 fi 4711 FILE=$ac_cv_path_FILE 4712 if test -n "$FILE"; then 4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5 4714 $as_echo "$FILE" >&6; } 4715 else 4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4717 $as_echo "no" >&6; } 4718 fi 4719 4720 4721 test -n "$FILE" && break 4722 done 4723 4724 4725 if test "x$FILE" = x; then 4726 if test "xfile" = x; then 4727 PROG_NAME=file 4728 else 4729 PROG_NAME=file 4730 fi 4731 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4732 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4733 as_fn_error $? "Cannot continue" "$LINENO" 5 4734 fi 4735 4736 4737 4738 for ac_prog in find 4739 do 4740 # Extract the first word of "$ac_prog", so it can be a program name with args. 4741 set dummy $ac_prog; ac_word=$2 4742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4743 $as_echo_n "checking for $ac_word... " >&6; } 4744 if ${ac_cv_path_FIND+:} false; then : 4745 $as_echo_n "(cached) " >&6 4746 else 4747 case $FIND in 4748 [\\/]* | ?:[\\/]*) 4749 ac_cv_path_FIND="$FIND" # Let the user override the test with a path. 4750 ;; 4751 *) 4752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4753 for as_dir in $PATH 4754 do 4755 IFS=$as_save_IFS 4756 test -z "$as_dir" && as_dir=. 4757 for ac_exec_ext in '' $ac_executable_extensions; do 4758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4759 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" 4760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4761 break 2 4762 fi 4763 done 4764 done 4765 IFS=$as_save_IFS 4766 4767 ;; 4768 esac 4769 fi 4770 FIND=$ac_cv_path_FIND 4771 if test -n "$FIND"; then 4772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 4773 $as_echo "$FIND" >&6; } 4774 else 4775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4776 $as_echo "no" >&6; } 4777 fi 4778 4779 4780 test -n "$FIND" && break 4781 done 4782 4783 4784 if test "x$FIND" = x; then 4785 if test "xfind" = x; then 4786 PROG_NAME=find 4787 else 4788 PROG_NAME=find 4789 fi 4790 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4791 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4792 as_fn_error $? "Cannot continue" "$LINENO" 5 4793 fi 4794 4795 4796 4797 for ac_prog in head 4798 do 4799 # Extract the first word of "$ac_prog", so it can be a program name with args. 4800 set dummy $ac_prog; ac_word=$2 4801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4802 $as_echo_n "checking for $ac_word... " >&6; } 4803 if ${ac_cv_path_HEAD+:} false; then : 4804 $as_echo_n "(cached) " >&6 4805 else 4806 case $HEAD in 4807 [\\/]* | ?:[\\/]*) 4808 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path. 4809 ;; 4810 *) 4811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4812 for as_dir in $PATH 4813 do 4814 IFS=$as_save_IFS 4815 test -z "$as_dir" && as_dir=. 4816 for ac_exec_ext in '' $ac_executable_extensions; do 4817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4818 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext" 4819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4820 break 2 4821 fi 4822 done 4823 done 4824 IFS=$as_save_IFS 4825 4826 ;; 4827 esac 4828 fi 4829 HEAD=$ac_cv_path_HEAD 4830 if test -n "$HEAD"; then 4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5 4832 $as_echo "$HEAD" >&6; } 4833 else 4834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4835 $as_echo "no" >&6; } 4836 fi 4837 4838 4839 test -n "$HEAD" && break 4840 done 4841 4842 4843 if test "x$HEAD" = x; then 4844 if test "xhead" = x; then 4845 PROG_NAME=head 4846 else 4847 PROG_NAME=head 4848 fi 4849 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4850 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4851 as_fn_error $? "Cannot continue" "$LINENO" 5 4852 fi 4853 4854 4855 4856 for ac_prog in ln 4857 do 4858 # Extract the first word of "$ac_prog", so it can be a program name with args. 4859 set dummy $ac_prog; ac_word=$2 4860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4861 $as_echo_n "checking for $ac_word... " >&6; } 4862 if ${ac_cv_path_LN+:} false; then : 4863 $as_echo_n "(cached) " >&6 4864 else 4865 case $LN in 4866 [\\/]* | ?:[\\/]*) 4867 ac_cv_path_LN="$LN" # Let the user override the test with a path. 4868 ;; 4869 *) 4870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4871 for as_dir in $PATH 4872 do 4873 IFS=$as_save_IFS 4874 test -z "$as_dir" && as_dir=. 4875 for ac_exec_ext in '' $ac_executable_extensions; do 4876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4877 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext" 4878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4879 break 2 4880 fi 4881 done 4882 done 4883 IFS=$as_save_IFS 4884 4885 ;; 4886 esac 4887 fi 4888 LN=$ac_cv_path_LN 4889 if test -n "$LN"; then 4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5 4891 $as_echo "$LN" >&6; } 4892 else 4893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4894 $as_echo "no" >&6; } 4895 fi 4896 4897 4898 test -n "$LN" && break 4899 done 4900 4901 4902 if test "x$LN" = x; then 4903 if test "xln" = x; then 4904 PROG_NAME=ln 4905 else 4906 PROG_NAME=ln 4907 fi 4908 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4909 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4910 as_fn_error $? "Cannot continue" "$LINENO" 5 4911 fi 4912 4913 4914 4915 for ac_prog in ls 4916 do 4917 # Extract the first word of "$ac_prog", so it can be a program name with args. 4918 set dummy $ac_prog; ac_word=$2 4919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4920 $as_echo_n "checking for $ac_word... " >&6; } 4921 if ${ac_cv_path_LS+:} false; then : 4922 $as_echo_n "(cached) " >&6 4923 else 4924 case $LS in 4925 [\\/]* | ?:[\\/]*) 4926 ac_cv_path_LS="$LS" # Let the user override the test with a path. 4927 ;; 4928 *) 4929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4930 for as_dir in $PATH 4931 do 4932 IFS=$as_save_IFS 4933 test -z "$as_dir" && as_dir=. 4934 for ac_exec_ext in '' $ac_executable_extensions; do 4935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4936 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext" 4937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4938 break 2 4939 fi 4940 done 4941 done 4942 IFS=$as_save_IFS 4943 4944 ;; 4945 esac 4946 fi 4947 LS=$ac_cv_path_LS 4948 if test -n "$LS"; then 4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5 4950 $as_echo "$LS" >&6; } 4951 else 4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4953 $as_echo "no" >&6; } 4954 fi 4955 4956 4957 test -n "$LS" && break 4958 done 4959 4960 4961 if test "x$LS" = x; then 4962 if test "xls" = x; then 4963 PROG_NAME=ls 4964 else 4965 PROG_NAME=ls 4966 fi 4967 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4968 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4969 as_fn_error $? "Cannot continue" "$LINENO" 5 4970 fi 4971 4972 4973 4974 for ac_prog in mkdir 4975 do 4976 # Extract the first word of "$ac_prog", so it can be a program name with args. 4977 set dummy $ac_prog; ac_word=$2 4978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4979 $as_echo_n "checking for $ac_word... " >&6; } 4980 if ${ac_cv_path_MKDIR+:} false; then : 4981 $as_echo_n "(cached) " >&6 4982 else 4983 case $MKDIR in 4984 [\\/]* | ?:[\\/]*) 4985 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. 4986 ;; 4987 *) 4988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4989 for as_dir in $PATH 4990 do 4991 IFS=$as_save_IFS 4992 test -z "$as_dir" && as_dir=. 4993 for ac_exec_ext in '' $ac_executable_extensions; do 4994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4995 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" 4996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4997 break 2 4998 fi 4999 done 5000 done 5001 IFS=$as_save_IFS 5002 5003 ;; 5004 esac 5005 fi 5006 MKDIR=$ac_cv_path_MKDIR 5007 if test -n "$MKDIR"; then 5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 5009 $as_echo "$MKDIR" >&6; } 5010 else 5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5012 $as_echo "no" >&6; } 5013 fi 5014 5015 5016 test -n "$MKDIR" && break 5017 done 5018 5019 5020 if test "x$MKDIR" = x; then 5021 if test "xmkdir" = x; then 5022 PROG_NAME=mkdir 5023 else 5024 PROG_NAME=mkdir 5025 fi 5026 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5027 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5028 as_fn_error $? "Cannot continue" "$LINENO" 5 5029 fi 5030 5031 5032 5033 for ac_prog in mktemp 5034 do 5035 # Extract the first word of "$ac_prog", so it can be a program name with args. 5036 set dummy $ac_prog; ac_word=$2 5037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5038 $as_echo_n "checking for $ac_word... " >&6; } 5039 if ${ac_cv_path_MKTEMP+:} false; then : 5040 $as_echo_n "(cached) " >&6 5041 else 5042 case $MKTEMP in 5043 [\\/]* | ?:[\\/]*) 5044 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path. 5045 ;; 5046 *) 5047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5048 for as_dir in $PATH 5049 do 5050 IFS=$as_save_IFS 5051 test -z "$as_dir" && as_dir=. 5052 for ac_exec_ext in '' $ac_executable_extensions; do 5053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5054 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext" 5055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5056 break 2 5057 fi 5058 done 5059 done 5060 IFS=$as_save_IFS 5061 5062 ;; 5063 esac 5064 fi 5065 MKTEMP=$ac_cv_path_MKTEMP 5066 if test -n "$MKTEMP"; then 5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5 5068 $as_echo "$MKTEMP" >&6; } 5069 else 5070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5071 $as_echo "no" >&6; } 5072 fi 5073 5074 5075 test -n "$MKTEMP" && break 5076 done 5077 5078 5079 if test "x$MKTEMP" = x; then 5080 if test "xmktemp" = x; then 5081 PROG_NAME=mktemp 5082 else 5083 PROG_NAME=mktemp 5084 fi 5085 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5086 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5087 as_fn_error $? "Cannot continue" "$LINENO" 5 5088 fi 5089 5090 5091 5092 for ac_prog in mv 5093 do 5094 # Extract the first word of "$ac_prog", so it can be a program name with args. 5095 set dummy $ac_prog; ac_word=$2 5096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5097 $as_echo_n "checking for $ac_word... " >&6; } 5098 if ${ac_cv_path_MV+:} false; then : 5099 $as_echo_n "(cached) " >&6 5100 else 5101 case $MV in 5102 [\\/]* | ?:[\\/]*) 5103 ac_cv_path_MV="$MV" # Let the user override the test with a path. 5104 ;; 5105 *) 5106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5107 for as_dir in $PATH 5108 do 5109 IFS=$as_save_IFS 5110 test -z "$as_dir" && as_dir=. 5111 for ac_exec_ext in '' $ac_executable_extensions; do 5112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5113 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" 5114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5115 break 2 5116 fi 5117 done 5118 done 5119 IFS=$as_save_IFS 5120 5121 ;; 5122 esac 5123 fi 5124 MV=$ac_cv_path_MV 5125 if test -n "$MV"; then 5126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5 5127 $as_echo "$MV" >&6; } 5128 else 5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5130 $as_echo "no" >&6; } 5131 fi 5132 5133 5134 test -n "$MV" && break 5135 done 5136 5137 5138 if test "x$MV" = x; then 5139 if test "xmv" = x; then 5140 PROG_NAME=mv 5141 else 5142 PROG_NAME=mv 5143 fi 5144 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5145 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5146 as_fn_error $? "Cannot continue" "$LINENO" 5 5147 fi 5148 5149 5150 5151 for ac_prog in printf 5152 do 5153 # Extract the first word of "$ac_prog", so it can be a program name with args. 5154 set dummy $ac_prog; ac_word=$2 5155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5156 $as_echo_n "checking for $ac_word... " >&6; } 5157 if ${ac_cv_path_PRINTF+:} false; then : 5158 $as_echo_n "(cached) " >&6 5159 else 5160 case $PRINTF in 5161 [\\/]* | ?:[\\/]*) 5162 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path. 5163 ;; 5164 *) 5165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5166 for as_dir in $PATH 5167 do 5168 IFS=$as_save_IFS 5169 test -z "$as_dir" && as_dir=. 5170 for ac_exec_ext in '' $ac_executable_extensions; do 5171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5172 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext" 5173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5174 break 2 5175 fi 5176 done 5177 done 5178 IFS=$as_save_IFS 5179 5180 ;; 5181 esac 5182 fi 5183 PRINTF=$ac_cv_path_PRINTF 5184 if test -n "$PRINTF"; then 5185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5 5186 $as_echo "$PRINTF" >&6; } 5187 else 5188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5189 $as_echo "no" >&6; } 5190 fi 5191 5192 5193 test -n "$PRINTF" && break 5194 done 5195 5196 5197 if test "x$PRINTF" = x; then 5198 if test "xprintf" = x; then 5199 PROG_NAME=printf 5200 else 5201 PROG_NAME=printf 5202 fi 5203 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5204 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5205 as_fn_error $? "Cannot continue" "$LINENO" 5 5206 fi 5207 5208 5209 5210 for ac_prog in rm 5211 do 5212 # Extract the first word of "$ac_prog", so it can be a program name with args. 5213 set dummy $ac_prog; ac_word=$2 5214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5215 $as_echo_n "checking for $ac_word... " >&6; } 5216 if ${ac_cv_path_RM+:} false; then : 5217 $as_echo_n "(cached) " >&6 5218 else 5219 case $RM in 5220 [\\/]* | ?:[\\/]*) 5221 ac_cv_path_RM="$RM" # Let the user override the test with a path. 5222 ;; 5223 *) 5224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5225 for as_dir in $PATH 5226 do 5227 IFS=$as_save_IFS 5228 test -z "$as_dir" && as_dir=. 5229 for ac_exec_ext in '' $ac_executable_extensions; do 5230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5231 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" 5232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5233 break 2 5234 fi 5235 done 5236 done 5237 IFS=$as_save_IFS 5238 5239 ;; 5240 esac 5241 fi 5242 RM=$ac_cv_path_RM 5243 if test -n "$RM"; then 5244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 5245 $as_echo "$RM" >&6; } 5246 else 5247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5248 $as_echo "no" >&6; } 5249 fi 5250 5251 5252 test -n "$RM" && break 5253 done 5254 5255 5256 if test "x$RM" = x; then 5257 if test "xrm" = x; then 5258 PROG_NAME=rm 5259 else 5260 PROG_NAME=rm 5261 fi 5262 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5263 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5264 as_fn_error $? "Cannot continue" "$LINENO" 5 5265 fi 5266 5267 5268 5269 for ac_prog in sh 5270 do 5271 # Extract the first word of "$ac_prog", so it can be a program name with args. 5272 set dummy $ac_prog; ac_word=$2 5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5274 $as_echo_n "checking for $ac_word... " >&6; } 5275 if ${ac_cv_path_SH+:} false; then : 5276 $as_echo_n "(cached) " >&6 5277 else 5278 case $SH in 5279 [\\/]* | ?:[\\/]*) 5280 ac_cv_path_SH="$SH" # Let the user override the test with a path. 5281 ;; 5282 *) 5283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5284 for as_dir in $PATH 5285 do 5286 IFS=$as_save_IFS 5287 test -z "$as_dir" && as_dir=. 5288 for ac_exec_ext in '' $ac_executable_extensions; do 5289 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5290 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" 5291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5292 break 2 5293 fi 5294 done 5295 done 5296 IFS=$as_save_IFS 5297 5298 ;; 5299 esac 5300 fi 5301 SH=$ac_cv_path_SH 5302 if test -n "$SH"; then 5303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5 5304 $as_echo "$SH" >&6; } 5305 else 5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5307 $as_echo "no" >&6; } 5308 fi 5309 5310 5311 test -n "$SH" && break 5312 done 5313 5314 5315 if test "x$SH" = x; then 5316 if test "xsh" = x; then 5317 PROG_NAME=sh 5318 else 5319 PROG_NAME=sh 5320 fi 5321 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5322 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5323 as_fn_error $? "Cannot continue" "$LINENO" 5 5324 fi 5325 5326 5327 5328 for ac_prog in sort 5329 do 5330 # Extract the first word of "$ac_prog", so it can be a program name with args. 5331 set dummy $ac_prog; ac_word=$2 5332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5333 $as_echo_n "checking for $ac_word... " >&6; } 5334 if ${ac_cv_path_SORT+:} false; then : 5335 $as_echo_n "(cached) " >&6 5336 else 5337 case $SORT in 5338 [\\/]* | ?:[\\/]*) 5339 ac_cv_path_SORT="$SORT" # Let the user override the test with a path. 5340 ;; 5341 *) 5342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5343 for as_dir in $PATH 5344 do 5345 IFS=$as_save_IFS 5346 test -z "$as_dir" && as_dir=. 5347 for ac_exec_ext in '' $ac_executable_extensions; do 5348 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5349 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext" 5350 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5351 break 2 5352 fi 5353 done 5354 done 5355 IFS=$as_save_IFS 5356 5357 ;; 5358 esac 5359 fi 5360 SORT=$ac_cv_path_SORT 5361 if test -n "$SORT"; then 5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5 5363 $as_echo "$SORT" >&6; } 5364 else 5365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5366 $as_echo "no" >&6; } 5367 fi 5368 5369 5370 test -n "$SORT" && break 5371 done 5372 5373 5374 if test "x$SORT" = x; then 5375 if test "xsort" = x; then 5376 PROG_NAME=sort 5377 else 5378 PROG_NAME=sort 5379 fi 5380 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5381 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5382 as_fn_error $? "Cannot continue" "$LINENO" 5 5383 fi 5384 5385 5386 5387 for ac_prog in tail 5388 do 5389 # Extract the first word of "$ac_prog", so it can be a program name with args. 5390 set dummy $ac_prog; ac_word=$2 5391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5392 $as_echo_n "checking for $ac_word... " >&6; } 5393 if ${ac_cv_path_TAIL+:} false; then : 5394 $as_echo_n "(cached) " >&6 5395 else 5396 case $TAIL in 5397 [\\/]* | ?:[\\/]*) 5398 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path. 5399 ;; 5400 *) 5401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5402 for as_dir in $PATH 5403 do 5404 IFS=$as_save_IFS 5405 test -z "$as_dir" && as_dir=. 5406 for ac_exec_ext in '' $ac_executable_extensions; do 5407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5408 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext" 5409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5410 break 2 5411 fi 5412 done 5413 done 5414 IFS=$as_save_IFS 5415 5416 ;; 5417 esac 5418 fi 5419 TAIL=$ac_cv_path_TAIL 5420 if test -n "$TAIL"; then 5421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5 5422 $as_echo "$TAIL" >&6; } 5423 else 5424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5425 $as_echo "no" >&6; } 5426 fi 5427 5428 5429 test -n "$TAIL" && break 5430 done 5431 5432 5433 if test "x$TAIL" = x; then 5434 if test "xtail" = x; then 5435 PROG_NAME=tail 5436 else 5437 PROG_NAME=tail 5438 fi 5439 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5440 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5441 as_fn_error $? "Cannot continue" "$LINENO" 5 5442 fi 5443 5444 5445 5446 for ac_prog in tar 5447 do 5448 # Extract the first word of "$ac_prog", so it can be a program name with args. 5449 set dummy $ac_prog; ac_word=$2 5450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5451 $as_echo_n "checking for $ac_word... " >&6; } 5452 if ${ac_cv_path_TAR+:} false; then : 5453 $as_echo_n "(cached) " >&6 5454 else 5455 case $TAR in 5456 [\\/]* | ?:[\\/]*) 5457 ac_cv_path_TAR="$TAR" # Let the user override the test with a path. 5458 ;; 5459 *) 5460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5461 for as_dir in $PATH 5462 do 5463 IFS=$as_save_IFS 5464 test -z "$as_dir" && as_dir=. 5465 for ac_exec_ext in '' $ac_executable_extensions; do 5466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5467 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" 5468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5469 break 2 5470 fi 5471 done 5472 done 5473 IFS=$as_save_IFS 5474 5475 ;; 5476 esac 5477 fi 5478 TAR=$ac_cv_path_TAR 5479 if test -n "$TAR"; then 5480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 5481 $as_echo "$TAR" >&6; } 5482 else 5483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5484 $as_echo "no" >&6; } 5485 fi 5486 5487 5488 test -n "$TAR" && break 5489 done 5490 5491 5492 if test "x$TAR" = x; then 5493 if test "xtar" = x; then 5494 PROG_NAME=tar 5495 else 5496 PROG_NAME=tar 5497 fi 5498 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5499 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5500 as_fn_error $? "Cannot continue" "$LINENO" 5 5501 fi 5502 5503 5504 5505 for ac_prog in tee 5506 do 5507 # Extract the first word of "$ac_prog", so it can be a program name with args. 5508 set dummy $ac_prog; ac_word=$2 5509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5510 $as_echo_n "checking for $ac_word... " >&6; } 5511 if ${ac_cv_path_TEE+:} false; then : 5512 $as_echo_n "(cached) " >&6 5513 else 5514 case $TEE in 5515 [\\/]* | ?:[\\/]*) 5516 ac_cv_path_TEE="$TEE" # Let the user override the test with a path. 5517 ;; 5518 *) 5519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5520 for as_dir in $PATH 5521 do 5522 IFS=$as_save_IFS 5523 test -z "$as_dir" && as_dir=. 5524 for ac_exec_ext in '' $ac_executable_extensions; do 5525 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5526 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext" 5527 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5528 break 2 5529 fi 5530 done 5531 done 5532 IFS=$as_save_IFS 5533 5534 ;; 5535 esac 5536 fi 5537 TEE=$ac_cv_path_TEE 5538 if test -n "$TEE"; then 5539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5 5540 $as_echo "$TEE" >&6; } 5541 else 5542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5543 $as_echo "no" >&6; } 5544 fi 5545 5546 5547 test -n "$TEE" && break 5548 done 5549 5550 5551 if test "x$TEE" = x; then 5552 if test "xtee" = x; then 5553 PROG_NAME=tee 5554 else 5555 PROG_NAME=tee 5556 fi 5557 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5558 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5559 as_fn_error $? "Cannot continue" "$LINENO" 5 5560 fi 5561 5562 5563 5564 for ac_prog in touch 5565 do 5566 # Extract the first word of "$ac_prog", so it can be a program name with args. 5567 set dummy $ac_prog; ac_word=$2 5568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5569 $as_echo_n "checking for $ac_word... " >&6; } 5570 if ${ac_cv_path_TOUCH+:} false; then : 5571 $as_echo_n "(cached) " >&6 5572 else 5573 case $TOUCH in 5574 [\\/]* | ?:[\\/]*) 5575 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path. 5576 ;; 5577 *) 5578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5579 for as_dir in $PATH 5580 do 5581 IFS=$as_save_IFS 5582 test -z "$as_dir" && as_dir=. 5583 for ac_exec_ext in '' $ac_executable_extensions; do 5584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5585 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext" 5586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5587 break 2 5588 fi 5589 done 5590 done 5591 IFS=$as_save_IFS 5592 5593 ;; 5594 esac 5595 fi 5596 TOUCH=$ac_cv_path_TOUCH 5597 if test -n "$TOUCH"; then 5598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5 5599 $as_echo "$TOUCH" >&6; } 5600 else 5601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5602 $as_echo "no" >&6; } 5603 fi 5604 5605 5606 test -n "$TOUCH" && break 5607 done 5608 5609 5610 if test "x$TOUCH" = x; then 5611 if test "xtouch" = x; then 5612 PROG_NAME=touch 5613 else 5614 PROG_NAME=touch 5615 fi 5616 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5617 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5618 as_fn_error $? "Cannot continue" "$LINENO" 5 5619 fi 5620 5621 5622 5623 for ac_prog in tr 5624 do 5625 # Extract the first word of "$ac_prog", so it can be a program name with args. 5626 set dummy $ac_prog; ac_word=$2 5627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5628 $as_echo_n "checking for $ac_word... " >&6; } 5629 if ${ac_cv_path_TR+:} false; then : 5630 $as_echo_n "(cached) " >&6 5631 else 5632 case $TR in 5633 [\\/]* | ?:[\\/]*) 5634 ac_cv_path_TR="$TR" # Let the user override the test with a path. 5635 ;; 5636 *) 5637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5638 for as_dir in $PATH 5639 do 5640 IFS=$as_save_IFS 5641 test -z "$as_dir" && as_dir=. 5642 for ac_exec_ext in '' $ac_executable_extensions; do 5643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5644 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" 5645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5646 break 2 5647 fi 5648 done 5649 done 5650 IFS=$as_save_IFS 5651 5652 ;; 5653 esac 5654 fi 5655 TR=$ac_cv_path_TR 5656 if test -n "$TR"; then 5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 5658 $as_echo "$TR" >&6; } 5659 else 5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5661 $as_echo "no" >&6; } 5662 fi 5663 5664 5665 test -n "$TR" && break 5666 done 5667 5668 5669 if test "x$TR" = x; then 5670 if test "xtr" = x; then 5671 PROG_NAME=tr 5672 else 5673 PROG_NAME=tr 5674 fi 5675 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5676 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5677 as_fn_error $? "Cannot continue" "$LINENO" 5 5678 fi 5679 5680 5681 5682 for ac_prog in uname 5683 do 5684 # Extract the first word of "$ac_prog", so it can be a program name with args. 5685 set dummy $ac_prog; ac_word=$2 5686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5687 $as_echo_n "checking for $ac_word... " >&6; } 5688 if ${ac_cv_path_UNAME+:} false; then : 5689 $as_echo_n "(cached) " >&6 5690 else 5691 case $UNAME in 5692 [\\/]* | ?:[\\/]*) 5693 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path. 5694 ;; 5695 *) 5696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5697 for as_dir in $PATH 5698 do 5699 IFS=$as_save_IFS 5700 test -z "$as_dir" && as_dir=. 5701 for ac_exec_ext in '' $ac_executable_extensions; do 5702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5703 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext" 5704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5705 break 2 5706 fi 5707 done 5708 done 5709 IFS=$as_save_IFS 5710 5711 ;; 5712 esac 5713 fi 5714 UNAME=$ac_cv_path_UNAME 5715 if test -n "$UNAME"; then 5716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5 5717 $as_echo "$UNAME" >&6; } 5718 else 5719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5720 $as_echo "no" >&6; } 5721 fi 5722 5723 5724 test -n "$UNAME" && break 5725 done 5726 5727 5728 if test "x$UNAME" = x; then 5729 if test "xuname" = x; then 5730 PROG_NAME=uname 5731 else 5732 PROG_NAME=uname 5733 fi 5734 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5735 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5736 as_fn_error $? "Cannot continue" "$LINENO" 5 5737 fi 5738 5739 5740 5741 for ac_prog in uniq 5742 do 5743 # Extract the first word of "$ac_prog", so it can be a program name with args. 5744 set dummy $ac_prog; ac_word=$2 5745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5746 $as_echo_n "checking for $ac_word... " >&6; } 5747 if ${ac_cv_path_UNIQ+:} false; then : 5748 $as_echo_n "(cached) " >&6 5749 else 5750 case $UNIQ in 5751 [\\/]* | ?:[\\/]*) 5752 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path. 5753 ;; 5754 *) 5755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5756 for as_dir in $PATH 5757 do 5758 IFS=$as_save_IFS 5759 test -z "$as_dir" && as_dir=. 5760 for ac_exec_ext in '' $ac_executable_extensions; do 5761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5762 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext" 5763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5764 break 2 5765 fi 5766 done 5767 done 5768 IFS=$as_save_IFS 5769 5770 ;; 5771 esac 5772 fi 5773 UNIQ=$ac_cv_path_UNIQ 5774 if test -n "$UNIQ"; then 5775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5 5776 $as_echo "$UNIQ" >&6; } 5777 else 5778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5779 $as_echo "no" >&6; } 5780 fi 5781 5782 5783 test -n "$UNIQ" && break 5784 done 5785 5786 5787 if test "x$UNIQ" = x; then 5788 if test "xuniq" = x; then 5789 PROG_NAME=uniq 5790 else 5791 PROG_NAME=uniq 5792 fi 5793 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5794 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5795 as_fn_error $? "Cannot continue" "$LINENO" 5 5796 fi 5797 5798 5799 5800 for ac_prog in wc 5801 do 5802 # Extract the first word of "$ac_prog", so it can be a program name with args. 5803 set dummy $ac_prog; ac_word=$2 5804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5805 $as_echo_n "checking for $ac_word... " >&6; } 5806 if ${ac_cv_path_WC+:} false; then : 5807 $as_echo_n "(cached) " >&6 5808 else 5809 case $WC in 5810 [\\/]* | ?:[\\/]*) 5811 ac_cv_path_WC="$WC" # Let the user override the test with a path. 5812 ;; 5813 *) 5814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5815 for as_dir in $PATH 5816 do 5817 IFS=$as_save_IFS 5818 test -z "$as_dir" && as_dir=. 5819 for ac_exec_ext in '' $ac_executable_extensions; do 5820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5821 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext" 5822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5823 break 2 5824 fi 5825 done 5826 done 5827 IFS=$as_save_IFS 5828 5829 ;; 5830 esac 5831 fi 5832 WC=$ac_cv_path_WC 5833 if test -n "$WC"; then 5834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5 5835 $as_echo "$WC" >&6; } 5836 else 5837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5838 $as_echo "no" >&6; } 5839 fi 5840 5841 5842 test -n "$WC" && break 5843 done 5844 5845 5846 if test "x$WC" = x; then 5847 if test "xwc" = x; then 5848 PROG_NAME=wc 5849 else 5850 PROG_NAME=wc 5851 fi 5852 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5853 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5854 as_fn_error $? "Cannot continue" "$LINENO" 5 5855 fi 5856 5857 5858 5859 for ac_prog in which 5860 do 5861 # Extract the first word of "$ac_prog", so it can be a program name with args. 5862 set dummy $ac_prog; ac_word=$2 5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5864 $as_echo_n "checking for $ac_word... " >&6; } 5865 if ${ac_cv_path_WHICH+:} false; then : 5866 $as_echo_n "(cached) " >&6 5867 else 5868 case $WHICH in 5869 [\\/]* | ?:[\\/]*) 5870 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path. 5871 ;; 5872 *) 5873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5874 for as_dir in $PATH 5875 do 5876 IFS=$as_save_IFS 5877 test -z "$as_dir" && as_dir=. 5878 for ac_exec_ext in '' $ac_executable_extensions; do 5879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5880 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext" 5881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5882 break 2 5883 fi 5884 done 5885 done 5886 IFS=$as_save_IFS 5887 5888 ;; 5889 esac 5890 fi 5891 WHICH=$ac_cv_path_WHICH 5892 if test -n "$WHICH"; then 5893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5 5894 $as_echo "$WHICH" >&6; } 5895 else 5896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5897 $as_echo "no" >&6; } 5898 fi 5899 5900 5901 test -n "$WHICH" && break 5902 done 5903 5904 5905 if test "x$WHICH" = x; then 5906 if test "xwhich" = x; then 5907 PROG_NAME=which 5908 else 5909 PROG_NAME=which 5910 fi 5911 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5912 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5913 as_fn_error $? "Cannot continue" "$LINENO" 5 5914 fi 5915 5916 5917 5918 for ac_prog in xargs 5919 do 5920 # Extract the first word of "$ac_prog", so it can be a program name with args. 5921 set dummy $ac_prog; ac_word=$2 5922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5923 $as_echo_n "checking for $ac_word... " >&6; } 5924 if ${ac_cv_path_XARGS+:} false; then : 5925 $as_echo_n "(cached) " >&6 5926 else 5927 case $XARGS in 5928 [\\/]* | ?:[\\/]*) 5929 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path. 5930 ;; 5931 *) 5932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5933 for as_dir in $PATH 5934 do 5935 IFS=$as_save_IFS 5936 test -z "$as_dir" && as_dir=. 5937 for ac_exec_ext in '' $ac_executable_extensions; do 5938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5939 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext" 5940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5941 break 2 5942 fi 5943 done 5944 done 5945 IFS=$as_save_IFS 5946 5947 ;; 5948 esac 5949 fi 5950 XARGS=$ac_cv_path_XARGS 5951 if test -n "$XARGS"; then 5952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5 5953 $as_echo "$XARGS" >&6; } 5954 else 5955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5956 $as_echo "no" >&6; } 5957 fi 5958 5959 5960 test -n "$XARGS" && break 5961 done 5962 5963 5964 if test "x$XARGS" = x; then 5965 if test "xxargs" = x; then 5966 PROG_NAME=xargs 5967 else 5968 PROG_NAME=xargs 5969 fi 5970 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5971 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5972 as_fn_error $? "Cannot continue" "$LINENO" 5 5973 fi 5974 5975 5976 5977 # Then required tools that require some special treatment. 5978 for ac_prog in gawk mawk nawk awk 5979 do 5980 # Extract the first word of "$ac_prog", so it can be a program name with args. 5981 set dummy $ac_prog; ac_word=$2 5982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5983 $as_echo_n "checking for $ac_word... " >&6; } 5984 if ${ac_cv_prog_AWK+:} false; then : 5985 $as_echo_n "(cached) " >&6 5986 else 5987 if test -n "$AWK"; then 5988 ac_cv_prog_AWK="$AWK" # Let the user override the test. 5989 else 5990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5991 for as_dir in $PATH 5992 do 5993 IFS=$as_save_IFS 5994 test -z "$as_dir" && as_dir=. 5995 for ac_exec_ext in '' $ac_executable_extensions; do 5996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5997 ac_cv_prog_AWK="$ac_prog" 5998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5999 break 2 6000 fi 6001 done 6002 done 6003 IFS=$as_save_IFS 6004 6005 fi 6006 fi 6007 AWK=$ac_cv_prog_AWK 6008 if test -n "$AWK"; then 6009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 6010 $as_echo "$AWK" >&6; } 6011 else 6012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6013 $as_echo "no" >&6; } 6014 fi 6015 6016 6017 test -n "$AWK" && break 6018 done 6019 6020 6021 if test "x$AWK" = x; then 6022 if test "x" = x; then 6023 PROG_NAME=awk 6024 else 6025 PROG_NAME= 6026 fi 6027 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6028 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6029 as_fn_error $? "Cannot continue" "$LINENO" 5 6030 fi 6031 6032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 6033 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } 6034 if ${ac_cv_path_GREP+:} false; then : 6035 $as_echo_n "(cached) " >&6 6036 else 6037 if test -z "$GREP"; then 6038 ac_path_GREP_found=false 6039 # Loop through the user's path and test for each of PROGNAME-LIST 6040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6041 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6042 do 6043 IFS=$as_save_IFS 6044 test -z "$as_dir" && as_dir=. 6045 for ac_prog in grep ggrep; do 6046 for ac_exec_ext in '' $ac_executable_extensions; do 6047 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 6048 as_fn_executable_p "$ac_path_GREP" || continue 6049 # Check for GNU ac_path_GREP and select it if it is found. 6050 # Check for GNU $ac_path_GREP 6051 case `"$ac_path_GREP" --version 2>&1` in 6052 *GNU*) 6053 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 6054 *) 6055 ac_count=0 6056 $as_echo_n 0123456789 >"conftest.in" 6057 while : 6058 do 6059 cat "conftest.in" "conftest.in" >"conftest.tmp" 6060 mv "conftest.tmp" "conftest.in" 6061 cp "conftest.in" "conftest.nl" 6062 $as_echo 'GREP' >> "conftest.nl" 6063 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6064 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6065 as_fn_arith $ac_count + 1 && ac_count=$as_val 6066 if test $ac_count -gt ${ac_path_GREP_max-0}; then 6067 # Best one so far, save it but keep looking for a better one 6068 ac_cv_path_GREP="$ac_path_GREP" 6069 ac_path_GREP_max=$ac_count 6070 fi 6071 # 10*(2^10) chars as input seems more than enough 6072 test $ac_count -gt 10 && break 6073 done 6074 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6075 esac 6076 6077 $ac_path_GREP_found && break 3 6078 done 6079 done 6080 done 6081 IFS=$as_save_IFS 6082 if test -z "$ac_cv_path_GREP"; then 6083 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6084 fi 6085 else 6086 ac_cv_path_GREP=$GREP 6087 fi 6088 6089 fi 6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 6091 $as_echo "$ac_cv_path_GREP" >&6; } 6092 GREP="$ac_cv_path_GREP" 6093 6094 6095 6096 if test "x$GREP" = x; then 6097 if test "x" = x; then 6098 PROG_NAME=grep 6099 else 6100 PROG_NAME= 6101 fi 6102 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6103 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6104 as_fn_error $? "Cannot continue" "$LINENO" 5 6105 fi 6106 6107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 6108 $as_echo_n "checking for egrep... " >&6; } 6109 if ${ac_cv_path_EGREP+:} false; then : 6110 $as_echo_n "(cached) " >&6 6111 else 6112 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 6113 then ac_cv_path_EGREP="$GREP -E" 6114 else 6115 if test -z "$EGREP"; then 6116 ac_path_EGREP_found=false 6117 # Loop through the user's path and test for each of PROGNAME-LIST 6118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6119 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6120 do 6121 IFS=$as_save_IFS 6122 test -z "$as_dir" && as_dir=. 6123 for ac_prog in egrep; do 6124 for ac_exec_ext in '' $ac_executable_extensions; do 6125 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 6126 as_fn_executable_p "$ac_path_EGREP" || continue 6127 # Check for GNU ac_path_EGREP and select it if it is found. 6128 # Check for GNU $ac_path_EGREP 6129 case `"$ac_path_EGREP" --version 2>&1` in 6130 *GNU*) 6131 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 6132 *) 6133 ac_count=0 6134 $as_echo_n 0123456789 >"conftest.in" 6135 while : 6136 do 6137 cat "conftest.in" "conftest.in" >"conftest.tmp" 6138 mv "conftest.tmp" "conftest.in" 6139 cp "conftest.in" "conftest.nl" 6140 $as_echo 'EGREP' >> "conftest.nl" 6141 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6142 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6143 as_fn_arith $ac_count + 1 && ac_count=$as_val 6144 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 6145 # Best one so far, save it but keep looking for a better one 6146 ac_cv_path_EGREP="$ac_path_EGREP" 6147 ac_path_EGREP_max=$ac_count 6148 fi 6149 # 10*(2^10) chars as input seems more than enough 6150 test $ac_count -gt 10 && break 6151 done 6152 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6153 esac 6154 6155 $ac_path_EGREP_found && break 3 6156 done 6157 done 6158 done 6159 IFS=$as_save_IFS 6160 if test -z "$ac_cv_path_EGREP"; then 6161 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6162 fi 6163 else 6164 ac_cv_path_EGREP=$EGREP 6165 fi 6166 6167 fi 6168 fi 6169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 6170 $as_echo "$ac_cv_path_EGREP" >&6; } 6171 EGREP="$ac_cv_path_EGREP" 6172 6173 6174 6175 if test "x$EGREP" = x; then 6176 if test "x" = x; then 6177 PROG_NAME=egrep 6178 else 6179 PROG_NAME= 6180 fi 6181 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6182 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6183 as_fn_error $? "Cannot continue" "$LINENO" 5 6184 fi 6185 6186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 6187 $as_echo_n "checking for fgrep... " >&6; } 6188 if ${ac_cv_path_FGREP+:} false; then : 6189 $as_echo_n "(cached) " >&6 6190 else 6191 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 6192 then ac_cv_path_FGREP="$GREP -F" 6193 else 6194 if test -z "$FGREP"; then 6195 ac_path_FGREP_found=false 6196 # Loop through the user's path and test for each of PROGNAME-LIST 6197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6198 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6199 do 6200 IFS=$as_save_IFS 6201 test -z "$as_dir" && as_dir=. 6202 for ac_prog in fgrep; do 6203 for ac_exec_ext in '' $ac_executable_extensions; do 6204 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" 6205 as_fn_executable_p "$ac_path_FGREP" || continue 6206 # Check for GNU ac_path_FGREP and select it if it is found. 6207 # Check for GNU $ac_path_FGREP 6208 case `"$ac_path_FGREP" --version 2>&1` in 6209 *GNU*) 6210 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; 6211 *) 6212 ac_count=0 6213 $as_echo_n 0123456789 >"conftest.in" 6214 while : 6215 do 6216 cat "conftest.in" "conftest.in" >"conftest.tmp" 6217 mv "conftest.tmp" "conftest.in" 6218 cp "conftest.in" "conftest.nl" 6219 $as_echo 'FGREP' >> "conftest.nl" 6220 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break 6221 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6222 as_fn_arith $ac_count + 1 && ac_count=$as_val 6223 if test $ac_count -gt ${ac_path_FGREP_max-0}; then 6224 # Best one so far, save it but keep looking for a better one 6225 ac_cv_path_FGREP="$ac_path_FGREP" 6226 ac_path_FGREP_max=$ac_count 6227 fi 6228 # 10*(2^10) chars as input seems more than enough 6229 test $ac_count -gt 10 && break 6230 done 6231 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6232 esac 6233 6234 $ac_path_FGREP_found && break 3 6235 done 6236 done 6237 done 6238 IFS=$as_save_IFS 6239 if test -z "$ac_cv_path_FGREP"; then 6240 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6241 fi 6242 else 6243 ac_cv_path_FGREP=$FGREP 6244 fi 6245 6246 fi 6247 fi 6248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 6249 $as_echo "$ac_cv_path_FGREP" >&6; } 6250 FGREP="$ac_cv_path_FGREP" 6251 6252 6253 6254 if test "x$FGREP" = x; then 6255 if test "x" = x; then 6256 PROG_NAME=fgrep 6257 else 6258 PROG_NAME= 6259 fi 6260 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6261 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6262 as_fn_error $? "Cannot continue" "$LINENO" 5 6263 fi 6264 6265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 6266 $as_echo_n "checking for a sed that does not truncate output... " >&6; } 6267 if ${ac_cv_path_SED+:} false; then : 6268 $as_echo_n "(cached) " >&6 6269 else 6270 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ 6271 for ac_i in 1 2 3 4 5 6 7; do 6272 ac_script="$ac_script$as_nl$ac_script" 6273 done 6274 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed 6275 { ac_script=; unset ac_script;} 6276 if test -z "$SED"; then 6277 ac_path_SED_found=false 6278 # Loop through the user's path and test for each of PROGNAME-LIST 6279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6280 for as_dir in $PATH 6281 do 6282 IFS=$as_save_IFS 6283 test -z "$as_dir" && as_dir=. 6284 for ac_prog in sed gsed; do 6285 for ac_exec_ext in '' $ac_executable_extensions; do 6286 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" 6287 as_fn_executable_p "$ac_path_SED" || continue 6288 # Check for GNU ac_path_SED and select it if it is found. 6289 # Check for GNU $ac_path_SED 6290 case `"$ac_path_SED" --version 2>&1` in 6291 *GNU*) 6292 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; 6293 *) 6294 ac_count=0 6295 $as_echo_n 0123456789 >"conftest.in" 6296 while : 6297 do 6298 cat "conftest.in" "conftest.in" >"conftest.tmp" 6299 mv "conftest.tmp" "conftest.in" 6300 cp "conftest.in" "conftest.nl" 6301 $as_echo '' >> "conftest.nl" 6302 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break 6303 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6304 as_fn_arith $ac_count + 1 && ac_count=$as_val 6305 if test $ac_count -gt ${ac_path_SED_max-0}; then 6306 # Best one so far, save it but keep looking for a better one 6307 ac_cv_path_SED="$ac_path_SED" 6308 ac_path_SED_max=$ac_count 6309 fi 6310 # 10*(2^10) chars as input seems more than enough 6311 test $ac_count -gt 10 && break 6312 done 6313 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6314 esac 6315 6316 $ac_path_SED_found && break 3 6317 done 6318 done 6319 done 6320 IFS=$as_save_IFS 6321 if test -z "$ac_cv_path_SED"; then 6322 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 6323 fi 6324 else 6325 ac_cv_path_SED=$SED 6326 fi 6327 6328 fi 6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 6330 $as_echo "$ac_cv_path_SED" >&6; } 6331 SED="$ac_cv_path_SED" 6332 rm -f conftest.sed 6333 6334 6335 if test "x$SED" = x; then 6336 if test "x" = x; then 6337 PROG_NAME=sed 6338 else 6339 PROG_NAME= 6340 fi 6341 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6342 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6343 as_fn_error $? "Cannot continue" "$LINENO" 5 6344 fi 6345 6346 6347 for ac_prog in nawk gawk awk 6348 do 6349 # Extract the first word of "$ac_prog", so it can be a program name with args. 6350 set dummy $ac_prog; ac_word=$2 6351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6352 $as_echo_n "checking for $ac_word... " >&6; } 6353 if ${ac_cv_path_NAWK+:} false; then : 6354 $as_echo_n "(cached) " >&6 6355 else 6356 case $NAWK in 6357 [\\/]* | ?:[\\/]*) 6358 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path. 6359 ;; 6360 *) 6361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6362 for as_dir in $PATH 6363 do 6364 IFS=$as_save_IFS 6365 test -z "$as_dir" && as_dir=. 6366 for ac_exec_ext in '' $ac_executable_extensions; do 6367 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6368 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext" 6369 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6370 break 2 6371 fi 6372 done 6373 done 6374 IFS=$as_save_IFS 6375 6376 ;; 6377 esac 6378 fi 6379 NAWK=$ac_cv_path_NAWK 6380 if test -n "$NAWK"; then 6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5 6382 $as_echo "$NAWK" >&6; } 6383 else 6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6385 $as_echo "no" >&6; } 6386 fi 6387 6388 6389 test -n "$NAWK" && break 6390 done 6391 6392 6393 if test "x$NAWK" = x; then 6394 if test "x" = x; then 6395 PROG_NAME=nawk 6396 else 6397 PROG_NAME= 6398 fi 6399 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6400 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6401 as_fn_error $? "Cannot continue" "$LINENO" 5 6402 fi 6403 6404 6405 # Always force rm. 6406 RM="$RM -f" 6407 6408 # pwd behaves differently on various platforms and some don't support the -L flag. 6409 # Always use the bash builtin pwd to get uniform behavior. 6410 THEPWDCMD=pwd 6411 6412 # These are not required on all platforms 6413 # Extract the first word of "cygpath", so it can be a program name with args. 6414 set dummy cygpath; ac_word=$2 6415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6416 $as_echo_n "checking for $ac_word... " >&6; } 6417 if ${ac_cv_path_CYGPATH+:} false; then : 6418 $as_echo_n "(cached) " >&6 6419 else 6420 case $CYGPATH in 6421 [\\/]* | ?:[\\/]*) 6422 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path. 6423 ;; 6424 *) 6425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6426 for as_dir in $PATH 6427 do 6428 IFS=$as_save_IFS 6429 test -z "$as_dir" && as_dir=. 6430 for ac_exec_ext in '' $ac_executable_extensions; do 6431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6432 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext" 6433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6434 break 2 6435 fi 6436 done 6437 done 6438 IFS=$as_save_IFS 6439 6440 ;; 6441 esac 6442 fi 6443 CYGPATH=$ac_cv_path_CYGPATH 6444 if test -n "$CYGPATH"; then 6445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 6446 $as_echo "$CYGPATH" >&6; } 6447 else 6448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6449 $as_echo "no" >&6; } 6450 fi 6451 6452 6453 # Extract the first word of "readlink", so it can be a program name with args. 6454 set dummy readlink; ac_word=$2 6455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6456 $as_echo_n "checking for $ac_word... " >&6; } 6457 if ${ac_cv_path_READLINK+:} false; then : 6458 $as_echo_n "(cached) " >&6 6459 else 6460 case $READLINK in 6461 [\\/]* | ?:[\\/]*) 6462 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path. 6463 ;; 6464 *) 6465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6466 for as_dir in $PATH 6467 do 6468 IFS=$as_save_IFS 6469 test -z "$as_dir" && as_dir=. 6470 for ac_exec_ext in '' $ac_executable_extensions; do 6471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6472 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext" 6473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6474 break 2 6475 fi 6476 done 6477 done 6478 IFS=$as_save_IFS 6479 6480 ;; 6481 esac 6482 fi 6483 READLINK=$ac_cv_path_READLINK 6484 if test -n "$READLINK"; then 6485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5 6486 $as_echo "$READLINK" >&6; } 6487 else 6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6489 $as_echo "no" >&6; } 6490 fi 6491 6492 6493 # Extract the first word of "df", so it can be a program name with args. 6494 set dummy df; ac_word=$2 6495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6496 $as_echo_n "checking for $ac_word... " >&6; } 6497 if ${ac_cv_path_DF+:} false; then : 6498 $as_echo_n "(cached) " >&6 6499 else 6500 case $DF in 6501 [\\/]* | ?:[\\/]*) 6502 ac_cv_path_DF="$DF" # Let the user override the test with a path. 6503 ;; 6504 *) 6505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6506 for as_dir in $PATH 6507 do 6508 IFS=$as_save_IFS 6509 test -z "$as_dir" && as_dir=. 6510 for ac_exec_ext in '' $ac_executable_extensions; do 6511 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6512 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext" 6513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6514 break 2 6515 fi 6516 done 6517 done 6518 IFS=$as_save_IFS 6519 6520 ;; 6521 esac 6522 fi 6523 DF=$ac_cv_path_DF 6524 if test -n "$DF"; then 6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5 6526 $as_echo "$DF" >&6; } 6527 else 6528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6529 $as_echo "no" >&6; } 6530 fi 6531 6532 6533 # Extract the first word of "SetFile", so it can be a program name with args. 6534 set dummy SetFile; ac_word=$2 6535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6536 $as_echo_n "checking for $ac_word... " >&6; } 6537 if ${ac_cv_path_SETFILE+:} false; then : 6538 $as_echo_n "(cached) " >&6 6539 else 6540 case $SETFILE in 6541 [\\/]* | ?:[\\/]*) 6542 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path. 6543 ;; 6544 *) 6545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6546 for as_dir in $PATH 6547 do 6548 IFS=$as_save_IFS 6549 test -z "$as_dir" && as_dir=. 6550 for ac_exec_ext in '' $ac_executable_extensions; do 6551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6552 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext" 6553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6554 break 2 6555 fi 6556 done 6557 done 6558 IFS=$as_save_IFS 6559 6560 ;; 6561 esac 6562 fi 6563 SETFILE=$ac_cv_path_SETFILE 6564 if test -n "$SETFILE"; then 6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5 6566 $as_echo "$SETFILE" >&6; } 6567 else 6568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6569 $as_echo "no" >&6; } 6570 fi 6571 6572 6573 6574 6575 # Now we can determine OpenJDK build and target platforms. This is required to 6576 # have early on. 6577 # Make sure we can run config.sub. 6578 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 6579 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 6580 6581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 6582 $as_echo_n "checking build system type... " >&6; } 6583 if ${ac_cv_build+:} false; then : 6584 $as_echo_n "(cached) " >&6 6585 else 6586 ac_build_alias=$build_alias 6587 test "x$ac_build_alias" = x && 6588 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 6589 test "x$ac_build_alias" = x && 6590 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 6591 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 6592 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 6593 6594 fi 6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 6596 $as_echo "$ac_cv_build" >&6; } 6597 case $ac_cv_build in 6598 *-*-*) ;; 6599 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 6600 esac 6601 build=$ac_cv_build 6602 ac_save_IFS=$IFS; IFS='-' 6603 set x $ac_cv_build 6604 shift 6605 build_cpu=$1 6606 build_vendor=$2 6607 shift; shift 6608 # Remember, the first character of IFS is used to create $*, 6609 # except with old shells: 6610 build_os=$* 6611 IFS=$ac_save_IFS 6612 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 6613 6614 6615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 6616 $as_echo_n "checking host system type... " >&6; } 6617 if ${ac_cv_host+:} false; then : 6618 $as_echo_n "(cached) " >&6 6619 else 6620 if test "x$host_alias" = x; then 6621 ac_cv_host=$ac_cv_build 6622 else 6623 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 6624 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 6625 fi 6626 6627 fi 6628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 6629 $as_echo "$ac_cv_host" >&6; } 6630 case $ac_cv_host in 6631 *-*-*) ;; 6632 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 6633 esac 6634 host=$ac_cv_host 6635 ac_save_IFS=$IFS; IFS='-' 6636 set x $ac_cv_host 6637 shift 6638 host_cpu=$1 6639 host_vendor=$2 6640 shift; shift 6641 # Remember, the first character of IFS is used to create $*, 6642 # except with old shells: 6643 host_os=$* 6644 IFS=$ac_save_IFS 6645 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 6646 6647 6648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 6649 $as_echo_n "checking target system type... " >&6; } 6650 if ${ac_cv_target+:} false; then : 6651 $as_echo_n "(cached) " >&6 6652 else 6653 if test "x$target_alias" = x; then 6654 ac_cv_target=$ac_cv_host 6655 else 6656 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || 6657 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 6658 fi 6659 6660 fi 6661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 6662 $as_echo "$ac_cv_target" >&6; } 6663 case $ac_cv_target in 6664 *-*-*) ;; 6665 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; 6666 esac 6667 target=$ac_cv_target 6668 ac_save_IFS=$IFS; IFS='-' 6669 set x $ac_cv_target 6670 shift 6671 target_cpu=$1 6672 target_vendor=$2 6673 shift; shift 6674 # Remember, the first character of IFS is used to create $*, 6675 # except with old shells: 6676 target_os=$* 6677 IFS=$ac_save_IFS 6678 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac 6679 6680 6681 # The aliases save the names the user supplied, while $host etc. 6682 # will get canonicalized. 6683 test -n "$target_alias" && 6684 test "$program_prefix$program_suffix$program_transform_name" = \ 6685 NONENONEs,x,x, && 6686 program_prefix=${target_alias}- 6687 6688 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" 6689 # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the 6690 # product you're building. The target of this build is called "host". Since this is confusing to most people, we 6691 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need 6692 # to use the configure naming style. 6693 6694 6695 6696 6697 6698 # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME 6699 # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME 6700 # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build, 6701 # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME. 6702 OPENJDK_TARGET_AUTOCONF_NAME="$host" 6703 OPENJDK_BUILD_AUTOCONF_NAME="$build" 6704 6705 6706 6707 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. 6708 6709 case "$build_os" in 6710 *linux*) 6711 VAR_OS=linux 6712 VAR_OS_API=posix 6713 VAR_OS_ENV=linux 6714 ;; 6715 *solaris*) 6716 VAR_OS=solaris 6717 VAR_OS_API=posix 6718 VAR_OS_ENV=solaris 6719 ;; 6720 *darwin*) 6721 VAR_OS=macosx 6722 VAR_OS_API=posix 6723 VAR_OS_ENV=macosx 6724 ;; 6725 *bsd*) 6726 VAR_OS=bsd 6727 VAR_OS_API=posix 6728 VAR_OS_ENV=bsd 6729 ;; 6730 *cygwin*) 6731 VAR_OS=windows 6732 VAR_OS_API=winapi 6733 VAR_OS_ENV=windows.cygwin 6734 ;; 6735 *mingw*) 6736 VAR_OS=windows 6737 VAR_OS_API=winapi 6738 VAR_OS_ENV=windows.msys 6739 ;; 6740 *) 6741 as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5 6742 ;; 6743 esac 6744 6745 6746 # First argument is the cpu name from the trip/quad 6747 case "$build_cpu" in 6748 x86_64) 6749 VAR_CPU=x86_64 6750 VAR_CPU_ARCH=x86 6751 VAR_CPU_BITS=64 6752 VAR_CPU_ENDIAN=little 6753 ;; 6754 i?86) 6755 VAR_CPU=x86 6756 VAR_CPU_ARCH=x86 6757 VAR_CPU_BITS=32 6758 VAR_CPU_ENDIAN=little 6759 ;; 6760 arm*) 6761 VAR_CPU=arm 6762 VAR_CPU_ARCH=arm 6763 VAR_CPU_BITS=32 6764 VAR_CPU_ENDIAN=little 6765 ;; 6766 powerpc) 6767 VAR_CPU=ppc 6768 VAR_CPU_ARCH=ppc 6769 VAR_CPU_BITS=32 6770 VAR_CPU_ENDIAN=big 6771 ;; 6772 powerpc64) 6773 VAR_CPU=ppc64 6774 VAR_CPU_ARCH=ppc 6775 VAR_CPU_BITS=64 6776 VAR_CPU_ENDIAN=big 6777 ;; 6778 sparc) 6779 VAR_CPU=sparc 6780 VAR_CPU_ARCH=sparc 6781 VAR_CPU_BITS=32 6782 VAR_CPU_ENDIAN=big 6783 ;; 6784 sparcv9) 6785 VAR_CPU=sparcv9 6786 VAR_CPU_ARCH=sparc 6787 VAR_CPU_BITS=64 6788 VAR_CPU_ENDIAN=big 6789 ;; 6790 *) 6791 as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5 6792 ;; 6793 esac 6794 6795 # ..and setup our own variables. (Do this explicitely to facilitate searching) 6796 OPENJDK_BUILD_OS="$VAR_OS" 6797 OPENJDK_BUILD_OS_API="$VAR_OS_API" 6798 OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV" 6799 OPENJDK_BUILD_CPU="$VAR_CPU" 6800 OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH" 6801 OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS" 6802 OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN" 6803 6804 6805 6806 6807 6808 6809 6810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5 6811 $as_echo_n "checking openjdk-build os-cpu... " >&6; } 6812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5 6813 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; } 6814 6815 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. 6816 6817 case "$host_os" in 6818 *linux*) 6819 VAR_OS=linux 6820 VAR_OS_API=posix 6821 VAR_OS_ENV=linux 6822 ;; 6823 *solaris*) 6824 VAR_OS=solaris 6825 VAR_OS_API=posix 6826 VAR_OS_ENV=solaris 6827 ;; 6828 *darwin*) 6829 VAR_OS=macosx 6830 VAR_OS_API=posix 6831 VAR_OS_ENV=macosx 6832 ;; 6833 *bsd*) 6834 VAR_OS=bsd 6835 VAR_OS_API=posix 6836 VAR_OS_ENV=bsd 6837 ;; 6838 *cygwin*) 6839 VAR_OS=windows 6840 VAR_OS_API=winapi 6841 VAR_OS_ENV=windows.cygwin 6842 ;; 6843 *mingw*) 6844 VAR_OS=windows 6845 VAR_OS_API=winapi 6846 VAR_OS_ENV=windows.msys 6847 ;; 6848 *) 6849 as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5 6850 ;; 6851 esac 6852 6853 6854 # First argument is the cpu name from the trip/quad 6855 case "$host_cpu" in 6856 x86_64) 6857 VAR_CPU=x86_64 6858 VAR_CPU_ARCH=x86 6859 VAR_CPU_BITS=64 6860 VAR_CPU_ENDIAN=little 6861 ;; 6862 i?86) 6863 VAR_CPU=x86 6864 VAR_CPU_ARCH=x86 6865 VAR_CPU_BITS=32 6866 VAR_CPU_ENDIAN=little 6867 ;; 6868 arm*) 6869 VAR_CPU=arm 6870 VAR_CPU_ARCH=arm 6871 VAR_CPU_BITS=32 6872 VAR_CPU_ENDIAN=little 6873 ;; 6874 powerpc) 6875 VAR_CPU=ppc 6876 VAR_CPU_ARCH=ppc 6877 VAR_CPU_BITS=32 6878 VAR_CPU_ENDIAN=big 6879 ;; 6880 powerpc64) 6881 VAR_CPU=ppc64 6882 VAR_CPU_ARCH=ppc 6883 VAR_CPU_BITS=64 6884 VAR_CPU_ENDIAN=big 6885 ;; 6886 sparc) 6887 VAR_CPU=sparc 6888 VAR_CPU_ARCH=sparc 6889 VAR_CPU_BITS=32 6890 VAR_CPU_ENDIAN=big 6891 ;; 6892 sparcv9) 6893 VAR_CPU=sparcv9 6894 VAR_CPU_ARCH=sparc 6895 VAR_CPU_BITS=64 6896 VAR_CPU_ENDIAN=big 6897 ;; 6898 *) 6899 as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5 6900 ;; 6901 esac 6902 6903 # ... and setup our own variables. (Do this explicitely to facilitate searching) 6904 OPENJDK_TARGET_OS="$VAR_OS" 6905 OPENJDK_TARGET_OS_API="$VAR_OS_API" 6906 OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV" 6907 OPENJDK_TARGET_CPU="$VAR_CPU" 6908 OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH" 6909 OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS" 6910 OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN" 6911 6912 6913 6914 6915 6916 6917 6918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5 6919 $as_echo_n "checking openjdk-target os-cpu... " >&6; } 6920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5 6921 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; } 6922 6923 6924 6925 # Check whether --with-target-bits was given. 6926 if test "${with_target_bits+set}" = set; then : 6927 withval=$with_target_bits; 6928 fi 6929 6930 6931 # We have three types of compiles: 6932 # native == normal compilation, target system == build system 6933 # cross == traditional cross compilation, target system != build system; special toolchain needed 6934 # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines 6935 # 6936 if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then 6937 # We're doing a proper cross-compilation 6938 COMPILE_TYPE="cross" 6939 else 6940 COMPILE_TYPE="native" 6941 fi 6942 6943 if test "x$with_target_bits" != x; then 6944 if test "x$COMPILE_TYPE" = "xcross"; then 6945 as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5 6946 fi 6947 6948 if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 6949 # A reduced build is requested 6950 COMPILE_TYPE="reduced" 6951 OPENJDK_TARGET_CPU_BITS=32 6952 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then 6953 OPENJDK_TARGET_CPU=x86 6954 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then 6955 OPENJDK_TARGET_CPU=sparc 6956 else 6957 as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5 6958 fi 6959 elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 6960 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 6961 elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then 6962 { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5 6963 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;} 6964 else 6965 as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5 6966 fi 6967 fi 6968 6969 6970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5 6971 $as_echo_n "checking compilation type... " >&6; } 6972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5 6973 $as_echo "$COMPILE_TYPE" >&6; } 6974 6975 6976 if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 6977 REQUIRED_OS_NAME=SunOS 6978 REQUIRED_OS_VERSION=5.10 6979 fi 6980 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then 6981 REQUIRED_OS_NAME=Linux 6982 REQUIRED_OS_VERSION=2.6 6983 fi 6984 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 6985 REQUIRED_OS_NAME=Windows 6986 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 6987 REQUIRED_OS_VERSION=5.2 6988 else 6989 REQUIRED_OS_VERSION=5.1 6990 fi 6991 fi 6992 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 6993 REQUIRED_OS_NAME=Darwin 6994 REQUIRED_OS_VERSION=11.2 6995 fi 6996 6997 6998 6999 7000 7001 # Also store the legacy naming of the cpu. 7002 # Ie i586 and amd64 instead of x86 and x86_64 7003 OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU" 7004 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7005 OPENJDK_TARGET_CPU_LEGACY="i586" 7006 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7007 # On all platforms except MacOSX replace x86_64 with amd64. 7008 OPENJDK_TARGET_CPU_LEGACY="amd64" 7009 fi 7010 7011 7012 # And the second legacy naming of the cpu. 7013 # Ie i386 and amd64 instead of x86 and x86_64. 7014 OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU" 7015 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7016 OPENJDK_TARGET_CPU_LEGACY_LIB="i386" 7017 elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7018 OPENJDK_TARGET_CPU_LEGACY_LIB="amd64" 7019 fi 7020 7021 7022 # This is the name of the cpu (but using i386 and amd64 instead of 7023 # x86 and x86_64, respectively), preceeded by a /, to be used when 7024 # locating libraries. On macosx, it's empty, though. 7025 OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB" 7026 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 7027 OPENJDK_TARGET_CPU_LIBDIR="" 7028 fi 7029 7030 7031 # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to 7032 # /amd64 or /sparcv9. This string is appended to some library paths, like this: 7033 # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so 7034 OPENJDK_TARGET_CPU_ISADIR="" 7035 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 7036 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7037 OPENJDK_TARGET_CPU_ISADIR="/amd64" 7038 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then 7039 OPENJDK_TARGET_CPU_ISADIR="/sparcv9" 7040 fi 7041 fi 7042 7043 7044 # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property 7045 OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU" 7046 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then 7047 # On linux only, we replace x86 with i386. 7048 OPENJDK_TARGET_CPU_OSARCH="i386" 7049 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7050 # On all platforms except macosx, we replace x86_64 with amd64. 7051 OPENJDK_TARGET_CPU_OSARCH="amd64" 7052 fi 7053 7054 7055 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU" 7056 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7057 OPENJDK_TARGET_CPU_JLI="i386" 7058 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7059 # On all platforms except macosx, we replace x86_64 with amd64. 7060 OPENJDK_TARGET_CPU_JLI="amd64" 7061 fi 7062 # Now setup the -D flags for building libjli. 7063 OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'" 7064 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 7065 if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then 7066 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'" 7067 elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then 7068 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'" 7069 fi 7070 fi 7071 7072 7073 # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths. 7074 if test "x$OPENJDK_TARGET_OS_API" = xposix; then 7075 OPENJDK_TARGET_OS_API_DIR="solaris" 7076 fi 7077 if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then 7078 OPENJDK_TARGET_OS_API_DIR="windows" 7079 fi 7080 7081 7082 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7083 A_LP64="LP64:=" 7084 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in 7085 # unpack200.exe 7086 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then 7087 ADD_LP64="-D_LP64=1" 7088 fi 7089 fi 7090 LP64=$A_LP64 7091 7092 7093 if test "x$COMPILE_TYPE" = "xcross"; then 7094 # FIXME: ... or should this include reduced builds..? 7095 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY" 7096 else 7097 DEFINE_CROSS_COMPILE_ARCH="" 7098 fi 7099 7100 7101 # ZERO_ARCHDEF is used to enable architecture-specific code 7102 case "${OPENJDK_TARGET_CPU}" in 7103 ppc*) ZERO_ARCHDEF=PPC ;; 7104 s390*) ZERO_ARCHDEF=S390 ;; 7105 sparc*) ZERO_ARCHDEF=SPARC ;; 7106 x86_64*) ZERO_ARCHDEF=AMD64 ;; 7107 x86) ZERO_ARCHDEF=IA32 ;; 7108 *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z) 7109 esac 7110 7111 7112 7113 7114 7115 # Continue setting up basic stuff. Most remaining code require fundamental tools. 7116 7117 # Locate the directory of this script. 7118 SCRIPT="$0" 7119 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L` 7120 7121 # Where is the source? It is located two levels above the configure script. 7122 CURDIR="$PWD" 7123 cd "$AUTOCONF_DIR/../.." 7124 SRC_ROOT="`$THEPWDCMD -L`" 7125 7126 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 7127 PATH_SEP=";" 7128 7129 SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m` 7130 if test $SRC_ROOT_LENGTH -gt 100; then 7131 as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5 7132 fi 7133 7134 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5 7136 $as_echo_n "checking cygwin release... " >&6; } 7137 CYGWIN_VERSION=`$UNAME -r` 7138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5 7139 $as_echo "$CYGWIN_VERSION" >&6; } 7140 WINDOWS_ENV_VENDOR='cygwin' 7141 WINDOWS_ENV_VERSION="$CYGWIN_VERSION" 7142 7143 CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.` 7144 if test "x$CYGWIN_VERSION_OK" = x; then 7145 { $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 7146 $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;} 7147 as_fn_error $? "Cannot continue" "$LINENO" 5 7148 fi 7149 if test "x$CYGPATH" = x; then 7150 as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5 7151 fi 7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5 7153 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; } 7154 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away 7155 cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"` 7156 # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. 7157 CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` 7158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5 7159 $as_echo "$CYGWIN_ROOT_PATH" >&6; } 7160 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" 7161 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` 7162 if test "x$test_cygdrive_prefix" = x; then 7163 as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5 7164 fi 7165 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5 7167 $as_echo_n "checking msys release... " >&6; } 7168 MSYS_VERSION=`$UNAME -r` 7169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5 7170 $as_echo "$MSYS_VERSION" >&6; } 7171 7172 WINDOWS_ENV_VENDOR='msys' 7173 WINDOWS_ENV_VERSION="$MSYS_VERSION" 7174 7175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5 7176 $as_echo_n "checking msys root directory as unix-style path... " >&6; } 7177 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away 7178 MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"` 7179 7180 windows_path="$MSYS_ROOT_PATH" 7181 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7182 unix_path=`$CYGPATH -u "$windows_path"` 7183 MSYS_ROOT_PATH="$unix_path" 7184 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7185 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7186 MSYS_ROOT_PATH="$unix_path" 7187 fi 7188 7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5 7190 $as_echo "$MSYS_ROOT_PATH" >&6; } 7191 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH" 7192 else 7193 as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5 7194 fi 7195 7196 # Test if windows or unix (cygwin/msys) find is first in path. 7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5 7198 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; } 7199 FIND_BINARY_OUTPUT=`find --version 2>&1` 7200 if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then 7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5 7202 $as_echo "unix style" >&6; } 7203 elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then 7204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5 7205 $as_echo "Windows" >&6; } 7206 { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5 7207 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;} 7208 { $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 7209 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;} 7210 as_fn_error $? "Cannot continue" "$LINENO" 5 7211 else 7212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 7213 $as_echo "unknown" >&6; } 7214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5 7215 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;} 7216 fi 7217 7218 else 7219 PATH_SEP=":" 7220 fi 7221 7222 7223 7224 cd "$CURDIR" 7225 7226 7227 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7228 7229 # Input might be given as Windows format, start by converting to 7230 # unix format. 7231 path="$SRC_ROOT" 7232 new_path=`$CYGPATH -u "$path"` 7233 7234 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7235 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7236 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7237 # "foo.exe" is OK but "foo" is an error. 7238 # 7239 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7240 # It is also a way to make sure we got the proper file name for the real test later on. 7241 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7242 if test "x$test_shortpath" = x; then 7243 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7244 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7245 as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5 7246 fi 7247 7248 # Call helper function which possibly converts this using DOS-style short mode. 7249 # If so, the updated path is stored in $new_path. 7250 7251 input_path="$new_path" 7252 # Check if we need to convert this using DOS-style short mode. If the path 7253 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7254 # take no chances and rewrite it. 7255 # Note: m4 eats our [], so we need to use [ and ] instead. 7256 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7257 if test "x$has_forbidden_chars" != x; then 7258 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7259 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7260 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7261 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7262 # Going to short mode and back again did indeed matter. Since short mode is 7263 # case insensitive, let's make it lowercase to improve readability. 7264 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7265 # Now convert it back to Unix-stile (cygpath) 7266 input_path=`$CYGPATH -u "$shortmode_path"` 7267 new_path="$input_path" 7268 fi 7269 fi 7270 7271 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7272 if test "x$test_cygdrive_prefix" = x; then 7273 # As a simple fix, exclude /usr/bin since it's not a real path. 7274 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7275 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7276 # a path prefixed by /cygdrive for fixpath to work. 7277 new_path="$CYGWIN_ROOT_PATH$input_path" 7278 fi 7279 fi 7280 7281 7282 if test "x$path" != "x$new_path"; then 7283 SRC_ROOT="$new_path" 7284 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7285 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7286 fi 7287 7288 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7289 7290 path="$SRC_ROOT" 7291 has_colon=`$ECHO $path | $GREP ^.:` 7292 new_path="$path" 7293 if test "x$has_colon" = x; then 7294 # Not in mixed or Windows style, start by that. 7295 new_path=`cmd //c echo $path` 7296 fi 7297 7298 7299 input_path="$new_path" 7300 # Check if we need to convert this using DOS-style short mode. If the path 7301 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7302 # take no chances and rewrite it. 7303 # Note: m4 eats our [], so we need to use [ and ] instead. 7304 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7305 if test "x$has_forbidden_chars" != x; then 7306 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7307 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7308 fi 7309 7310 7311 windows_path="$new_path" 7312 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7313 unix_path=`$CYGPATH -u "$windows_path"` 7314 new_path="$unix_path" 7315 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7316 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7317 new_path="$unix_path" 7318 fi 7319 7320 if test "x$path" != "x$new_path"; then 7321 SRC_ROOT="$new_path" 7322 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7323 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7324 fi 7325 7326 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7327 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7328 7329 else 7330 # We're on a posix platform. Hooray! :) 7331 path="$SRC_ROOT" 7332 has_space=`$ECHO "$path" | $GREP " "` 7333 if test "x$has_space" != x; then 7334 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7335 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7336 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7337 fi 7338 7339 # Use eval to expand a potential ~ 7340 eval path="$path" 7341 if test ! -f "$path" && test ! -d "$path"; then 7342 as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 7343 fi 7344 7345 SRC_ROOT="`cd "$path"; $THEPWDCMD -L`" 7346 fi 7347 7348 7349 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7350 7351 # Input might be given as Windows format, start by converting to 7352 # unix format. 7353 path="$CURDIR" 7354 new_path=`$CYGPATH -u "$path"` 7355 7356 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7357 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7358 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7359 # "foo.exe" is OK but "foo" is an error. 7360 # 7361 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7362 # It is also a way to make sure we got the proper file name for the real test later on. 7363 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7364 if test "x$test_shortpath" = x; then 7365 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7366 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7367 as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5 7368 fi 7369 7370 # Call helper function which possibly converts this using DOS-style short mode. 7371 # If so, the updated path is stored in $new_path. 7372 7373 input_path="$new_path" 7374 # Check if we need to convert this using DOS-style short mode. If the path 7375 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7376 # take no chances and rewrite it. 7377 # Note: m4 eats our [], so we need to use [ and ] instead. 7378 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7379 if test "x$has_forbidden_chars" != x; then 7380 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7381 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7382 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7383 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7384 # Going to short mode and back again did indeed matter. Since short mode is 7385 # case insensitive, let's make it lowercase to improve readability. 7386 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7387 # Now convert it back to Unix-stile (cygpath) 7388 input_path=`$CYGPATH -u "$shortmode_path"` 7389 new_path="$input_path" 7390 fi 7391 fi 7392 7393 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7394 if test "x$test_cygdrive_prefix" = x; then 7395 # As a simple fix, exclude /usr/bin since it's not a real path. 7396 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7397 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7398 # a path prefixed by /cygdrive for fixpath to work. 7399 new_path="$CYGWIN_ROOT_PATH$input_path" 7400 fi 7401 fi 7402 7403 7404 if test "x$path" != "x$new_path"; then 7405 CURDIR="$new_path" 7406 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7407 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7408 fi 7409 7410 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7411 7412 path="$CURDIR" 7413 has_colon=`$ECHO $path | $GREP ^.:` 7414 new_path="$path" 7415 if test "x$has_colon" = x; then 7416 # Not in mixed or Windows style, start by that. 7417 new_path=`cmd //c echo $path` 7418 fi 7419 7420 7421 input_path="$new_path" 7422 # Check if we need to convert this using DOS-style short mode. If the path 7423 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7424 # take no chances and rewrite it. 7425 # Note: m4 eats our [], so we need to use [ and ] instead. 7426 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7427 if test "x$has_forbidden_chars" != x; then 7428 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7429 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7430 fi 7431 7432 7433 windows_path="$new_path" 7434 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7435 unix_path=`$CYGPATH -u "$windows_path"` 7436 new_path="$unix_path" 7437 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7438 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7439 new_path="$unix_path" 7440 fi 7441 7442 if test "x$path" != "x$new_path"; then 7443 CURDIR="$new_path" 7444 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7445 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7446 fi 7447 7448 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7449 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7450 7451 else 7452 # We're on a posix platform. Hooray! :) 7453 path="$CURDIR" 7454 has_space=`$ECHO "$path" | $GREP " "` 7455 if test "x$has_space" != x; then 7456 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7457 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7458 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7459 fi 7460 7461 # Use eval to expand a potential ~ 7462 eval path="$path" 7463 if test ! -f "$path" && test ! -d "$path"; then 7464 as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5 7465 fi 7466 7467 CURDIR="`cd "$path"; $THEPWDCMD -L`" 7468 fi 7469 7470 7471 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then 7472 # Add extra search paths on solaris for utilities like ar and as etc... 7473 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" 7474 fi 7475 7476 # You can force the sys-root if the sys-root encoded into the cross compiler tools 7477 # is not correct. 7478 7479 # Check whether --with-sys-root was given. 7480 if test "${with_sys_root+set}" = set; then : 7481 withval=$with_sys_root; 7482 fi 7483 7484 7485 if test "x$with_sys_root" != x; then 7486 SYS_ROOT=$with_sys_root 7487 else 7488 SYS_ROOT=/ 7489 fi 7490 7491 7492 7493 # Check whether --with-tools-dir was given. 7494 if test "${with_tools_dir+set}" = set; then : 7495 withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir 7496 7497 fi 7498 7499 7500 7501 # Check whether --with-devkit was given. 7502 if test "${with_devkit+set}" = set; then : 7503 withval=$with_devkit; 7504 if test "x$with_sys_root" != x; then 7505 as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5 7506 fi 7507 7508 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7509 7510 # Input might be given as Windows format, start by converting to 7511 # unix format. 7512 path="$with_devkit" 7513 new_path=`$CYGPATH -u "$path"` 7514 7515 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7516 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7517 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7518 # "foo.exe" is OK but "foo" is an error. 7519 # 7520 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7521 # It is also a way to make sure we got the proper file name for the real test later on. 7522 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7523 if test "x$test_shortpath" = x; then 7524 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5 7525 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;} 7526 as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5 7527 fi 7528 7529 # Call helper function which possibly converts this using DOS-style short mode. 7530 # If so, the updated path is stored in $new_path. 7531 7532 input_path="$new_path" 7533 # Check if we need to convert this using DOS-style short mode. If the path 7534 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7535 # take no chances and rewrite it. 7536 # Note: m4 eats our [], so we need to use [ and ] instead. 7537 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7538 if test "x$has_forbidden_chars" != x; then 7539 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7540 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7541 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7542 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7543 # Going to short mode and back again did indeed matter. Since short mode is 7544 # case insensitive, let's make it lowercase to improve readability. 7545 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7546 # Now convert it back to Unix-stile (cygpath) 7547 input_path=`$CYGPATH -u "$shortmode_path"` 7548 new_path="$input_path" 7549 fi 7550 fi 7551 7552 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7553 if test "x$test_cygdrive_prefix" = x; then 7554 # As a simple fix, exclude /usr/bin since it's not a real path. 7555 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7556 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7557 # a path prefixed by /cygdrive for fixpath to work. 7558 new_path="$CYGWIN_ROOT_PATH$input_path" 7559 fi 7560 fi 7561 7562 7563 if test "x$path" != "x$new_path"; then 7564 with_devkit="$new_path" 7565 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5 7566 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;} 7567 fi 7568 7569 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7570 7571 path="$with_devkit" 7572 has_colon=`$ECHO $path | $GREP ^.:` 7573 new_path="$path" 7574 if test "x$has_colon" = x; then 7575 # Not in mixed or Windows style, start by that. 7576 new_path=`cmd //c echo $path` 7577 fi 7578 7579 7580 input_path="$new_path" 7581 # Check if we need to convert this using DOS-style short mode. If the path 7582 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7583 # take no chances and rewrite it. 7584 # Note: m4 eats our [], so we need to use [ and ] instead. 7585 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7586 if test "x$has_forbidden_chars" != x; then 7587 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7588 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7589 fi 7590 7591 7592 windows_path="$new_path" 7593 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7594 unix_path=`$CYGPATH -u "$windows_path"` 7595 new_path="$unix_path" 7596 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7597 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7598 new_path="$unix_path" 7599 fi 7600 7601 if test "x$path" != "x$new_path"; then 7602 with_devkit="$new_path" 7603 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5 7604 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;} 7605 fi 7606 7607 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7608 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7609 7610 else 7611 # We're on a posix platform. Hooray! :) 7612 path="$with_devkit" 7613 has_space=`$ECHO "$path" | $GREP " "` 7614 if test "x$has_space" != x; then 7615 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5 7616 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;} 7617 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7618 fi 7619 7620 # Use eval to expand a potential ~ 7621 eval path="$path" 7622 if test ! -f "$path" && test ! -d "$path"; then 7623 as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5 7624 fi 7625 7626 with_devkit="`cd "$path"; $THEPWDCMD -L`" 7627 fi 7628 7629 7630 if test "x$TOOLS_DIR" = x; then 7631 TOOLS_DIR="$with_devkit/bin" 7632 else 7633 TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin" 7634 fi 7635 7636 if test -d "$with_devkit/$host_alias/libc"; then 7637 SYS_ROOT=$with_devkit/$host_alias/libc 7638 elif test -d "$with_devkit/$host/sys-root"; then 7639 SYS_ROOT=$with_devkit/$host/sys-root 7640 fi 7641 7642 fi 7643 7644 7645 7646 # Setup default logging of stdout and stderr to build.log in the output root. 7647 BUILD_LOG='$(OUTPUT_ROOT)/build.log' 7648 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old' 7649 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)' 7650 7651 7652 7653 7654 7655 # Check if it's a pure open build or if custom sources are to be used. 7656 7657 # Check whether --enable-openjdk-only was given. 7658 if test "${enable_openjdk_only+set}" = set; then : 7659 enableval=$enable_openjdk_only; 7660 else 7661 enable_openjdk_only="no" 7662 fi 7663 7664 7665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5 7666 $as_echo_n "checking for presence of closed sources... " >&6; } 7667 if test -d "$SRC_ROOT/jdk/src/closed"; then 7668 CLOSED_SOURCE_PRESENT=yes 7669 else 7670 CLOSED_SOURCE_PRESENT=no 7671 fi 7672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5 7673 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; } 7674 7675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5 7676 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; } 7677 SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only" 7678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5 7679 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; } 7680 7681 if test "x$CLOSED_SOURCE_PRESENT" = xno; then 7682 OPENJDK=true 7683 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 7684 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5 7685 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;} 7686 fi 7687 else 7688 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 7689 OPENJDK=true 7690 else 7691 OPENJDK=false 7692 fi 7693 fi 7694 7695 if test "x$OPENJDK" = "xtrue"; then 7696 SET_OPENJDK="OPENJDK=true" 7697 fi 7698 7699 7700 7701 7702 # These are needed to be able to create a configuration name (and thus the output directory) 7703 7704 ############################################################################### 7705 # 7706 # Check which variant of the JDK that we want to build. 7707 # Currently we have: 7708 # normal: standard edition 7709 # but the custom make system may add other variants 7710 # 7711 # Effectively the JDK variant gives a name to a specific set of 7712 # modules to compile into the JDK. In the future, these modules 7713 # might even be Jigsaw modules. 7714 # 7715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5 7716 $as_echo_n "checking which variant of the JDK to build... " >&6; } 7717 7718 # Check whether --with-jdk-variant was given. 7719 if test "${with_jdk_variant+set}" = set; then : 7720 withval=$with_jdk_variant; 7721 fi 7722 7723 7724 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then 7725 JDK_VARIANT="normal" 7726 else 7727 as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5 7728 fi 7729 7730 7731 7732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5 7733 $as_echo "$JDK_VARIANT" >&6; } 7734 7735 7736 7737 ############################################################################### 7738 # 7739 # Check which variants of the JVM that we want to build. 7740 # Currently we have: 7741 # server: normal interpreter and a tiered C1/C2 compiler 7742 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) 7743 # minimal1: reduced form of client with optional VM services and features stripped out 7744 # kernel: kernel footprint JVM that passes the TCK without major performance problems, 7745 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc 7746 # zero: no machine code interpreter, no compiler 7747 # zeroshark: zero interpreter and shark/llvm compiler backend 7748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5 7749 $as_echo_n "checking which variants of the JVM to build... " >&6; } 7750 7751 # Check whether --with-jvm-variants was given. 7752 if test "${with_jvm_variants+set}" = set; then : 7753 withval=$with_jvm_variants; 7754 fi 7755 7756 7757 if test "x$with_jvm_variants" = x; then 7758 with_jvm_variants="server" 7759 fi 7760 7761 JVM_VARIANTS=",$with_jvm_variants," 7762 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` 7763 7764 if test "x$TEST_VARIANTS" != "x,"; then 7765 as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5 7766 fi 7767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5 7768 $as_echo "$with_jvm_variants" >&6; } 7769 7770 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` 7771 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 7772 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'` 7773 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` 7774 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` 7775 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` 7776 7777 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 7778 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7779 as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5 7780 fi 7781 fi 7782 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 7783 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7784 as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5 7785 fi 7786 fi 7787 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 7788 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7789 as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5 7790 fi 7791 fi 7792 7793 # Replace the commas with AND for use in the build directory name. 7794 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` 7795 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/'` 7796 if test "x$COUNT_VARIANTS" != "x,1"; then 7797 BUILDING_MULTIPLE_JVM_VARIANTS=yes 7798 else 7799 BUILDING_MULTIPLE_JVM_VARIANTS=no 7800 fi 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 INCLUDE_SA=true 7811 if test "x$JVM_VARIANT_ZERO" = xtrue ; then 7812 INCLUDE_SA=false 7813 fi 7814 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then 7815 INCLUDE_SA=false 7816 fi 7817 7818 7819 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 7820 MACOSX_UNIVERSAL="true" 7821 fi 7822 7823 7824 7825 7826 7827 ############################################################################### 7828 # 7829 # Set the debug level 7830 # release: no debug information, all optimizations, no asserts. 7831 # fastdebug: debug information (-g), all optimizations, all asserts 7832 # slowdebug: debug information (-g), no optimizations, all asserts 7833 # 7834 DEBUG_LEVEL="release" 7835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5 7836 $as_echo_n "checking which debug level to use... " >&6; } 7837 # Check whether --enable-debug was given. 7838 if test "${enable_debug+set}" = set; then : 7839 enableval=$enable_debug; 7840 ENABLE_DEBUG="${enableval}" 7841 DEBUG_LEVEL="fastdebug" 7842 7843 else 7844 ENABLE_DEBUG="no" 7845 fi 7846 7847 7848 7849 # Check whether --with-debug-level was given. 7850 if test "${with_debug_level+set}" = set; then : 7851 withval=$with_debug_level; 7852 DEBUG_LEVEL="${withval}" 7853 if test "x$ENABLE_DEBUG" = xyes; then 7854 as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5 7855 fi 7856 7857 fi 7858 7859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5 7860 $as_echo "$DEBUG_LEVEL" >&6; } 7861 7862 if test "x$DEBUG_LEVEL" != xrelease && \ 7863 test "x$DEBUG_LEVEL" != xfastdebug && \ 7864 test "x$DEBUG_LEVEL" != xslowdebug; then 7865 as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5 7866 fi 7867 7868 7869 ############################################################################### 7870 # 7871 # Setup legacy vars/targets and new vars to deal with different debug levels. 7872 # 7873 7874 case $DEBUG_LEVEL in 7875 release ) 7876 VARIANT="OPT" 7877 FASTDEBUG="false" 7878 DEBUG_CLASSFILES="false" 7879 BUILD_VARIANT_RELEASE="" 7880 HOTSPOT_DEBUG_LEVEL="product" 7881 HOTSPOT_EXPORT="product" 7882 ;; 7883 fastdebug ) 7884 VARIANT="DBG" 7885 FASTDEBUG="true" 7886 DEBUG_CLASSFILES="true" 7887 BUILD_VARIANT_RELEASE="-fastdebug" 7888 HOTSPOT_DEBUG_LEVEL="fastdebug" 7889 HOTSPOT_EXPORT="fastdebug" 7890 ;; 7891 slowdebug ) 7892 VARIANT="DBG" 7893 FASTDEBUG="false" 7894 DEBUG_CLASSFILES="true" 7895 BUILD_VARIANT_RELEASE="-debug" 7896 HOTSPOT_DEBUG_LEVEL="jvmg" 7897 HOTSPOT_EXPORT="debug" 7898 ;; 7899 esac 7900 7901 ##### 7902 # Generate the legacy makefile targets for hotspot. 7903 # The hotspot api for selecting the build artifacts, really, needs to be improved. 7904 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to 7905 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc 7906 # But until then ... 7907 HOTSPOT_TARGET="" 7908 7909 if test "x$JVM_VARIANT_SERVER" = xtrue; then 7910 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " 7911 fi 7912 7913 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 7914 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " 7915 fi 7916 7917 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 7918 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " 7919 fi 7920 7921 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 7922 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " 7923 fi 7924 7925 if test "x$JVM_VARIANT_ZERO" = xtrue; then 7926 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " 7927 fi 7928 7929 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 7930 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " 7931 fi 7932 7933 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" 7934 7935 # On Macosx universal binaries are produced, but they only contain 7936 # 64 bit intel. This invalidates control of which jvms are built 7937 # from configure, but only server is valid anyway. Fix this 7938 # when hotspot makefiles are rewritten. 7939 if test "x$MACOSX_UNIVERSAL" = xtrue; then 7940 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} 7941 fi 7942 7943 ##### 7944 7945 7946 7947 7948 7949 7950 7951 7952 # With basic setup done, call the custom early hook. 7953 7954 7955 # To properly create a configuration name, we need to have the OpenJDK target 7956 # and options (variants and debug level) parsed. 7957 7958 7959 7960 # Check whether --with-conf-name was given. 7961 if test "${with_conf_name+set}" = set; then : 7962 withval=$with_conf_name; CONF_NAME=${with_conf_name} 7963 fi 7964 7965 7966 # Test from where we are running configure, in or outside of src root. 7967 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \ 7968 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \ 7969 || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then 7970 # We are running configure from the src root. 7971 # Create a default ./build/target-variant-debuglevel output root. 7972 if test "x${CONF_NAME}" = x; then 7973 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 7974 fi 7975 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 7976 $MKDIR -p "$OUTPUT_ROOT" 7977 if test ! -d "$OUTPUT_ROOT"; then 7978 as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5 7979 fi 7980 else 7981 # We are running configure from outside of the src dir. 7982 # Then use the current directory as output dir! 7983 # If configuration is situated in normal build directory, just use the build 7984 # directory name as configuration name, otherwise use the complete path. 7985 if test "x${CONF_NAME}" = x; then 7986 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 7987 fi 7988 OUTPUT_ROOT="$CURDIR" 7989 7990 # WARNING: This might be a bad thing to do. You need to be sure you want to 7991 # have a configuration in this directory. Do some sanity checks! 7992 7993 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then 7994 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for 7995 # other files 7996 files_present=`$LS $OUTPUT_ROOT` 7997 # Configure has already touched config.log and confdefs.h in the current dir when this check 7998 # is performed. 7999 filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \ 8000 | $TR -d '\n'` 8001 if test "x$filtered_files" != x; then 8002 { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5 8003 $as_echo "$as_me: Current directory is $CURDIR." >&6;} 8004 { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5 8005 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;} 8006 { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5 8007 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;} 8008 { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5 8009 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;} 8010 { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5 8011 $as_echo "$as_me: seriously mess up just about everything." >&6;} 8012 { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5 8013 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;} 8014 { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5 8015 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;} 8016 as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5 8017 fi 8018 fi 8019 fi 8020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5 8021 $as_echo_n "checking what configuration name to use... " >&6; } 8022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5 8023 $as_echo "$CONF_NAME" >&6; } 8024 8025 8026 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8027 8028 # Input might be given as Windows format, start by converting to 8029 # unix format. 8030 path="$OUTPUT_ROOT" 8031 new_path=`$CYGPATH -u "$path"` 8032 8033 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8034 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8035 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8036 # "foo.exe" is OK but "foo" is an error. 8037 # 8038 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8039 # It is also a way to make sure we got the proper file name for the real test later on. 8040 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8041 if test "x$test_shortpath" = x; then 8042 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5 8043 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;} 8044 as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5 8045 fi 8046 8047 # Call helper function which possibly converts this using DOS-style short mode. 8048 # If so, the updated path is stored in $new_path. 8049 8050 input_path="$new_path" 8051 # Check if we need to convert this using DOS-style short mode. If the path 8052 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8053 # take no chances and rewrite it. 8054 # Note: m4 eats our [], so we need to use [ and ] instead. 8055 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8056 if test "x$has_forbidden_chars" != x; then 8057 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8058 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8059 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8060 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8061 # Going to short mode and back again did indeed matter. Since short mode is 8062 # case insensitive, let's make it lowercase to improve readability. 8063 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8064 # Now convert it back to Unix-stile (cygpath) 8065 input_path=`$CYGPATH -u "$shortmode_path"` 8066 new_path="$input_path" 8067 fi 8068 fi 8069 8070 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8071 if test "x$test_cygdrive_prefix" = x; then 8072 # As a simple fix, exclude /usr/bin since it's not a real path. 8073 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 8074 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8075 # a path prefixed by /cygdrive for fixpath to work. 8076 new_path="$CYGWIN_ROOT_PATH$input_path" 8077 fi 8078 fi 8079 8080 8081 if test "x$path" != "x$new_path"; then 8082 OUTPUT_ROOT="$new_path" 8083 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5 8084 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;} 8085 fi 8086 8087 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8088 8089 path="$OUTPUT_ROOT" 8090 has_colon=`$ECHO $path | $GREP ^.:` 8091 new_path="$path" 8092 if test "x$has_colon" = x; then 8093 # Not in mixed or Windows style, start by that. 8094 new_path=`cmd //c echo $path` 8095 fi 8096 8097 8098 input_path="$new_path" 8099 # Check if we need to convert this using DOS-style short mode. If the path 8100 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8101 # take no chances and rewrite it. 8102 # Note: m4 eats our [], so we need to use [ and ] instead. 8103 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8104 if test "x$has_forbidden_chars" != x; then 8105 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8106 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8107 fi 8108 8109 8110 windows_path="$new_path" 8111 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8112 unix_path=`$CYGPATH -u "$windows_path"` 8113 new_path="$unix_path" 8114 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8115 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8116 new_path="$unix_path" 8117 fi 8118 8119 if test "x$path" != "x$new_path"; then 8120 OUTPUT_ROOT="$new_path" 8121 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5 8122 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;} 8123 fi 8124 8125 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8126 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8127 8128 else 8129 # We're on a posix platform. Hooray! :) 8130 path="$OUTPUT_ROOT" 8131 has_space=`$ECHO "$path" | $GREP " "` 8132 if test "x$has_space" != x; then 8133 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5 8134 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;} 8135 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 8136 fi 8137 8138 # Use eval to expand a potential ~ 8139 eval path="$path" 8140 if test ! -f "$path" && test ! -d "$path"; then 8141 as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 8142 fi 8143 8144 OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`" 8145 fi 8146 8147 8148 SPEC=$OUTPUT_ROOT/spec.gmk 8149 8150 CONF_NAME=$CONF_NAME 8151 8152 OUTPUT_ROOT=$OUTPUT_ROOT 8153 8154 8155 # Most of the probed defines are put into config.h 8156 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" 8157 8158 # The spec.gmk file contains all variables for the make system. 8159 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" 8160 8161 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system. 8162 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" 8163 8164 # The bootcycle-spec.gmk file contains support for boot cycle builds. 8165 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" 8166 8167 # The compare.sh is used to compare the build output to other builds. 8168 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" 8169 8170 # Spec.sh is currently used by compare-objects.sh 8171 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" 8172 8173 # The generated Makefile knows where the spec.gmk is and where the source is. 8174 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile 8175 # which will look for generated configurations 8176 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" 8177 8178 8179 # Save the arguments given to us 8180 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments 8181 8182 8183 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY. 8184 8185 for ac_prog in apt-get yum port pkgutil pkgadd 8186 do 8187 # Extract the first word of "$ac_prog", so it can be a program name with args. 8188 set dummy $ac_prog; ac_word=$2 8189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8190 $as_echo_n "checking for $ac_word... " >&6; } 8191 if ${ac_cv_prog_PKGHANDLER+:} false; then : 8192 $as_echo_n "(cached) " >&6 8193 else 8194 if test -n "$PKGHANDLER"; then 8195 ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test. 8196 else 8197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8198 for as_dir in $PATH 8199 do 8200 IFS=$as_save_IFS 8201 test -z "$as_dir" && as_dir=. 8202 for ac_exec_ext in '' $ac_executable_extensions; do 8203 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8204 ac_cv_prog_PKGHANDLER="$ac_prog" 8205 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8206 break 2 8207 fi 8208 done 8209 done 8210 IFS=$as_save_IFS 8211 8212 fi 8213 fi 8214 PKGHANDLER=$ac_cv_prog_PKGHANDLER 8215 if test -n "$PKGHANDLER"; then 8216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5 8217 $as_echo "$PKGHANDLER" >&6; } 8218 else 8219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8220 $as_echo "no" >&6; } 8221 fi 8222 8223 8224 test -n "$PKGHANDLER" && break 8225 done 8226 8227 8228 8229 # Setup tools that requires more complex handling, or that is not needed by the configure script. 8230 8231 8232 # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky. 8233 if test "x$MAKE" != x; then 8234 # User has supplied a make, test it. 8235 if test ! -f "$MAKE"; then 8236 as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5 8237 fi 8238 8239 MAKE_CANDIDATE=""$MAKE"" 8240 DESCRIPTION="user supplied MAKE=$MAKE" 8241 if test "x$MAKE_CANDIDATE" != x; then 8242 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8243 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8244 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8245 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8246 if test "x$IS_GNU_MAKE" = x; then 8247 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8248 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8249 else 8250 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8251 if test "x$IS_MODERN_MAKE" = x; then 8252 { $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 8253 $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;} 8254 else 8255 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8256 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8257 MAKE_EXPECTED_ENV='cygwin' 8258 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8259 MAKE_EXPECTED_ENV='msys' 8260 else 8261 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8262 fi 8263 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8264 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8265 else 8266 # Not relevant for non-Windows 8267 IS_MAKE_CORRECT_ENV=true 8268 fi 8269 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8270 { $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 8271 $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;} 8272 else 8273 FOUND_MAKE=$MAKE_CANDIDATE 8274 8275 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8276 8277 # First separate the path from the arguments. This will split at the first 8278 # space. 8279 complete="$FOUND_MAKE" 8280 path="${complete%% *}" 8281 tmp="$complete EOL" 8282 arguments="${tmp#* }" 8283 8284 # Input might be given as Windows format, start by converting to 8285 # unix format. 8286 new_path=`$CYGPATH -u "$path"` 8287 8288 # Now try to locate executable using which 8289 new_path=`$WHICH "$new_path" 2> /dev/null` 8290 # bat and cmd files are not always considered executable in cygwin causing which 8291 # to not find them 8292 if test "x$new_path" = x \ 8293 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8294 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8295 new_path=`$CYGPATH -u "$path"` 8296 fi 8297 if test "x$new_path" = x; then 8298 # Oops. Which didn't find the executable. 8299 # The splitting of arguments from the executable at a space might have been incorrect, 8300 # since paths with space are more likely in Windows. Give it another try with the whole 8301 # argument. 8302 path="$complete" 8303 arguments="EOL" 8304 new_path=`$CYGPATH -u "$path"` 8305 new_path=`$WHICH "$new_path" 2> /dev/null` 8306 # bat and cmd files are not always considered executable in cygwin causing which 8307 # to not find them 8308 if test "x$new_path" = x \ 8309 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8310 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8311 new_path=`$CYGPATH -u "$path"` 8312 fi 8313 if test "x$new_path" = x; then 8314 # It's still not found. Now this is an unrecoverable error. 8315 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8316 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8317 has_space=`$ECHO "$complete" | $GREP " "` 8318 if test "x$has_space" != x; then 8319 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8320 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8321 fi 8322 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8323 fi 8324 fi 8325 8326 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8327 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8328 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8329 # "foo.exe" is OK but "foo" is an error. 8330 # 8331 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8332 # It is also a way to make sure we got the proper file name for the real test later on. 8333 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8334 if test "x$test_shortpath" = x; then 8335 # Short path failed, file does not exist as specified. 8336 # Try adding .exe or .cmd 8337 if test -f "${new_path}.exe"; then 8338 input_to_shortpath="${new_path}.exe" 8339 elif test -f "${new_path}.cmd"; then 8340 input_to_shortpath="${new_path}.cmd" 8341 else 8342 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8343 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8344 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8345 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8346 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8347 fi 8348 else 8349 input_to_shortpath="$new_path" 8350 fi 8351 8352 # Call helper function which possibly converts this using DOS-style short mode. 8353 # If so, the updated path is stored in $new_path. 8354 new_path="$input_to_shortpath" 8355 8356 input_path="$input_to_shortpath" 8357 # Check if we need to convert this using DOS-style short mode. If the path 8358 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8359 # take no chances and rewrite it. 8360 # Note: m4 eats our [], so we need to use [ and ] instead. 8361 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8362 if test "x$has_forbidden_chars" != x; then 8363 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8364 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8365 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8366 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8367 # Going to short mode and back again did indeed matter. Since short mode is 8368 # case insensitive, let's make it lowercase to improve readability. 8369 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8370 # Now convert it back to Unix-stile (cygpath) 8371 input_path=`$CYGPATH -u "$shortmode_path"` 8372 new_path="$input_path" 8373 fi 8374 fi 8375 8376 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8377 if test "x$test_cygdrive_prefix" = x; then 8378 # As a simple fix, exclude /usr/bin since it's not a real path. 8379 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8380 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8381 # a path prefixed by /cygdrive for fixpath to work. 8382 new_path="$CYGWIN_ROOT_PATH$input_path" 8383 fi 8384 fi 8385 8386 # remove trailing .exe if any 8387 new_path="${new_path/%.exe/}" 8388 8389 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8390 8391 # First separate the path from the arguments. This will split at the first 8392 # space. 8393 complete="$FOUND_MAKE" 8394 path="${complete%% *}" 8395 tmp="$complete EOL" 8396 arguments="${tmp#* }" 8397 8398 # Input might be given as Windows format, start by converting to 8399 # unix format. 8400 new_path="$path" 8401 8402 windows_path="$new_path" 8403 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8404 unix_path=`$CYGPATH -u "$windows_path"` 8405 new_path="$unix_path" 8406 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8407 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8408 new_path="$unix_path" 8409 fi 8410 8411 8412 # Now try to locate executable using which 8413 new_path=`$WHICH "$new_path" 2> /dev/null` 8414 8415 if test "x$new_path" = x; then 8416 # Oops. Which didn't find the executable. 8417 # The splitting of arguments from the executable at a space might have been incorrect, 8418 # since paths with space are more likely in Windows. Give it another try with the whole 8419 # argument. 8420 path="$complete" 8421 arguments="EOL" 8422 new_path="$path" 8423 8424 windows_path="$new_path" 8425 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8426 unix_path=`$CYGPATH -u "$windows_path"` 8427 new_path="$unix_path" 8428 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8429 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8430 new_path="$unix_path" 8431 fi 8432 8433 8434 new_path=`$WHICH "$new_path" 2> /dev/null` 8435 8436 if test "x$new_path" = x; then 8437 # It's still not found. Now this is an unrecoverable error. 8438 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8439 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8440 has_space=`$ECHO "$complete" | $GREP " "` 8441 if test "x$has_space" != x; then 8442 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8443 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8444 fi 8445 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8446 fi 8447 fi 8448 8449 # Now new_path has a complete unix path to the binary 8450 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 8451 # Keep paths in /bin as-is, but remove trailing .exe if any 8452 new_path="${new_path/%.exe/}" 8453 # Do not save /bin paths to all_fixpath_prefixes! 8454 else 8455 # Not in mixed or Windows style, start by that. 8456 new_path=`cmd //c echo $new_path` 8457 8458 input_path="$new_path" 8459 # Check if we need to convert this using DOS-style short mode. If the path 8460 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8461 # take no chances and rewrite it. 8462 # Note: m4 eats our [], so we need to use [ and ] instead. 8463 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8464 if test "x$has_forbidden_chars" != x; then 8465 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8466 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8467 fi 8468 8469 # Output is in $new_path 8470 8471 windows_path="$new_path" 8472 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8473 unix_path=`$CYGPATH -u "$windows_path"` 8474 new_path="$unix_path" 8475 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8476 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8477 new_path="$unix_path" 8478 fi 8479 8480 # remove trailing .exe if any 8481 new_path="${new_path/%.exe/}" 8482 8483 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8484 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8485 fi 8486 8487 else 8488 # We're on a posix platform. Hooray! :) 8489 # First separate the path from the arguments. This will split at the first 8490 # space. 8491 complete="$FOUND_MAKE" 8492 path="${complete%% *}" 8493 tmp="$complete EOL" 8494 arguments="${tmp#* }" 8495 8496 # Cannot rely on the command "which" here since it doesn't always work. 8497 is_absolute_path=`$ECHO "$path" | $GREP ^/` 8498 if test -z "$is_absolute_path"; then 8499 # Path to executable is not absolute. Find it. 8500 IFS_save="$IFS" 8501 IFS=: 8502 for p in $PATH; do 8503 if test -f "$p/$path" && test -x "$p/$path"; then 8504 new_path="$p/$path" 8505 break 8506 fi 8507 done 8508 IFS="$IFS_save" 8509 else 8510 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 8511 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 8512 new_path="$path" 8513 fi 8514 8515 if test "x$new_path" = x; then 8516 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8517 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8518 has_space=`$ECHO "$complete" | $GREP " "` 8519 if test "x$has_space" != x; then 8520 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 8521 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 8522 fi 8523 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8524 fi 8525 fi 8526 8527 # Now join together the path and the arguments once again 8528 if test "x$arguments" != xEOL; then 8529 new_complete="$new_path ${arguments% *}" 8530 else 8531 new_complete="$new_path" 8532 fi 8533 8534 if test "x$complete" != "x$new_complete"; then 8535 FOUND_MAKE="$new_complete" 8536 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 8537 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 8538 fi 8539 8540 fi 8541 fi 8542 fi 8543 fi 8544 8545 if test "x$FOUND_MAKE" = x; then 8546 as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5 8547 fi 8548 else 8549 # Try our hardest to locate a correct version of GNU make 8550 for ac_prog in gmake 8551 do 8552 # Extract the first word of "$ac_prog", so it can be a program name with args. 8553 set dummy $ac_prog; ac_word=$2 8554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8555 $as_echo_n "checking for $ac_word... " >&6; } 8556 if ${ac_cv_path_CHECK_GMAKE+:} false; then : 8557 $as_echo_n "(cached) " >&6 8558 else 8559 case $CHECK_GMAKE in 8560 [\\/]* | ?:[\\/]*) 8561 ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path. 8562 ;; 8563 *) 8564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8565 for as_dir in $PATH 8566 do 8567 IFS=$as_save_IFS 8568 test -z "$as_dir" && as_dir=. 8569 for ac_exec_ext in '' $ac_executable_extensions; do 8570 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8571 ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext" 8572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8573 break 2 8574 fi 8575 done 8576 done 8577 IFS=$as_save_IFS 8578 8579 ;; 8580 esac 8581 fi 8582 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE 8583 if test -n "$CHECK_GMAKE"; then 8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5 8585 $as_echo "$CHECK_GMAKE" >&6; } 8586 else 8587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8588 $as_echo "no" >&6; } 8589 fi 8590 8591 8592 test -n "$CHECK_GMAKE" && break 8593 done 8594 8595 8596 MAKE_CANDIDATE=""$CHECK_GMAKE"" 8597 DESCRIPTION="gmake in PATH" 8598 if test "x$MAKE_CANDIDATE" != x; then 8599 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8600 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8601 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8602 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8603 if test "x$IS_GNU_MAKE" = x; then 8604 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8605 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8606 else 8607 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8608 if test "x$IS_MODERN_MAKE" = x; then 8609 { $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 8610 $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;} 8611 else 8612 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8613 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8614 MAKE_EXPECTED_ENV='cygwin' 8615 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8616 MAKE_EXPECTED_ENV='msys' 8617 else 8618 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8619 fi 8620 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8621 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8622 else 8623 # Not relevant for non-Windows 8624 IS_MAKE_CORRECT_ENV=true 8625 fi 8626 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8627 { $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 8628 $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;} 8629 else 8630 FOUND_MAKE=$MAKE_CANDIDATE 8631 8632 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8633 8634 # First separate the path from the arguments. This will split at the first 8635 # space. 8636 complete="$FOUND_MAKE" 8637 path="${complete%% *}" 8638 tmp="$complete EOL" 8639 arguments="${tmp#* }" 8640 8641 # Input might be given as Windows format, start by converting to 8642 # unix format. 8643 new_path=`$CYGPATH -u "$path"` 8644 8645 # Now try to locate executable using which 8646 new_path=`$WHICH "$new_path" 2> /dev/null` 8647 # bat and cmd files are not always considered executable in cygwin causing which 8648 # to not find them 8649 if test "x$new_path" = x \ 8650 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8651 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8652 new_path=`$CYGPATH -u "$path"` 8653 fi 8654 if test "x$new_path" = x; then 8655 # Oops. Which didn't find the executable. 8656 # The splitting of arguments from the executable at a space might have been incorrect, 8657 # since paths with space are more likely in Windows. Give it another try with the whole 8658 # argument. 8659 path="$complete" 8660 arguments="EOL" 8661 new_path=`$CYGPATH -u "$path"` 8662 new_path=`$WHICH "$new_path" 2> /dev/null` 8663 # bat and cmd files are not always considered executable in cygwin causing which 8664 # to not find them 8665 if test "x$new_path" = x \ 8666 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8667 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8668 new_path=`$CYGPATH -u "$path"` 8669 fi 8670 if test "x$new_path" = x; then 8671 # It's still not found. Now this is an unrecoverable error. 8672 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8673 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8674 has_space=`$ECHO "$complete" | $GREP " "` 8675 if test "x$has_space" != x; then 8676 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8677 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8678 fi 8679 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8680 fi 8681 fi 8682 8683 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8684 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8685 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8686 # "foo.exe" is OK but "foo" is an error. 8687 # 8688 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8689 # It is also a way to make sure we got the proper file name for the real test later on. 8690 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8691 if test "x$test_shortpath" = x; then 8692 # Short path failed, file does not exist as specified. 8693 # Try adding .exe or .cmd 8694 if test -f "${new_path}.exe"; then 8695 input_to_shortpath="${new_path}.exe" 8696 elif test -f "${new_path}.cmd"; then 8697 input_to_shortpath="${new_path}.cmd" 8698 else 8699 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8700 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8701 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8702 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8703 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8704 fi 8705 else 8706 input_to_shortpath="$new_path" 8707 fi 8708 8709 # Call helper function which possibly converts this using DOS-style short mode. 8710 # If so, the updated path is stored in $new_path. 8711 new_path="$input_to_shortpath" 8712 8713 input_path="$input_to_shortpath" 8714 # Check if we need to convert this using DOS-style short mode. If the path 8715 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8716 # take no chances and rewrite it. 8717 # Note: m4 eats our [], so we need to use [ and ] instead. 8718 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8719 if test "x$has_forbidden_chars" != x; then 8720 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8721 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8722 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8723 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8724 # Going to short mode and back again did indeed matter. Since short mode is 8725 # case insensitive, let's make it lowercase to improve readability. 8726 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8727 # Now convert it back to Unix-stile (cygpath) 8728 input_path=`$CYGPATH -u "$shortmode_path"` 8729 new_path="$input_path" 8730 fi 8731 fi 8732 8733 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8734 if test "x$test_cygdrive_prefix" = x; then 8735 # As a simple fix, exclude /usr/bin since it's not a real path. 8736 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8737 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8738 # a path prefixed by /cygdrive for fixpath to work. 8739 new_path="$CYGWIN_ROOT_PATH$input_path" 8740 fi 8741 fi 8742 8743 # remove trailing .exe if any 8744 new_path="${new_path/%.exe/}" 8745 8746 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8747 8748 # First separate the path from the arguments. This will split at the first 8749 # space. 8750 complete="$FOUND_MAKE" 8751 path="${complete%% *}" 8752 tmp="$complete EOL" 8753 arguments="${tmp#* }" 8754 8755 # Input might be given as Windows format, start by converting to 8756 # unix format. 8757 new_path="$path" 8758 8759 windows_path="$new_path" 8760 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8761 unix_path=`$CYGPATH -u "$windows_path"` 8762 new_path="$unix_path" 8763 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8764 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8765 new_path="$unix_path" 8766 fi 8767 8768 8769 # Now try to locate executable using which 8770 new_path=`$WHICH "$new_path" 2> /dev/null` 8771 8772 if test "x$new_path" = x; then 8773 # Oops. Which didn't find the executable. 8774 # The splitting of arguments from the executable at a space might have been incorrect, 8775 # since paths with space are more likely in Windows. Give it another try with the whole 8776 # argument. 8777 path="$complete" 8778 arguments="EOL" 8779 new_path="$path" 8780 8781 windows_path="$new_path" 8782 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8783 unix_path=`$CYGPATH -u "$windows_path"` 8784 new_path="$unix_path" 8785 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8786 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8787 new_path="$unix_path" 8788 fi 8789 8790 8791 new_path=`$WHICH "$new_path" 2> /dev/null` 8792 8793 if test "x$new_path" = x; then 8794 # It's still not found. Now this is an unrecoverable error. 8795 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8796 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8797 has_space=`$ECHO "$complete" | $GREP " "` 8798 if test "x$has_space" != x; then 8799 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8800 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8801 fi 8802 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8803 fi 8804 fi 8805 8806 # Now new_path has a complete unix path to the binary 8807 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 8808 # Keep paths in /bin as-is, but remove trailing .exe if any 8809 new_path="${new_path/%.exe/}" 8810 # Do not save /bin paths to all_fixpath_prefixes! 8811 else 8812 # Not in mixed or Windows style, start by that. 8813 new_path=`cmd //c echo $new_path` 8814 8815 input_path="$new_path" 8816 # Check if we need to convert this using DOS-style short mode. If the path 8817 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8818 # take no chances and rewrite it. 8819 # Note: m4 eats our [], so we need to use [ and ] instead. 8820 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8821 if test "x$has_forbidden_chars" != x; then 8822 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8823 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8824 fi 8825 8826 # Output is in $new_path 8827 8828 windows_path="$new_path" 8829 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8830 unix_path=`$CYGPATH -u "$windows_path"` 8831 new_path="$unix_path" 8832 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8833 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8834 new_path="$unix_path" 8835 fi 8836 8837 # remove trailing .exe if any 8838 new_path="${new_path/%.exe/}" 8839 8840 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8841 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8842 fi 8843 8844 else 8845 # We're on a posix platform. Hooray! :) 8846 # First separate the path from the arguments. This will split at the first 8847 # space. 8848 complete="$FOUND_MAKE" 8849 path="${complete%% *}" 8850 tmp="$complete EOL" 8851 arguments="${tmp#* }" 8852 8853 # Cannot rely on the command "which" here since it doesn't always work. 8854 is_absolute_path=`$ECHO "$path" | $GREP ^/` 8855 if test -z "$is_absolute_path"; then 8856 # Path to executable is not absolute. Find it. 8857 IFS_save="$IFS" 8858 IFS=: 8859 for p in $PATH; do 8860 if test -f "$p/$path" && test -x "$p/$path"; then 8861 new_path="$p/$path" 8862 break 8863 fi 8864 done 8865 IFS="$IFS_save" 8866 else 8867 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 8868 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 8869 new_path="$path" 8870 fi 8871 8872 if test "x$new_path" = x; then 8873 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8874 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8875 has_space=`$ECHO "$complete" | $GREP " "` 8876 if test "x$has_space" != x; then 8877 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 8878 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 8879 fi 8880 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8881 fi 8882 fi 8883 8884 # Now join together the path and the arguments once again 8885 if test "x$arguments" != xEOL; then 8886 new_complete="$new_path ${arguments% *}" 8887 else 8888 new_complete="$new_path" 8889 fi 8890 8891 if test "x$complete" != "x$new_complete"; then 8892 FOUND_MAKE="$new_complete" 8893 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 8894 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 8895 fi 8896 8897 fi 8898 fi 8899 fi 8900 fi 8901 8902 8903 if test "x$FOUND_MAKE" = x; then 8904 for ac_prog in make 8905 do 8906 # Extract the first word of "$ac_prog", so it can be a program name with args. 8907 set dummy $ac_prog; ac_word=$2 8908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8909 $as_echo_n "checking for $ac_word... " >&6; } 8910 if ${ac_cv_path_CHECK_MAKE+:} false; then : 8911 $as_echo_n "(cached) " >&6 8912 else 8913 case $CHECK_MAKE in 8914 [\\/]* | ?:[\\/]*) 8915 ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path. 8916 ;; 8917 *) 8918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8919 for as_dir in $PATH 8920 do 8921 IFS=$as_save_IFS 8922 test -z "$as_dir" && as_dir=. 8923 for ac_exec_ext in '' $ac_executable_extensions; do 8924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8925 ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext" 8926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8927 break 2 8928 fi 8929 done 8930 done 8931 IFS=$as_save_IFS 8932 8933 ;; 8934 esac 8935 fi 8936 CHECK_MAKE=$ac_cv_path_CHECK_MAKE 8937 if test -n "$CHECK_MAKE"; then 8938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5 8939 $as_echo "$CHECK_MAKE" >&6; } 8940 else 8941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8942 $as_echo "no" >&6; } 8943 fi 8944 8945 8946 test -n "$CHECK_MAKE" && break 8947 done 8948 8949 8950 MAKE_CANDIDATE=""$CHECK_MAKE"" 8951 DESCRIPTION="make in PATH" 8952 if test "x$MAKE_CANDIDATE" != x; then 8953 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8954 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8955 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8956 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8957 if test "x$IS_GNU_MAKE" = x; then 8958 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8959 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8960 else 8961 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8962 if test "x$IS_MODERN_MAKE" = x; then 8963 { $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 8964 $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;} 8965 else 8966 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8967 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8968 MAKE_EXPECTED_ENV='cygwin' 8969 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8970 MAKE_EXPECTED_ENV='msys' 8971 else 8972 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8973 fi 8974 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8975 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8976 else 8977 # Not relevant for non-Windows 8978 IS_MAKE_CORRECT_ENV=true 8979 fi 8980 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8981 { $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 8982 $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;} 8983 else 8984 FOUND_MAKE=$MAKE_CANDIDATE 8985 8986 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8987 8988 # First separate the path from the arguments. This will split at the first 8989 # space. 8990 complete="$FOUND_MAKE" 8991 path="${complete%% *}" 8992 tmp="$complete EOL" 8993 arguments="${tmp#* }" 8994 8995 # Input might be given as Windows format, start by converting to 8996 # unix format. 8997 new_path=`$CYGPATH -u "$path"` 8998 8999 # Now try to locate executable using which 9000 new_path=`$WHICH "$new_path" 2> /dev/null` 9001 # bat and cmd files are not always considered executable in cygwin causing which 9002 # to not find them 9003 if test "x$new_path" = x \ 9004 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9005 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9006 new_path=`$CYGPATH -u "$path"` 9007 fi 9008 if test "x$new_path" = x; then 9009 # Oops. Which didn't find the executable. 9010 # The splitting of arguments from the executable at a space might have been incorrect, 9011 # since paths with space are more likely in Windows. Give it another try with the whole 9012 # argument. 9013 path="$complete" 9014 arguments="EOL" 9015 new_path=`$CYGPATH -u "$path"` 9016 new_path=`$WHICH "$new_path" 2> /dev/null` 9017 # bat and cmd files are not always considered executable in cygwin causing which 9018 # to not find them 9019 if test "x$new_path" = x \ 9020 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9021 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9022 new_path=`$CYGPATH -u "$path"` 9023 fi 9024 if test "x$new_path" = x; then 9025 # It's still not found. Now this is an unrecoverable error. 9026 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9027 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9028 has_space=`$ECHO "$complete" | $GREP " "` 9029 if test "x$has_space" != x; then 9030 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9031 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9032 fi 9033 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9034 fi 9035 fi 9036 9037 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9038 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9039 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9040 # "foo.exe" is OK but "foo" is an error. 9041 # 9042 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9043 # It is also a way to make sure we got the proper file name for the real test later on. 9044 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9045 if test "x$test_shortpath" = x; then 9046 # Short path failed, file does not exist as specified. 9047 # Try adding .exe or .cmd 9048 if test -f "${new_path}.exe"; then 9049 input_to_shortpath="${new_path}.exe" 9050 elif test -f "${new_path}.cmd"; then 9051 input_to_shortpath="${new_path}.cmd" 9052 else 9053 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9054 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9055 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9056 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9057 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9058 fi 9059 else 9060 input_to_shortpath="$new_path" 9061 fi 9062 9063 # Call helper function which possibly converts this using DOS-style short mode. 9064 # If so, the updated path is stored in $new_path. 9065 new_path="$input_to_shortpath" 9066 9067 input_path="$input_to_shortpath" 9068 # Check if we need to convert this using DOS-style short mode. If the path 9069 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9070 # take no chances and rewrite it. 9071 # Note: m4 eats our [], so we need to use [ and ] instead. 9072 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9073 if test "x$has_forbidden_chars" != x; then 9074 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9075 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9076 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9077 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9078 # Going to short mode and back again did indeed matter. Since short mode is 9079 # case insensitive, let's make it lowercase to improve readability. 9080 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9081 # Now convert it back to Unix-stile (cygpath) 9082 input_path=`$CYGPATH -u "$shortmode_path"` 9083 new_path="$input_path" 9084 fi 9085 fi 9086 9087 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9088 if test "x$test_cygdrive_prefix" = x; then 9089 # As a simple fix, exclude /usr/bin since it's not a real path. 9090 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9091 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9092 # a path prefixed by /cygdrive for fixpath to work. 9093 new_path="$CYGWIN_ROOT_PATH$input_path" 9094 fi 9095 fi 9096 9097 # remove trailing .exe if any 9098 new_path="${new_path/%.exe/}" 9099 9100 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9101 9102 # First separate the path from the arguments. This will split at the first 9103 # space. 9104 complete="$FOUND_MAKE" 9105 path="${complete%% *}" 9106 tmp="$complete EOL" 9107 arguments="${tmp#* }" 9108 9109 # Input might be given as Windows format, start by converting to 9110 # unix format. 9111 new_path="$path" 9112 9113 windows_path="$new_path" 9114 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9115 unix_path=`$CYGPATH -u "$windows_path"` 9116 new_path="$unix_path" 9117 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9118 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9119 new_path="$unix_path" 9120 fi 9121 9122 9123 # Now try to locate executable using which 9124 new_path=`$WHICH "$new_path" 2> /dev/null` 9125 9126 if test "x$new_path" = x; then 9127 # Oops. Which didn't find the executable. 9128 # The splitting of arguments from the executable at a space might have been incorrect, 9129 # since paths with space are more likely in Windows. Give it another try with the whole 9130 # argument. 9131 path="$complete" 9132 arguments="EOL" 9133 new_path="$path" 9134 9135 windows_path="$new_path" 9136 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9137 unix_path=`$CYGPATH -u "$windows_path"` 9138 new_path="$unix_path" 9139 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9140 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9141 new_path="$unix_path" 9142 fi 9143 9144 9145 new_path=`$WHICH "$new_path" 2> /dev/null` 9146 9147 if test "x$new_path" = x; then 9148 # It's still not found. Now this is an unrecoverable error. 9149 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9150 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9151 has_space=`$ECHO "$complete" | $GREP " "` 9152 if test "x$has_space" != x; then 9153 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9154 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9155 fi 9156 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9157 fi 9158 fi 9159 9160 # Now new_path has a complete unix path to the binary 9161 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9162 # Keep paths in /bin as-is, but remove trailing .exe if any 9163 new_path="${new_path/%.exe/}" 9164 # Do not save /bin paths to all_fixpath_prefixes! 9165 else 9166 # Not in mixed or Windows style, start by that. 9167 new_path=`cmd //c echo $new_path` 9168 9169 input_path="$new_path" 9170 # Check if we need to convert this using DOS-style short mode. If the path 9171 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9172 # take no chances and rewrite it. 9173 # Note: m4 eats our [], so we need to use [ and ] instead. 9174 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9175 if test "x$has_forbidden_chars" != x; then 9176 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9177 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9178 fi 9179 9180 # Output is in $new_path 9181 9182 windows_path="$new_path" 9183 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9184 unix_path=`$CYGPATH -u "$windows_path"` 9185 new_path="$unix_path" 9186 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9187 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9188 new_path="$unix_path" 9189 fi 9190 9191 # remove trailing .exe if any 9192 new_path="${new_path/%.exe/}" 9193 9194 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9195 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9196 fi 9197 9198 else 9199 # We're on a posix platform. Hooray! :) 9200 # First separate the path from the arguments. This will split at the first 9201 # space. 9202 complete="$FOUND_MAKE" 9203 path="${complete%% *}" 9204 tmp="$complete EOL" 9205 arguments="${tmp#* }" 9206 9207 # Cannot rely on the command "which" here since it doesn't always work. 9208 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9209 if test -z "$is_absolute_path"; then 9210 # Path to executable is not absolute. Find it. 9211 IFS_save="$IFS" 9212 IFS=: 9213 for p in $PATH; do 9214 if test -f "$p/$path" && test -x "$p/$path"; then 9215 new_path="$p/$path" 9216 break 9217 fi 9218 done 9219 IFS="$IFS_save" 9220 else 9221 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9222 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9223 new_path="$path" 9224 fi 9225 9226 if test "x$new_path" = x; then 9227 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9228 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9229 has_space=`$ECHO "$complete" | $GREP " "` 9230 if test "x$has_space" != x; then 9231 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9232 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9233 fi 9234 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9235 fi 9236 fi 9237 9238 # Now join together the path and the arguments once again 9239 if test "x$arguments" != xEOL; then 9240 new_complete="$new_path ${arguments% *}" 9241 else 9242 new_complete="$new_path" 9243 fi 9244 9245 if test "x$complete" != "x$new_complete"; then 9246 FOUND_MAKE="$new_complete" 9247 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9248 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9249 fi 9250 9251 fi 9252 fi 9253 fi 9254 fi 9255 9256 fi 9257 9258 if test "x$FOUND_MAKE" = x; then 9259 if test "x$TOOLS_DIR" != x; then 9260 # We have a tools-dir, check that as well before giving up. 9261 OLD_PATH=$PATH 9262 PATH=$TOOLS_DIR:$PATH 9263 for ac_prog in gmake 9264 do 9265 # Extract the first word of "$ac_prog", so it can be a program name with args. 9266 set dummy $ac_prog; ac_word=$2 9267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9268 $as_echo_n "checking for $ac_word... " >&6; } 9269 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then : 9270 $as_echo_n "(cached) " >&6 9271 else 9272 case $CHECK_TOOLSDIR_GMAKE in 9273 [\\/]* | ?:[\\/]*) 9274 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path. 9275 ;; 9276 *) 9277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9278 for as_dir in $PATH 9279 do 9280 IFS=$as_save_IFS 9281 test -z "$as_dir" && as_dir=. 9282 for ac_exec_ext in '' $ac_executable_extensions; do 9283 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 9284 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext" 9285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9286 break 2 9287 fi 9288 done 9289 done 9290 IFS=$as_save_IFS 9291 9292 ;; 9293 esac 9294 fi 9295 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE 9296 if test -n "$CHECK_TOOLSDIR_GMAKE"; then 9297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5 9298 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; } 9299 else 9300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9301 $as_echo "no" >&6; } 9302 fi 9303 9304 9305 test -n "$CHECK_TOOLSDIR_GMAKE" && break 9306 done 9307 9308 9309 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE"" 9310 DESCRIPTION="gmake in tools-dir" 9311 if test "x$MAKE_CANDIDATE" != x; then 9312 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 9313 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 9314 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 9315 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 9316 if test "x$IS_GNU_MAKE" = x; then 9317 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 9318 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 9319 else 9320 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 9321 if test "x$IS_MODERN_MAKE" = x; then 9322 { $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 9323 $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;} 9324 else 9325 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 9326 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9327 MAKE_EXPECTED_ENV='cygwin' 9328 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9329 MAKE_EXPECTED_ENV='msys' 9330 else 9331 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 9332 fi 9333 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 9334 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 9335 else 9336 # Not relevant for non-Windows 9337 IS_MAKE_CORRECT_ENV=true 9338 fi 9339 if test "x$IS_MAKE_CORRECT_ENV" = x; then 9340 { $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 9341 $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;} 9342 else 9343 FOUND_MAKE=$MAKE_CANDIDATE 9344 9345 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9346 9347 # First separate the path from the arguments. This will split at the first 9348 # space. 9349 complete="$FOUND_MAKE" 9350 path="${complete%% *}" 9351 tmp="$complete EOL" 9352 arguments="${tmp#* }" 9353 9354 # Input might be given as Windows format, start by converting to 9355 # unix format. 9356 new_path=`$CYGPATH -u "$path"` 9357 9358 # Now try to locate executable using which 9359 new_path=`$WHICH "$new_path" 2> /dev/null` 9360 # bat and cmd files are not always considered executable in cygwin causing which 9361 # to not find them 9362 if test "x$new_path" = x \ 9363 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9364 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9365 new_path=`$CYGPATH -u "$path"` 9366 fi 9367 if test "x$new_path" = x; then 9368 # Oops. Which didn't find the executable. 9369 # The splitting of arguments from the executable at a space might have been incorrect, 9370 # since paths with space are more likely in Windows. Give it another try with the whole 9371 # argument. 9372 path="$complete" 9373 arguments="EOL" 9374 new_path=`$CYGPATH -u "$path"` 9375 new_path=`$WHICH "$new_path" 2> /dev/null` 9376 # bat and cmd files are not always considered executable in cygwin causing which 9377 # to not find them 9378 if test "x$new_path" = x \ 9379 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9380 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9381 new_path=`$CYGPATH -u "$path"` 9382 fi 9383 if test "x$new_path" = x; then 9384 # It's still not found. Now this is an unrecoverable error. 9385 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9386 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9387 has_space=`$ECHO "$complete" | $GREP " "` 9388 if test "x$has_space" != x; then 9389 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9390 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9391 fi 9392 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9393 fi 9394 fi 9395 9396 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9397 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9398 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9399 # "foo.exe" is OK but "foo" is an error. 9400 # 9401 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9402 # It is also a way to make sure we got the proper file name for the real test later on. 9403 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9404 if test "x$test_shortpath" = x; then 9405 # Short path failed, file does not exist as specified. 9406 # Try adding .exe or .cmd 9407 if test -f "${new_path}.exe"; then 9408 input_to_shortpath="${new_path}.exe" 9409 elif test -f "${new_path}.cmd"; then 9410 input_to_shortpath="${new_path}.cmd" 9411 else 9412 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9413 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9414 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9415 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9416 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9417 fi 9418 else 9419 input_to_shortpath="$new_path" 9420 fi 9421 9422 # Call helper function which possibly converts this using DOS-style short mode. 9423 # If so, the updated path is stored in $new_path. 9424 new_path="$input_to_shortpath" 9425 9426 input_path="$input_to_shortpath" 9427 # Check if we need to convert this using DOS-style short mode. If the path 9428 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9429 # take no chances and rewrite it. 9430 # Note: m4 eats our [], so we need to use [ and ] instead. 9431 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9432 if test "x$has_forbidden_chars" != x; then 9433 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9434 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9435 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9436 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9437 # Going to short mode and back again did indeed matter. Since short mode is 9438 # case insensitive, let's make it lowercase to improve readability. 9439 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9440 # Now convert it back to Unix-stile (cygpath) 9441 input_path=`$CYGPATH -u "$shortmode_path"` 9442 new_path="$input_path" 9443 fi 9444 fi 9445 9446 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9447 if test "x$test_cygdrive_prefix" = x; then 9448 # As a simple fix, exclude /usr/bin since it's not a real path. 9449 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9450 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9451 # a path prefixed by /cygdrive for fixpath to work. 9452 new_path="$CYGWIN_ROOT_PATH$input_path" 9453 fi 9454 fi 9455 9456 # remove trailing .exe if any 9457 new_path="${new_path/%.exe/}" 9458 9459 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9460 9461 # First separate the path from the arguments. This will split at the first 9462 # space. 9463 complete="$FOUND_MAKE" 9464 path="${complete%% *}" 9465 tmp="$complete EOL" 9466 arguments="${tmp#* }" 9467 9468 # Input might be given as Windows format, start by converting to 9469 # unix format. 9470 new_path="$path" 9471 9472 windows_path="$new_path" 9473 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9474 unix_path=`$CYGPATH -u "$windows_path"` 9475 new_path="$unix_path" 9476 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9477 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9478 new_path="$unix_path" 9479 fi 9480 9481 9482 # Now try to locate executable using which 9483 new_path=`$WHICH "$new_path" 2> /dev/null` 9484 9485 if test "x$new_path" = x; then 9486 # Oops. Which didn't find the executable. 9487 # The splitting of arguments from the executable at a space might have been incorrect, 9488 # since paths with space are more likely in Windows. Give it another try with the whole 9489 # argument. 9490 path="$complete" 9491 arguments="EOL" 9492 new_path="$path" 9493 9494 windows_path="$new_path" 9495 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9496 unix_path=`$CYGPATH -u "$windows_path"` 9497 new_path="$unix_path" 9498 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9499 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9500 new_path="$unix_path" 9501 fi 9502 9503 9504 new_path=`$WHICH "$new_path" 2> /dev/null` 9505 9506 if test "x$new_path" = x; then 9507 # It's still not found. Now this is an unrecoverable error. 9508 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9509 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9510 has_space=`$ECHO "$complete" | $GREP " "` 9511 if test "x$has_space" != x; then 9512 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9513 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9514 fi 9515 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9516 fi 9517 fi 9518 9519 # Now new_path has a complete unix path to the binary 9520 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9521 # Keep paths in /bin as-is, but remove trailing .exe if any 9522 new_path="${new_path/%.exe/}" 9523 # Do not save /bin paths to all_fixpath_prefixes! 9524 else 9525 # Not in mixed or Windows style, start by that. 9526 new_path=`cmd //c echo $new_path` 9527 9528 input_path="$new_path" 9529 # Check if we need to convert this using DOS-style short mode. If the path 9530 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9531 # take no chances and rewrite it. 9532 # Note: m4 eats our [], so we need to use [ and ] instead. 9533 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9534 if test "x$has_forbidden_chars" != x; then 9535 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9536 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9537 fi 9538 9539 # Output is in $new_path 9540 9541 windows_path="$new_path" 9542 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9543 unix_path=`$CYGPATH -u "$windows_path"` 9544 new_path="$unix_path" 9545 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9546 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9547 new_path="$unix_path" 9548 fi 9549 9550 # remove trailing .exe if any 9551 new_path="${new_path/%.exe/}" 9552 9553 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9554 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9555 fi 9556 9557 else 9558 # We're on a posix platform. Hooray! :) 9559 # First separate the path from the arguments. This will split at the first 9560 # space. 9561 complete="$FOUND_MAKE" 9562 path="${complete%% *}" 9563 tmp="$complete EOL" 9564 arguments="${tmp#* }" 9565 9566 # Cannot rely on the command "which" here since it doesn't always work. 9567 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9568 if test -z "$is_absolute_path"; then 9569 # Path to executable is not absolute. Find it. 9570 IFS_save="$IFS" 9571 IFS=: 9572 for p in $PATH; do 9573 if test -f "$p/$path" && test -x "$p/$path"; then 9574 new_path="$p/$path" 9575 break 9576 fi 9577 done 9578 IFS="$IFS_save" 9579 else 9580 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9581 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9582 new_path="$path" 9583 fi 9584 9585 if test "x$new_path" = x; then 9586 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9587 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9588 has_space=`$ECHO "$complete" | $GREP " "` 9589 if test "x$has_space" != x; then 9590 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9591 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9592 fi 9593 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9594 fi 9595 fi 9596 9597 # Now join together the path and the arguments once again 9598 if test "x$arguments" != xEOL; then 9599 new_complete="$new_path ${arguments% *}" 9600 else 9601 new_complete="$new_path" 9602 fi 9603 9604 if test "x$complete" != "x$new_complete"; then 9605 FOUND_MAKE="$new_complete" 9606 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9607 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9608 fi 9609 9610 fi 9611 fi 9612 fi 9613 fi 9614 9615 if test "x$FOUND_MAKE" = x; then 9616 for ac_prog in make 9617 do 9618 # Extract the first word of "$ac_prog", so it can be a program name with args. 9619 set dummy $ac_prog; ac_word=$2 9620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9621 $as_echo_n "checking for $ac_word... " >&6; } 9622 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then : 9623 $as_echo_n "(cached) " >&6 9624 else 9625 case $CHECK_TOOLSDIR_MAKE in 9626 [\\/]* | ?:[\\/]*) 9627 ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path. 9628 ;; 9629 *) 9630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9631 for as_dir in $PATH 9632 do 9633 IFS=$as_save_IFS 9634 test -z "$as_dir" && as_dir=. 9635 for ac_exec_ext in '' $ac_executable_extensions; do 9636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 9637 ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext" 9638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9639 break 2 9640 fi 9641 done 9642 done 9643 IFS=$as_save_IFS 9644 9645 ;; 9646 esac 9647 fi 9648 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE 9649 if test -n "$CHECK_TOOLSDIR_MAKE"; then 9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5 9651 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; } 9652 else 9653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9654 $as_echo "no" >&6; } 9655 fi 9656 9657 9658 test -n "$CHECK_TOOLSDIR_MAKE" && break 9659 done 9660 9661 9662 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE"" 9663 DESCRIPTION="make in tools-dir" 9664 if test "x$MAKE_CANDIDATE" != x; then 9665 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 9666 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 9667 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 9668 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 9669 if test "x$IS_GNU_MAKE" = x; then 9670 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 9671 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 9672 else 9673 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 9674 if test "x$IS_MODERN_MAKE" = x; then 9675 { $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 9676 $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;} 9677 else 9678 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 9679 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9680 MAKE_EXPECTED_ENV='cygwin' 9681 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9682 MAKE_EXPECTED_ENV='msys' 9683 else 9684 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 9685 fi 9686 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 9687 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 9688 else 9689 # Not relevant for non-Windows 9690 IS_MAKE_CORRECT_ENV=true 9691 fi 9692 if test "x$IS_MAKE_CORRECT_ENV" = x; then 9693 { $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 9694 $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;} 9695 else 9696 FOUND_MAKE=$MAKE_CANDIDATE 9697 9698 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9699 9700 # First separate the path from the arguments. This will split at the first 9701 # space. 9702 complete="$FOUND_MAKE" 9703 path="${complete%% *}" 9704 tmp="$complete EOL" 9705 arguments="${tmp#* }" 9706 9707 # Input might be given as Windows format, start by converting to 9708 # unix format. 9709 new_path=`$CYGPATH -u "$path"` 9710 9711 # Now try to locate executable using which 9712 new_path=`$WHICH "$new_path" 2> /dev/null` 9713 # bat and cmd files are not always considered executable in cygwin causing which 9714 # to not find them 9715 if test "x$new_path" = x \ 9716 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9717 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9718 new_path=`$CYGPATH -u "$path"` 9719 fi 9720 if test "x$new_path" = x; then 9721 # Oops. Which didn't find the executable. 9722 # The splitting of arguments from the executable at a space might have been incorrect, 9723 # since paths with space are more likely in Windows. Give it another try with the whole 9724 # argument. 9725 path="$complete" 9726 arguments="EOL" 9727 new_path=`$CYGPATH -u "$path"` 9728 new_path=`$WHICH "$new_path" 2> /dev/null` 9729 # bat and cmd files are not always considered executable in cygwin causing which 9730 # to not find them 9731 if test "x$new_path" = x \ 9732 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9733 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9734 new_path=`$CYGPATH -u "$path"` 9735 fi 9736 if test "x$new_path" = x; then 9737 # It's still not found. Now this is an unrecoverable error. 9738 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9739 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9740 has_space=`$ECHO "$complete" | $GREP " "` 9741 if test "x$has_space" != x; then 9742 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9743 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9744 fi 9745 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9746 fi 9747 fi 9748 9749 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9750 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9751 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9752 # "foo.exe" is OK but "foo" is an error. 9753 # 9754 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9755 # It is also a way to make sure we got the proper file name for the real test later on. 9756 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9757 if test "x$test_shortpath" = x; then 9758 # Short path failed, file does not exist as specified. 9759 # Try adding .exe or .cmd 9760 if test -f "${new_path}.exe"; then 9761 input_to_shortpath="${new_path}.exe" 9762 elif test -f "${new_path}.cmd"; then 9763 input_to_shortpath="${new_path}.cmd" 9764 else 9765 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9766 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9767 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9768 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9769 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9770 fi 9771 else 9772 input_to_shortpath="$new_path" 9773 fi 9774 9775 # Call helper function which possibly converts this using DOS-style short mode. 9776 # If so, the updated path is stored in $new_path. 9777 new_path="$input_to_shortpath" 9778 9779 input_path="$input_to_shortpath" 9780 # Check if we need to convert this using DOS-style short mode. If the path 9781 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9782 # take no chances and rewrite it. 9783 # Note: m4 eats our [], so we need to use [ and ] instead. 9784 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9785 if test "x$has_forbidden_chars" != x; then 9786 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9787 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9788 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9789 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9790 # Going to short mode and back again did indeed matter. Since short mode is 9791 # case insensitive, let's make it lowercase to improve readability. 9792 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9793 # Now convert it back to Unix-stile (cygpath) 9794 input_path=`$CYGPATH -u "$shortmode_path"` 9795 new_path="$input_path" 9796 fi 9797 fi 9798 9799 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9800 if test "x$test_cygdrive_prefix" = x; then 9801 # As a simple fix, exclude /usr/bin since it's not a real path. 9802 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9803 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9804 # a path prefixed by /cygdrive for fixpath to work. 9805 new_path="$CYGWIN_ROOT_PATH$input_path" 9806 fi 9807 fi 9808 9809 # remove trailing .exe if any 9810 new_path="${new_path/%.exe/}" 9811 9812 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9813 9814 # First separate the path from the arguments. This will split at the first 9815 # space. 9816 complete="$FOUND_MAKE" 9817 path="${complete%% *}" 9818 tmp="$complete EOL" 9819 arguments="${tmp#* }" 9820 9821 # Input might be given as Windows format, start by converting to 9822 # unix format. 9823 new_path="$path" 9824 9825 windows_path="$new_path" 9826 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9827 unix_path=`$CYGPATH -u "$windows_path"` 9828 new_path="$unix_path" 9829 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9830 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9831 new_path="$unix_path" 9832 fi 9833 9834 9835 # Now try to locate executable using which 9836 new_path=`$WHICH "$new_path" 2> /dev/null` 9837 9838 if test "x$new_path" = x; then 9839 # Oops. Which didn't find the executable. 9840 # The splitting of arguments from the executable at a space might have been incorrect, 9841 # since paths with space are more likely in Windows. Give it another try with the whole 9842 # argument. 9843 path="$complete" 9844 arguments="EOL" 9845 new_path="$path" 9846 9847 windows_path="$new_path" 9848 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9849 unix_path=`$CYGPATH -u "$windows_path"` 9850 new_path="$unix_path" 9851 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9852 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9853 new_path="$unix_path" 9854 fi 9855 9856 9857 new_path=`$WHICH "$new_path" 2> /dev/null` 9858 9859 if test "x$new_path" = x; then 9860 # It's still not found. Now this is an unrecoverable error. 9861 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9862 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9863 has_space=`$ECHO "$complete" | $GREP " "` 9864 if test "x$has_space" != x; then 9865 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9866 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9867 fi 9868 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9869 fi 9870 fi 9871 9872 # Now new_path has a complete unix path to the binary 9873 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9874 # Keep paths in /bin as-is, but remove trailing .exe if any 9875 new_path="${new_path/%.exe/}" 9876 # Do not save /bin paths to all_fixpath_prefixes! 9877 else 9878 # Not in mixed or Windows style, start by that. 9879 new_path=`cmd //c echo $new_path` 9880 9881 input_path="$new_path" 9882 # Check if we need to convert this using DOS-style short mode. If the path 9883 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9884 # take no chances and rewrite it. 9885 # Note: m4 eats our [], so we need to use [ and ] instead. 9886 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9887 if test "x$has_forbidden_chars" != x; then 9888 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9889 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9890 fi 9891 9892 # Output is in $new_path 9893 9894 windows_path="$new_path" 9895 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9896 unix_path=`$CYGPATH -u "$windows_path"` 9897 new_path="$unix_path" 9898 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9899 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9900 new_path="$unix_path" 9901 fi 9902 9903 # remove trailing .exe if any 9904 new_path="${new_path/%.exe/}" 9905 9906 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9907 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9908 fi 9909 9910 else 9911 # We're on a posix platform. Hooray! :) 9912 # First separate the path from the arguments. This will split at the first 9913 # space. 9914 complete="$FOUND_MAKE" 9915 path="${complete%% *}" 9916 tmp="$complete EOL" 9917 arguments="${tmp#* }" 9918 9919 # Cannot rely on the command "which" here since it doesn't always work. 9920 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9921 if test -z "$is_absolute_path"; then 9922 # Path to executable is not absolute. Find it. 9923 IFS_save="$IFS" 9924 IFS=: 9925 for p in $PATH; do 9926 if test -f "$p/$path" && test -x "$p/$path"; then 9927 new_path="$p/$path" 9928 break 9929 fi 9930 done 9931 IFS="$IFS_save" 9932 else 9933 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9934 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9935 new_path="$path" 9936 fi 9937 9938 if test "x$new_path" = x; then 9939 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9940 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9941 has_space=`$ECHO "$complete" | $GREP " "` 9942 if test "x$has_space" != x; then 9943 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9944 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9945 fi 9946 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9947 fi 9948 fi 9949 9950 # Now join together the path and the arguments once again 9951 if test "x$arguments" != xEOL; then 9952 new_complete="$new_path ${arguments% *}" 9953 else 9954 new_complete="$new_path" 9955 fi 9956 9957 if test "x$complete" != "x$new_complete"; then 9958 FOUND_MAKE="$new_complete" 9959 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9960 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9961 fi 9962 9963 fi 9964 fi 9965 fi 9966 fi 9967 9968 fi 9969 PATH=$OLD_PATH 9970 fi 9971 fi 9972 9973 if test "x$FOUND_MAKE" = x; then 9974 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 9975 fi 9976 fi 9977 9978 MAKE=$FOUND_MAKE 9979 9980 { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5 9981 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;} 9982 9983 9984 9985 # Test if find supports -delete 9986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5 9987 $as_echo_n "checking if find supports -delete... " >&6; } 9988 FIND_DELETE="-delete" 9989 9990 DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?) 9991 9992 echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete 9993 9994 TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1` 9995 if test -f $DELETEDIR/TestIfFindSupportsDelete; then 9996 # No, it does not. 9997 rm $DELETEDIR/TestIfFindSupportsDelete 9998 FIND_DELETE="-exec rm \{\} \+" 9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10000 $as_echo "no" >&6; } 10001 else 10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10003 $as_echo "yes" >&6; } 10004 fi 10005 rmdir $DELETEDIR 10006 10007 10008 10009 # These tools might not be installed by default, 10010 # need hint on how to install them. 10011 10012 for ac_prog in unzip 10013 do 10014 # Extract the first word of "$ac_prog", so it can be a program name with args. 10015 set dummy $ac_prog; ac_word=$2 10016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10017 $as_echo_n "checking for $ac_word... " >&6; } 10018 if ${ac_cv_path_UNZIP+:} false; then : 10019 $as_echo_n "(cached) " >&6 10020 else 10021 case $UNZIP in 10022 [\\/]* | ?:[\\/]*) 10023 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path. 10024 ;; 10025 *) 10026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10027 for as_dir in $PATH 10028 do 10029 IFS=$as_save_IFS 10030 test -z "$as_dir" && as_dir=. 10031 for ac_exec_ext in '' $ac_executable_extensions; do 10032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10033 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext" 10034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10035 break 2 10036 fi 10037 done 10038 done 10039 IFS=$as_save_IFS 10040 10041 ;; 10042 esac 10043 fi 10044 UNZIP=$ac_cv_path_UNZIP 10045 if test -n "$UNZIP"; then 10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5 10047 $as_echo "$UNZIP" >&6; } 10048 else 10049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10050 $as_echo "no" >&6; } 10051 fi 10052 10053 10054 test -n "$UNZIP" && break 10055 done 10056 10057 10058 if test "x$UNZIP" = x; then 10059 if test "xunzip" = x; then 10060 PROG_NAME=unzip 10061 else 10062 PROG_NAME=unzip 10063 fi 10064 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10065 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10066 as_fn_error $? "Cannot continue" "$LINENO" 5 10067 fi 10068 10069 10070 10071 for ac_prog in zip 10072 do 10073 # Extract the first word of "$ac_prog", so it can be a program name with args. 10074 set dummy $ac_prog; ac_word=$2 10075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10076 $as_echo_n "checking for $ac_word... " >&6; } 10077 if ${ac_cv_path_ZIP+:} false; then : 10078 $as_echo_n "(cached) " >&6 10079 else 10080 case $ZIP in 10081 [\\/]* | ?:[\\/]*) 10082 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path. 10083 ;; 10084 *) 10085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10086 for as_dir in $PATH 10087 do 10088 IFS=$as_save_IFS 10089 test -z "$as_dir" && as_dir=. 10090 for ac_exec_ext in '' $ac_executable_extensions; do 10091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10092 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" 10093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10094 break 2 10095 fi 10096 done 10097 done 10098 IFS=$as_save_IFS 10099 10100 ;; 10101 esac 10102 fi 10103 ZIP=$ac_cv_path_ZIP 10104 if test -n "$ZIP"; then 10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5 10106 $as_echo "$ZIP" >&6; } 10107 else 10108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10109 $as_echo "no" >&6; } 10110 fi 10111 10112 10113 test -n "$ZIP" && break 10114 done 10115 10116 10117 if test "x$ZIP" = x; then 10118 if test "xzip" = x; then 10119 PROG_NAME=zip 10120 else 10121 PROG_NAME=zip 10122 fi 10123 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10124 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10125 as_fn_error $? "Cannot continue" "$LINENO" 5 10126 fi 10127 10128 10129 10130 # Non-required basic tools 10131 10132 # Extract the first word of "ldd", so it can be a program name with args. 10133 set dummy ldd; ac_word=$2 10134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10135 $as_echo_n "checking for $ac_word... " >&6; } 10136 if ${ac_cv_path_LDD+:} false; then : 10137 $as_echo_n "(cached) " >&6 10138 else 10139 case $LDD in 10140 [\\/]* | ?:[\\/]*) 10141 ac_cv_path_LDD="$LDD" # Let the user override the test with a path. 10142 ;; 10143 *) 10144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10145 for as_dir in $PATH 10146 do 10147 IFS=$as_save_IFS 10148 test -z "$as_dir" && as_dir=. 10149 for ac_exec_ext in '' $ac_executable_extensions; do 10150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10151 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext" 10152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10153 break 2 10154 fi 10155 done 10156 done 10157 IFS=$as_save_IFS 10158 10159 ;; 10160 esac 10161 fi 10162 LDD=$ac_cv_path_LDD 10163 if test -n "$LDD"; then 10164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5 10165 $as_echo "$LDD" >&6; } 10166 else 10167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10168 $as_echo "no" >&6; } 10169 fi 10170 10171 10172 if test "x$LDD" = "x"; then 10173 # List shared lib dependencies is used for 10174 # debug output and checking for forbidden dependencies. 10175 # We can build without it. 10176 LDD="true" 10177 fi 10178 # Extract the first word of "otool", so it can be a program name with args. 10179 set dummy otool; ac_word=$2 10180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10181 $as_echo_n "checking for $ac_word... " >&6; } 10182 if ${ac_cv_path_OTOOL+:} false; then : 10183 $as_echo_n "(cached) " >&6 10184 else 10185 case $OTOOL in 10186 [\\/]* | ?:[\\/]*) 10187 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path. 10188 ;; 10189 *) 10190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10191 for as_dir in $PATH 10192 do 10193 IFS=$as_save_IFS 10194 test -z "$as_dir" && as_dir=. 10195 for ac_exec_ext in '' $ac_executable_extensions; do 10196 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10197 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext" 10198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10199 break 2 10200 fi 10201 done 10202 done 10203 IFS=$as_save_IFS 10204 10205 ;; 10206 esac 10207 fi 10208 OTOOL=$ac_cv_path_OTOOL 10209 if test -n "$OTOOL"; then 10210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 10211 $as_echo "$OTOOL" >&6; } 10212 else 10213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10214 $as_echo "no" >&6; } 10215 fi 10216 10217 10218 if test "x$OTOOL" = "x"; then 10219 OTOOL="true" 10220 fi 10221 for ac_prog in readelf greadelf 10222 do 10223 # Extract the first word of "$ac_prog", so it can be a program name with args. 10224 set dummy $ac_prog; ac_word=$2 10225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10226 $as_echo_n "checking for $ac_word... " >&6; } 10227 if ${ac_cv_path_READELF+:} false; then : 10228 $as_echo_n "(cached) " >&6 10229 else 10230 case $READELF in 10231 [\\/]* | ?:[\\/]*) 10232 ac_cv_path_READELF="$READELF" # Let the user override the test with a path. 10233 ;; 10234 *) 10235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10236 for as_dir in $PATH 10237 do 10238 IFS=$as_save_IFS 10239 test -z "$as_dir" && as_dir=. 10240 for ac_exec_ext in '' $ac_executable_extensions; do 10241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10242 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext" 10243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10244 break 2 10245 fi 10246 done 10247 done 10248 IFS=$as_save_IFS 10249 10250 ;; 10251 esac 10252 fi 10253 READELF=$ac_cv_path_READELF 10254 if test -n "$READELF"; then 10255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 10256 $as_echo "$READELF" >&6; } 10257 else 10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10259 $as_echo "no" >&6; } 10260 fi 10261 10262 10263 test -n "$READELF" && break 10264 done 10265 10266 # Extract the first word of "hg", so it can be a program name with args. 10267 set dummy hg; ac_word=$2 10268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10269 $as_echo_n "checking for $ac_word... " >&6; } 10270 if ${ac_cv_path_HG+:} false; then : 10271 $as_echo_n "(cached) " >&6 10272 else 10273 case $HG in 10274 [\\/]* | ?:[\\/]*) 10275 ac_cv_path_HG="$HG" # Let the user override the test with a path. 10276 ;; 10277 *) 10278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10279 for as_dir in $PATH 10280 do 10281 IFS=$as_save_IFS 10282 test -z "$as_dir" && as_dir=. 10283 for ac_exec_ext in '' $ac_executable_extensions; do 10284 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10285 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext" 10286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10287 break 2 10288 fi 10289 done 10290 done 10291 IFS=$as_save_IFS 10292 10293 ;; 10294 esac 10295 fi 10296 HG=$ac_cv_path_HG 10297 if test -n "$HG"; then 10298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5 10299 $as_echo "$HG" >&6; } 10300 else 10301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10302 $as_echo "no" >&6; } 10303 fi 10304 10305 10306 # Extract the first word of "stat", so it can be a program name with args. 10307 set dummy stat; ac_word=$2 10308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10309 $as_echo_n "checking for $ac_word... " >&6; } 10310 if ${ac_cv_path_STAT+:} false; then : 10311 $as_echo_n "(cached) " >&6 10312 else 10313 case $STAT in 10314 [\\/]* | ?:[\\/]*) 10315 ac_cv_path_STAT="$STAT" # Let the user override the test with a path. 10316 ;; 10317 *) 10318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10319 for as_dir in $PATH 10320 do 10321 IFS=$as_save_IFS 10322 test -z "$as_dir" && as_dir=. 10323 for ac_exec_ext in '' $ac_executable_extensions; do 10324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10325 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext" 10326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10327 break 2 10328 fi 10329 done 10330 done 10331 IFS=$as_save_IFS 10332 10333 ;; 10334 esac 10335 fi 10336 STAT=$ac_cv_path_STAT 10337 if test -n "$STAT"; then 10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5 10339 $as_echo "$STAT" >&6; } 10340 else 10341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10342 $as_echo "no" >&6; } 10343 fi 10344 10345 10346 # Extract the first word of "time", so it can be a program name with args. 10347 set dummy time; ac_word=$2 10348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10349 $as_echo_n "checking for $ac_word... " >&6; } 10350 if ${ac_cv_path_TIME+:} false; then : 10351 $as_echo_n "(cached) " >&6 10352 else 10353 case $TIME in 10354 [\\/]* | ?:[\\/]*) 10355 ac_cv_path_TIME="$TIME" # Let the user override the test with a path. 10356 ;; 10357 *) 10358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10359 for as_dir in $PATH 10360 do 10361 IFS=$as_save_IFS 10362 test -z "$as_dir" && as_dir=. 10363 for ac_exec_ext in '' $ac_executable_extensions; do 10364 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10365 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext" 10366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10367 break 2 10368 fi 10369 done 10370 done 10371 IFS=$as_save_IFS 10372 10373 ;; 10374 esac 10375 fi 10376 TIME=$ac_cv_path_TIME 10377 if test -n "$TIME"; then 10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5 10379 $as_echo "$TIME" >&6; } 10380 else 10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10382 $as_echo "no" >&6; } 10383 fi 10384 10385 10386 # Check if it's GNU time 10387 IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'` 10388 if test "x$IS_GNU_TIME" != x; then 10389 IS_GNU_TIME=yes 10390 else 10391 IS_GNU_TIME=no 10392 fi 10393 10394 10395 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 10396 10397 for ac_prog in comm 10398 do 10399 # Extract the first word of "$ac_prog", so it can be a program name with args. 10400 set dummy $ac_prog; ac_word=$2 10401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10402 $as_echo_n "checking for $ac_word... " >&6; } 10403 if ${ac_cv_path_COMM+:} false; then : 10404 $as_echo_n "(cached) " >&6 10405 else 10406 case $COMM in 10407 [\\/]* | ?:[\\/]*) 10408 ac_cv_path_COMM="$COMM" # Let the user override the test with a path. 10409 ;; 10410 *) 10411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10412 for as_dir in $PATH 10413 do 10414 IFS=$as_save_IFS 10415 test -z "$as_dir" && as_dir=. 10416 for ac_exec_ext in '' $ac_executable_extensions; do 10417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10418 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext" 10419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10420 break 2 10421 fi 10422 done 10423 done 10424 IFS=$as_save_IFS 10425 10426 ;; 10427 esac 10428 fi 10429 COMM=$ac_cv_path_COMM 10430 if test -n "$COMM"; then 10431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5 10432 $as_echo "$COMM" >&6; } 10433 else 10434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10435 $as_echo "no" >&6; } 10436 fi 10437 10438 10439 test -n "$COMM" && break 10440 done 10441 10442 10443 if test "x$COMM" = x; then 10444 if test "xcomm" = x; then 10445 PROG_NAME=comm 10446 else 10447 PROG_NAME=comm 10448 fi 10449 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10450 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10451 as_fn_error $? "Cannot continue" "$LINENO" 5 10452 fi 10453 10454 10455 fi 10456 10457 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 10458 10459 for ac_prog in xattr 10460 do 10461 # Extract the first word of "$ac_prog", so it can be a program name with args. 10462 set dummy $ac_prog; ac_word=$2 10463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10464 $as_echo_n "checking for $ac_word... " >&6; } 10465 if ${ac_cv_path_XATTR+:} false; then : 10466 $as_echo_n "(cached) " >&6 10467 else 10468 case $XATTR in 10469 [\\/]* | ?:[\\/]*) 10470 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path. 10471 ;; 10472 *) 10473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10474 for as_dir in $PATH 10475 do 10476 IFS=$as_save_IFS 10477 test -z "$as_dir" && as_dir=. 10478 for ac_exec_ext in '' $ac_executable_extensions; do 10479 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10480 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext" 10481 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10482 break 2 10483 fi 10484 done 10485 done 10486 IFS=$as_save_IFS 10487 10488 ;; 10489 esac 10490 fi 10491 XATTR=$ac_cv_path_XATTR 10492 if test -n "$XATTR"; then 10493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5 10494 $as_echo "$XATTR" >&6; } 10495 else 10496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10497 $as_echo "no" >&6; } 10498 fi 10499 10500 10501 test -n "$XATTR" && break 10502 done 10503 10504 10505 if test "x$XATTR" = x; then 10506 if test "xxattr" = x; then 10507 PROG_NAME=xattr 10508 else 10509 PROG_NAME=xattr 10510 fi 10511 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10512 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10513 as_fn_error $? "Cannot continue" "$LINENO" 5 10514 fi 10515 10516 10517 # Extract the first word of "codesign", so it can be a program name with args. 10518 set dummy codesign; ac_word=$2 10519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10520 $as_echo_n "checking for $ac_word... " >&6; } 10521 if ${ac_cv_path_CODESIGN+:} false; then : 10522 $as_echo_n "(cached) " >&6 10523 else 10524 case $CODESIGN in 10525 [\\/]* | ?:[\\/]*) 10526 ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path. 10527 ;; 10528 *) 10529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10530 for as_dir in $PATH 10531 do 10532 IFS=$as_save_IFS 10533 test -z "$as_dir" && as_dir=. 10534 for ac_exec_ext in '' $ac_executable_extensions; do 10535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10536 ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext" 10537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10538 break 2 10539 fi 10540 done 10541 done 10542 IFS=$as_save_IFS 10543 10544 ;; 10545 esac 10546 fi 10547 CODESIGN=$ac_cv_path_CODESIGN 10548 if test -n "$CODESIGN"; then 10549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5 10550 $as_echo "$CODESIGN" >&6; } 10551 else 10552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10553 $as_echo "no" >&6; } 10554 fi 10555 10556 10557 if test "x$CODESIGN" != "x"; then 10558 # Verify that the openjdk_codesign certificate is present 10559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5 10560 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; } 10561 rm -f codesign-testfile 10562 touch codesign-testfile 10563 codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN= 10564 rm -f codesign-testfile 10565 if test "x$CODESIGN" = x; then 10566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10567 $as_echo "no" >&6; } 10568 else 10569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10570 $as_echo "yes" >&6; } 10571 fi 10572 fi 10573 fi 10574 10575 10576 # Check if pkg-config is available. 10577 10578 10579 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 10580 if test -n "$ac_tool_prefix"; then 10581 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. 10582 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 10583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10584 $as_echo_n "checking for $ac_word... " >&6; } 10585 if ${ac_cv_path_PKG_CONFIG+:} false; then : 10586 $as_echo_n "(cached) " >&6 10587 else 10588 case $PKG_CONFIG in 10589 [\\/]* | ?:[\\/]*) 10590 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. 10591 ;; 10592 *) 10593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10594 for as_dir in $PATH 10595 do 10596 IFS=$as_save_IFS 10597 test -z "$as_dir" && as_dir=. 10598 for ac_exec_ext in '' $ac_executable_extensions; do 10599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10600 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 10601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10602 break 2 10603 fi 10604 done 10605 done 10606 IFS=$as_save_IFS 10607 10608 ;; 10609 esac 10610 fi 10611 PKG_CONFIG=$ac_cv_path_PKG_CONFIG 10612 if test -n "$PKG_CONFIG"; then 10613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 10614 $as_echo "$PKG_CONFIG" >&6; } 10615 else 10616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10617 $as_echo "no" >&6; } 10618 fi 10619 10620 10621 fi 10622 if test -z "$ac_cv_path_PKG_CONFIG"; then 10623 ac_pt_PKG_CONFIG=$PKG_CONFIG 10624 # Extract the first word of "pkg-config", so it can be a program name with args. 10625 set dummy pkg-config; ac_word=$2 10626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10627 $as_echo_n "checking for $ac_word... " >&6; } 10628 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : 10629 $as_echo_n "(cached) " >&6 10630 else 10631 case $ac_pt_PKG_CONFIG in 10632 [\\/]* | ?:[\\/]*) 10633 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. 10634 ;; 10635 *) 10636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10637 for as_dir in $PATH 10638 do 10639 IFS=$as_save_IFS 10640 test -z "$as_dir" && as_dir=. 10641 for ac_exec_ext in '' $ac_executable_extensions; do 10642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10643 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 10644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10645 break 2 10646 fi 10647 done 10648 done 10649 IFS=$as_save_IFS 10650 10651 ;; 10652 esac 10653 fi 10654 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG 10655 if test -n "$ac_pt_PKG_CONFIG"; then 10656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 10657 $as_echo "$ac_pt_PKG_CONFIG" >&6; } 10658 else 10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10660 $as_echo "no" >&6; } 10661 fi 10662 10663 if test "x$ac_pt_PKG_CONFIG" = x; then 10664 PKG_CONFIG="" 10665 else 10666 case $cross_compiling:$ac_tool_warned in 10667 yes:) 10668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 10669 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 10670 ac_tool_warned=yes ;; 10671 esac 10672 PKG_CONFIG=$ac_pt_PKG_CONFIG 10673 fi 10674 else 10675 PKG_CONFIG="$ac_cv_path_PKG_CONFIG" 10676 fi 10677 10678 fi 10679 if test -n "$PKG_CONFIG"; then 10680 _pkg_min_version=0.9.0 10681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 10682 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } 10683 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 10684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10685 $as_echo "yes" >&6; } 10686 else 10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10688 $as_echo "no" >&6; } 10689 PKG_CONFIG="" 10690 fi 10691 10692 fi 10693 10694 # After basic tools have been setup, we can check build os specific details. 10695 10696 ############################################################################### 10697 10698 # Note that this is the build platform OS version! 10699 10700 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`" 10701 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`" 10702 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`" 10703 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`" 10704 10705 10706 10707 10708 10709 # Setup builddeps, for automatic downloading of tools we need. 10710 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in 10711 # boot-jdk setup, but we need to have basic tools setup first. 10712 10713 10714 # Check whether --with-builddeps-conf was given. 10715 if test "${with_builddeps_conf+set}" = set; then : 10716 withval=$with_builddeps_conf; 10717 fi 10718 10719 10720 10721 # Check whether --with-builddeps-server was given. 10722 if test "${with_builddeps_server+set}" = set; then : 10723 withval=$with_builddeps_server; 10724 fi 10725 10726 10727 10728 # Check whether --with-builddeps-dir was given. 10729 if test "${with_builddeps_dir+set}" = set; then : 10730 withval=$with_builddeps_dir; 10731 else 10732 with_builddeps_dir=/localhome/builddeps 10733 fi 10734 10735 10736 10737 # Check whether --with-builddeps-group was given. 10738 if test "${with_builddeps_group+set}" = set; then : 10739 withval=$with_builddeps_group; 10740 fi 10741 10742 10743 10744 10745 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 10746 if test "x$with_builddeps_conf" != x; then 10747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5 10748 $as_echo_n "checking for supplied builddeps configuration file... " >&6; } 10749 builddepsfile=$with_builddeps_conf 10750 if test -s $builddepsfile; then 10751 . $builddepsfile 10752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5 10753 $as_echo "loaded!" >&6; } 10754 else 10755 as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5 10756 fi 10757 else 10758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5 10759 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; } 10760 builddepsfile=`mktemp` 10761 touch $builddepsfile 10762 # Put all found confs into a single file. 10763 find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile 10764 # Source the file to acquire the variables 10765 if test -s $builddepsfile; then 10766 . $builddepsfile 10767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5 10768 $as_echo "found at least one!" >&6; } 10769 else 10770 as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5 10771 fi 10772 fi 10773 # Create build and target names that use _ instead of "-" and ".". 10774 # This is necessary to use them in variable names. 10775 build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` 10776 target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` 10777 # Extract rewrite information for build and target 10778 eval rewritten_build=\${REWRITE_${build_var}} 10779 if test "x$rewritten_build" = x; then 10780 rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME} 10781 echo Build stays the same $rewritten_build 10782 else 10783 echo Rewriting build for builddeps into $rewritten_build 10784 fi 10785 eval rewritten_target=\${REWRITE_${target_var}} 10786 if test "x$rewritten_target" = x; then 10787 rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME} 10788 echo Target stays the same $rewritten_target 10789 else 10790 echo Rewriting target for builddeps into $rewritten_target 10791 fi 10792 rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'` 10793 rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'` 10794 fi 10795 for ac_prog in 7z unzip 10796 do 10797 # Extract the first word of "$ac_prog", so it can be a program name with args. 10798 set dummy $ac_prog; ac_word=$2 10799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10800 $as_echo_n "checking for $ac_word... " >&6; } 10801 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then : 10802 $as_echo_n "(cached) " >&6 10803 else 10804 if test -n "$BDEPS_UNZIP"; then 10805 ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test. 10806 else 10807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10808 for as_dir in $PATH 10809 do 10810 IFS=$as_save_IFS 10811 test -z "$as_dir" && as_dir=. 10812 for ac_exec_ext in '' $ac_executable_extensions; do 10813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10814 ac_cv_prog_BDEPS_UNZIP="$ac_prog" 10815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10816 break 2 10817 fi 10818 done 10819 done 10820 IFS=$as_save_IFS 10821 10822 fi 10823 fi 10824 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP 10825 if test -n "$BDEPS_UNZIP"; then 10826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5 10827 $as_echo "$BDEPS_UNZIP" >&6; } 10828 else 10829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10830 $as_echo "no" >&6; } 10831 fi 10832 10833 10834 test -n "$BDEPS_UNZIP" && break 10835 done 10836 10837 if test "x$BDEPS_UNZIP" = x7z; then 10838 BDEPS_UNZIP="7z x" 10839 fi 10840 10841 for ac_prog in wget lftp ftp 10842 do 10843 # Extract the first word of "$ac_prog", so it can be a program name with args. 10844 set dummy $ac_prog; ac_word=$2 10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10846 $as_echo_n "checking for $ac_word... " >&6; } 10847 if ${ac_cv_prog_BDEPS_FTP+:} false; then : 10848 $as_echo_n "(cached) " >&6 10849 else 10850 if test -n "$BDEPS_FTP"; then 10851 ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test. 10852 else 10853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10854 for as_dir in $PATH 10855 do 10856 IFS=$as_save_IFS 10857 test -z "$as_dir" && as_dir=. 10858 for ac_exec_ext in '' $ac_executable_extensions; do 10859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 10860 ac_cv_prog_BDEPS_FTP="$ac_prog" 10861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10862 break 2 10863 fi 10864 done 10865 done 10866 IFS=$as_save_IFS 10867 10868 fi 10869 fi 10870 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP 10871 if test -n "$BDEPS_FTP"; then 10872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5 10873 $as_echo "$BDEPS_FTP" >&6; } 10874 else 10875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10876 $as_echo "no" >&6; } 10877 fi 10878 10879 10880 test -n "$BDEPS_FTP" && break 10881 done 10882 10883 10884 10885 ############################################################################### 10886 # 10887 # Determine OpenJDK variants, options and version numbers. 10888 # 10889 ############################################################################### 10890 10891 # We need build & target for this. 10892 10893 10894 ############################################################################### 10895 # 10896 # Should we build a JDK/JVM with headful support (ie a graphical ui)? 10897 # We always build headless support. 10898 # 10899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5 10900 $as_echo_n "checking headful support... " >&6; } 10901 # Check whether --enable-headful was given. 10902 if test "${enable_headful+set}" = set; then : 10903 enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful} 10904 else 10905 SUPPORT_HEADFUL=yes 10906 fi 10907 10908 10909 SUPPORT_HEADLESS=yes 10910 BUILD_HEADLESS="BUILD_HEADLESS:=true" 10911 10912 if test "x$SUPPORT_HEADFUL" = xyes; then 10913 # We are building both headful and headless. 10914 headful_msg="inlude support for both headful and headless" 10915 fi 10916 10917 if test "x$SUPPORT_HEADFUL" = xno; then 10918 # Thus we are building headless only. 10919 BUILD_HEADLESS="BUILD_HEADLESS:=true" 10920 headful_msg="headless only" 10921 fi 10922 10923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5 10924 $as_echo "$headful_msg" >&6; } 10925 10926 10927 10928 10929 10930 # Control wether Hotspot runs Queens test after build. 10931 # Check whether --enable-hotspot-test-in-build was given. 10932 if test "${enable_hotspot_test_in_build+set}" = set; then : 10933 enableval=$enable_hotspot_test_in_build; 10934 else 10935 enable_hotspot_test_in_build=no 10936 fi 10937 10938 if test "x$enable_hotspot_test_in_build" = "xyes"; then 10939 TEST_IN_BUILD=true 10940 else 10941 TEST_IN_BUILD=false 10942 fi 10943 10944 10945 ############################################################################### 10946 # 10947 # Choose cacerts source file 10948 # 10949 10950 # Check whether --with-cacerts-file was given. 10951 if test "${with_cacerts_file+set}" = set; then : 10952 withval=$with_cacerts_file; 10953 fi 10954 10955 if test "x$with_cacerts_file" != x; then 10956 CACERTS_FILE=$with_cacerts_file 10957 else 10958 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts 10959 fi 10960 10961 10962 ############################################################################### 10963 # 10964 # Enable or disable unlimited crypto 10965 # 10966 # Check whether --enable-unlimited-crypto was given. 10967 if test "${enable_unlimited_crypto+set}" = set; then : 10968 enableval=$enable_unlimited_crypto; 10969 else 10970 enable_unlimited_crypto=no 10971 fi 10972 10973 if test "x$enable_unlimited_crypto" = "xyes"; then 10974 UNLIMITED_CRYPTO=true 10975 else 10976 UNLIMITED_CRYPTO=false 10977 fi 10978 10979 10980 ############################################################################### 10981 # 10982 # Enable or disable the elliptic curve crypto implementation 10983 # 10984 10985 10986 ############################################################################### 10987 # 10988 # Compress jars 10989 # 10990 COMPRESS_JARS=false 10991 10992 10993 10994 10995 # Source the version numbers 10996 . $AUTOCONF_DIR/version-numbers 10997 10998 # Get the settings from parameters 10999 11000 # Check whether --with-milestone was given. 11001 if test "${with_milestone+set}" = set; then : 11002 withval=$with_milestone; 11003 fi 11004 11005 if test "x$with_milestone" = xyes; then 11006 as_fn_error $? "Milestone must have a value" "$LINENO" 5 11007 elif test "x$with_milestone" != x; then 11008 MILESTONE="$with_milestone" 11009 fi 11010 if test "x$MILESTONE" = x; then 11011 MILESTONE=internal 11012 fi 11013 11014 11015 # Check whether --with-update-version was given. 11016 if test "${with_update_version+set}" = set; then : 11017 withval=$with_update_version; 11018 fi 11019 11020 if test "x$with_update_version" = xyes; then 11021 as_fn_error $? "Update version must have a value" "$LINENO" 5 11022 elif test "x$with_update_version" != x; then 11023 JDK_UPDATE_VERSION="$with_update_version" 11024 fi 11025 11026 11027 # Check whether --with-build-number was given. 11028 if test "${with_build_number+set}" = set; then : 11029 withval=$with_build_number; 11030 fi 11031 11032 if test "x$with_build_number" = xyes; then 11033 as_fn_error $? "Build number must have a value" "$LINENO" 5 11034 elif test "x$with_build_number" != x; then 11035 JDK_BUILD_NUMBER="$with_build_number" 11036 fi 11037 if test "x$JDK_BUILD_NUMBER" = x; then 11038 JDK_BUILD_NUMBER=b00 11039 fi 11040 11041 11042 # Check whether --with-user-release-suffix was given. 11043 if test "${with_user_release_suffix+set}" = set; then : 11044 withval=$with_user_release_suffix; 11045 fi 11046 11047 if test "x$with_user_release_suffix" = xyes; then 11048 as_fn_error $? "Release suffix must have a value" "$LINENO" 5 11049 elif test "x$with_user_release_suffix" != x; then 11050 USER_RELEASE_SUFFIX="$with_user_release_suffix" 11051 else 11052 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` 11053 # Avoid [:alnum:] since it depends on the locale. 11054 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` 11055 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11056 fi 11057 11058 11059 # Now set the JDK version, milestone, build number etc. 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 COPYRIGHT_YEAR=`date +'%Y'` 11075 11076 11077 if test "x$JDK_UPDATE_VERSION" != x; then 11078 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" 11079 else 11080 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" 11081 fi 11082 11083 11084 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` 11085 11086 11087 11088 ############################################################################### 11089 # 11090 # Setup BootJDK, used to bootstrap the build. 11091 # 11092 ############################################################################### 11093 11094 11095 BOOT_JDK_FOUND=no 11096 11097 # Check whether --with-boot-jdk was given. 11098 if test "${with_boot_jdk+set}" = set; then : 11099 withval=$with_boot_jdk; 11100 fi 11101 11102 11103 # We look for the Boot JDK through various means, going from more certain to 11104 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if 11105 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we 11106 # must check if this is indeed valid; otherwise we'll continue looking. 11107 11108 # Test: Is bootjdk explicitely set by command line arguments? 11109 11110 if test "x$BOOT_JDK_FOUND" = xno; then 11111 # Now execute the test 11112 11113 if test "x$with_boot_jdk" != x; then 11114 BOOT_JDK=$with_boot_jdk 11115 BOOT_JDK_FOUND=maybe 11116 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5 11117 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;} 11118 fi 11119 11120 11121 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11122 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11123 # Do we have a bin/java? 11124 if test ! -x "$BOOT_JDK/bin/java"; then 11125 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11126 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11127 BOOT_JDK_FOUND=no 11128 else 11129 # Do we have a bin/javac? 11130 if test ! -x "$BOOT_JDK/bin/javac"; then 11131 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11132 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11133 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11134 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11135 BOOT_JDK_FOUND=no 11136 else 11137 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11138 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11139 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11141 BOOT_JDK_FOUND=no 11142 else 11143 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11144 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11145 11146 # Extra M4 quote needed to protect [] in grep expression. 11147 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11148 if test "x$FOUND_VERSION_78" = x; then 11149 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11150 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11151 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11152 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11153 BOOT_JDK_FOUND=no 11154 else 11155 # We're done! :-) 11156 BOOT_JDK_FOUND=yes 11157 11158 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11159 11160 # Input might be given as Windows format, start by converting to 11161 # unix format. 11162 path="$BOOT_JDK" 11163 new_path=`$CYGPATH -u "$path"` 11164 11165 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11166 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11167 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11168 # "foo.exe" is OK but "foo" is an error. 11169 # 11170 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11171 # It is also a way to make sure we got the proper file name for the real test later on. 11172 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11173 if test "x$test_shortpath" = x; then 11174 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11175 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11176 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11177 fi 11178 11179 # Call helper function which possibly converts this using DOS-style short mode. 11180 # If so, the updated path is stored in $new_path. 11181 11182 input_path="$new_path" 11183 # Check if we need to convert this using DOS-style short mode. If the path 11184 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11185 # take no chances and rewrite it. 11186 # Note: m4 eats our [], so we need to use [ and ] instead. 11187 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11188 if test "x$has_forbidden_chars" != x; then 11189 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11190 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11191 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11192 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11193 # Going to short mode and back again did indeed matter. Since short mode is 11194 # case insensitive, let's make it lowercase to improve readability. 11195 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11196 # Now convert it back to Unix-stile (cygpath) 11197 input_path=`$CYGPATH -u "$shortmode_path"` 11198 new_path="$input_path" 11199 fi 11200 fi 11201 11202 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11203 if test "x$test_cygdrive_prefix" = x; then 11204 # As a simple fix, exclude /usr/bin since it's not a real path. 11205 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11206 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11207 # a path prefixed by /cygdrive for fixpath to work. 11208 new_path="$CYGWIN_ROOT_PATH$input_path" 11209 fi 11210 fi 11211 11212 11213 if test "x$path" != "x$new_path"; then 11214 BOOT_JDK="$new_path" 11215 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11216 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11217 fi 11218 11219 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11220 11221 path="$BOOT_JDK" 11222 has_colon=`$ECHO $path | $GREP ^.:` 11223 new_path="$path" 11224 if test "x$has_colon" = x; then 11225 # Not in mixed or Windows style, start by that. 11226 new_path=`cmd //c echo $path` 11227 fi 11228 11229 11230 input_path="$new_path" 11231 # Check if we need to convert this using DOS-style short mode. If the path 11232 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11233 # take no chances and rewrite it. 11234 # Note: m4 eats our [], so we need to use [ and ] instead. 11235 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11236 if test "x$has_forbidden_chars" != x; then 11237 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11238 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11239 fi 11240 11241 11242 windows_path="$new_path" 11243 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11244 unix_path=`$CYGPATH -u "$windows_path"` 11245 new_path="$unix_path" 11246 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11247 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11248 new_path="$unix_path" 11249 fi 11250 11251 if test "x$path" != "x$new_path"; then 11252 BOOT_JDK="$new_path" 11253 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11254 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11255 fi 11256 11257 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11258 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11259 11260 else 11261 # We're on a posix platform. Hooray! :) 11262 path="$BOOT_JDK" 11263 has_space=`$ECHO "$path" | $GREP " "` 11264 if test "x$has_space" != x; then 11265 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11266 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11267 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11268 fi 11269 11270 # Use eval to expand a potential ~ 11271 eval path="$path" 11272 if test ! -f "$path" && test ! -d "$path"; then 11273 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11274 fi 11275 11276 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 11277 fi 11278 11279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11280 $as_echo_n "checking for Boot JDK... " >&6; } 11281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11282 $as_echo "$BOOT_JDK" >&6; } 11283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11284 $as_echo_n "checking Boot JDK version... " >&6; } 11285 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11287 $as_echo "$BOOT_JDK_VERSION" >&6; } 11288 fi # end check jdk version 11289 fi # end check rt.jar 11290 fi # end check javac 11291 fi # end check java 11292 fi # end check boot jdk found 11293 fi 11294 11295 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then 11296 # Having specified an argument which is incorrect will produce an instant failure; 11297 # we should not go on looking 11298 as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5 11299 fi 11300 11301 # Test: Is bootjdk available from builddeps? 11302 11303 if test "x$BOOT_JDK_FOUND" = xno; then 11304 # Now execute the test 11305 11306 11307 11308 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 11309 # Source the builddeps file again, to make sure it uses the latest variables! 11310 . $builddepsfile 11311 # Look for a target and build machine specific resource! 11312 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 11313 if test "x$resource" = x; then 11314 # Ok, lets instead look for a target specific resource 11315 eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}} 11316 fi 11317 if test "x$resource" = x; then 11318 # Ok, lets instead look for a build specific resource 11319 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}} 11320 fi 11321 if test "x$resource" = x; then 11322 # Ok, lets instead look for a generic resource 11323 # (The bootjdk comes from M4 and not the shell, thus no need for eval here.) 11324 resource=${builddep_bootjdk} 11325 fi 11326 if test "x$resource" != x; then 11327 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5 11328 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;} 11329 # If the resource in the builddeps.conf file is an existing directory, 11330 # for example /java/linux/cups 11331 if test -d ${resource}; then 11332 depdir=${resource} 11333 else 11334 11335 # bootjdk is for example mymodule 11336 # $resource is for example libs/general/libmymod_1_2_3.zip 11337 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 11338 # $with_builddeps_dir is for example /localhome/builddeps 11339 # depdir is the name of the variable into which we store the depdir, eg MYMOD 11340 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 11341 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 11342 filename=`basename $resource` 11343 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 11344 filebase=${filename%%.*} 11345 extension=${filename#*.} 11346 installdir=$with_builddeps_dir/$filebase 11347 if test ! -f $installdir/$filename.unpacked; then 11348 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5 11349 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;} 11350 if test ! -d $installdir; then 11351 mkdir -p $installdir 11352 fi 11353 if test ! -d $installdir; then 11354 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 11355 fi 11356 tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX` 11357 touch $tmpfile 11358 if test ! -f $tmpfile; then 11359 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 11360 fi 11361 11362 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 11363 # $tmpfile is the local file name for the downloaded file. 11364 VALID_TOOL=no 11365 if test "x$BDEPS_FTP" = xwget; then 11366 VALID_TOOL=yes 11367 wget -O $tmpfile $with_builddeps_server/$resource 11368 fi 11369 if test "x$BDEPS_FTP" = xlftp; then 11370 VALID_TOOL=yes 11371 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 11372 fi 11373 if test "x$BDEPS_FTP" = xftp; then 11374 VALID_TOOL=yes 11375 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 11376 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 11377 FTPUSERPWD=${FTPSERVER%%@*} 11378 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 11379 FTPUSER=${userpwd%%:*} 11380 FTPPWD=${userpwd#*@} 11381 FTPSERVER=${FTPSERVER#*@} 11382 else 11383 FTPUSER=ftp 11384 FTPPWD=ftp 11385 fi 11386 # the "pass" command does not work on some 11387 # ftp clients (read ftp.exe) but if it works, 11388 # passive mode is better! 11389 (\ 11390 echo "user $FTPUSER $FTPPWD" ;\ 11391 echo "pass" ;\ 11392 echo "bin" ;\ 11393 echo "get $FTPPATH $tmpfile" ;\ 11394 ) | ftp -in $FTPSERVER 11395 fi 11396 if test "x$VALID_TOOL" != xyes; then 11397 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 11398 fi 11399 11400 mv $tmpfile $installdir/$filename 11401 if test ! -s $installdir/$filename; then 11402 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 11403 fi 11404 case "$extension" in 11405 zip) echo "Unzipping $installdir/$filename..." 11406 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 11407 ;; 11408 tar.gz) echo "Untaring $installdir/$filename..." 11409 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 11410 ;; 11411 tgz) echo "Untaring $installdir/$filename..." 11412 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 11413 ;; 11414 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 11415 ;; 11416 esac 11417 fi 11418 if test -f $installdir/$filename.unpacked; then 11419 depdir=$installdir 11420 fi 11421 11422 fi 11423 # Source the builddeps file again, because in the previous command, the depdir 11424 # was updated to point at the current build dependency install directory. 11425 . $builddepsfile 11426 # Now extract variables from the builddeps.conf files. 11427 theroot=${builddep_bootjdk_ROOT} 11428 thecflags=${builddep_bootjdk_CFLAGS} 11429 thelibs=${builddep_bootjdk_LIBS} 11430 if test "x$depdir" = x; then 11431 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5 11432 fi 11433 BOOT_JDK=$depdir 11434 if test "x$theroot" != x; then 11435 BOOT_JDK="$theroot" 11436 fi 11437 if test "x$thecflags" != x; then 11438 BOOT_JDK_CFLAGS="$thecflags" 11439 fi 11440 if test "x$thelibs" != x; then 11441 BOOT_JDK_LIBS="$thelibs" 11442 fi 11443 BOOT_JDK_FOUND=maybe 11444 else BOOT_JDK_FOUND=no 11445 11446 fi 11447 else BOOT_JDK_FOUND=no 11448 11449 fi 11450 11451 11452 11453 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11454 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11455 # Do we have a bin/java? 11456 if test ! -x "$BOOT_JDK/bin/java"; then 11457 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11458 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11459 BOOT_JDK_FOUND=no 11460 else 11461 # Do we have a bin/javac? 11462 if test ! -x "$BOOT_JDK/bin/javac"; then 11463 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11465 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11466 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11467 BOOT_JDK_FOUND=no 11468 else 11469 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11470 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11471 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11472 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11473 BOOT_JDK_FOUND=no 11474 else 11475 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11476 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11477 11478 # Extra M4 quote needed to protect [] in grep expression. 11479 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11480 if test "x$FOUND_VERSION_78" = x; then 11481 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11482 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11483 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11484 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11485 BOOT_JDK_FOUND=no 11486 else 11487 # We're done! :-) 11488 BOOT_JDK_FOUND=yes 11489 11490 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11491 11492 # Input might be given as Windows format, start by converting to 11493 # unix format. 11494 path="$BOOT_JDK" 11495 new_path=`$CYGPATH -u "$path"` 11496 11497 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11498 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11499 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11500 # "foo.exe" is OK but "foo" is an error. 11501 # 11502 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11503 # It is also a way to make sure we got the proper file name for the real test later on. 11504 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11505 if test "x$test_shortpath" = x; then 11506 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11507 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11508 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11509 fi 11510 11511 # Call helper function which possibly converts this using DOS-style short mode. 11512 # If so, the updated path is stored in $new_path. 11513 11514 input_path="$new_path" 11515 # Check if we need to convert this using DOS-style short mode. If the path 11516 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11517 # take no chances and rewrite it. 11518 # Note: m4 eats our [], so we need to use [ and ] instead. 11519 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11520 if test "x$has_forbidden_chars" != x; then 11521 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11522 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11523 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11524 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11525 # Going to short mode and back again did indeed matter. Since short mode is 11526 # case insensitive, let's make it lowercase to improve readability. 11527 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11528 # Now convert it back to Unix-stile (cygpath) 11529 input_path=`$CYGPATH -u "$shortmode_path"` 11530 new_path="$input_path" 11531 fi 11532 fi 11533 11534 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11535 if test "x$test_cygdrive_prefix" = x; then 11536 # As a simple fix, exclude /usr/bin since it's not a real path. 11537 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11538 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11539 # a path prefixed by /cygdrive for fixpath to work. 11540 new_path="$CYGWIN_ROOT_PATH$input_path" 11541 fi 11542 fi 11543 11544 11545 if test "x$path" != "x$new_path"; then 11546 BOOT_JDK="$new_path" 11547 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11549 fi 11550 11551 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11552 11553 path="$BOOT_JDK" 11554 has_colon=`$ECHO $path | $GREP ^.:` 11555 new_path="$path" 11556 if test "x$has_colon" = x; then 11557 # Not in mixed or Windows style, start by that. 11558 new_path=`cmd //c echo $path` 11559 fi 11560 11561 11562 input_path="$new_path" 11563 # Check if we need to convert this using DOS-style short mode. If the path 11564 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11565 # take no chances and rewrite it. 11566 # Note: m4 eats our [], so we need to use [ and ] instead. 11567 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11568 if test "x$has_forbidden_chars" != x; then 11569 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11570 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11571 fi 11572 11573 11574 windows_path="$new_path" 11575 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11576 unix_path=`$CYGPATH -u "$windows_path"` 11577 new_path="$unix_path" 11578 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11579 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11580 new_path="$unix_path" 11581 fi 11582 11583 if test "x$path" != "x$new_path"; then 11584 BOOT_JDK="$new_path" 11585 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11586 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11587 fi 11588 11589 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11590 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11591 11592 else 11593 # We're on a posix platform. Hooray! :) 11594 path="$BOOT_JDK" 11595 has_space=`$ECHO "$path" | $GREP " "` 11596 if test "x$has_space" != x; then 11597 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11598 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11599 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11600 fi 11601 11602 # Use eval to expand a potential ~ 11603 eval path="$path" 11604 if test ! -f "$path" && test ! -d "$path"; then 11605 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11606 fi 11607 11608 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 11609 fi 11610 11611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11612 $as_echo_n "checking for Boot JDK... " >&6; } 11613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11614 $as_echo "$BOOT_JDK" >&6; } 11615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11616 $as_echo_n "checking Boot JDK version... " >&6; } 11617 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11619 $as_echo "$BOOT_JDK_VERSION" >&6; } 11620 fi # end check jdk version 11621 fi # end check rt.jar 11622 fi # end check javac 11623 fi # end check java 11624 fi # end check boot jdk found 11625 fi 11626 11627 11628 # Test: Is $JAVA_HOME set? 11629 11630 if test "x$BOOT_JDK_FOUND" = xno; then 11631 # Now execute the test 11632 11633 if test "x$JAVA_HOME" != x; then 11634 JAVA_HOME_PROCESSED="$JAVA_HOME" 11635 11636 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11637 11638 # Input might be given as Windows format, start by converting to 11639 # unix format. 11640 path="$JAVA_HOME_PROCESSED" 11641 new_path=`$CYGPATH -u "$path"` 11642 11643 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11644 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11645 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11646 # "foo.exe" is OK but "foo" is an error. 11647 # 11648 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11649 # It is also a way to make sure we got the proper file name for the real test later on. 11650 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11651 if test "x$test_shortpath" = x; then 11652 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5 11653 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;} 11654 as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5 11655 fi 11656 11657 # Call helper function which possibly converts this using DOS-style short mode. 11658 # If so, the updated path is stored in $new_path. 11659 11660 input_path="$new_path" 11661 # Check if we need to convert this using DOS-style short mode. If the path 11662 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11663 # take no chances and rewrite it. 11664 # Note: m4 eats our [], so we need to use [ and ] instead. 11665 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11666 if test "x$has_forbidden_chars" != x; then 11667 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11668 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11669 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11670 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11671 # Going to short mode and back again did indeed matter. Since short mode is 11672 # case insensitive, let's make it lowercase to improve readability. 11673 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11674 # Now convert it back to Unix-stile (cygpath) 11675 input_path=`$CYGPATH -u "$shortmode_path"` 11676 new_path="$input_path" 11677 fi 11678 fi 11679 11680 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11681 if test "x$test_cygdrive_prefix" = x; then 11682 # As a simple fix, exclude /usr/bin since it's not a real path. 11683 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11684 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11685 # a path prefixed by /cygdrive for fixpath to work. 11686 new_path="$CYGWIN_ROOT_PATH$input_path" 11687 fi 11688 fi 11689 11690 11691 if test "x$path" != "x$new_path"; then 11692 JAVA_HOME_PROCESSED="$new_path" 11693 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5 11694 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;} 11695 fi 11696 11697 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11698 11699 path="$JAVA_HOME_PROCESSED" 11700 has_colon=`$ECHO $path | $GREP ^.:` 11701 new_path="$path" 11702 if test "x$has_colon" = x; then 11703 # Not in mixed or Windows style, start by that. 11704 new_path=`cmd //c echo $path` 11705 fi 11706 11707 11708 input_path="$new_path" 11709 # Check if we need to convert this using DOS-style short mode. If the path 11710 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11711 # take no chances and rewrite it. 11712 # Note: m4 eats our [], so we need to use [ and ] instead. 11713 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11714 if test "x$has_forbidden_chars" != x; then 11715 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11716 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11717 fi 11718 11719 11720 windows_path="$new_path" 11721 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11722 unix_path=`$CYGPATH -u "$windows_path"` 11723 new_path="$unix_path" 11724 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11725 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11726 new_path="$unix_path" 11727 fi 11728 11729 if test "x$path" != "x$new_path"; then 11730 JAVA_HOME_PROCESSED="$new_path" 11731 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5 11732 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;} 11733 fi 11734 11735 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11736 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11737 11738 else 11739 # We're on a posix platform. Hooray! :) 11740 path="$JAVA_HOME_PROCESSED" 11741 has_space=`$ECHO "$path" | $GREP " "` 11742 if test "x$has_space" != x; then 11743 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5 11744 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;} 11745 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11746 fi 11747 11748 # Use eval to expand a potential ~ 11749 eval path="$path" 11750 if test ! -f "$path" && test ! -d "$path"; then 11751 as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5 11752 fi 11753 11754 JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`" 11755 fi 11756 11757 if test ! -d "$JAVA_HOME_PROCESSED"; then 11758 { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5 11759 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;} 11760 else 11761 # Aha, the user has set a JAVA_HOME 11762 # let us use that as the Boot JDK. 11763 BOOT_JDK="$JAVA_HOME_PROCESSED" 11764 BOOT_JDK_FOUND=maybe 11765 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5 11766 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;} 11767 fi 11768 fi 11769 11770 11771 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11772 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11773 # Do we have a bin/java? 11774 if test ! -x "$BOOT_JDK/bin/java"; then 11775 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11776 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11777 BOOT_JDK_FOUND=no 11778 else 11779 # Do we have a bin/javac? 11780 if test ! -x "$BOOT_JDK/bin/javac"; then 11781 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11782 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11783 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11784 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11785 BOOT_JDK_FOUND=no 11786 else 11787 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11788 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11789 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11790 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11791 BOOT_JDK_FOUND=no 11792 else 11793 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11794 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11795 11796 # Extra M4 quote needed to protect [] in grep expression. 11797 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11798 if test "x$FOUND_VERSION_78" = x; then 11799 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11801 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11802 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11803 BOOT_JDK_FOUND=no 11804 else 11805 # We're done! :-) 11806 BOOT_JDK_FOUND=yes 11807 11808 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11809 11810 # Input might be given as Windows format, start by converting to 11811 # unix format. 11812 path="$BOOT_JDK" 11813 new_path=`$CYGPATH -u "$path"` 11814 11815 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11816 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11817 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11818 # "foo.exe" is OK but "foo" is an error. 11819 # 11820 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11821 # It is also a way to make sure we got the proper file name for the real test later on. 11822 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11823 if test "x$test_shortpath" = x; then 11824 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11825 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11826 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11827 fi 11828 11829 # Call helper function which possibly converts this using DOS-style short mode. 11830 # If so, the updated path is stored in $new_path. 11831 11832 input_path="$new_path" 11833 # Check if we need to convert this using DOS-style short mode. If the path 11834 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11835 # take no chances and rewrite it. 11836 # Note: m4 eats our [], so we need to use [ and ] instead. 11837 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11838 if test "x$has_forbidden_chars" != x; then 11839 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11840 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11841 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11842 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11843 # Going to short mode and back again did indeed matter. Since short mode is 11844 # case insensitive, let's make it lowercase to improve readability. 11845 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11846 # Now convert it back to Unix-stile (cygpath) 11847 input_path=`$CYGPATH -u "$shortmode_path"` 11848 new_path="$input_path" 11849 fi 11850 fi 11851 11852 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11853 if test "x$test_cygdrive_prefix" = x; then 11854 # As a simple fix, exclude /usr/bin since it's not a real path. 11855 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11856 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11857 # a path prefixed by /cygdrive for fixpath to work. 11858 new_path="$CYGWIN_ROOT_PATH$input_path" 11859 fi 11860 fi 11861 11862 11863 if test "x$path" != "x$new_path"; then 11864 BOOT_JDK="$new_path" 11865 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11866 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11867 fi 11868 11869 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11870 11871 path="$BOOT_JDK" 11872 has_colon=`$ECHO $path | $GREP ^.:` 11873 new_path="$path" 11874 if test "x$has_colon" = x; then 11875 # Not in mixed or Windows style, start by that. 11876 new_path=`cmd //c echo $path` 11877 fi 11878 11879 11880 input_path="$new_path" 11881 # Check if we need to convert this using DOS-style short mode. If the path 11882 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11883 # take no chances and rewrite it. 11884 # Note: m4 eats our [], so we need to use [ and ] instead. 11885 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11886 if test "x$has_forbidden_chars" != x; then 11887 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11888 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11889 fi 11890 11891 11892 windows_path="$new_path" 11893 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11894 unix_path=`$CYGPATH -u "$windows_path"` 11895 new_path="$unix_path" 11896 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11897 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11898 new_path="$unix_path" 11899 fi 11900 11901 if test "x$path" != "x$new_path"; then 11902 BOOT_JDK="$new_path" 11903 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11904 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11905 fi 11906 11907 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11908 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11909 11910 else 11911 # We're on a posix platform. Hooray! :) 11912 path="$BOOT_JDK" 11913 has_space=`$ECHO "$path" | $GREP " "` 11914 if test "x$has_space" != x; then 11915 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11916 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11917 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11918 fi 11919 11920 # Use eval to expand a potential ~ 11921 eval path="$path" 11922 if test ! -f "$path" && test ! -d "$path"; then 11923 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11924 fi 11925 11926 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 11927 fi 11928 11929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11930 $as_echo_n "checking for Boot JDK... " >&6; } 11931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11932 $as_echo "$BOOT_JDK" >&6; } 11933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11934 $as_echo_n "checking Boot JDK version... " >&6; } 11935 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11937 $as_echo "$BOOT_JDK_VERSION" >&6; } 11938 fi # end check jdk version 11939 fi # end check rt.jar 11940 fi # end check javac 11941 fi # end check java 11942 fi # end check boot jdk found 11943 fi 11944 11945 11946 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) 11947 11948 if test "x$BOOT_JDK_FOUND" = xno; then 11949 # Now execute the test 11950 11951 if test -x /usr/libexec/java_home; then 11952 BOOT_JDK=`/usr/libexec/java_home` 11953 BOOT_JDK_FOUND=maybe 11954 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5 11955 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;} 11956 fi 11957 11958 11959 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11960 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11961 # Do we have a bin/java? 11962 if test ! -x "$BOOT_JDK/bin/java"; then 11963 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11964 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11965 BOOT_JDK_FOUND=no 11966 else 11967 # Do we have a bin/javac? 11968 if test ! -x "$BOOT_JDK/bin/javac"; then 11969 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11970 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11971 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11972 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11973 BOOT_JDK_FOUND=no 11974 else 11975 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11976 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11977 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11978 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11979 BOOT_JDK_FOUND=no 11980 else 11981 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11982 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11983 11984 # Extra M4 quote needed to protect [] in grep expression. 11985 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11986 if test "x$FOUND_VERSION_78" = x; then 11987 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11988 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11989 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11990 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11991 BOOT_JDK_FOUND=no 11992 else 11993 # We're done! :-) 11994 BOOT_JDK_FOUND=yes 11995 11996 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11997 11998 # Input might be given as Windows format, start by converting to 11999 # unix format. 12000 path="$BOOT_JDK" 12001 new_path=`$CYGPATH -u "$path"` 12002 12003 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12004 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12005 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12006 # "foo.exe" is OK but "foo" is an error. 12007 # 12008 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12009 # It is also a way to make sure we got the proper file name for the real test later on. 12010 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12011 if test "x$test_shortpath" = x; then 12012 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12013 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12014 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12015 fi 12016 12017 # Call helper function which possibly converts this using DOS-style short mode. 12018 # If so, the updated path is stored in $new_path. 12019 12020 input_path="$new_path" 12021 # Check if we need to convert this using DOS-style short mode. If the path 12022 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12023 # take no chances and rewrite it. 12024 # Note: m4 eats our [], so we need to use [ and ] instead. 12025 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12026 if test "x$has_forbidden_chars" != x; then 12027 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12028 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12029 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12030 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12031 # Going to short mode and back again did indeed matter. Since short mode is 12032 # case insensitive, let's make it lowercase to improve readability. 12033 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12034 # Now convert it back to Unix-stile (cygpath) 12035 input_path=`$CYGPATH -u "$shortmode_path"` 12036 new_path="$input_path" 12037 fi 12038 fi 12039 12040 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12041 if test "x$test_cygdrive_prefix" = x; then 12042 # As a simple fix, exclude /usr/bin since it's not a real path. 12043 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12044 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12045 # a path prefixed by /cygdrive for fixpath to work. 12046 new_path="$CYGWIN_ROOT_PATH$input_path" 12047 fi 12048 fi 12049 12050 12051 if test "x$path" != "x$new_path"; then 12052 BOOT_JDK="$new_path" 12053 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12054 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12055 fi 12056 12057 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12058 12059 path="$BOOT_JDK" 12060 has_colon=`$ECHO $path | $GREP ^.:` 12061 new_path="$path" 12062 if test "x$has_colon" = x; then 12063 # Not in mixed or Windows style, start by that. 12064 new_path=`cmd //c echo $path` 12065 fi 12066 12067 12068 input_path="$new_path" 12069 # Check if we need to convert this using DOS-style short mode. If the path 12070 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12071 # take no chances and rewrite it. 12072 # Note: m4 eats our [], so we need to use [ and ] instead. 12073 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12074 if test "x$has_forbidden_chars" != x; then 12075 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12076 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12077 fi 12078 12079 12080 windows_path="$new_path" 12081 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12082 unix_path=`$CYGPATH -u "$windows_path"` 12083 new_path="$unix_path" 12084 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12085 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12086 new_path="$unix_path" 12087 fi 12088 12089 if test "x$path" != "x$new_path"; then 12090 BOOT_JDK="$new_path" 12091 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12092 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12093 fi 12094 12095 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12096 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12097 12098 else 12099 # We're on a posix platform. Hooray! :) 12100 path="$BOOT_JDK" 12101 has_space=`$ECHO "$path" | $GREP " "` 12102 if test "x$has_space" != x; then 12103 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12104 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12105 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12106 fi 12107 12108 # Use eval to expand a potential ~ 12109 eval path="$path" 12110 if test ! -f "$path" && test ! -d "$path"; then 12111 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12112 fi 12113 12114 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 12115 fi 12116 12117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12118 $as_echo_n "checking for Boot JDK... " >&6; } 12119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12120 $as_echo "$BOOT_JDK" >&6; } 12121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12122 $as_echo_n "checking Boot JDK version... " >&6; } 12123 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12125 $as_echo "$BOOT_JDK_VERSION" >&6; } 12126 fi # end check jdk version 12127 fi # end check rt.jar 12128 fi # end check javac 12129 fi # end check java 12130 fi # end check boot jdk found 12131 fi 12132 12133 12134 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK? 12135 12136 if test "x$BOOT_JDK_FOUND" = xno; then 12137 # Now execute the test 12138 12139 # Extract the first word of "javac", so it can be a program name with args. 12140 set dummy javac; ac_word=$2 12141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 12142 $as_echo_n "checking for $ac_word... " >&6; } 12143 if ${ac_cv_path_JAVAC_CHECK+:} false; then : 12144 $as_echo_n "(cached) " >&6 12145 else 12146 case $JAVAC_CHECK in 12147 [\\/]* | ?:[\\/]*) 12148 ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path. 12149 ;; 12150 *) 12151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12152 for as_dir in $PATH 12153 do 12154 IFS=$as_save_IFS 12155 test -z "$as_dir" && as_dir=. 12156 for ac_exec_ext in '' $ac_executable_extensions; do 12157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 12158 ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext" 12159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 12160 break 2 12161 fi 12162 done 12163 done 12164 IFS=$as_save_IFS 12165 12166 ;; 12167 esac 12168 fi 12169 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK 12170 if test -n "$JAVAC_CHECK"; then 12171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5 12172 $as_echo "$JAVAC_CHECK" >&6; } 12173 else 12174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12175 $as_echo "no" >&6; } 12176 fi 12177 12178 12179 # Extract the first word of "java", so it can be a program name with args. 12180 set dummy java; ac_word=$2 12181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 12182 $as_echo_n "checking for $ac_word... " >&6; } 12183 if ${ac_cv_path_JAVA_CHECK+:} false; then : 12184 $as_echo_n "(cached) " >&6 12185 else 12186 case $JAVA_CHECK in 12187 [\\/]* | ?:[\\/]*) 12188 ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path. 12189 ;; 12190 *) 12191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12192 for as_dir in $PATH 12193 do 12194 IFS=$as_save_IFS 12195 test -z "$as_dir" && as_dir=. 12196 for ac_exec_ext in '' $ac_executable_extensions; do 12197 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 12198 ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext" 12199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 12200 break 2 12201 fi 12202 done 12203 done 12204 IFS=$as_save_IFS 12205 12206 ;; 12207 esac 12208 fi 12209 JAVA_CHECK=$ac_cv_path_JAVA_CHECK 12210 if test -n "$JAVA_CHECK"; then 12211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5 12212 $as_echo "$JAVA_CHECK" >&6; } 12213 else 12214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12215 $as_echo "no" >&6; } 12216 fi 12217 12218 12219 BINARY="$JAVAC_CHECK" 12220 if test "x$JAVAC_CHECK" = x; then 12221 BINARY="$JAVA_CHECK" 12222 fi 12223 if test "x$BINARY" != x; then 12224 # So there is a java(c) binary, it might be part of a JDK. 12225 # Lets find the JDK/JRE directory by following symbolic links. 12226 # Linux/GNU systems often have links from /usr/bin/java to 12227 # /etc/alternatives/java to the real JDK binary. 12228 12229 if test "x$OPENJDK_BUILD_OS" != xwindows; then 12230 # Follow a chain of symbolic links. Use readlink 12231 # where it exists, else fall back to horribly 12232 # complicated shell code. 12233 if test "x$READLINK_TESTED" != yes; then 12234 # On MacOSX there is a readlink tool with a different 12235 # purpose than the GNU readlink tool. Check the found readlink. 12236 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 12237 if test "x$ISGNU" = x; then 12238 # A readlink that we do not know how to use. 12239 # Are there other non-GNU readlinks out there? 12240 READLINK_TESTED=yes 12241 READLINK= 12242 fi 12243 fi 12244 12245 if test "x$READLINK" != x; then 12246 BINARY=`$READLINK -f $BINARY` 12247 else 12248 # Save the current directory for restoring afterwards 12249 STARTDIR=$PWD 12250 COUNTER=0 12251 sym_link_dir=`$DIRNAME $BINARY` 12252 sym_link_file=`$BASENAME $BINARY` 12253 cd $sym_link_dir 12254 # Use -P flag to resolve symlinks in directories. 12255 cd `$THEPWDCMD -P` 12256 sym_link_dir=`$THEPWDCMD -P` 12257 # Resolve file symlinks 12258 while test $COUNTER -lt 20; do 12259 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 12260 if test "x$ISLINK" == x; then 12261 # This is not a symbolic link! We are done! 12262 break 12263 fi 12264 # Again resolve directory symlinks since the target of the just found 12265 # link could be in a different directory 12266 cd `$DIRNAME $ISLINK` 12267 sym_link_dir=`$THEPWDCMD -P` 12268 sym_link_file=`$BASENAME $ISLINK` 12269 let COUNTER=COUNTER+1 12270 done 12271 cd $STARTDIR 12272 BINARY=$sym_link_dir/$sym_link_file 12273 fi 12274 fi 12275 12276 BOOT_JDK=`dirname "$BINARY"` 12277 BOOT_JDK=`cd "$BOOT_JDK/.."; pwd` 12278 if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then 12279 # Looks like we found ourselves an JDK 12280 BOOT_JDK_FOUND=maybe 12281 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5 12282 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;} 12283 fi 12284 fi 12285 12286 12287 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12288 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12289 # Do we have a bin/java? 12290 if test ! -x "$BOOT_JDK/bin/java"; then 12291 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12292 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12293 BOOT_JDK_FOUND=no 12294 else 12295 # Do we have a bin/javac? 12296 if test ! -x "$BOOT_JDK/bin/javac"; then 12297 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12298 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12299 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12300 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12301 BOOT_JDK_FOUND=no 12302 else 12303 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12304 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12305 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12306 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12307 BOOT_JDK_FOUND=no 12308 else 12309 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12310 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12311 12312 # Extra M4 quote needed to protect [] in grep expression. 12313 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12314 if test "x$FOUND_VERSION_78" = x; then 12315 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12316 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12317 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12318 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12319 BOOT_JDK_FOUND=no 12320 else 12321 # We're done! :-) 12322 BOOT_JDK_FOUND=yes 12323 12324 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12325 12326 # Input might be given as Windows format, start by converting to 12327 # unix format. 12328 path="$BOOT_JDK" 12329 new_path=`$CYGPATH -u "$path"` 12330 12331 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12332 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12333 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12334 # "foo.exe" is OK but "foo" is an error. 12335 # 12336 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12337 # It is also a way to make sure we got the proper file name for the real test later on. 12338 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12339 if test "x$test_shortpath" = x; then 12340 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12341 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12342 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12343 fi 12344 12345 # Call helper function which possibly converts this using DOS-style short mode. 12346 # If so, the updated path is stored in $new_path. 12347 12348 input_path="$new_path" 12349 # Check if we need to convert this using DOS-style short mode. If the path 12350 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12351 # take no chances and rewrite it. 12352 # Note: m4 eats our [], so we need to use [ and ] instead. 12353 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12354 if test "x$has_forbidden_chars" != x; then 12355 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12356 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12357 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12358 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12359 # Going to short mode and back again did indeed matter. Since short mode is 12360 # case insensitive, let's make it lowercase to improve readability. 12361 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12362 # Now convert it back to Unix-stile (cygpath) 12363 input_path=`$CYGPATH -u "$shortmode_path"` 12364 new_path="$input_path" 12365 fi 12366 fi 12367 12368 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12369 if test "x$test_cygdrive_prefix" = x; then 12370 # As a simple fix, exclude /usr/bin since it's not a real path. 12371 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12372 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12373 # a path prefixed by /cygdrive for fixpath to work. 12374 new_path="$CYGWIN_ROOT_PATH$input_path" 12375 fi 12376 fi 12377 12378 12379 if test "x$path" != "x$new_path"; then 12380 BOOT_JDK="$new_path" 12381 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12382 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12383 fi 12384 12385 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12386 12387 path="$BOOT_JDK" 12388 has_colon=`$ECHO $path | $GREP ^.:` 12389 new_path="$path" 12390 if test "x$has_colon" = x; then 12391 # Not in mixed or Windows style, start by that. 12392 new_path=`cmd //c echo $path` 12393 fi 12394 12395 12396 input_path="$new_path" 12397 # Check if we need to convert this using DOS-style short mode. If the path 12398 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12399 # take no chances and rewrite it. 12400 # Note: m4 eats our [], so we need to use [ and ] instead. 12401 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12402 if test "x$has_forbidden_chars" != x; then 12403 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12404 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12405 fi 12406 12407 12408 windows_path="$new_path" 12409 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12410 unix_path=`$CYGPATH -u "$windows_path"` 12411 new_path="$unix_path" 12412 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12413 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12414 new_path="$unix_path" 12415 fi 12416 12417 if test "x$path" != "x$new_path"; then 12418 BOOT_JDK="$new_path" 12419 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12420 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12421 fi 12422 12423 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12424 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12425 12426 else 12427 # We're on a posix platform. Hooray! :) 12428 path="$BOOT_JDK" 12429 has_space=`$ECHO "$path" | $GREP " "` 12430 if test "x$has_space" != x; then 12431 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12432 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12433 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12434 fi 12435 12436 # Use eval to expand a potential ~ 12437 eval path="$path" 12438 if test ! -f "$path" && test ! -d "$path"; then 12439 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12440 fi 12441 12442 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 12443 fi 12444 12445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12446 $as_echo_n "checking for Boot JDK... " >&6; } 12447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12448 $as_echo "$BOOT_JDK" >&6; } 12449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12450 $as_echo_n "checking Boot JDK version... " >&6; } 12451 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12453 $as_echo "$BOOT_JDK_VERSION" >&6; } 12454 fi # end check jdk version 12455 fi # end check rt.jar 12456 fi # end check javac 12457 fi # end check java 12458 fi # end check boot jdk found 12459 fi 12460 12461 12462 # Test: Is there a JDK installed in default, well-known locations? 12463 12464 if test "x$BOOT_JDK_FOUND" = xno; then 12465 # Now execute the test 12466 12467 if test "x$OPENJDK_TARGET_OS" = xwindows; then 12468 12469 if test "x$BOOT_JDK_FOUND" = xno; then 12470 # Now execute the test 12471 12472 if test "x$ProgramW6432" != x; then 12473 VIRTUAL_DIR="$ProgramW6432/Java" 12474 12475 windows_path="$VIRTUAL_DIR" 12476 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12477 unix_path=`$CYGPATH -u "$windows_path"` 12478 VIRTUAL_DIR="$unix_path" 12479 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12480 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12481 VIRTUAL_DIR="$unix_path" 12482 fi 12483 12484 12485 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 12486 BOOT_JDK_SUFFIX="" 12487 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 12488 if test "x$ALL_JDKS_FOUND" != x; then 12489 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 12490 12491 if test "x$BOOT_JDK_FOUND" = xno; then 12492 # Now execute the test 12493 12494 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 12495 if test -d "$BOOT_JDK"; then 12496 BOOT_JDK_FOUND=maybe 12497 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 12498 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 12499 fi 12500 12501 12502 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12503 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12504 # Do we have a bin/java? 12505 if test ! -x "$BOOT_JDK/bin/java"; then 12506 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12507 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12508 BOOT_JDK_FOUND=no 12509 else 12510 # Do we have a bin/javac? 12511 if test ! -x "$BOOT_JDK/bin/javac"; then 12512 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12513 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12514 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12515 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12516 BOOT_JDK_FOUND=no 12517 else 12518 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12519 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12520 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12521 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12522 BOOT_JDK_FOUND=no 12523 else 12524 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12525 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12526 12527 # Extra M4 quote needed to protect [] in grep expression. 12528 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12529 if test "x$FOUND_VERSION_78" = x; then 12530 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12531 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12532 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12533 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12534 BOOT_JDK_FOUND=no 12535 else 12536 # We're done! :-) 12537 BOOT_JDK_FOUND=yes 12538 12539 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12540 12541 # Input might be given as Windows format, start by converting to 12542 # unix format. 12543 path="$BOOT_JDK" 12544 new_path=`$CYGPATH -u "$path"` 12545 12546 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12547 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12548 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12549 # "foo.exe" is OK but "foo" is an error. 12550 # 12551 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12552 # It is also a way to make sure we got the proper file name for the real test later on. 12553 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12554 if test "x$test_shortpath" = x; then 12555 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12556 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12557 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12558 fi 12559 12560 # Call helper function which possibly converts this using DOS-style short mode. 12561 # If so, the updated path is stored in $new_path. 12562 12563 input_path="$new_path" 12564 # Check if we need to convert this using DOS-style short mode. If the path 12565 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12566 # take no chances and rewrite it. 12567 # Note: m4 eats our [], so we need to use [ and ] instead. 12568 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12569 if test "x$has_forbidden_chars" != x; then 12570 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12571 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12572 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12573 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12574 # Going to short mode and back again did indeed matter. Since short mode is 12575 # case insensitive, let's make it lowercase to improve readability. 12576 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12577 # Now convert it back to Unix-stile (cygpath) 12578 input_path=`$CYGPATH -u "$shortmode_path"` 12579 new_path="$input_path" 12580 fi 12581 fi 12582 12583 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12584 if test "x$test_cygdrive_prefix" = x; then 12585 # As a simple fix, exclude /usr/bin since it's not a real path. 12586 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12587 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12588 # a path prefixed by /cygdrive for fixpath to work. 12589 new_path="$CYGWIN_ROOT_PATH$input_path" 12590 fi 12591 fi 12592 12593 12594 if test "x$path" != "x$new_path"; then 12595 BOOT_JDK="$new_path" 12596 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12597 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12598 fi 12599 12600 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12601 12602 path="$BOOT_JDK" 12603 has_colon=`$ECHO $path | $GREP ^.:` 12604 new_path="$path" 12605 if test "x$has_colon" = x; then 12606 # Not in mixed or Windows style, start by that. 12607 new_path=`cmd //c echo $path` 12608 fi 12609 12610 12611 input_path="$new_path" 12612 # Check if we need to convert this using DOS-style short mode. If the path 12613 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12614 # take no chances and rewrite it. 12615 # Note: m4 eats our [], so we need to use [ and ] instead. 12616 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12617 if test "x$has_forbidden_chars" != x; then 12618 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12619 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12620 fi 12621 12622 12623 windows_path="$new_path" 12624 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12625 unix_path=`$CYGPATH -u "$windows_path"` 12626 new_path="$unix_path" 12627 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12628 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12629 new_path="$unix_path" 12630 fi 12631 12632 if test "x$path" != "x$new_path"; then 12633 BOOT_JDK="$new_path" 12634 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12635 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12636 fi 12637 12638 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12639 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12640 12641 else 12642 # We're on a posix platform. Hooray! :) 12643 path="$BOOT_JDK" 12644 has_space=`$ECHO "$path" | $GREP " "` 12645 if test "x$has_space" != x; then 12646 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12647 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12648 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12649 fi 12650 12651 # Use eval to expand a potential ~ 12652 eval path="$path" 12653 if test ! -f "$path" && test ! -d "$path"; then 12654 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12655 fi 12656 12657 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 12658 fi 12659 12660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12661 $as_echo_n "checking for Boot JDK... " >&6; } 12662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12663 $as_echo "$BOOT_JDK" >&6; } 12664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12665 $as_echo_n "checking Boot JDK version... " >&6; } 12666 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12668 $as_echo "$BOOT_JDK_VERSION" >&6; } 12669 fi # end check jdk version 12670 fi # end check rt.jar 12671 fi # end check javac 12672 fi # end check java 12673 fi # end check boot jdk found 12674 fi 12675 12676 done 12677 fi 12678 12679 fi 12680 12681 12682 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12683 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12684 # Do we have a bin/java? 12685 if test ! -x "$BOOT_JDK/bin/java"; then 12686 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12688 BOOT_JDK_FOUND=no 12689 else 12690 # Do we have a bin/javac? 12691 if test ! -x "$BOOT_JDK/bin/javac"; then 12692 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12693 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12694 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12695 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12696 BOOT_JDK_FOUND=no 12697 else 12698 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12699 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12700 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12701 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12702 BOOT_JDK_FOUND=no 12703 else 12704 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12705 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12706 12707 # Extra M4 quote needed to protect [] in grep expression. 12708 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12709 if test "x$FOUND_VERSION_78" = x; then 12710 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12712 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12713 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12714 BOOT_JDK_FOUND=no 12715 else 12716 # We're done! :-) 12717 BOOT_JDK_FOUND=yes 12718 12719 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12720 12721 # Input might be given as Windows format, start by converting to 12722 # unix format. 12723 path="$BOOT_JDK" 12724 new_path=`$CYGPATH -u "$path"` 12725 12726 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12727 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12728 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12729 # "foo.exe" is OK but "foo" is an error. 12730 # 12731 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12732 # It is also a way to make sure we got the proper file name for the real test later on. 12733 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12734 if test "x$test_shortpath" = x; then 12735 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12736 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12737 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12738 fi 12739 12740 # Call helper function which possibly converts this using DOS-style short mode. 12741 # If so, the updated path is stored in $new_path. 12742 12743 input_path="$new_path" 12744 # Check if we need to convert this using DOS-style short mode. If the path 12745 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12746 # take no chances and rewrite it. 12747 # Note: m4 eats our [], so we need to use [ and ] instead. 12748 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12749 if test "x$has_forbidden_chars" != x; then 12750 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12751 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12752 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12753 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12754 # Going to short mode and back again did indeed matter. Since short mode is 12755 # case insensitive, let's make it lowercase to improve readability. 12756 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12757 # Now convert it back to Unix-stile (cygpath) 12758 input_path=`$CYGPATH -u "$shortmode_path"` 12759 new_path="$input_path" 12760 fi 12761 fi 12762 12763 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12764 if test "x$test_cygdrive_prefix" = x; then 12765 # As a simple fix, exclude /usr/bin since it's not a real path. 12766 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12767 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12768 # a path prefixed by /cygdrive for fixpath to work. 12769 new_path="$CYGWIN_ROOT_PATH$input_path" 12770 fi 12771 fi 12772 12773 12774 if test "x$path" != "x$new_path"; then 12775 BOOT_JDK="$new_path" 12776 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12777 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12778 fi 12779 12780 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12781 12782 path="$BOOT_JDK" 12783 has_colon=`$ECHO $path | $GREP ^.:` 12784 new_path="$path" 12785 if test "x$has_colon" = x; then 12786 # Not in mixed or Windows style, start by that. 12787 new_path=`cmd //c echo $path` 12788 fi 12789 12790 12791 input_path="$new_path" 12792 # Check if we need to convert this using DOS-style short mode. If the path 12793 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12794 # take no chances and rewrite it. 12795 # Note: m4 eats our [], so we need to use [ and ] instead. 12796 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12797 if test "x$has_forbidden_chars" != x; then 12798 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12799 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12800 fi 12801 12802 12803 windows_path="$new_path" 12804 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12805 unix_path=`$CYGPATH -u "$windows_path"` 12806 new_path="$unix_path" 12807 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12808 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12809 new_path="$unix_path" 12810 fi 12811 12812 if test "x$path" != "x$new_path"; then 12813 BOOT_JDK="$new_path" 12814 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12815 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12816 fi 12817 12818 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12819 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12820 12821 else 12822 # We're on a posix platform. Hooray! :) 12823 path="$BOOT_JDK" 12824 has_space=`$ECHO "$path" | $GREP " "` 12825 if test "x$has_space" != x; then 12826 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12827 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12828 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12829 fi 12830 12831 # Use eval to expand a potential ~ 12832 eval path="$path" 12833 if test ! -f "$path" && test ! -d "$path"; then 12834 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12835 fi 12836 12837 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 12838 fi 12839 12840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12841 $as_echo_n "checking for Boot JDK... " >&6; } 12842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12843 $as_echo "$BOOT_JDK" >&6; } 12844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12845 $as_echo_n "checking Boot JDK version... " >&6; } 12846 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12848 $as_echo "$BOOT_JDK_VERSION" >&6; } 12849 fi # end check jdk version 12850 fi # end check rt.jar 12851 fi # end check javac 12852 fi # end check java 12853 fi # end check boot jdk found 12854 fi 12855 12856 12857 if test "x$BOOT_JDK_FOUND" = xno; then 12858 # Now execute the test 12859 12860 if test "x$PROGRAMW6432" != x; then 12861 VIRTUAL_DIR="$PROGRAMW6432/Java" 12862 12863 windows_path="$VIRTUAL_DIR" 12864 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12865 unix_path=`$CYGPATH -u "$windows_path"` 12866 VIRTUAL_DIR="$unix_path" 12867 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12868 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12869 VIRTUAL_DIR="$unix_path" 12870 fi 12871 12872 12873 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 12874 BOOT_JDK_SUFFIX="" 12875 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 12876 if test "x$ALL_JDKS_FOUND" != x; then 12877 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 12878 12879 if test "x$BOOT_JDK_FOUND" = xno; then 12880 # Now execute the test 12881 12882 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 12883 if test -d "$BOOT_JDK"; then 12884 BOOT_JDK_FOUND=maybe 12885 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 12886 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 12887 fi 12888 12889 12890 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12891 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12892 # Do we have a bin/java? 12893 if test ! -x "$BOOT_JDK/bin/java"; then 12894 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12895 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12896 BOOT_JDK_FOUND=no 12897 else 12898 # Do we have a bin/javac? 12899 if test ! -x "$BOOT_JDK/bin/javac"; then 12900 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12901 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12902 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12903 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12904 BOOT_JDK_FOUND=no 12905 else 12906 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12907 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12908 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12910 BOOT_JDK_FOUND=no 12911 else 12912 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12913 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12914 12915 # Extra M4 quote needed to protect [] in grep expression. 12916 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12917 if test "x$FOUND_VERSION_78" = x; then 12918 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12919 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12920 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12921 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12922 BOOT_JDK_FOUND=no 12923 else 12924 # We're done! :-) 12925 BOOT_JDK_FOUND=yes 12926 12927 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12928 12929 # Input might be given as Windows format, start by converting to 12930 # unix format. 12931 path="$BOOT_JDK" 12932 new_path=`$CYGPATH -u "$path"` 12933 12934 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12935 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12936 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12937 # "foo.exe" is OK but "foo" is an error. 12938 # 12939 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12940 # It is also a way to make sure we got the proper file name for the real test later on. 12941 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12942 if test "x$test_shortpath" = x; then 12943 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12944 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12945 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12946 fi 12947 12948 # Call helper function which possibly converts this using DOS-style short mode. 12949 # If so, the updated path is stored in $new_path. 12950 12951 input_path="$new_path" 12952 # Check if we need to convert this using DOS-style short mode. If the path 12953 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12954 # take no chances and rewrite it. 12955 # Note: m4 eats our [], so we need to use [ and ] instead. 12956 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12957 if test "x$has_forbidden_chars" != x; then 12958 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12959 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12960 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12961 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12962 # Going to short mode and back again did indeed matter. Since short mode is 12963 # case insensitive, let's make it lowercase to improve readability. 12964 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12965 # Now convert it back to Unix-stile (cygpath) 12966 input_path=`$CYGPATH -u "$shortmode_path"` 12967 new_path="$input_path" 12968 fi 12969 fi 12970 12971 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12972 if test "x$test_cygdrive_prefix" = x; then 12973 # As a simple fix, exclude /usr/bin since it's not a real path. 12974 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12975 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12976 # a path prefixed by /cygdrive for fixpath to work. 12977 new_path="$CYGWIN_ROOT_PATH$input_path" 12978 fi 12979 fi 12980 12981 12982 if test "x$path" != "x$new_path"; then 12983 BOOT_JDK="$new_path" 12984 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12986 fi 12987 12988 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12989 12990 path="$BOOT_JDK" 12991 has_colon=`$ECHO $path | $GREP ^.:` 12992 new_path="$path" 12993 if test "x$has_colon" = x; then 12994 # Not in mixed or Windows style, start by that. 12995 new_path=`cmd //c echo $path` 12996 fi 12997 12998 12999 input_path="$new_path" 13000 # Check if we need to convert this using DOS-style short mode. If the path 13001 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13002 # take no chances and rewrite it. 13003 # Note: m4 eats our [], so we need to use [ and ] instead. 13004 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13005 if test "x$has_forbidden_chars" != x; then 13006 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13007 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13008 fi 13009 13010 13011 windows_path="$new_path" 13012 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13013 unix_path=`$CYGPATH -u "$windows_path"` 13014 new_path="$unix_path" 13015 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13016 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13017 new_path="$unix_path" 13018 fi 13019 13020 if test "x$path" != "x$new_path"; then 13021 BOOT_JDK="$new_path" 13022 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13023 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13024 fi 13025 13026 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13027 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13028 13029 else 13030 # We're on a posix platform. Hooray! :) 13031 path="$BOOT_JDK" 13032 has_space=`$ECHO "$path" | $GREP " "` 13033 if test "x$has_space" != x; then 13034 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13035 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13036 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13037 fi 13038 13039 # Use eval to expand a potential ~ 13040 eval path="$path" 13041 if test ! -f "$path" && test ! -d "$path"; then 13042 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13043 fi 13044 13045 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13046 fi 13047 13048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13049 $as_echo_n "checking for Boot JDK... " >&6; } 13050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13051 $as_echo "$BOOT_JDK" >&6; } 13052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13053 $as_echo_n "checking Boot JDK version... " >&6; } 13054 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13056 $as_echo "$BOOT_JDK_VERSION" >&6; } 13057 fi # end check jdk version 13058 fi # end check rt.jar 13059 fi # end check javac 13060 fi # end check java 13061 fi # end check boot jdk found 13062 fi 13063 13064 done 13065 fi 13066 13067 fi 13068 13069 13070 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13071 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13072 # Do we have a bin/java? 13073 if test ! -x "$BOOT_JDK/bin/java"; then 13074 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13075 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13076 BOOT_JDK_FOUND=no 13077 else 13078 # Do we have a bin/javac? 13079 if test ! -x "$BOOT_JDK/bin/javac"; then 13080 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13081 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13082 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13083 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13084 BOOT_JDK_FOUND=no 13085 else 13086 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13087 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13088 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13089 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13090 BOOT_JDK_FOUND=no 13091 else 13092 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13093 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13094 13095 # Extra M4 quote needed to protect [] in grep expression. 13096 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13097 if test "x$FOUND_VERSION_78" = x; then 13098 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13099 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13100 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13101 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13102 BOOT_JDK_FOUND=no 13103 else 13104 # We're done! :-) 13105 BOOT_JDK_FOUND=yes 13106 13107 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13108 13109 # Input might be given as Windows format, start by converting to 13110 # unix format. 13111 path="$BOOT_JDK" 13112 new_path=`$CYGPATH -u "$path"` 13113 13114 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13115 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13116 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13117 # "foo.exe" is OK but "foo" is an error. 13118 # 13119 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13120 # It is also a way to make sure we got the proper file name for the real test later on. 13121 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13122 if test "x$test_shortpath" = x; then 13123 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13124 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13125 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13126 fi 13127 13128 # Call helper function which possibly converts this using DOS-style short mode. 13129 # If so, the updated path is stored in $new_path. 13130 13131 input_path="$new_path" 13132 # Check if we need to convert this using DOS-style short mode. If the path 13133 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13134 # take no chances and rewrite it. 13135 # Note: m4 eats our [], so we need to use [ and ] instead. 13136 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13137 if test "x$has_forbidden_chars" != x; then 13138 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13139 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13140 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13141 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13142 # Going to short mode and back again did indeed matter. Since short mode is 13143 # case insensitive, let's make it lowercase to improve readability. 13144 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13145 # Now convert it back to Unix-stile (cygpath) 13146 input_path=`$CYGPATH -u "$shortmode_path"` 13147 new_path="$input_path" 13148 fi 13149 fi 13150 13151 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13152 if test "x$test_cygdrive_prefix" = x; then 13153 # As a simple fix, exclude /usr/bin since it's not a real path. 13154 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13155 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13156 # a path prefixed by /cygdrive for fixpath to work. 13157 new_path="$CYGWIN_ROOT_PATH$input_path" 13158 fi 13159 fi 13160 13161 13162 if test "x$path" != "x$new_path"; then 13163 BOOT_JDK="$new_path" 13164 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13165 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13166 fi 13167 13168 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13169 13170 path="$BOOT_JDK" 13171 has_colon=`$ECHO $path | $GREP ^.:` 13172 new_path="$path" 13173 if test "x$has_colon" = x; then 13174 # Not in mixed or Windows style, start by that. 13175 new_path=`cmd //c echo $path` 13176 fi 13177 13178 13179 input_path="$new_path" 13180 # Check if we need to convert this using DOS-style short mode. If the path 13181 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13182 # take no chances and rewrite it. 13183 # Note: m4 eats our [], so we need to use [ and ] instead. 13184 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13185 if test "x$has_forbidden_chars" != x; then 13186 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13187 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13188 fi 13189 13190 13191 windows_path="$new_path" 13192 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13193 unix_path=`$CYGPATH -u "$windows_path"` 13194 new_path="$unix_path" 13195 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13196 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13197 new_path="$unix_path" 13198 fi 13199 13200 if test "x$path" != "x$new_path"; then 13201 BOOT_JDK="$new_path" 13202 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13203 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13204 fi 13205 13206 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13207 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13208 13209 else 13210 # We're on a posix platform. Hooray! :) 13211 path="$BOOT_JDK" 13212 has_space=`$ECHO "$path" | $GREP " "` 13213 if test "x$has_space" != x; then 13214 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13215 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13216 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13217 fi 13218 13219 # Use eval to expand a potential ~ 13220 eval path="$path" 13221 if test ! -f "$path" && test ! -d "$path"; then 13222 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13223 fi 13224 13225 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13226 fi 13227 13228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13229 $as_echo_n "checking for Boot JDK... " >&6; } 13230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13231 $as_echo "$BOOT_JDK" >&6; } 13232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13233 $as_echo_n "checking Boot JDK version... " >&6; } 13234 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13236 $as_echo "$BOOT_JDK_VERSION" >&6; } 13237 fi # end check jdk version 13238 fi # end check rt.jar 13239 fi # end check javac 13240 fi # end check java 13241 fi # end check boot jdk found 13242 fi 13243 13244 13245 if test "x$BOOT_JDK_FOUND" = xno; then 13246 # Now execute the test 13247 13248 if test "x$PROGRAMFILES" != x; then 13249 VIRTUAL_DIR="$PROGRAMFILES/Java" 13250 13251 windows_path="$VIRTUAL_DIR" 13252 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13253 unix_path=`$CYGPATH -u "$windows_path"` 13254 VIRTUAL_DIR="$unix_path" 13255 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13256 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13257 VIRTUAL_DIR="$unix_path" 13258 fi 13259 13260 13261 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 13262 BOOT_JDK_SUFFIX="" 13263 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13264 if test "x$ALL_JDKS_FOUND" != x; then 13265 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13266 13267 if test "x$BOOT_JDK_FOUND" = xno; then 13268 # Now execute the test 13269 13270 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13271 if test -d "$BOOT_JDK"; then 13272 BOOT_JDK_FOUND=maybe 13273 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13274 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13275 fi 13276 13277 13278 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13279 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13280 # Do we have a bin/java? 13281 if test ! -x "$BOOT_JDK/bin/java"; then 13282 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13283 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13284 BOOT_JDK_FOUND=no 13285 else 13286 # Do we have a bin/javac? 13287 if test ! -x "$BOOT_JDK/bin/javac"; then 13288 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13289 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13290 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13291 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13292 BOOT_JDK_FOUND=no 13293 else 13294 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13295 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13296 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13297 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13298 BOOT_JDK_FOUND=no 13299 else 13300 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13301 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13302 13303 # Extra M4 quote needed to protect [] in grep expression. 13304 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13305 if test "x$FOUND_VERSION_78" = x; then 13306 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13307 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13308 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13309 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13310 BOOT_JDK_FOUND=no 13311 else 13312 # We're done! :-) 13313 BOOT_JDK_FOUND=yes 13314 13315 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13316 13317 # Input might be given as Windows format, start by converting to 13318 # unix format. 13319 path="$BOOT_JDK" 13320 new_path=`$CYGPATH -u "$path"` 13321 13322 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13323 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13324 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13325 # "foo.exe" is OK but "foo" is an error. 13326 # 13327 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13328 # It is also a way to make sure we got the proper file name for the real test later on. 13329 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13330 if test "x$test_shortpath" = x; then 13331 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13332 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13333 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13334 fi 13335 13336 # Call helper function which possibly converts this using DOS-style short mode. 13337 # If so, the updated path is stored in $new_path. 13338 13339 input_path="$new_path" 13340 # Check if we need to convert this using DOS-style short mode. If the path 13341 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13342 # take no chances and rewrite it. 13343 # Note: m4 eats our [], so we need to use [ and ] instead. 13344 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13345 if test "x$has_forbidden_chars" != x; then 13346 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13347 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13348 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13349 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13350 # Going to short mode and back again did indeed matter. Since short mode is 13351 # case insensitive, let's make it lowercase to improve readability. 13352 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13353 # Now convert it back to Unix-stile (cygpath) 13354 input_path=`$CYGPATH -u "$shortmode_path"` 13355 new_path="$input_path" 13356 fi 13357 fi 13358 13359 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13360 if test "x$test_cygdrive_prefix" = x; then 13361 # As a simple fix, exclude /usr/bin since it's not a real path. 13362 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13363 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13364 # a path prefixed by /cygdrive for fixpath to work. 13365 new_path="$CYGWIN_ROOT_PATH$input_path" 13366 fi 13367 fi 13368 13369 13370 if test "x$path" != "x$new_path"; then 13371 BOOT_JDK="$new_path" 13372 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13373 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13374 fi 13375 13376 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13377 13378 path="$BOOT_JDK" 13379 has_colon=`$ECHO $path | $GREP ^.:` 13380 new_path="$path" 13381 if test "x$has_colon" = x; then 13382 # Not in mixed or Windows style, start by that. 13383 new_path=`cmd //c echo $path` 13384 fi 13385 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 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13396 fi 13397 13398 13399 windows_path="$new_path" 13400 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13401 unix_path=`$CYGPATH -u "$windows_path"` 13402 new_path="$unix_path" 13403 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13404 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13405 new_path="$unix_path" 13406 fi 13407 13408 if test "x$path" != "x$new_path"; then 13409 BOOT_JDK="$new_path" 13410 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13411 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13412 fi 13413 13414 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13415 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13416 13417 else 13418 # We're on a posix platform. Hooray! :) 13419 path="$BOOT_JDK" 13420 has_space=`$ECHO "$path" | $GREP " "` 13421 if test "x$has_space" != x; then 13422 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13423 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13424 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13425 fi 13426 13427 # Use eval to expand a potential ~ 13428 eval path="$path" 13429 if test ! -f "$path" && test ! -d "$path"; then 13430 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13431 fi 13432 13433 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13434 fi 13435 13436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13437 $as_echo_n "checking for Boot JDK... " >&6; } 13438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13439 $as_echo "$BOOT_JDK" >&6; } 13440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13441 $as_echo_n "checking Boot JDK version... " >&6; } 13442 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13444 $as_echo "$BOOT_JDK_VERSION" >&6; } 13445 fi # end check jdk version 13446 fi # end check rt.jar 13447 fi # end check javac 13448 fi # end check java 13449 fi # end check boot jdk found 13450 fi 13451 13452 done 13453 fi 13454 13455 fi 13456 13457 13458 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13459 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13460 # Do we have a bin/java? 13461 if test ! -x "$BOOT_JDK/bin/java"; then 13462 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13463 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13464 BOOT_JDK_FOUND=no 13465 else 13466 # Do we have a bin/javac? 13467 if test ! -x "$BOOT_JDK/bin/javac"; then 13468 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13469 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13470 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13471 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13472 BOOT_JDK_FOUND=no 13473 else 13474 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13475 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13476 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13477 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13478 BOOT_JDK_FOUND=no 13479 else 13480 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13481 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13482 13483 # Extra M4 quote needed to protect [] in grep expression. 13484 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13485 if test "x$FOUND_VERSION_78" = x; then 13486 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13487 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13488 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13489 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13490 BOOT_JDK_FOUND=no 13491 else 13492 # We're done! :-) 13493 BOOT_JDK_FOUND=yes 13494 13495 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13496 13497 # Input might be given as Windows format, start by converting to 13498 # unix format. 13499 path="$BOOT_JDK" 13500 new_path=`$CYGPATH -u "$path"` 13501 13502 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13503 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13504 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13505 # "foo.exe" is OK but "foo" is an error. 13506 # 13507 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13508 # It is also a way to make sure we got the proper file name for the real test later on. 13509 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13510 if test "x$test_shortpath" = x; then 13511 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13512 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13513 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13514 fi 13515 13516 # Call helper function which possibly converts this using DOS-style short mode. 13517 # If so, the updated path is stored in $new_path. 13518 13519 input_path="$new_path" 13520 # Check if we need to convert this using DOS-style short mode. If the path 13521 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13522 # take no chances and rewrite it. 13523 # Note: m4 eats our [], so we need to use [ and ] instead. 13524 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13525 if test "x$has_forbidden_chars" != x; then 13526 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13527 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13528 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13529 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13530 # Going to short mode and back again did indeed matter. Since short mode is 13531 # case insensitive, let's make it lowercase to improve readability. 13532 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13533 # Now convert it back to Unix-stile (cygpath) 13534 input_path=`$CYGPATH -u "$shortmode_path"` 13535 new_path="$input_path" 13536 fi 13537 fi 13538 13539 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13540 if test "x$test_cygdrive_prefix" = x; then 13541 # As a simple fix, exclude /usr/bin since it's not a real path. 13542 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13543 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13544 # a path prefixed by /cygdrive for fixpath to work. 13545 new_path="$CYGWIN_ROOT_PATH$input_path" 13546 fi 13547 fi 13548 13549 13550 if test "x$path" != "x$new_path"; then 13551 BOOT_JDK="$new_path" 13552 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13553 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13554 fi 13555 13556 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13557 13558 path="$BOOT_JDK" 13559 has_colon=`$ECHO $path | $GREP ^.:` 13560 new_path="$path" 13561 if test "x$has_colon" = x; then 13562 # Not in mixed or Windows style, start by that. 13563 new_path=`cmd //c echo $path` 13564 fi 13565 13566 13567 input_path="$new_path" 13568 # Check if we need to convert this using DOS-style short mode. If the path 13569 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13570 # take no chances and rewrite it. 13571 # Note: m4 eats our [], so we need to use [ and ] instead. 13572 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13573 if test "x$has_forbidden_chars" != x; then 13574 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13575 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13576 fi 13577 13578 13579 windows_path="$new_path" 13580 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13581 unix_path=`$CYGPATH -u "$windows_path"` 13582 new_path="$unix_path" 13583 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13584 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13585 new_path="$unix_path" 13586 fi 13587 13588 if test "x$path" != "x$new_path"; then 13589 BOOT_JDK="$new_path" 13590 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13591 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13592 fi 13593 13594 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13595 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13596 13597 else 13598 # We're on a posix platform. Hooray! :) 13599 path="$BOOT_JDK" 13600 has_space=`$ECHO "$path" | $GREP " "` 13601 if test "x$has_space" != x; then 13602 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13603 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13604 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13605 fi 13606 13607 # Use eval to expand a potential ~ 13608 eval path="$path" 13609 if test ! -f "$path" && test ! -d "$path"; then 13610 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13611 fi 13612 13613 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13614 fi 13615 13616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13617 $as_echo_n "checking for Boot JDK... " >&6; } 13618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13619 $as_echo "$BOOT_JDK" >&6; } 13620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13621 $as_echo_n "checking Boot JDK version... " >&6; } 13622 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13624 $as_echo "$BOOT_JDK_VERSION" >&6; } 13625 fi # end check jdk version 13626 fi # end check rt.jar 13627 fi # end check javac 13628 fi # end check java 13629 fi # end check boot jdk found 13630 fi 13631 13632 13633 if test "x$BOOT_JDK_FOUND" = xno; then 13634 # Now execute the test 13635 13636 if test "x$ProgramFiles" != x; then 13637 VIRTUAL_DIR="$ProgramFiles/Java" 13638 13639 windows_path="$VIRTUAL_DIR" 13640 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13641 unix_path=`$CYGPATH -u "$windows_path"` 13642 VIRTUAL_DIR="$unix_path" 13643 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13644 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13645 VIRTUAL_DIR="$unix_path" 13646 fi 13647 13648 13649 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 13650 BOOT_JDK_SUFFIX="" 13651 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13652 if test "x$ALL_JDKS_FOUND" != x; then 13653 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13654 13655 if test "x$BOOT_JDK_FOUND" = xno; then 13656 # Now execute the test 13657 13658 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13659 if test -d "$BOOT_JDK"; then 13660 BOOT_JDK_FOUND=maybe 13661 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13662 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13663 fi 13664 13665 13666 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13667 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13668 # Do we have a bin/java? 13669 if test ! -x "$BOOT_JDK/bin/java"; then 13670 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13671 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13672 BOOT_JDK_FOUND=no 13673 else 13674 # Do we have a bin/javac? 13675 if test ! -x "$BOOT_JDK/bin/javac"; then 13676 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13677 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13678 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13679 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13680 BOOT_JDK_FOUND=no 13681 else 13682 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13683 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13684 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13685 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13686 BOOT_JDK_FOUND=no 13687 else 13688 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13689 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13690 13691 # Extra M4 quote needed to protect [] in grep expression. 13692 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13693 if test "x$FOUND_VERSION_78" = x; then 13694 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13695 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13696 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13697 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13698 BOOT_JDK_FOUND=no 13699 else 13700 # We're done! :-) 13701 BOOT_JDK_FOUND=yes 13702 13703 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13704 13705 # Input might be given as Windows format, start by converting to 13706 # unix format. 13707 path="$BOOT_JDK" 13708 new_path=`$CYGPATH -u "$path"` 13709 13710 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13711 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13712 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13713 # "foo.exe" is OK but "foo" is an error. 13714 # 13715 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13716 # It is also a way to make sure we got the proper file name for the real test later on. 13717 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13718 if test "x$test_shortpath" = x; then 13719 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13720 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13721 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13722 fi 13723 13724 # Call helper function which possibly converts this using DOS-style short mode. 13725 # If so, the updated path is stored in $new_path. 13726 13727 input_path="$new_path" 13728 # Check if we need to convert this using DOS-style short mode. If the path 13729 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13730 # take no chances and rewrite it. 13731 # Note: m4 eats our [], so we need to use [ and ] instead. 13732 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13733 if test "x$has_forbidden_chars" != x; then 13734 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13735 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13736 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13737 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13738 # Going to short mode and back again did indeed matter. Since short mode is 13739 # case insensitive, let's make it lowercase to improve readability. 13740 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13741 # Now convert it back to Unix-stile (cygpath) 13742 input_path=`$CYGPATH -u "$shortmode_path"` 13743 new_path="$input_path" 13744 fi 13745 fi 13746 13747 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13748 if test "x$test_cygdrive_prefix" = x; then 13749 # As a simple fix, exclude /usr/bin since it's not a real path. 13750 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13751 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13752 # a path prefixed by /cygdrive for fixpath to work. 13753 new_path="$CYGWIN_ROOT_PATH$input_path" 13754 fi 13755 fi 13756 13757 13758 if test "x$path" != "x$new_path"; then 13759 BOOT_JDK="$new_path" 13760 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13761 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13762 fi 13763 13764 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13765 13766 path="$BOOT_JDK" 13767 has_colon=`$ECHO $path | $GREP ^.:` 13768 new_path="$path" 13769 if test "x$has_colon" = x; then 13770 # Not in mixed or Windows style, start by that. 13771 new_path=`cmd //c echo $path` 13772 fi 13773 13774 13775 input_path="$new_path" 13776 # Check if we need to convert this using DOS-style short mode. If the path 13777 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13778 # take no chances and rewrite it. 13779 # Note: m4 eats our [], so we need to use [ and ] instead. 13780 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13781 if test "x$has_forbidden_chars" != x; then 13782 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13783 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13784 fi 13785 13786 13787 windows_path="$new_path" 13788 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13789 unix_path=`$CYGPATH -u "$windows_path"` 13790 new_path="$unix_path" 13791 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13792 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13793 new_path="$unix_path" 13794 fi 13795 13796 if test "x$path" != "x$new_path"; then 13797 BOOT_JDK="$new_path" 13798 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13799 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13800 fi 13801 13802 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13803 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13804 13805 else 13806 # We're on a posix platform. Hooray! :) 13807 path="$BOOT_JDK" 13808 has_space=`$ECHO "$path" | $GREP " "` 13809 if test "x$has_space" != x; then 13810 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13811 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13812 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13813 fi 13814 13815 # Use eval to expand a potential ~ 13816 eval path="$path" 13817 if test ! -f "$path" && test ! -d "$path"; then 13818 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13819 fi 13820 13821 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13822 fi 13823 13824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13825 $as_echo_n "checking for Boot JDK... " >&6; } 13826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13827 $as_echo "$BOOT_JDK" >&6; } 13828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13829 $as_echo_n "checking Boot JDK version... " >&6; } 13830 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13832 $as_echo "$BOOT_JDK_VERSION" >&6; } 13833 fi # end check jdk version 13834 fi # end check rt.jar 13835 fi # end check javac 13836 fi # end check java 13837 fi # end check boot jdk found 13838 fi 13839 13840 done 13841 fi 13842 13843 fi 13844 13845 13846 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13847 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13848 # Do we have a bin/java? 13849 if test ! -x "$BOOT_JDK/bin/java"; then 13850 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13851 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13852 BOOT_JDK_FOUND=no 13853 else 13854 # Do we have a bin/javac? 13855 if test ! -x "$BOOT_JDK/bin/javac"; then 13856 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13857 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13858 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13859 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13860 BOOT_JDK_FOUND=no 13861 else 13862 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13863 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13864 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13865 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13866 BOOT_JDK_FOUND=no 13867 else 13868 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13869 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13870 13871 # Extra M4 quote needed to protect [] in grep expression. 13872 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13873 if test "x$FOUND_VERSION_78" = x; then 13874 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13875 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13876 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13877 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13878 BOOT_JDK_FOUND=no 13879 else 13880 # We're done! :-) 13881 BOOT_JDK_FOUND=yes 13882 13883 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13884 13885 # Input might be given as Windows format, start by converting to 13886 # unix format. 13887 path="$BOOT_JDK" 13888 new_path=`$CYGPATH -u "$path"` 13889 13890 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13891 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13892 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13893 # "foo.exe" is OK but "foo" is an error. 13894 # 13895 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13896 # It is also a way to make sure we got the proper file name for the real test later on. 13897 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13898 if test "x$test_shortpath" = x; then 13899 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13901 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13902 fi 13903 13904 # Call helper function which possibly converts this using DOS-style short mode. 13905 # If so, the updated path is stored in $new_path. 13906 13907 input_path="$new_path" 13908 # Check if we need to convert this using DOS-style short mode. If the path 13909 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13910 # take no chances and rewrite it. 13911 # Note: m4 eats our [], so we need to use [ and ] instead. 13912 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13913 if test "x$has_forbidden_chars" != x; then 13914 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13915 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13916 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13917 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13918 # Going to short mode and back again did indeed matter. Since short mode is 13919 # case insensitive, let's make it lowercase to improve readability. 13920 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13921 # Now convert it back to Unix-stile (cygpath) 13922 input_path=`$CYGPATH -u "$shortmode_path"` 13923 new_path="$input_path" 13924 fi 13925 fi 13926 13927 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13928 if test "x$test_cygdrive_prefix" = x; then 13929 # As a simple fix, exclude /usr/bin since it's not a real path. 13930 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13931 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13932 # a path prefixed by /cygdrive for fixpath to work. 13933 new_path="$CYGWIN_ROOT_PATH$input_path" 13934 fi 13935 fi 13936 13937 13938 if test "x$path" != "x$new_path"; then 13939 BOOT_JDK="$new_path" 13940 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13942 fi 13943 13944 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13945 13946 path="$BOOT_JDK" 13947 has_colon=`$ECHO $path | $GREP ^.:` 13948 new_path="$path" 13949 if test "x$has_colon" = x; then 13950 # Not in mixed or Windows style, start by that. 13951 new_path=`cmd //c echo $path` 13952 fi 13953 13954 13955 input_path="$new_path" 13956 # Check if we need to convert this using DOS-style short mode. If the path 13957 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13958 # take no chances and rewrite it. 13959 # Note: m4 eats our [], so we need to use [ and ] instead. 13960 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13961 if test "x$has_forbidden_chars" != x; then 13962 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13963 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13964 fi 13965 13966 13967 windows_path="$new_path" 13968 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13969 unix_path=`$CYGPATH -u "$windows_path"` 13970 new_path="$unix_path" 13971 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13972 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13973 new_path="$unix_path" 13974 fi 13975 13976 if test "x$path" != "x$new_path"; then 13977 BOOT_JDK="$new_path" 13978 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13979 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13980 fi 13981 13982 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13983 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13984 13985 else 13986 # We're on a posix platform. Hooray! :) 13987 path="$BOOT_JDK" 13988 has_space=`$ECHO "$path" | $GREP " "` 13989 if test "x$has_space" != x; then 13990 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13991 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13992 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13993 fi 13994 13995 # Use eval to expand a potential ~ 13996 eval path="$path" 13997 if test ! -f "$path" && test ! -d "$path"; then 13998 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13999 fi 14000 14001 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14002 fi 14003 14004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14005 $as_echo_n "checking for Boot JDK... " >&6; } 14006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14007 $as_echo "$BOOT_JDK" >&6; } 14008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14009 $as_echo_n "checking Boot JDK version... " >&6; } 14010 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14012 $as_echo "$BOOT_JDK_VERSION" >&6; } 14013 fi # end check jdk version 14014 fi # end check rt.jar 14015 fi # end check javac 14016 fi # end check java 14017 fi # end check boot jdk found 14018 fi 14019 14020 14021 if test "x$BOOT_JDK_FOUND" = xno; then 14022 # Now execute the test 14023 14024 BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java" 14025 BOOT_JDK_SUFFIX="" 14026 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14027 if test "x$ALL_JDKS_FOUND" != x; then 14028 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14029 14030 if test "x$BOOT_JDK_FOUND" = xno; then 14031 # Now execute the test 14032 14033 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14034 if test -d "$BOOT_JDK"; then 14035 BOOT_JDK_FOUND=maybe 14036 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14037 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14038 fi 14039 14040 14041 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14042 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14043 # Do we have a bin/java? 14044 if test ! -x "$BOOT_JDK/bin/java"; then 14045 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14046 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14047 BOOT_JDK_FOUND=no 14048 else 14049 # Do we have a bin/javac? 14050 if test ! -x "$BOOT_JDK/bin/javac"; then 14051 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14052 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14053 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14054 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14055 BOOT_JDK_FOUND=no 14056 else 14057 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14058 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14059 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14060 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14061 BOOT_JDK_FOUND=no 14062 else 14063 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14064 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14065 14066 # Extra M4 quote needed to protect [] in grep expression. 14067 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14068 if test "x$FOUND_VERSION_78" = x; then 14069 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14070 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14071 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14072 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14073 BOOT_JDK_FOUND=no 14074 else 14075 # We're done! :-) 14076 BOOT_JDK_FOUND=yes 14077 14078 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14079 14080 # Input might be given as Windows format, start by converting to 14081 # unix format. 14082 path="$BOOT_JDK" 14083 new_path=`$CYGPATH -u "$path"` 14084 14085 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14086 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14087 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14088 # "foo.exe" is OK but "foo" is an error. 14089 # 14090 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14091 # It is also a way to make sure we got the proper file name for the real test later on. 14092 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14093 if test "x$test_shortpath" = x; then 14094 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14095 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14096 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14097 fi 14098 14099 # Call helper function which possibly converts this using DOS-style short mode. 14100 # If so, the updated path is stored in $new_path. 14101 14102 input_path="$new_path" 14103 # Check if we need to convert this using DOS-style short mode. If the path 14104 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14105 # take no chances and rewrite it. 14106 # Note: m4 eats our [], so we need to use [ and ] instead. 14107 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14108 if test "x$has_forbidden_chars" != x; then 14109 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14110 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14111 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14112 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14113 # Going to short mode and back again did indeed matter. Since short mode is 14114 # case insensitive, let's make it lowercase to improve readability. 14115 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14116 # Now convert it back to Unix-stile (cygpath) 14117 input_path=`$CYGPATH -u "$shortmode_path"` 14118 new_path="$input_path" 14119 fi 14120 fi 14121 14122 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14123 if test "x$test_cygdrive_prefix" = x; then 14124 # As a simple fix, exclude /usr/bin since it's not a real path. 14125 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14126 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14127 # a path prefixed by /cygdrive for fixpath to work. 14128 new_path="$CYGWIN_ROOT_PATH$input_path" 14129 fi 14130 fi 14131 14132 14133 if test "x$path" != "x$new_path"; then 14134 BOOT_JDK="$new_path" 14135 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14136 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14137 fi 14138 14139 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14140 14141 path="$BOOT_JDK" 14142 has_colon=`$ECHO $path | $GREP ^.:` 14143 new_path="$path" 14144 if test "x$has_colon" = x; then 14145 # Not in mixed or Windows style, start by that. 14146 new_path=`cmd //c echo $path` 14147 fi 14148 14149 14150 input_path="$new_path" 14151 # Check if we need to convert this using DOS-style short mode. If the path 14152 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14153 # take no chances and rewrite it. 14154 # Note: m4 eats our [], so we need to use [ and ] instead. 14155 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14156 if test "x$has_forbidden_chars" != x; then 14157 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14158 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14159 fi 14160 14161 14162 windows_path="$new_path" 14163 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14164 unix_path=`$CYGPATH -u "$windows_path"` 14165 new_path="$unix_path" 14166 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14167 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14168 new_path="$unix_path" 14169 fi 14170 14171 if test "x$path" != "x$new_path"; then 14172 BOOT_JDK="$new_path" 14173 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14174 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14175 fi 14176 14177 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14178 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14179 14180 else 14181 # We're on a posix platform. Hooray! :) 14182 path="$BOOT_JDK" 14183 has_space=`$ECHO "$path" | $GREP " "` 14184 if test "x$has_space" != x; then 14185 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14186 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14187 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14188 fi 14189 14190 # Use eval to expand a potential ~ 14191 eval path="$path" 14192 if test ! -f "$path" && test ! -d "$path"; then 14193 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14194 fi 14195 14196 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14197 fi 14198 14199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14200 $as_echo_n "checking for Boot JDK... " >&6; } 14201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14202 $as_echo "$BOOT_JDK" >&6; } 14203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14204 $as_echo_n "checking Boot JDK version... " >&6; } 14205 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14207 $as_echo "$BOOT_JDK_VERSION" >&6; } 14208 fi # end check jdk version 14209 fi # end check rt.jar 14210 fi # end check javac 14211 fi # end check java 14212 fi # end check boot jdk found 14213 fi 14214 14215 done 14216 fi 14217 14218 14219 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14220 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14221 # Do we have a bin/java? 14222 if test ! -x "$BOOT_JDK/bin/java"; then 14223 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14224 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14225 BOOT_JDK_FOUND=no 14226 else 14227 # Do we have a bin/javac? 14228 if test ! -x "$BOOT_JDK/bin/javac"; then 14229 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14230 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14231 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14232 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14233 BOOT_JDK_FOUND=no 14234 else 14235 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14236 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14237 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14238 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14239 BOOT_JDK_FOUND=no 14240 else 14241 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14242 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14243 14244 # Extra M4 quote needed to protect [] in grep expression. 14245 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14246 if test "x$FOUND_VERSION_78" = x; then 14247 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14248 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14249 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14250 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14251 BOOT_JDK_FOUND=no 14252 else 14253 # We're done! :-) 14254 BOOT_JDK_FOUND=yes 14255 14256 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14257 14258 # Input might be given as Windows format, start by converting to 14259 # unix format. 14260 path="$BOOT_JDK" 14261 new_path=`$CYGPATH -u "$path"` 14262 14263 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14264 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14265 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14266 # "foo.exe" is OK but "foo" is an error. 14267 # 14268 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14269 # It is also a way to make sure we got the proper file name for the real test later on. 14270 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14271 if test "x$test_shortpath" = x; then 14272 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14273 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14274 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14275 fi 14276 14277 # Call helper function which possibly converts this using DOS-style short mode. 14278 # If so, the updated path is stored in $new_path. 14279 14280 input_path="$new_path" 14281 # Check if we need to convert this using DOS-style short mode. If the path 14282 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14283 # take no chances and rewrite it. 14284 # Note: m4 eats our [], so we need to use [ and ] instead. 14285 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14286 if test "x$has_forbidden_chars" != x; then 14287 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14288 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14289 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14290 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14291 # Going to short mode and back again did indeed matter. Since short mode is 14292 # case insensitive, let's make it lowercase to improve readability. 14293 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14294 # Now convert it back to Unix-stile (cygpath) 14295 input_path=`$CYGPATH -u "$shortmode_path"` 14296 new_path="$input_path" 14297 fi 14298 fi 14299 14300 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14301 if test "x$test_cygdrive_prefix" = x; then 14302 # As a simple fix, exclude /usr/bin since it's not a real path. 14303 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14304 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14305 # a path prefixed by /cygdrive for fixpath to work. 14306 new_path="$CYGWIN_ROOT_PATH$input_path" 14307 fi 14308 fi 14309 14310 14311 if test "x$path" != "x$new_path"; then 14312 BOOT_JDK="$new_path" 14313 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14314 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14315 fi 14316 14317 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14318 14319 path="$BOOT_JDK" 14320 has_colon=`$ECHO $path | $GREP ^.:` 14321 new_path="$path" 14322 if test "x$has_colon" = x; then 14323 # Not in mixed or Windows style, start by that. 14324 new_path=`cmd //c echo $path` 14325 fi 14326 14327 14328 input_path="$new_path" 14329 # Check if we need to convert this using DOS-style short mode. If the path 14330 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14331 # take no chances and rewrite it. 14332 # Note: m4 eats our [], so we need to use [ and ] instead. 14333 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14334 if test "x$has_forbidden_chars" != x; then 14335 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14336 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14337 fi 14338 14339 14340 windows_path="$new_path" 14341 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14342 unix_path=`$CYGPATH -u "$windows_path"` 14343 new_path="$unix_path" 14344 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14345 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14346 new_path="$unix_path" 14347 fi 14348 14349 if test "x$path" != "x$new_path"; then 14350 BOOT_JDK="$new_path" 14351 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14352 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14353 fi 14354 14355 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14356 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14357 14358 else 14359 # We're on a posix platform. Hooray! :) 14360 path="$BOOT_JDK" 14361 has_space=`$ECHO "$path" | $GREP " "` 14362 if test "x$has_space" != x; then 14363 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14364 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14365 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14366 fi 14367 14368 # Use eval to expand a potential ~ 14369 eval path="$path" 14370 if test ! -f "$path" && test ! -d "$path"; then 14371 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14372 fi 14373 14374 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14375 fi 14376 14377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14378 $as_echo_n "checking for Boot JDK... " >&6; } 14379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14380 $as_echo "$BOOT_JDK" >&6; } 14381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14382 $as_echo_n "checking Boot JDK version... " >&6; } 14383 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14385 $as_echo "$BOOT_JDK_VERSION" >&6; } 14386 fi # end check jdk version 14387 fi # end check rt.jar 14388 fi # end check javac 14389 fi # end check java 14390 fi # end check boot jdk found 14391 fi 14392 14393 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then 14394 14395 if test "x$BOOT_JDK_FOUND" = xno; then 14396 # Now execute the test 14397 14398 BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines" 14399 BOOT_JDK_SUFFIX="/Contents/Home" 14400 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14401 if test "x$ALL_JDKS_FOUND" != x; then 14402 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14403 14404 if test "x$BOOT_JDK_FOUND" = xno; then 14405 # Now execute the test 14406 14407 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14408 if test -d "$BOOT_JDK"; then 14409 BOOT_JDK_FOUND=maybe 14410 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14411 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14412 fi 14413 14414 14415 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14416 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14417 # Do we have a bin/java? 14418 if test ! -x "$BOOT_JDK/bin/java"; then 14419 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14420 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14421 BOOT_JDK_FOUND=no 14422 else 14423 # Do we have a bin/javac? 14424 if test ! -x "$BOOT_JDK/bin/javac"; then 14425 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14426 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14427 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14428 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14429 BOOT_JDK_FOUND=no 14430 else 14431 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14432 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14433 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14435 BOOT_JDK_FOUND=no 14436 else 14437 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14438 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14439 14440 # Extra M4 quote needed to protect [] in grep expression. 14441 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14442 if test "x$FOUND_VERSION_78" = x; then 14443 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14445 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14446 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14447 BOOT_JDK_FOUND=no 14448 else 14449 # We're done! :-) 14450 BOOT_JDK_FOUND=yes 14451 14452 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14453 14454 # Input might be given as Windows format, start by converting to 14455 # unix format. 14456 path="$BOOT_JDK" 14457 new_path=`$CYGPATH -u "$path"` 14458 14459 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14460 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14461 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14462 # "foo.exe" is OK but "foo" is an error. 14463 # 14464 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14465 # It is also a way to make sure we got the proper file name for the real test later on. 14466 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14467 if test "x$test_shortpath" = x; then 14468 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14469 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14470 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14471 fi 14472 14473 # Call helper function which possibly converts this using DOS-style short mode. 14474 # If so, the updated path is stored in $new_path. 14475 14476 input_path="$new_path" 14477 # Check if we need to convert this using DOS-style short mode. If the path 14478 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14479 # take no chances and rewrite it. 14480 # Note: m4 eats our [], so we need to use [ and ] instead. 14481 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14482 if test "x$has_forbidden_chars" != x; then 14483 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14484 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14485 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14486 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14487 # Going to short mode and back again did indeed matter. Since short mode is 14488 # case insensitive, let's make it lowercase to improve readability. 14489 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14490 # Now convert it back to Unix-stile (cygpath) 14491 input_path=`$CYGPATH -u "$shortmode_path"` 14492 new_path="$input_path" 14493 fi 14494 fi 14495 14496 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14497 if test "x$test_cygdrive_prefix" = x; then 14498 # As a simple fix, exclude /usr/bin since it's not a real path. 14499 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14500 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14501 # a path prefixed by /cygdrive for fixpath to work. 14502 new_path="$CYGWIN_ROOT_PATH$input_path" 14503 fi 14504 fi 14505 14506 14507 if test "x$path" != "x$new_path"; then 14508 BOOT_JDK="$new_path" 14509 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14510 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14511 fi 14512 14513 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14514 14515 path="$BOOT_JDK" 14516 has_colon=`$ECHO $path | $GREP ^.:` 14517 new_path="$path" 14518 if test "x$has_colon" = x; then 14519 # Not in mixed or Windows style, start by that. 14520 new_path=`cmd //c echo $path` 14521 fi 14522 14523 14524 input_path="$new_path" 14525 # Check if we need to convert this using DOS-style short mode. If the path 14526 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14527 # take no chances and rewrite it. 14528 # Note: m4 eats our [], so we need to use [ and ] instead. 14529 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14530 if test "x$has_forbidden_chars" != x; then 14531 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14532 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14533 fi 14534 14535 14536 windows_path="$new_path" 14537 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14538 unix_path=`$CYGPATH -u "$windows_path"` 14539 new_path="$unix_path" 14540 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14541 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14542 new_path="$unix_path" 14543 fi 14544 14545 if test "x$path" != "x$new_path"; then 14546 BOOT_JDK="$new_path" 14547 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14549 fi 14550 14551 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14552 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14553 14554 else 14555 # We're on a posix platform. Hooray! :) 14556 path="$BOOT_JDK" 14557 has_space=`$ECHO "$path" | $GREP " "` 14558 if test "x$has_space" != x; then 14559 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14560 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14561 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14562 fi 14563 14564 # Use eval to expand a potential ~ 14565 eval path="$path" 14566 if test ! -f "$path" && test ! -d "$path"; then 14567 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14568 fi 14569 14570 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14571 fi 14572 14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14574 $as_echo_n "checking for Boot JDK... " >&6; } 14575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14576 $as_echo "$BOOT_JDK" >&6; } 14577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14578 $as_echo_n "checking Boot JDK version... " >&6; } 14579 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14581 $as_echo "$BOOT_JDK_VERSION" >&6; } 14582 fi # end check jdk version 14583 fi # end check rt.jar 14584 fi # end check javac 14585 fi # end check java 14586 fi # end check boot jdk found 14587 fi 14588 14589 done 14590 fi 14591 14592 14593 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14594 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14595 # Do we have a bin/java? 14596 if test ! -x "$BOOT_JDK/bin/java"; then 14597 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14598 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14599 BOOT_JDK_FOUND=no 14600 else 14601 # Do we have a bin/javac? 14602 if test ! -x "$BOOT_JDK/bin/javac"; then 14603 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14604 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14605 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14606 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14607 BOOT_JDK_FOUND=no 14608 else 14609 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14610 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14611 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14612 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14613 BOOT_JDK_FOUND=no 14614 else 14615 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14616 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14617 14618 # Extra M4 quote needed to protect [] in grep expression. 14619 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14620 if test "x$FOUND_VERSION_78" = x; then 14621 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14623 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14624 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14625 BOOT_JDK_FOUND=no 14626 else 14627 # We're done! :-) 14628 BOOT_JDK_FOUND=yes 14629 14630 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14631 14632 # Input might be given as Windows format, start by converting to 14633 # unix format. 14634 path="$BOOT_JDK" 14635 new_path=`$CYGPATH -u "$path"` 14636 14637 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14638 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14639 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14640 # "foo.exe" is OK but "foo" is an error. 14641 # 14642 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14643 # It is also a way to make sure we got the proper file name for the real test later on. 14644 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14645 if test "x$test_shortpath" = x; then 14646 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14647 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14648 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14649 fi 14650 14651 # Call helper function which possibly converts this using DOS-style short mode. 14652 # If so, the updated path is stored in $new_path. 14653 14654 input_path="$new_path" 14655 # Check if we need to convert this using DOS-style short mode. If the path 14656 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14657 # take no chances and rewrite it. 14658 # Note: m4 eats our [], so we need to use [ and ] instead. 14659 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14660 if test "x$has_forbidden_chars" != x; then 14661 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14662 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14663 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14664 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14665 # Going to short mode and back again did indeed matter. Since short mode is 14666 # case insensitive, let's make it lowercase to improve readability. 14667 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14668 # Now convert it back to Unix-stile (cygpath) 14669 input_path=`$CYGPATH -u "$shortmode_path"` 14670 new_path="$input_path" 14671 fi 14672 fi 14673 14674 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14675 if test "x$test_cygdrive_prefix" = x; then 14676 # As a simple fix, exclude /usr/bin since it's not a real path. 14677 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14678 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14679 # a path prefixed by /cygdrive for fixpath to work. 14680 new_path="$CYGWIN_ROOT_PATH$input_path" 14681 fi 14682 fi 14683 14684 14685 if test "x$path" != "x$new_path"; then 14686 BOOT_JDK="$new_path" 14687 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14688 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14689 fi 14690 14691 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14692 14693 path="$BOOT_JDK" 14694 has_colon=`$ECHO $path | $GREP ^.:` 14695 new_path="$path" 14696 if test "x$has_colon" = x; then 14697 # Not in mixed or Windows style, start by that. 14698 new_path=`cmd //c echo $path` 14699 fi 14700 14701 14702 input_path="$new_path" 14703 # Check if we need to convert this using DOS-style short mode. If the path 14704 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14705 # take no chances and rewrite it. 14706 # Note: m4 eats our [], so we need to use [ and ] instead. 14707 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14708 if test "x$has_forbidden_chars" != x; then 14709 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14710 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14711 fi 14712 14713 14714 windows_path="$new_path" 14715 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14716 unix_path=`$CYGPATH -u "$windows_path"` 14717 new_path="$unix_path" 14718 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14719 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14720 new_path="$unix_path" 14721 fi 14722 14723 if test "x$path" != "x$new_path"; then 14724 BOOT_JDK="$new_path" 14725 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14726 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14727 fi 14728 14729 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14730 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14731 14732 else 14733 # We're on a posix platform. Hooray! :) 14734 path="$BOOT_JDK" 14735 has_space=`$ECHO "$path" | $GREP " "` 14736 if test "x$has_space" != x; then 14737 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14738 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14739 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14740 fi 14741 14742 # Use eval to expand a potential ~ 14743 eval path="$path" 14744 if test ! -f "$path" && test ! -d "$path"; then 14745 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14746 fi 14747 14748 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14749 fi 14750 14751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14752 $as_echo_n "checking for Boot JDK... " >&6; } 14753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14754 $as_echo "$BOOT_JDK" >&6; } 14755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14756 $as_echo_n "checking Boot JDK version... " >&6; } 14757 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14759 $as_echo "$BOOT_JDK_VERSION" >&6; } 14760 fi # end check jdk version 14761 fi # end check rt.jar 14762 fi # end check javac 14763 fi # end check java 14764 fi # end check boot jdk found 14765 fi 14766 14767 14768 if test "x$BOOT_JDK_FOUND" = xno; then 14769 # Now execute the test 14770 14771 BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines" 14772 BOOT_JDK_SUFFIX="/Contents/Home" 14773 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14774 if test "x$ALL_JDKS_FOUND" != x; then 14775 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14776 14777 if test "x$BOOT_JDK_FOUND" = xno; then 14778 # Now execute the test 14779 14780 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14781 if test -d "$BOOT_JDK"; then 14782 BOOT_JDK_FOUND=maybe 14783 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14784 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14785 fi 14786 14787 14788 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14789 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14790 # Do we have a bin/java? 14791 if test ! -x "$BOOT_JDK/bin/java"; then 14792 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14793 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14794 BOOT_JDK_FOUND=no 14795 else 14796 # Do we have a bin/javac? 14797 if test ! -x "$BOOT_JDK/bin/javac"; then 14798 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14799 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14800 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14801 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14802 BOOT_JDK_FOUND=no 14803 else 14804 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14805 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14806 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14807 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14808 BOOT_JDK_FOUND=no 14809 else 14810 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14811 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14812 14813 # Extra M4 quote needed to protect [] in grep expression. 14814 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14815 if test "x$FOUND_VERSION_78" = x; then 14816 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14817 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14818 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14819 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14820 BOOT_JDK_FOUND=no 14821 else 14822 # We're done! :-) 14823 BOOT_JDK_FOUND=yes 14824 14825 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14826 14827 # Input might be given as Windows format, start by converting to 14828 # unix format. 14829 path="$BOOT_JDK" 14830 new_path=`$CYGPATH -u "$path"` 14831 14832 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14833 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14834 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14835 # "foo.exe" is OK but "foo" is an error. 14836 # 14837 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14838 # It is also a way to make sure we got the proper file name for the real test later on. 14839 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14840 if test "x$test_shortpath" = x; then 14841 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14842 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14843 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14844 fi 14845 14846 # Call helper function which possibly converts this using DOS-style short mode. 14847 # If so, the updated path is stored in $new_path. 14848 14849 input_path="$new_path" 14850 # Check if we need to convert this using DOS-style short mode. If the path 14851 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14852 # take no chances and rewrite it. 14853 # Note: m4 eats our [], so we need to use [ and ] instead. 14854 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14855 if test "x$has_forbidden_chars" != x; then 14856 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14857 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14858 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14859 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14860 # Going to short mode and back again did indeed matter. Since short mode is 14861 # case insensitive, let's make it lowercase to improve readability. 14862 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14863 # Now convert it back to Unix-stile (cygpath) 14864 input_path=`$CYGPATH -u "$shortmode_path"` 14865 new_path="$input_path" 14866 fi 14867 fi 14868 14869 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14870 if test "x$test_cygdrive_prefix" = x; then 14871 # As a simple fix, exclude /usr/bin since it's not a real path. 14872 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14873 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14874 # a path prefixed by /cygdrive for fixpath to work. 14875 new_path="$CYGWIN_ROOT_PATH$input_path" 14876 fi 14877 fi 14878 14879 14880 if test "x$path" != "x$new_path"; then 14881 BOOT_JDK="$new_path" 14882 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14883 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14884 fi 14885 14886 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14887 14888 path="$BOOT_JDK" 14889 has_colon=`$ECHO $path | $GREP ^.:` 14890 new_path="$path" 14891 if test "x$has_colon" = x; then 14892 # Not in mixed or Windows style, start by that. 14893 new_path=`cmd //c echo $path` 14894 fi 14895 14896 14897 input_path="$new_path" 14898 # Check if we need to convert this using DOS-style short mode. If the path 14899 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14900 # take no chances and rewrite it. 14901 # Note: m4 eats our [], so we need to use [ and ] instead. 14902 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14903 if test "x$has_forbidden_chars" != x; then 14904 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14905 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14906 fi 14907 14908 14909 windows_path="$new_path" 14910 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14911 unix_path=`$CYGPATH -u "$windows_path"` 14912 new_path="$unix_path" 14913 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14914 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14915 new_path="$unix_path" 14916 fi 14917 14918 if test "x$path" != "x$new_path"; then 14919 BOOT_JDK="$new_path" 14920 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14921 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14922 fi 14923 14924 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14925 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14926 14927 else 14928 # We're on a posix platform. Hooray! :) 14929 path="$BOOT_JDK" 14930 has_space=`$ECHO "$path" | $GREP " "` 14931 if test "x$has_space" != x; then 14932 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14933 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14934 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14935 fi 14936 14937 # Use eval to expand a potential ~ 14938 eval path="$path" 14939 if test ! -f "$path" && test ! -d "$path"; then 14940 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14941 fi 14942 14943 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14944 fi 14945 14946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14947 $as_echo_n "checking for Boot JDK... " >&6; } 14948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14949 $as_echo "$BOOT_JDK" >&6; } 14950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14951 $as_echo_n "checking Boot JDK version... " >&6; } 14952 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14954 $as_echo "$BOOT_JDK_VERSION" >&6; } 14955 fi # end check jdk version 14956 fi # end check rt.jar 14957 fi # end check javac 14958 fi # end check java 14959 fi # end check boot jdk found 14960 fi 14961 14962 done 14963 fi 14964 14965 14966 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14967 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14968 # Do we have a bin/java? 14969 if test ! -x "$BOOT_JDK/bin/java"; then 14970 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14972 BOOT_JDK_FOUND=no 14973 else 14974 # Do we have a bin/javac? 14975 if test ! -x "$BOOT_JDK/bin/javac"; then 14976 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14977 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14978 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14979 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14980 BOOT_JDK_FOUND=no 14981 else 14982 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14983 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14984 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14985 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14986 BOOT_JDK_FOUND=no 14987 else 14988 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14989 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14990 14991 # Extra M4 quote needed to protect [] in grep expression. 14992 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14993 if test "x$FOUND_VERSION_78" = x; then 14994 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14995 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14996 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14997 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14998 BOOT_JDK_FOUND=no 14999 else 15000 # We're done! :-) 15001 BOOT_JDK_FOUND=yes 15002 15003 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15004 15005 # Input might be given as Windows format, start by converting to 15006 # unix format. 15007 path="$BOOT_JDK" 15008 new_path=`$CYGPATH -u "$path"` 15009 15010 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15011 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15012 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15013 # "foo.exe" is OK but "foo" is an error. 15014 # 15015 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15016 # It is also a way to make sure we got the proper file name for the real test later on. 15017 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15018 if test "x$test_shortpath" = x; then 15019 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15020 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15021 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15022 fi 15023 15024 # Call helper function which possibly converts this using DOS-style short mode. 15025 # If so, the updated path is stored in $new_path. 15026 15027 input_path="$new_path" 15028 # Check if we need to convert this using DOS-style short mode. If the path 15029 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15030 # take no chances and rewrite it. 15031 # Note: m4 eats our [], so we need to use [ and ] instead. 15032 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15033 if test "x$has_forbidden_chars" != x; then 15034 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15035 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15036 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15037 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15038 # Going to short mode and back again did indeed matter. Since short mode is 15039 # case insensitive, let's make it lowercase to improve readability. 15040 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15041 # Now convert it back to Unix-stile (cygpath) 15042 input_path=`$CYGPATH -u "$shortmode_path"` 15043 new_path="$input_path" 15044 fi 15045 fi 15046 15047 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15048 if test "x$test_cygdrive_prefix" = x; then 15049 # As a simple fix, exclude /usr/bin since it's not a real path. 15050 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15051 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15052 # a path prefixed by /cygdrive for fixpath to work. 15053 new_path="$CYGWIN_ROOT_PATH$input_path" 15054 fi 15055 fi 15056 15057 15058 if test "x$path" != "x$new_path"; then 15059 BOOT_JDK="$new_path" 15060 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15061 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15062 fi 15063 15064 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15065 15066 path="$BOOT_JDK" 15067 has_colon=`$ECHO $path | $GREP ^.:` 15068 new_path="$path" 15069 if test "x$has_colon" = x; then 15070 # Not in mixed or Windows style, start by that. 15071 new_path=`cmd //c echo $path` 15072 fi 15073 15074 15075 input_path="$new_path" 15076 # Check if we need to convert this using DOS-style short mode. If the path 15077 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15078 # take no chances and rewrite it. 15079 # Note: m4 eats our [], so we need to use [ and ] instead. 15080 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15081 if test "x$has_forbidden_chars" != x; then 15082 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15083 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15084 fi 15085 15086 15087 windows_path="$new_path" 15088 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15089 unix_path=`$CYGPATH -u "$windows_path"` 15090 new_path="$unix_path" 15091 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15092 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15093 new_path="$unix_path" 15094 fi 15095 15096 if test "x$path" != "x$new_path"; then 15097 BOOT_JDK="$new_path" 15098 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15099 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15100 fi 15101 15102 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15103 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15104 15105 else 15106 # We're on a posix platform. Hooray! :) 15107 path="$BOOT_JDK" 15108 has_space=`$ECHO "$path" | $GREP " "` 15109 if test "x$has_space" != x; then 15110 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15111 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15112 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15113 fi 15114 15115 # Use eval to expand a potential ~ 15116 eval path="$path" 15117 if test ! -f "$path" && test ! -d "$path"; then 15118 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15119 fi 15120 15121 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 15122 fi 15123 15124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15125 $as_echo_n "checking for Boot JDK... " >&6; } 15126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15127 $as_echo "$BOOT_JDK" >&6; } 15128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15129 $as_echo_n "checking Boot JDK version... " >&6; } 15130 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15132 $as_echo "$BOOT_JDK_VERSION" >&6; } 15133 fi # end check jdk version 15134 fi # end check rt.jar 15135 fi # end check javac 15136 fi # end check java 15137 fi # end check boot jdk found 15138 fi 15139 15140 elif test "x$OPENJDK_TARGET_OS" = xlinux; then 15141 15142 if test "x$BOOT_JDK_FOUND" = xno; then 15143 # Now execute the test 15144 15145 BOOT_JDK_PREFIX="/usr/lib/jvm" 15146 BOOT_JDK_SUFFIX="" 15147 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 15148 if test "x$ALL_JDKS_FOUND" != x; then 15149 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 15150 15151 if test "x$BOOT_JDK_FOUND" = xno; then 15152 # Now execute the test 15153 15154 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 15155 if test -d "$BOOT_JDK"; then 15156 BOOT_JDK_FOUND=maybe 15157 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 15158 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 15159 fi 15160 15161 15162 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15163 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15164 # Do we have a bin/java? 15165 if test ! -x "$BOOT_JDK/bin/java"; then 15166 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15167 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15168 BOOT_JDK_FOUND=no 15169 else 15170 # Do we have a bin/javac? 15171 if test ! -x "$BOOT_JDK/bin/javac"; then 15172 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15173 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15174 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15175 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15176 BOOT_JDK_FOUND=no 15177 else 15178 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15179 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15180 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15182 BOOT_JDK_FOUND=no 15183 else 15184 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15185 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15186 15187 # Extra M4 quote needed to protect [] in grep expression. 15188 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15189 if test "x$FOUND_VERSION_78" = x; then 15190 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15192 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15193 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15194 BOOT_JDK_FOUND=no 15195 else 15196 # We're done! :-) 15197 BOOT_JDK_FOUND=yes 15198 15199 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15200 15201 # Input might be given as Windows format, start by converting to 15202 # unix format. 15203 path="$BOOT_JDK" 15204 new_path=`$CYGPATH -u "$path"` 15205 15206 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15207 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15208 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15209 # "foo.exe" is OK but "foo" is an error. 15210 # 15211 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15212 # It is also a way to make sure we got the proper file name for the real test later on. 15213 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15214 if test "x$test_shortpath" = x; then 15215 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15217 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15218 fi 15219 15220 # Call helper function which possibly converts this using DOS-style short mode. 15221 # If so, the updated path is stored in $new_path. 15222 15223 input_path="$new_path" 15224 # Check if we need to convert this using DOS-style short mode. If the path 15225 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15226 # take no chances and rewrite it. 15227 # Note: m4 eats our [], so we need to use [ and ] instead. 15228 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15229 if test "x$has_forbidden_chars" != x; then 15230 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15231 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15232 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15233 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15234 # Going to short mode and back again did indeed matter. Since short mode is 15235 # case insensitive, let's make it lowercase to improve readability. 15236 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15237 # Now convert it back to Unix-stile (cygpath) 15238 input_path=`$CYGPATH -u "$shortmode_path"` 15239 new_path="$input_path" 15240 fi 15241 fi 15242 15243 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15244 if test "x$test_cygdrive_prefix" = x; then 15245 # As a simple fix, exclude /usr/bin since it's not a real path. 15246 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15247 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15248 # a path prefixed by /cygdrive for fixpath to work. 15249 new_path="$CYGWIN_ROOT_PATH$input_path" 15250 fi 15251 fi 15252 15253 15254 if test "x$path" != "x$new_path"; then 15255 BOOT_JDK="$new_path" 15256 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15257 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15258 fi 15259 15260 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15261 15262 path="$BOOT_JDK" 15263 has_colon=`$ECHO $path | $GREP ^.:` 15264 new_path="$path" 15265 if test "x$has_colon" = x; then 15266 # Not in mixed or Windows style, start by that. 15267 new_path=`cmd //c echo $path` 15268 fi 15269 15270 15271 input_path="$new_path" 15272 # Check if we need to convert this using DOS-style short mode. If the path 15273 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15274 # take no chances and rewrite it. 15275 # Note: m4 eats our [], so we need to use [ and ] instead. 15276 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15277 if test "x$has_forbidden_chars" != x; then 15278 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15279 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15280 fi 15281 15282 15283 windows_path="$new_path" 15284 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15285 unix_path=`$CYGPATH -u "$windows_path"` 15286 new_path="$unix_path" 15287 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15288 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15289 new_path="$unix_path" 15290 fi 15291 15292 if test "x$path" != "x$new_path"; then 15293 BOOT_JDK="$new_path" 15294 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15295 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15296 fi 15297 15298 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15299 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15300 15301 else 15302 # We're on a posix platform. Hooray! :) 15303 path="$BOOT_JDK" 15304 has_space=`$ECHO "$path" | $GREP " "` 15305 if test "x$has_space" != x; then 15306 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15307 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15308 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15309 fi 15310 15311 # Use eval to expand a potential ~ 15312 eval path="$path" 15313 if test ! -f "$path" && test ! -d "$path"; then 15314 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15315 fi 15316 15317 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 15318 fi 15319 15320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15321 $as_echo_n "checking for Boot JDK... " >&6; } 15322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15323 $as_echo "$BOOT_JDK" >&6; } 15324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15325 $as_echo_n "checking Boot JDK version... " >&6; } 15326 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15328 $as_echo "$BOOT_JDK_VERSION" >&6; } 15329 fi # end check jdk version 15330 fi # end check rt.jar 15331 fi # end check javac 15332 fi # end check java 15333 fi # end check boot jdk found 15334 fi 15335 15336 done 15337 fi 15338 15339 15340 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15341 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15342 # Do we have a bin/java? 15343 if test ! -x "$BOOT_JDK/bin/java"; then 15344 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15345 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15346 BOOT_JDK_FOUND=no 15347 else 15348 # Do we have a bin/javac? 15349 if test ! -x "$BOOT_JDK/bin/javac"; then 15350 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15351 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15352 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15353 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15354 BOOT_JDK_FOUND=no 15355 else 15356 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15357 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15358 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15360 BOOT_JDK_FOUND=no 15361 else 15362 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15363 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15364 15365 # Extra M4 quote needed to protect [] in grep expression. 15366 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15367 if test "x$FOUND_VERSION_78" = x; then 15368 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15370 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15371 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15372 BOOT_JDK_FOUND=no 15373 else 15374 # We're done! :-) 15375 BOOT_JDK_FOUND=yes 15376 15377 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15378 15379 # Input might be given as Windows format, start by converting to 15380 # unix format. 15381 path="$BOOT_JDK" 15382 new_path=`$CYGPATH -u "$path"` 15383 15384 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15385 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15386 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15387 # "foo.exe" is OK but "foo" is an error. 15388 # 15389 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15390 # It is also a way to make sure we got the proper file name for the real test later on. 15391 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15392 if test "x$test_shortpath" = x; then 15393 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15394 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15395 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15396 fi 15397 15398 # Call helper function which possibly converts this using DOS-style short mode. 15399 # If so, the updated path is stored in $new_path. 15400 15401 input_path="$new_path" 15402 # Check if we need to convert this using DOS-style short mode. If the path 15403 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15404 # take no chances and rewrite it. 15405 # Note: m4 eats our [], so we need to use [ and ] instead. 15406 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15407 if test "x$has_forbidden_chars" != x; then 15408 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15409 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15410 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15411 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15412 # Going to short mode and back again did indeed matter. Since short mode is 15413 # case insensitive, let's make it lowercase to improve readability. 15414 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15415 # Now convert it back to Unix-stile (cygpath) 15416 input_path=`$CYGPATH -u "$shortmode_path"` 15417 new_path="$input_path" 15418 fi 15419 fi 15420 15421 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15422 if test "x$test_cygdrive_prefix" = x; then 15423 # As a simple fix, exclude /usr/bin since it's not a real path. 15424 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15425 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15426 # a path prefixed by /cygdrive for fixpath to work. 15427 new_path="$CYGWIN_ROOT_PATH$input_path" 15428 fi 15429 fi 15430 15431 15432 if test "x$path" != "x$new_path"; then 15433 BOOT_JDK="$new_path" 15434 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15435 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15436 fi 15437 15438 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15439 15440 path="$BOOT_JDK" 15441 has_colon=`$ECHO $path | $GREP ^.:` 15442 new_path="$path" 15443 if test "x$has_colon" = x; then 15444 # Not in mixed or Windows style, start by that. 15445 new_path=`cmd //c echo $path` 15446 fi 15447 15448 15449 input_path="$new_path" 15450 # Check if we need to convert this using DOS-style short mode. If the path 15451 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15452 # take no chances and rewrite it. 15453 # Note: m4 eats our [], so we need to use [ and ] instead. 15454 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15455 if test "x$has_forbidden_chars" != x; then 15456 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15457 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15458 fi 15459 15460 15461 windows_path="$new_path" 15462 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15463 unix_path=`$CYGPATH -u "$windows_path"` 15464 new_path="$unix_path" 15465 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15466 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15467 new_path="$unix_path" 15468 fi 15469 15470 if test "x$path" != "x$new_path"; then 15471 BOOT_JDK="$new_path" 15472 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15473 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15474 fi 15475 15476 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15477 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15478 15479 else 15480 # We're on a posix platform. Hooray! :) 15481 path="$BOOT_JDK" 15482 has_space=`$ECHO "$path" | $GREP " "` 15483 if test "x$has_space" != x; then 15484 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15485 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15486 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15487 fi 15488 15489 # Use eval to expand a potential ~ 15490 eval path="$path" 15491 if test ! -f "$path" && test ! -d "$path"; then 15492 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15493 fi 15494 15495 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 15496 fi 15497 15498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15499 $as_echo_n "checking for Boot JDK... " >&6; } 15500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15501 $as_echo "$BOOT_JDK" >&6; } 15502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15503 $as_echo_n "checking Boot JDK version... " >&6; } 15504 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15506 $as_echo "$BOOT_JDK_VERSION" >&6; } 15507 fi # end check jdk version 15508 fi # end check rt.jar 15509 fi # end check javac 15510 fi # end check java 15511 fi # end check boot jdk found 15512 fi 15513 15514 fi 15515 15516 15517 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15518 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15519 # Do we have a bin/java? 15520 if test ! -x "$BOOT_JDK/bin/java"; then 15521 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15522 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15523 BOOT_JDK_FOUND=no 15524 else 15525 # Do we have a bin/javac? 15526 if test ! -x "$BOOT_JDK/bin/javac"; then 15527 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15528 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15529 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15530 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15531 BOOT_JDK_FOUND=no 15532 else 15533 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15534 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15535 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15536 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15537 BOOT_JDK_FOUND=no 15538 else 15539 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15540 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15541 15542 # Extra M4 quote needed to protect [] in grep expression. 15543 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15544 if test "x$FOUND_VERSION_78" = x; then 15545 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15546 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15547 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15548 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15549 BOOT_JDK_FOUND=no 15550 else 15551 # We're done! :-) 15552 BOOT_JDK_FOUND=yes 15553 15554 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15555 15556 # Input might be given as Windows format, start by converting to 15557 # unix format. 15558 path="$BOOT_JDK" 15559 new_path=`$CYGPATH -u "$path"` 15560 15561 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15562 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15563 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15564 # "foo.exe" is OK but "foo" is an error. 15565 # 15566 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15567 # It is also a way to make sure we got the proper file name for the real test later on. 15568 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15569 if test "x$test_shortpath" = x; then 15570 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15571 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15572 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15573 fi 15574 15575 # Call helper function which possibly converts this using DOS-style short mode. 15576 # If so, the updated path is stored in $new_path. 15577 15578 input_path="$new_path" 15579 # Check if we need to convert this using DOS-style short mode. If the path 15580 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15581 # take no chances and rewrite it. 15582 # Note: m4 eats our [], so we need to use [ and ] instead. 15583 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15584 if test "x$has_forbidden_chars" != x; then 15585 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15586 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15587 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15588 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15589 # Going to short mode and back again did indeed matter. Since short mode is 15590 # case insensitive, let's make it lowercase to improve readability. 15591 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15592 # Now convert it back to Unix-stile (cygpath) 15593 input_path=`$CYGPATH -u "$shortmode_path"` 15594 new_path="$input_path" 15595 fi 15596 fi 15597 15598 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15599 if test "x$test_cygdrive_prefix" = x; then 15600 # As a simple fix, exclude /usr/bin since it's not a real path. 15601 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15602 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15603 # a path prefixed by /cygdrive for fixpath to work. 15604 new_path="$CYGWIN_ROOT_PATH$input_path" 15605 fi 15606 fi 15607 15608 15609 if test "x$path" != "x$new_path"; then 15610 BOOT_JDK="$new_path" 15611 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15612 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15613 fi 15614 15615 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15616 15617 path="$BOOT_JDK" 15618 has_colon=`$ECHO $path | $GREP ^.:` 15619 new_path="$path" 15620 if test "x$has_colon" = x; then 15621 # Not in mixed or Windows style, start by that. 15622 new_path=`cmd //c echo $path` 15623 fi 15624 15625 15626 input_path="$new_path" 15627 # Check if we need to convert this using DOS-style short mode. If the path 15628 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15629 # take no chances and rewrite it. 15630 # Note: m4 eats our [], so we need to use [ and ] instead. 15631 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15632 if test "x$has_forbidden_chars" != x; then 15633 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15634 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15635 fi 15636 15637 15638 windows_path="$new_path" 15639 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15640 unix_path=`$CYGPATH -u "$windows_path"` 15641 new_path="$unix_path" 15642 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15643 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15644 new_path="$unix_path" 15645 fi 15646 15647 if test "x$path" != "x$new_path"; then 15648 BOOT_JDK="$new_path" 15649 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15650 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15651 fi 15652 15653 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15654 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15655 15656 else 15657 # We're on a posix platform. Hooray! :) 15658 path="$BOOT_JDK" 15659 has_space=`$ECHO "$path" | $GREP " "` 15660 if test "x$has_space" != x; then 15661 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15662 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15663 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15664 fi 15665 15666 # Use eval to expand a potential ~ 15667 eval path="$path" 15668 if test ! -f "$path" && test ! -d "$path"; then 15669 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15670 fi 15671 15672 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 15673 fi 15674 15675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15676 $as_echo_n "checking for Boot JDK... " >&6; } 15677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15678 $as_echo "$BOOT_JDK" >&6; } 15679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15680 $as_echo_n "checking Boot JDK version... " >&6; } 15681 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15683 $as_echo "$BOOT_JDK_VERSION" >&6; } 15684 fi # end check jdk version 15685 fi # end check rt.jar 15686 fi # end check javac 15687 fi # end check java 15688 fi # end check boot jdk found 15689 fi 15690 15691 15692 # If we haven't found anything yet, we've truly lost. Give up. 15693 if test "x$BOOT_JDK_FOUND" = xno; then 15694 15695 # Print a helpful message on how to acquire the necessary build dependency. 15696 # openjdk is the help tag: freetyp2, cups, pulse, alsa etc 15697 MISSING_DEPENDENCY=openjdk 15698 PKGHANDLER_COMMAND= 15699 15700 case $PKGHANDLER in 15701 apt-get) 15702 apt_help $MISSING_DEPENDENCY ;; 15703 yum) 15704 yum_help $MISSING_DEPENDENCY ;; 15705 port) 15706 port_help $MISSING_DEPENDENCY ;; 15707 pkgutil) 15708 pkgutil_help $MISSING_DEPENDENCY ;; 15709 pkgadd) 15710 pkgadd_help $MISSING_DEPENDENCY ;; 15711 * ) 15712 break ;; 15713 esac 15714 15715 if test "x$PKGHANDLER_COMMAND" != x; then 15716 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 15717 fi 15718 15719 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5 15720 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;} 15721 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5 15722 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15723 as_fn_error $? "Cannot continue" "$LINENO" 5 15724 fi 15725 15726 # Setup proper paths for what we found 15727 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" 15728 if test ! -f "$BOOT_RTJAR"; then 15729 # On MacOSX it is called classes.jar 15730 BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar" 15731 if test -f "$BOOT_RTJAR"; then 15732 # Remove the .. 15733 BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" 15734 fi 15735 fi 15736 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" 15737 BOOT_JDK="$BOOT_JDK" 15738 15739 15740 15741 15742 # Setup tools from the Boot JDK. 15743 15744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5 15745 $as_echo_n "checking for java in Boot JDK... " >&6; } 15746 JAVA=$BOOT_JDK/bin/java 15747 if test ! -x $JAVA; then 15748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15749 $as_echo "not found" >&6; } 15750 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15751 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15752 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5 15753 fi 15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15755 $as_echo "ok" >&6; } 15756 15757 15758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5 15759 $as_echo_n "checking for javac in Boot JDK... " >&6; } 15760 JAVAC=$BOOT_JDK/bin/javac 15761 if test ! -x $JAVAC; then 15762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15763 $as_echo "not found" >&6; } 15764 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15765 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15766 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5 15767 fi 15768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15769 $as_echo "ok" >&6; } 15770 15771 15772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5 15773 $as_echo_n "checking for javah in Boot JDK... " >&6; } 15774 JAVAH=$BOOT_JDK/bin/javah 15775 if test ! -x $JAVAH; then 15776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15777 $as_echo "not found" >&6; } 15778 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15779 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15780 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5 15781 fi 15782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15783 $as_echo "ok" >&6; } 15784 15785 15786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5 15787 $as_echo_n "checking for javap in Boot JDK... " >&6; } 15788 JAVAP=$BOOT_JDK/bin/javap 15789 if test ! -x $JAVAP; then 15790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15791 $as_echo "not found" >&6; } 15792 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15793 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15794 as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5 15795 fi 15796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15797 $as_echo "ok" >&6; } 15798 15799 15800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5 15801 $as_echo_n "checking for jar in Boot JDK... " >&6; } 15802 JAR=$BOOT_JDK/bin/jar 15803 if test ! -x $JAR; then 15804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15805 $as_echo "not found" >&6; } 15806 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15807 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15808 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5 15809 fi 15810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15811 $as_echo "ok" >&6; } 15812 15813 15814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5 15815 $as_echo_n "checking for rmic in Boot JDK... " >&6; } 15816 RMIC=$BOOT_JDK/bin/rmic 15817 if test ! -x $RMIC; then 15818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15819 $as_echo "not found" >&6; } 15820 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15821 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15822 as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5 15823 fi 15824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15825 $as_echo "ok" >&6; } 15826 15827 15828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5 15829 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; } 15830 NATIVE2ASCII=$BOOT_JDK/bin/native2ascii 15831 if test ! -x $NATIVE2ASCII; then 15832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15833 $as_echo "not found" >&6; } 15834 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15835 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15836 as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5 15837 fi 15838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15839 $as_echo "ok" >&6; } 15840 15841 15842 # Finally, set some other options... 15843 15844 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility. 15845 BOOT_JDK_SOURCETARGET="-source 7 -target 7" 15846 15847 15848 15849 15850 ############################################################################## 15851 # 15852 # Specify options for anything that is run with the Boot JDK. 15853 # 15854 15855 # Check whether --with-boot-jdk-jvmargs was given. 15856 if test "${with_boot_jdk_jvmargs+set}" = set; then : 15857 withval=$with_boot_jdk_jvmargs; 15858 fi 15859 15860 15861 if test "x$with_boot_jdk_jvmargs" = x; then 15862 # Not all JVM:s accept the same arguments on the command line. 15863 # OpenJDK specific increase in thread stack for JDK build, 15864 # well more specifically, when running javac. 15865 if test "x$BUILD_NUM_BITS" = x32; then 15866 STACK_SIZE=768 15867 else 15868 # Running Javac on a JVM on a 64-bit machine, the stack takes more space 15869 # since 64-bit pointers are pushed on the stach. Apparently, we need 15870 # to increase the stack space when javacing the JDK.... 15871 STACK_SIZE=1536 15872 fi 15873 15874 # Minimum amount of heap memory. 15875 15876 $ECHO "Check if jvm arg is ok: -Xms64M" >&5 15877 $ECHO "Command: $JAVA -Xms64M -version" >&5 15878 OUTPUT=`$JAVA -Xms64M -version 2>&1` 15879 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15880 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15881 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15882 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M" 15883 JVM_ARG_OK=true 15884 else 15885 $ECHO "Arg failed:" >&5 15886 $ECHO "$OUTPUT" >&5 15887 JVM_ARG_OK=false 15888 fi 15889 15890 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 15891 # Why does macosx need more heap? Its the huge JDK batch. 15892 15893 $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5 15894 $ECHO "Command: $JAVA -Xmx1600M -version" >&5 15895 OUTPUT=`$JAVA -Xmx1600M -version 2>&1` 15896 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15897 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15898 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15899 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M" 15900 JVM_ARG_OK=true 15901 else 15902 $ECHO "Arg failed:" >&5 15903 $ECHO "$OUTPUT" >&5 15904 JVM_ARG_OK=false 15905 fi 15906 15907 else 15908 15909 $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5 15910 $ECHO "Command: $JAVA -Xmx1100M -version" >&5 15911 OUTPUT=`$JAVA -Xmx1100M -version 2>&1` 15912 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15913 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15914 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15915 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M" 15916 JVM_ARG_OK=true 15917 else 15918 $ECHO "Arg failed:" >&5 15919 $ECHO "$OUTPUT" >&5 15920 JVM_ARG_OK=false 15921 fi 15922 15923 fi 15924 # When is adding -client something that speeds up the JVM? 15925 # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) 15926 15927 $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5 15928 $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5 15929 OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1` 15930 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15931 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15932 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15933 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m" 15934 JVM_ARG_OK=true 15935 else 15936 $ECHO "Arg failed:" >&5 15937 $ECHO "$OUTPUT" >&5 15938 JVM_ARG_OK=false 15939 fi 15940 15941 15942 $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5 15943 $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5 15944 OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1` 15945 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15946 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15947 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15948 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m" 15949 JVM_ARG_OK=true 15950 else 15951 $ECHO "Arg failed:" >&5 15952 $ECHO "$OUTPUT" >&5 15953 JVM_ARG_OK=false 15954 fi 15955 15956 15957 $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5 15958 $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5 15959 OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1` 15960 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15961 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15962 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15963 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE" 15964 JVM_ARG_OK=true 15965 else 15966 $ECHO "Arg failed:" >&5 15967 $ECHO "$OUTPUT" >&5 15968 JVM_ARG_OK=false 15969 fi 15970 15971 # Disable special log output when a debug build is used as Boot JDK... 15972 15973 $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5 15974 $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5 15975 OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1` 15976 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15977 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15978 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15979 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" 15980 JVM_ARG_OK=true 15981 else 15982 $ECHO "Arg failed:" >&5 15983 $ECHO "$OUTPUT" >&5 15984 JVM_ARG_OK=false 15985 fi 15986 15987 fi 15988 15989 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs 15990 15991 15992 15993 ############################################################################### 15994 # 15995 # Configure the sources to use. We can add or override individual directories. 15996 # 15997 ############################################################################### 15998 15999 16000 16001 # Where are the sources. Any of these can be overridden 16002 # using --with-override-corba and the likes. 16003 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" 16004 CORBA_TOPDIR="$SRC_ROOT/corba" 16005 JAXP_TOPDIR="$SRC_ROOT/jaxp" 16006 JAXWS_TOPDIR="$SRC_ROOT/jaxws" 16007 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" 16008 NASHORN_TOPDIR="$SRC_ROOT/nashorn" 16009 JDK_TOPDIR="$SRC_ROOT/jdk" 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 ############################################################################### 16021 # 16022 # Pickup additional source for a component from outside of the source root 16023 # or override source for a component. 16024 # 16025 16026 # Check whether --with-add-source-root was given. 16027 if test "${with_add_source_root+set}" = set; then : 16028 withval=$with_add_source_root; 16029 fi 16030 16031 16032 16033 # Check whether --with-override-source-root was given. 16034 if test "${with_override_source_root+set}" = set; then : 16035 withval=$with_override_source_root; 16036 fi 16037 16038 16039 16040 # Check whether --with-adds-and-overrides was given. 16041 if test "${with_adds_and_overrides+set}" = set; then : 16042 withval=$with_adds_and_overrides; 16043 fi 16044 16045 16046 if test "x$with_adds_and_overrides" != x; then 16047 with_add_source_root="$with_adds_and_overrides/adds" 16048 with_override_source_root="$with_adds_and_overrides/overrides" 16049 fi 16050 16051 if test "x$with_add_source_root" != x; then 16052 if ! test -d $with_add_source_root; then 16053 as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5 16054 fi 16055 CURDIR="$PWD" 16056 cd "$with_add_source_root" 16057 ADD_SRC_ROOT="`pwd`" 16058 cd "$CURDIR" 16059 # Verify that the addon source root does not have any root makefiles. 16060 # If it does, then it is usually an error, prevent this. 16061 if test -f $with_add_source_root/langtools/makefiles/Makefile || \ 16062 test -f $with_add_source_root/langtools/make/Makefile; then 16063 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 16064 fi 16065 if test -f $with_add_source_root/corba/makefiles/Makefile || \ 16066 test -f $with_add_source_root/corba/make/Makefile; then 16067 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 16068 fi 16069 if test -f $with_add_source_root/jaxp/makefiles/Makefile || \ 16070 test -f $with_add_source_root/jaxp/make/Makefile; then 16071 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 16072 fi 16073 if test -f $with_add_source_root/jaxws/makefiles/Makefile || \ 16074 test -f $with_add_source_root/jaxws/make/Makefile; then 16075 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 16076 fi 16077 if test -f $with_add_source_root/hotspot/makefiles/Makefile || \ 16078 test -f $with_add_source_root/hotspot/make/Makefile; then 16079 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 16080 fi 16081 if test -f $with_add_source_root/jdk/makefiles/Makefile || \ 16082 test -f $with_add_source_root/jdk/make/Makefile; then 16083 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 16084 fi 16085 fi 16086 16087 16088 if test "x$with_override_source_root" != x; then 16089 if ! test -d $with_override_source_root; then 16090 as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5 16091 fi 16092 CURDIR="$PWD" 16093 cd "$with_override_source_root" 16094 OVERRIDE_SRC_ROOT="`pwd`" 16095 cd "$CURDIR" 16096 if test -f $with_override_source_root/langtools/makefiles/Makefile || \ 16097 test -f $with_override_source_root/langtools/make/Makefile; then 16098 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 16099 fi 16100 if test -f $with_override_source_root/corba/makefiles/Makefile || \ 16101 test -f $with_override_source_root/corba/make/Makefile; then 16102 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 16103 fi 16104 if test -f $with_override_source_root/jaxp/makefiles/Makefile || \ 16105 test -f $with_override_source_root/jaxp/make/Makefile; then 16106 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 16107 fi 16108 if test -f $with_override_source_root/jaxws/makefiles/Makefile || \ 16109 test -f $with_override_source_root/jaxws/make/Makefile; then 16110 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 16111 fi 16112 if test -f $with_override_source_root/hotspot/makefiles/Makefile || \ 16113 test -f $with_override_source_root/hotspot/make/Makefile; then 16114 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 16115 fi 16116 if test -f $with_override_source_root/jdk/makefiles/Makefile || \ 16117 test -f $with_override_source_root/jdk/make/Makefile; then 16118 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 16119 fi 16120 fi 16121 16122 16123 ############################################################################### 16124 # 16125 # Override a repo completely, this is used for example when you have 3 small 16126 # development sandboxes of the langtools sources and want to avoid having 3 full 16127 # OpenJDK sources checked out on disk. 16128 # 16129 # Assuming that the 3 langtools sandboxes are located here: 16130 # /home/fredrik/sandbox1/langtools 16131 # /home/fredrik/sandbox2/langtools 16132 # /home/fredrik/sandbox3/langtools 16133 # 16134 # From the source root you create build subdirs manually: 16135 # mkdir -p build1 build2 build3 16136 # in each build directory run: 16137 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) 16138 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) 16139 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) 16140 # 16141 16142 16143 # Check whether --with-override-langtools was given. 16144 if test "${with_override_langtools+set}" = set; then : 16145 withval=$with_override_langtools; 16146 fi 16147 16148 16149 16150 # Check whether --with-override-corba was given. 16151 if test "${with_override_corba+set}" = set; then : 16152 withval=$with_override_corba; 16153 fi 16154 16155 16156 16157 # Check whether --with-override-jaxp was given. 16158 if test "${with_override_jaxp+set}" = set; then : 16159 withval=$with_override_jaxp; 16160 fi 16161 16162 16163 16164 # Check whether --with-override-jaxws was given. 16165 if test "${with_override_jaxws+set}" = set; then : 16166 withval=$with_override_jaxws; 16167 fi 16168 16169 16170 16171 # Check whether --with-override-hotspot was given. 16172 if test "${with_override_hotspot+set}" = set; then : 16173 withval=$with_override_hotspot; 16174 fi 16175 16176 16177 16178 # Check whether --with-override-jdk was given. 16179 if test "${with_override_jdk+set}" = set; then : 16180 withval=$with_override_jdk; 16181 fi 16182 16183 16184 if test "x$with_override_langtools" != x; then 16185 CURDIR="$PWD" 16186 cd "$with_override_langtools" 16187 LANGTOOLS_TOPDIR="`pwd`" 16188 cd "$CURDIR" 16189 if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then 16190 as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5 16191 fi 16192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5 16193 $as_echo_n "checking if langtools should be overridden... " >&6; } 16194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5 16195 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; } 16196 fi 16197 if test "x$with_override_corba" != x; then 16198 CURDIR="$PWD" 16199 cd "$with_override_corba" 16200 CORBA_TOPDIR="`pwd`" 16201 cd "$CURDIR" 16202 if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then 16203 as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5 16204 fi 16205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5 16206 $as_echo_n "checking if corba should be overridden... " >&6; } 16207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5 16208 $as_echo "yes with $CORBA_TOPDIR" >&6; } 16209 fi 16210 if test "x$with_override_jaxp" != x; then 16211 CURDIR="$PWD" 16212 cd "$with_override_jaxp" 16213 JAXP_TOPDIR="`pwd`" 16214 cd "$CURDIR" 16215 if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then 16216 as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5 16217 fi 16218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5 16219 $as_echo_n "checking if jaxp should be overridden... " >&6; } 16220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5 16221 $as_echo "yes with $JAXP_TOPDIR" >&6; } 16222 fi 16223 if test "x$with_override_jaxws" != x; then 16224 CURDIR="$PWD" 16225 cd "$with_override_jaxws" 16226 JAXWS_TOPDIR="`pwd`" 16227 cd "$CURDIR" 16228 if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then 16229 as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5 16230 fi 16231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5 16232 $as_echo_n "checking if jaxws should be overridden... " >&6; } 16233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5 16234 $as_echo "yes with $JAXWS_TOPDIR" >&6; } 16235 fi 16236 if test "x$with_override_hotspot" != x; then 16237 CURDIR="$PWD" 16238 cd "$with_override_hotspot" 16239 HOTSPOT_TOPDIR="`pwd`" 16240 cd "$CURDIR" 16241 if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \ 16242 ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then 16243 as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5 16244 fi 16245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5 16246 $as_echo_n "checking if hotspot should be overridden... " >&6; } 16247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5 16248 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; } 16249 fi 16250 if test "x$with_override_nashorn" != x; then 16251 CURDIR="$PWD" 16252 cd "$with_override_nashorn" 16253 NASHORN_TOPDIR="`pwd`" 16254 cd "$CURDIR" 16255 if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then 16256 as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5 16257 fi 16258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5 16259 $as_echo_n "checking if nashorn should be overridden... " >&6; } 16260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5 16261 $as_echo "yes with $NASHORN_TOPDIR" >&6; } 16262 fi 16263 if test "x$with_override_jdk" != x; then 16264 CURDIR="$PWD" 16265 cd "$with_override_jdk" 16266 JDK_TOPDIR="`pwd`" 16267 cd "$CURDIR" 16268 if ! test -f $JDK_TOPDIR/makefiles/Makefile; then 16269 as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5 16270 fi 16271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5 16272 $as_echo_n "checking if JDK should be overridden... " >&6; } 16273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5 16274 $as_echo "yes with $JDK_TOPDIR" >&6; } 16275 fi 16276 16277 16278 16279 BUILD_OUTPUT="$OUTPUT_ROOT" 16280 16281 16282 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" 16283 BUILD_HOTSPOT=true 16284 16285 16286 16287 # Check whether --with-import-hotspot was given. 16288 if test "${with_import_hotspot+set}" = set; then : 16289 withval=$with_import_hotspot; 16290 fi 16291 16292 if test "x$with_import_hotspot" != x; then 16293 CURDIR="$PWD" 16294 cd "$with_import_hotspot" 16295 HOTSPOT_DIST="`pwd`" 16296 cd "$CURDIR" 16297 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then 16298 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5 16299 fi 16300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5 16301 $as_echo_n "checking if hotspot should be imported... " >&6; } 16302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5 16303 $as_echo "yes from $HOTSPOT_DIST" >&6; } 16304 BUILD_HOTSPOT=false 16305 fi 16306 16307 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" 16308 16309 16310 ############################################################################### 16311 # 16312 # Setup the toolchain (compilers etc), i.e. the tools that need to be 16313 # cross-compilation aware. 16314 # 16315 ############################################################################### 16316 16317 16318 ############################################################################### 16319 # 16320 # Configure the development tool paths and potential sysroot. 16321 # 16322 ac_ext=cpp 16323 ac_cpp='$CXXCPP $CPPFLAGS' 16324 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 16325 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 16326 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 16327 16328 16329 # The option used to specify the target .o,.a or .so file. 16330 # When compiling, how to specify the to be created object file. 16331 CC_OUT_OPTION='-o$(SPACE)' 16332 # When linking, how to specify the to be created executable. 16333 EXE_OUT_OPTION='-o$(SPACE)' 16334 # When linking, how to specify the to be created dynamically linkable library. 16335 LD_OUT_OPTION='-o$(SPACE)' 16336 # When archiving, how to specify the to be create static archive for object files. 16337 AR_OUT_OPTION='rcs$(SPACE)' 16338 16339 16340 16341 16342 16343 # Locate the actual tools 16344 16345 16346 # Check whether --with-jtreg was given. 16347 if test "${with_jtreg+set}" = set; then : 16348 withval=$with_jtreg; 16349 else 16350 with_jtreg=no 16351 fi 16352 16353 16354 if test "x$with_jtreg" = xno; then 16355 # jtreg disabled 16356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 16357 $as_echo_n "checking for jtreg... " >&6; } 16358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16359 $as_echo "no" >&6; } 16360 else 16361 if test "x$with_jtreg" != xyes; then 16362 # with path specified. 16363 JT_HOME="$with_jtreg" 16364 fi 16365 16366 if test "x$JT_HOME" != x; then 16367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 16368 $as_echo_n "checking for jtreg... " >&6; } 16369 16370 # use JT_HOME enviroment var. 16371 16372 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16373 16374 # Input might be given as Windows format, start by converting to 16375 # unix format. 16376 path="$JT_HOME" 16377 new_path=`$CYGPATH -u "$path"` 16378 16379 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 16380 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 16381 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 16382 # "foo.exe" is OK but "foo" is an error. 16383 # 16384 # This test is therefore slightly more accurate than "test -f" to check for file precense. 16385 # It is also a way to make sure we got the proper file name for the real test later on. 16386 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 16387 if test "x$test_shortpath" = x; then 16388 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 16389 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} 16390 as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5 16391 fi 16392 16393 # Call helper function which possibly converts this using DOS-style short mode. 16394 # If so, the updated path is stored in $new_path. 16395 16396 input_path="$new_path" 16397 # Check if we need to convert this using DOS-style short mode. If the path 16398 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16399 # take no chances and rewrite it. 16400 # Note: m4 eats our [], so we need to use [ and ] instead. 16401 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 16402 if test "x$has_forbidden_chars" != x; then 16403 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16404 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 16405 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 16406 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 16407 # Going to short mode and back again did indeed matter. Since short mode is 16408 # case insensitive, let's make it lowercase to improve readability. 16409 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16410 # Now convert it back to Unix-stile (cygpath) 16411 input_path=`$CYGPATH -u "$shortmode_path"` 16412 new_path="$input_path" 16413 fi 16414 fi 16415 16416 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 16417 if test "x$test_cygdrive_prefix" = x; then 16418 # As a simple fix, exclude /usr/bin since it's not a real path. 16419 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 16420 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 16421 # a path prefixed by /cygdrive for fixpath to work. 16422 new_path="$CYGWIN_ROOT_PATH$input_path" 16423 fi 16424 fi 16425 16426 16427 if test "x$path" != "x$new_path"; then 16428 JT_HOME="$new_path" 16429 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 16430 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} 16431 fi 16432 16433 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16434 16435 path="$JT_HOME" 16436 has_colon=`$ECHO $path | $GREP ^.:` 16437 new_path="$path" 16438 if test "x$has_colon" = x; then 16439 # Not in mixed or Windows style, start by that. 16440 new_path=`cmd //c echo $path` 16441 fi 16442 16443 16444 input_path="$new_path" 16445 # Check if we need to convert this using DOS-style short mode. If the path 16446 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16447 # take no chances and rewrite it. 16448 # Note: m4 eats our [], so we need to use [ and ] instead. 16449 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 16450 if test "x$has_forbidden_chars" != x; then 16451 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16452 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16453 fi 16454 16455 16456 windows_path="$new_path" 16457 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16458 unix_path=`$CYGPATH -u "$windows_path"` 16459 new_path="$unix_path" 16460 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16461 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16462 new_path="$unix_path" 16463 fi 16464 16465 if test "x$path" != "x$new_path"; then 16466 JT_HOME="$new_path" 16467 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 16468 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} 16469 fi 16470 16471 # Save the first 10 bytes of this path to the storage, so fixpath can work. 16472 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 16473 16474 else 16475 # We're on a posix platform. Hooray! :) 16476 path="$JT_HOME" 16477 has_space=`$ECHO "$path" | $GREP " "` 16478 if test "x$has_space" != x; then 16479 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 16480 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} 16481 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 16482 fi 16483 16484 # Use eval to expand a potential ~ 16485 eval path="$path" 16486 if test ! -f "$path" && test ! -d "$path"; then 16487 as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5 16488 fi 16489 16490 JT_HOME="`cd "$path"; $THEPWDCMD -L`" 16491 fi 16492 16493 16494 # jtreg win32 script works for everybody 16495 JTREGEXE="$JT_HOME/win32/bin/jtreg" 16496 16497 if test ! -f "$JTREGEXE"; then 16498 as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5 16499 fi 16500 16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 16502 $as_echo "$JTREGEXE" >&6; } 16503 else 16504 # try to find jtreg on path 16505 16506 for ac_prog in jtreg 16507 do 16508 # Extract the first word of "$ac_prog", so it can be a program name with args. 16509 set dummy $ac_prog; ac_word=$2 16510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 16511 $as_echo_n "checking for $ac_word... " >&6; } 16512 if ${ac_cv_path_JTREGEXE+:} false; then : 16513 $as_echo_n "(cached) " >&6 16514 else 16515 case $JTREGEXE in 16516 [\\/]* | ?:[\\/]*) 16517 ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path. 16518 ;; 16519 *) 16520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 16521 for as_dir in $PATH 16522 do 16523 IFS=$as_save_IFS 16524 test -z "$as_dir" && as_dir=. 16525 for ac_exec_ext in '' $ac_executable_extensions; do 16526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 16527 ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext" 16528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 16529 break 2 16530 fi 16531 done 16532 done 16533 IFS=$as_save_IFS 16534 16535 ;; 16536 esac 16537 fi 16538 JTREGEXE=$ac_cv_path_JTREGEXE 16539 if test -n "$JTREGEXE"; then 16540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 16541 $as_echo "$JTREGEXE" >&6; } 16542 else 16543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16544 $as_echo "no" >&6; } 16545 fi 16546 16547 16548 test -n "$JTREGEXE" && break 16549 done 16550 16551 16552 if test "x$JTREGEXE" = x; then 16553 if test "xjtreg" = x; then 16554 PROG_NAME=jtregexe 16555 else 16556 PROG_NAME=jtreg 16557 fi 16558 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 16559 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 16560 as_fn_error $? "Cannot continue" "$LINENO" 5 16561 fi 16562 16563 16564 JT_HOME="`$DIRNAME $JTREGEXE`" 16565 fi 16566 fi 16567 16568 16569 16570 16571 16572 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 16573 16574 # Store path to cygwin link.exe to help excluding it when searching for 16575 # VS linker. This must be done before changing the PATH when looking for VS. 16576 # Extract the first word of "link", so it can be a program name with args. 16577 set dummy link; ac_word=$2 16578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 16579 $as_echo_n "checking for $ac_word... " >&6; } 16580 if ${ac_cv_path_CYGWIN_LINK+:} false; then : 16581 $as_echo_n "(cached) " >&6 16582 else 16583 case $CYGWIN_LINK in 16584 [\\/]* | ?:[\\/]*) 16585 ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path. 16586 ;; 16587 *) 16588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 16589 for as_dir in $PATH 16590 do 16591 IFS=$as_save_IFS 16592 test -z "$as_dir" && as_dir=. 16593 for ac_exec_ext in '' $ac_executable_extensions; do 16594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 16595 ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext" 16596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 16597 break 2 16598 fi 16599 done 16600 done 16601 IFS=$as_save_IFS 16602 16603 ;; 16604 esac 16605 fi 16606 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK 16607 if test -n "$CYGWIN_LINK"; then 16608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5 16609 $as_echo "$CYGWIN_LINK" >&6; } 16610 else 16611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16612 $as_echo "no" >&6; } 16613 fi 16614 16615 16616 if test "x$CYGWIN_LINK" != x; then 16617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5 16618 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; } 16619 "$CYGWIN_LINK" --version > /dev/null 16620 if test $? -eq 0 ; then 16621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 16622 $as_echo "yes" >&6; } 16623 else 16624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16625 $as_echo "no" >&6; } 16626 # This might be the VS linker. Don't exclude it later on. 16627 CYGWIN_LINK="" 16628 fi 16629 fi 16630 16631 # First-hand choice is to locate and run the vsvars bat file. 16632 16633 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16634 VCVARSFILE="vc/bin/vcvars32.bat" 16635 else 16636 VCVARSFILE="vc/bin/amd64/vcvars64.bat" 16637 fi 16638 16639 VS_ENV_CMD="" 16640 VS_ENV_ARGS="" 16641 if test "x$with_toolsdir" != x; then 16642 16643 if test "x$VS_ENV_CMD" = x; then 16644 VS100BASE="$with_toolsdir/../.." 16645 METHOD="--with-tools-dir" 16646 16647 windows_path="$VS100BASE" 16648 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16649 unix_path=`$CYGPATH -u "$windows_path"` 16650 VS100BASE="$unix_path" 16651 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16652 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16653 VS100BASE="$unix_path" 16654 fi 16655 16656 if test -d "$VS100BASE"; then 16657 if test -f "$VS100BASE/$VCVARSFILE"; then 16658 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16659 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16660 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16661 else 16662 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16663 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16664 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16665 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16666 fi 16667 fi 16668 fi 16669 16670 fi 16671 16672 if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then 16673 # Having specified an argument which is incorrect will produce an instant failure; 16674 # we should not go on looking 16675 { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5 16676 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;} 16677 { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5 16678 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;} 16679 as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5 16680 fi 16681 16682 if test "x$VS100COMNTOOLS" != x; then 16683 16684 if test "x$VS_ENV_CMD" = x; then 16685 VS100BASE="$VS100COMNTOOLS/../.." 16686 METHOD="VS100COMNTOOLS variable" 16687 16688 windows_path="$VS100BASE" 16689 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16690 unix_path=`$CYGPATH -u "$windows_path"` 16691 VS100BASE="$unix_path" 16692 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16693 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16694 VS100BASE="$unix_path" 16695 fi 16696 16697 if test -d "$VS100BASE"; then 16698 if test -f "$VS100BASE/$VCVARSFILE"; then 16699 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16700 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16701 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16702 else 16703 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16704 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16705 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16706 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16707 fi 16708 fi 16709 fi 16710 16711 fi 16712 if test "x$PROGRAMFILES" != x; then 16713 16714 if test "x$VS_ENV_CMD" = x; then 16715 VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0" 16716 METHOD="well-known name" 16717 16718 windows_path="$VS100BASE" 16719 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16720 unix_path=`$CYGPATH -u "$windows_path"` 16721 VS100BASE="$unix_path" 16722 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16723 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16724 VS100BASE="$unix_path" 16725 fi 16726 16727 if test -d "$VS100BASE"; then 16728 if test -f "$VS100BASE/$VCVARSFILE"; then 16729 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16730 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16731 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16732 else 16733 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16734 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16735 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16736 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16737 fi 16738 fi 16739 fi 16740 16741 fi 16742 16743 if test "x$VS_ENV_CMD" = x; then 16744 VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0" 16745 METHOD="well-known name" 16746 16747 windows_path="$VS100BASE" 16748 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16749 unix_path=`$CYGPATH -u "$windows_path"` 16750 VS100BASE="$unix_path" 16751 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16752 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16753 VS100BASE="$unix_path" 16754 fi 16755 16756 if test -d "$VS100BASE"; then 16757 if test -f "$VS100BASE/$VCVARSFILE"; then 16758 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16759 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16760 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16761 else 16762 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16763 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16764 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16765 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16766 fi 16767 fi 16768 fi 16769 16770 16771 if test "x$VS_ENV_CMD" = x; then 16772 VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0" 16773 METHOD="well-known name" 16774 16775 windows_path="$VS100BASE" 16776 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16777 unix_path=`$CYGPATH -u "$windows_path"` 16778 VS100BASE="$unix_path" 16779 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16780 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16781 VS100BASE="$unix_path" 16782 fi 16783 16784 if test -d "$VS100BASE"; then 16785 if test -f "$VS100BASE/$VCVARSFILE"; then 16786 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16787 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16788 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16789 else 16790 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16791 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16792 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16793 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16794 fi 16795 fi 16796 fi 16797 16798 16799 if test "x$ProgramW6432" != x; then 16800 16801 if test "x$VS_ENV_CMD" = x; then 16802 WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin" 16803 METHOD="well-known name" 16804 16805 windows_path="$WIN_SDK_BASE" 16806 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16807 unix_path=`$CYGPATH -u "$windows_path"` 16808 WIN_SDK_BASE="$unix_path" 16809 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16810 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16811 WIN_SDK_BASE="$unix_path" 16812 fi 16813 16814 if test -d "$WIN_SDK_BASE"; then 16815 # There have been cases of partial or broken SDK installations. A missing 16816 # lib dir is not going to work. 16817 if test ! -d "$WIN_SDK_BASE/../lib"; then 16818 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16819 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16820 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16821 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16822 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16823 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16824 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16825 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16826 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16827 VS_ENV_ARGS="/x86" 16828 else 16829 VS_ENV_ARGS="/x64" 16830 fi 16831 else 16832 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16833 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16834 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16835 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16836 fi 16837 fi 16838 fi 16839 16840 fi 16841 if test "x$PROGRAMW6432" != x; then 16842 16843 if test "x$VS_ENV_CMD" = x; then 16844 WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin" 16845 METHOD="well-known name" 16846 16847 windows_path="$WIN_SDK_BASE" 16848 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16849 unix_path=`$CYGPATH -u "$windows_path"` 16850 WIN_SDK_BASE="$unix_path" 16851 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16852 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16853 WIN_SDK_BASE="$unix_path" 16854 fi 16855 16856 if test -d "$WIN_SDK_BASE"; then 16857 # There have been cases of partial or broken SDK installations. A missing 16858 # lib dir is not going to work. 16859 if test ! -d "$WIN_SDK_BASE/../lib"; then 16860 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16861 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16862 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16863 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16864 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16865 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16866 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16867 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16868 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16869 VS_ENV_ARGS="/x86" 16870 else 16871 VS_ENV_ARGS="/x64" 16872 fi 16873 else 16874 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16875 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16876 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16877 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16878 fi 16879 fi 16880 fi 16881 16882 fi 16883 if test "x$PROGRAMFILES" != x; then 16884 16885 if test "x$VS_ENV_CMD" = x; then 16886 WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin" 16887 METHOD="well-known name" 16888 16889 windows_path="$WIN_SDK_BASE" 16890 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16891 unix_path=`$CYGPATH -u "$windows_path"` 16892 WIN_SDK_BASE="$unix_path" 16893 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16894 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16895 WIN_SDK_BASE="$unix_path" 16896 fi 16897 16898 if test -d "$WIN_SDK_BASE"; then 16899 # There have been cases of partial or broken SDK installations. A missing 16900 # lib dir is not going to work. 16901 if test ! -d "$WIN_SDK_BASE/../lib"; then 16902 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16903 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16904 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16905 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16906 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16907 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16908 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16909 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16910 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16911 VS_ENV_ARGS="/x86" 16912 else 16913 VS_ENV_ARGS="/x64" 16914 fi 16915 else 16916 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16917 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16918 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16919 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16920 fi 16921 fi 16922 fi 16923 16924 fi 16925 16926 if test "x$VS_ENV_CMD" = x; then 16927 WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin" 16928 METHOD="well-known name" 16929 16930 windows_path="$WIN_SDK_BASE" 16931 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16932 unix_path=`$CYGPATH -u "$windows_path"` 16933 WIN_SDK_BASE="$unix_path" 16934 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16935 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16936 WIN_SDK_BASE="$unix_path" 16937 fi 16938 16939 if test -d "$WIN_SDK_BASE"; then 16940 # There have been cases of partial or broken SDK installations. A missing 16941 # lib dir is not going to work. 16942 if test ! -d "$WIN_SDK_BASE/../lib"; then 16943 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16944 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16945 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16946 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16947 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16948 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16949 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16950 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16951 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16952 VS_ENV_ARGS="/x86" 16953 else 16954 VS_ENV_ARGS="/x64" 16955 fi 16956 else 16957 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16958 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16959 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16960 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16961 fi 16962 fi 16963 fi 16964 16965 16966 if test "x$VS_ENV_CMD" = x; then 16967 WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin" 16968 METHOD="well-known name" 16969 16970 windows_path="$WIN_SDK_BASE" 16971 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16972 unix_path=`$CYGPATH -u "$windows_path"` 16973 WIN_SDK_BASE="$unix_path" 16974 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16975 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16976 WIN_SDK_BASE="$unix_path" 16977 fi 16978 16979 if test -d "$WIN_SDK_BASE"; then 16980 # There have been cases of partial or broken SDK installations. A missing 16981 # lib dir is not going to work. 16982 if test ! -d "$WIN_SDK_BASE/../lib"; then 16983 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16984 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16985 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16986 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16987 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16988 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16989 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16990 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16991 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16992 VS_ENV_ARGS="/x86" 16993 else 16994 VS_ENV_ARGS="/x64" 16995 fi 16996 else 16997 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16998 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16999 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 17000 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 17001 fi 17002 fi 17003 fi 17004 17005 17006 if test "x$VS_ENV_CMD" != x; then 17007 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file. 17008 17009 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17010 17011 # First separate the path from the arguments. This will split at the first 17012 # space. 17013 complete="$VS_ENV_CMD" 17014 path="${complete%% *}" 17015 tmp="$complete EOL" 17016 arguments="${tmp#* }" 17017 17018 # Input might be given as Windows format, start by converting to 17019 # unix format. 17020 new_path=`$CYGPATH -u "$path"` 17021 17022 # Now try to locate executable using which 17023 new_path=`$WHICH "$new_path" 2> /dev/null` 17024 # bat and cmd files are not always considered executable in cygwin causing which 17025 # to not find them 17026 if test "x$new_path" = x \ 17027 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17028 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17029 new_path=`$CYGPATH -u "$path"` 17030 fi 17031 if test "x$new_path" = x; then 17032 # Oops. Which didn't find the executable. 17033 # The splitting of arguments from the executable at a space might have been incorrect, 17034 # since paths with space are more likely in Windows. Give it another try with the whole 17035 # argument. 17036 path="$complete" 17037 arguments="EOL" 17038 new_path=`$CYGPATH -u "$path"` 17039 new_path=`$WHICH "$new_path" 2> /dev/null` 17040 # bat and cmd files are not always considered executable in cygwin causing which 17041 # to not find them 17042 if test "x$new_path" = x \ 17043 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17044 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17045 new_path=`$CYGPATH -u "$path"` 17046 fi 17047 if test "x$new_path" = x; then 17048 # It's still not found. Now this is an unrecoverable error. 17049 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 17050 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 17051 has_space=`$ECHO "$complete" | $GREP " "` 17052 if test "x$has_space" != x; then 17053 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17054 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17055 fi 17056 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 17057 fi 17058 fi 17059 17060 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17061 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17062 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17063 # "foo.exe" is OK but "foo" is an error. 17064 # 17065 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17066 # It is also a way to make sure we got the proper file name for the real test later on. 17067 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17068 if test "x$test_shortpath" = x; then 17069 # Short path failed, file does not exist as specified. 17070 # Try adding .exe or .cmd 17071 if test -f "${new_path}.exe"; then 17072 input_to_shortpath="${new_path}.exe" 17073 elif test -f "${new_path}.cmd"; then 17074 input_to_shortpath="${new_path}.cmd" 17075 else 17076 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5 17077 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;} 17078 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 17079 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 17080 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 17081 fi 17082 else 17083 input_to_shortpath="$new_path" 17084 fi 17085 17086 # Call helper function which possibly converts this using DOS-style short mode. 17087 # If so, the updated path is stored in $new_path. 17088 new_path="$input_to_shortpath" 17089 17090 input_path="$input_to_shortpath" 17091 # Check if we need to convert this using DOS-style short mode. If the path 17092 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17093 # take no chances and rewrite it. 17094 # Note: m4 eats our [], so we need to use [ and ] instead. 17095 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17096 if test "x$has_forbidden_chars" != x; then 17097 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17098 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17099 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17100 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17101 # Going to short mode and back again did indeed matter. Since short mode is 17102 # case insensitive, let's make it lowercase to improve readability. 17103 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17104 # Now convert it back to Unix-stile (cygpath) 17105 input_path=`$CYGPATH -u "$shortmode_path"` 17106 new_path="$input_path" 17107 fi 17108 fi 17109 17110 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17111 if test "x$test_cygdrive_prefix" = x; then 17112 # As a simple fix, exclude /usr/bin since it's not a real path. 17113 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 17114 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17115 # a path prefixed by /cygdrive for fixpath to work. 17116 new_path="$CYGWIN_ROOT_PATH$input_path" 17117 fi 17118 fi 17119 17120 # remove trailing .exe if any 17121 new_path="${new_path/%.exe/}" 17122 17123 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17124 17125 # First separate the path from the arguments. This will split at the first 17126 # space. 17127 complete="$VS_ENV_CMD" 17128 path="${complete%% *}" 17129 tmp="$complete EOL" 17130 arguments="${tmp#* }" 17131 17132 # Input might be given as Windows format, start by converting to 17133 # unix format. 17134 new_path="$path" 17135 17136 windows_path="$new_path" 17137 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17138 unix_path=`$CYGPATH -u "$windows_path"` 17139 new_path="$unix_path" 17140 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17141 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17142 new_path="$unix_path" 17143 fi 17144 17145 17146 # Now try to locate executable using which 17147 new_path=`$WHICH "$new_path" 2> /dev/null` 17148 17149 if test "x$new_path" = x; then 17150 # Oops. Which didn't find the executable. 17151 # The splitting of arguments from the executable at a space might have been incorrect, 17152 # since paths with space are more likely in Windows. Give it another try with the whole 17153 # argument. 17154 path="$complete" 17155 arguments="EOL" 17156 new_path="$path" 17157 17158 windows_path="$new_path" 17159 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17160 unix_path=`$CYGPATH -u "$windows_path"` 17161 new_path="$unix_path" 17162 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17163 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17164 new_path="$unix_path" 17165 fi 17166 17167 17168 new_path=`$WHICH "$new_path" 2> /dev/null` 17169 17170 if test "x$new_path" = x; then 17171 # It's still not found. Now this is an unrecoverable error. 17172 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 17173 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 17174 has_space=`$ECHO "$complete" | $GREP " "` 17175 if test "x$has_space" != x; then 17176 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17177 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17178 fi 17179 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 17180 fi 17181 fi 17182 17183 # Now new_path has a complete unix path to the binary 17184 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 17185 # Keep paths in /bin as-is, but remove trailing .exe if any 17186 new_path="${new_path/%.exe/}" 17187 # Do not save /bin paths to all_fixpath_prefixes! 17188 else 17189 # Not in mixed or Windows style, start by that. 17190 new_path=`cmd //c echo $new_path` 17191 17192 input_path="$new_path" 17193 # Check if we need to convert this using DOS-style short mode. If the path 17194 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17195 # take no chances and rewrite it. 17196 # Note: m4 eats our [], so we need to use [ and ] instead. 17197 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17198 if test "x$has_forbidden_chars" != x; then 17199 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17200 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17201 fi 17202 17203 # Output is in $new_path 17204 17205 windows_path="$new_path" 17206 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17207 unix_path=`$CYGPATH -u "$windows_path"` 17208 new_path="$unix_path" 17209 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17210 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17211 new_path="$unix_path" 17212 fi 17213 17214 # remove trailing .exe if any 17215 new_path="${new_path/%.exe/}" 17216 17217 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17218 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17219 fi 17220 17221 else 17222 # We're on a posix platform. Hooray! :) 17223 # First separate the path from the arguments. This will split at the first 17224 # space. 17225 complete="$VS_ENV_CMD" 17226 path="${complete%% *}" 17227 tmp="$complete EOL" 17228 arguments="${tmp#* }" 17229 17230 # Cannot rely on the command "which" here since it doesn't always work. 17231 is_absolute_path=`$ECHO "$path" | $GREP ^/` 17232 if test -z "$is_absolute_path"; then 17233 # Path to executable is not absolute. Find it. 17234 IFS_save="$IFS" 17235 IFS=: 17236 for p in $PATH; do 17237 if test -f "$p/$path" && test -x "$p/$path"; then 17238 new_path="$p/$path" 17239 break 17240 fi 17241 done 17242 IFS="$IFS_save" 17243 else 17244 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5 17245 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;} 17246 new_path="$path" 17247 fi 17248 17249 if test "x$new_path" = x; then 17250 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 17251 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 17252 has_space=`$ECHO "$complete" | $GREP " "` 17253 if test "x$has_space" != x; then 17254 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 17255 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 17256 fi 17257 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 17258 fi 17259 fi 17260 17261 # Now join together the path and the arguments once again 17262 if test "x$arguments" != xEOL; then 17263 new_complete="$new_path ${arguments% *}" 17264 else 17265 new_complete="$new_path" 17266 fi 17267 17268 if test "x$complete" != "x$new_complete"; then 17269 VS_ENV_CMD="$new_complete" 17270 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5 17271 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;} 17272 fi 17273 17274 17275 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat 17276 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5 17277 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;} 17278 cd $OUTPUT_ROOT 17279 # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted 17280 # to autoconf standards. 17281 17282 #---- 17283 17284 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment) 17285 # but calculate the difference in Cygwin environment before/after running it and then 17286 # apply the diff. 17287 17288 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 17289 _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"` 17290 _dosvs10varsall=`cygpath -a -w -s $_vs10varsall` 17291 _dosbash=`cygpath -a -w -s \`which bash\`.*` 17292 else 17293 _dosvs10varsall=`cmd //c echo $VS_ENV_CMD` 17294 _dosbash=`cmd //c echo \`which bash\`` 17295 fi 17296 17297 # generate the set of exported vars before/after the vs10 setup 17298 $ECHO "@echo off" > localdevenvtmp.bat 17299 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat 17300 $ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat 17301 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat 17302 17303 # Now execute the newly created bat file. 17304 # The | cat is to stop SetEnv.Cmd to mess with system colors on msys 17305 cmd /c localdevenvtmp.bat | cat 17306 17307 # apply the diff (less some non-vs10 vars named by "!") 17308 $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort 17309 $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort 17310 $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh 17311 17312 # cleanup 17313 $RM localdevenvtmp* 17314 #---- 17315 cd $CURDIR 17316 if test ! -s $OUTPUT_ROOT/localdevenv.sh; then 17317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17318 $as_echo "no" >&6; } 17319 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5 17320 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;} 17321 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 17322 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} 17323 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 17324 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} 17325 as_fn_error $? "Cannot continue" "$LINENO" 5 17326 fi 17327 17328 # Now set all paths and other env variables. This will allow the rest of 17329 # the configure script to find and run the compiler in the proper way. 17330 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5 17331 $as_echo "$as_me: Setting extracted environment variables" >&6;} 17332 . $OUTPUT_ROOT/localdevenv.sh 17333 else 17334 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. 17335 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5 17336 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;} 17337 fi 17338 17339 # At this point, we should have corrent variables in the environment, or we can't continue. 17340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5 17341 $as_echo_n "checking for Visual Studio variables... " >&6; } 17342 17343 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then 17344 if test "x$INCLUDE" = x || test "x$LIB" = x; then 17345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5 17346 $as_echo "present but broken" >&6; } 17347 as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5 17348 else 17349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 17350 $as_echo "ok" >&6; } 17351 # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk. 17352 VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'` 17353 VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'` 17354 # Remove any paths containing # (typically F#) as that messes up make 17355 PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'` 17356 VS_PATH="$PATH" 17357 17358 17359 17360 fi 17361 else 17362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 17363 $as_echo "not found" >&6; } 17364 17365 if test "x$VS_ENV_CMD" = x; then 17366 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5 17367 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;} 17368 { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5 17369 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;} 17370 else 17371 { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5 17372 $as_echo "$as_me: Running the extraction script failed." >&6;} 17373 fi 17374 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 17375 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} 17376 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 17377 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} 17378 as_fn_error $? "Cannot continue" "$LINENO" 5 17379 fi 17380 17381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 17382 $as_echo_n "checking for msvcr100.dll... " >&6; } 17383 17384 # Check whether --with-msvcr-dll was given. 17385 if test "${with_msvcr_dll+set}" = set; then : 17386 withval=$with_msvcr_dll; 17387 fi 17388 17389 if test "x$with_msvcr_dll" != x; then 17390 MSVCR_DLL="$with_msvcr_dll" 17391 else 17392 if test "x$VCINSTALLDIR" != x; then 17393 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 17394 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1` 17395 else 17396 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1` 17397 if test "x$MSVCR_DLL" = x; then 17398 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1` 17399 fi 17400 fi 17401 if test "x$MSVCR_DLL" != x; then 17402 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5 17403 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;} 17404 else 17405 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5 17406 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;} 17407 fi 17408 fi 17409 # Try some fallback alternatives 17410 if test "x$MSVCR_DLL" = x; then 17411 # If visual studio express is installed, there is usually one with the debugger 17412 if test "x$VS100COMNTOOLS" != x; then 17413 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 17414 MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1` 17415 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5 17416 $as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;} 17417 fi 17418 fi 17419 fi 17420 if test "x$MSVCR_DLL" = x; then 17421 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 17422 # Fallback for 32bit builds, look in the windows directory. 17423 if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then 17424 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5 17425 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;} 17426 MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll" 17427 fi 17428 fi 17429 fi 17430 fi 17431 if test "x$MSVCR_DLL" = x; then 17432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17433 $as_echo "no" >&6; } 17434 as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5 17435 fi 17436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 17437 $as_echo "$MSVCR_DLL" >&6; } 17438 17439 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17440 17441 # Input might be given as Windows format, start by converting to 17442 # unix format. 17443 path="$MSVCR_DLL" 17444 new_path=`$CYGPATH -u "$path"` 17445 17446 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17447 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17448 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17449 # "foo.exe" is OK but "foo" is an error. 17450 # 17451 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17452 # It is also a way to make sure we got the proper file name for the real test later on. 17453 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17454 if test "x$test_shortpath" = x; then 17455 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 17456 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} 17457 as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5 17458 fi 17459 17460 # Call helper function which possibly converts this using DOS-style short mode. 17461 # If so, the updated path is stored in $new_path. 17462 17463 input_path="$new_path" 17464 # Check if we need to convert this using DOS-style short mode. If the path 17465 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17466 # take no chances and rewrite it. 17467 # Note: m4 eats our [], so we need to use [ and ] instead. 17468 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17469 if test "x$has_forbidden_chars" != x; then 17470 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17471 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17472 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17473 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17474 # Going to short mode and back again did indeed matter. Since short mode is 17475 # case insensitive, let's make it lowercase to improve readability. 17476 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17477 # Now convert it back to Unix-stile (cygpath) 17478 input_path=`$CYGPATH -u "$shortmode_path"` 17479 new_path="$input_path" 17480 fi 17481 fi 17482 17483 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17484 if test "x$test_cygdrive_prefix" = x; then 17485 # As a simple fix, exclude /usr/bin since it's not a real path. 17486 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17487 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17488 # a path prefixed by /cygdrive for fixpath to work. 17489 new_path="$CYGWIN_ROOT_PATH$input_path" 17490 fi 17491 fi 17492 17493 17494 if test "x$path" != "x$new_path"; then 17495 MSVCR_DLL="$new_path" 17496 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 17497 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} 17498 fi 17499 17500 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17501 17502 path="$MSVCR_DLL" 17503 has_colon=`$ECHO $path | $GREP ^.:` 17504 new_path="$path" 17505 if test "x$has_colon" = x; then 17506 # Not in mixed or Windows style, start by that. 17507 new_path=`cmd //c echo $path` 17508 fi 17509 17510 17511 input_path="$new_path" 17512 # Check if we need to convert this using DOS-style short mode. If the path 17513 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17514 # take no chances and rewrite it. 17515 # Note: m4 eats our [], so we need to use [ and ] instead. 17516 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17517 if test "x$has_forbidden_chars" != x; then 17518 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17519 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17520 fi 17521 17522 17523 windows_path="$new_path" 17524 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17525 unix_path=`$CYGPATH -u "$windows_path"` 17526 new_path="$unix_path" 17527 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17528 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17529 new_path="$unix_path" 17530 fi 17531 17532 if test "x$path" != "x$new_path"; then 17533 MSVCR_DLL="$new_path" 17534 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 17535 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} 17536 fi 17537 17538 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17539 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17540 17541 else 17542 # We're on a posix platform. Hooray! :) 17543 path="$MSVCR_DLL" 17544 has_space=`$ECHO "$path" | $GREP " "` 17545 if test "x$has_space" != x; then 17546 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 17547 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} 17548 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17549 fi 17550 17551 # Use eval to expand a potential ~ 17552 eval path="$path" 17553 if test ! -f "$path" && test ! -d "$path"; then 17554 as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 17555 fi 17556 17557 MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`" 17558 fi 17559 17560 17561 17562 17563 # Check whether --with-dxsdk was given. 17564 if test "${with_dxsdk+set}" = set; then : 17565 withval=$with_dxsdk; 17566 fi 17567 17568 17569 # Check whether --with-dxsdk-lib was given. 17570 if test "${with_dxsdk_lib+set}" = set; then : 17571 withval=$with_dxsdk_lib; 17572 fi 17573 17574 17575 # Check whether --with-dxsdk-include was given. 17576 if test "${with_dxsdk_include+set}" = set; then : 17577 withval=$with_dxsdk_include; 17578 fi 17579 17580 17581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5 17582 $as_echo_n "checking for DirectX SDK... " >&6; } 17583 17584 if test "x$with_dxsdk" != x; then 17585 dxsdk_path="$with_dxsdk" 17586 elif test "x$DXSDK_DIR" != x; then 17587 dxsdk_path="$DXSDK_DIR" 17588 elif test -d "C:/DXSDK"; then 17589 dxsdk_path="C:/DXSDK" 17590 else 17591 as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5 17592 fi 17593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5 17594 $as_echo "$dxsdk_path" >&6; } 17595 17596 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17597 17598 # Input might be given as Windows format, start by converting to 17599 # unix format. 17600 path="$dxsdk_path" 17601 new_path=`$CYGPATH -u "$path"` 17602 17603 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17604 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17605 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17606 # "foo.exe" is OK but "foo" is an error. 17607 # 17608 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17609 # It is also a way to make sure we got the proper file name for the real test later on. 17610 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17611 if test "x$test_shortpath" = x; then 17612 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5 17613 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;} 17614 as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5 17615 fi 17616 17617 # Call helper function which possibly converts this using DOS-style short mode. 17618 # If so, the updated path is stored in $new_path. 17619 17620 input_path="$new_path" 17621 # Check if we need to convert this using DOS-style short mode. If the path 17622 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17623 # take no chances and rewrite it. 17624 # Note: m4 eats our [], so we need to use [ and ] instead. 17625 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17626 if test "x$has_forbidden_chars" != x; then 17627 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17628 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17629 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17630 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17631 # Going to short mode and back again did indeed matter. Since short mode is 17632 # case insensitive, let's make it lowercase to improve readability. 17633 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17634 # Now convert it back to Unix-stile (cygpath) 17635 input_path=`$CYGPATH -u "$shortmode_path"` 17636 new_path="$input_path" 17637 fi 17638 fi 17639 17640 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17641 if test "x$test_cygdrive_prefix" = x; then 17642 # As a simple fix, exclude /usr/bin since it's not a real path. 17643 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17644 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17645 # a path prefixed by /cygdrive for fixpath to work. 17646 new_path="$CYGWIN_ROOT_PATH$input_path" 17647 fi 17648 fi 17649 17650 17651 if test "x$path" != "x$new_path"; then 17652 dxsdk_path="$new_path" 17653 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5 17654 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;} 17655 fi 17656 17657 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17658 17659 path="$dxsdk_path" 17660 has_colon=`$ECHO $path | $GREP ^.:` 17661 new_path="$path" 17662 if test "x$has_colon" = x; then 17663 # Not in mixed or Windows style, start by that. 17664 new_path=`cmd //c echo $path` 17665 fi 17666 17667 17668 input_path="$new_path" 17669 # Check if we need to convert this using DOS-style short mode. If the path 17670 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17671 # take no chances and rewrite it. 17672 # Note: m4 eats our [], so we need to use [ and ] instead. 17673 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17674 if test "x$has_forbidden_chars" != x; then 17675 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17676 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17677 fi 17678 17679 17680 windows_path="$new_path" 17681 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17682 unix_path=`$CYGPATH -u "$windows_path"` 17683 new_path="$unix_path" 17684 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17685 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17686 new_path="$unix_path" 17687 fi 17688 17689 if test "x$path" != "x$new_path"; then 17690 dxsdk_path="$new_path" 17691 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5 17692 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;} 17693 fi 17694 17695 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17696 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17697 17698 else 17699 # We're on a posix platform. Hooray! :) 17700 path="$dxsdk_path" 17701 has_space=`$ECHO "$path" | $GREP " "` 17702 if test "x$has_space" != x; then 17703 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5 17704 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;} 17705 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17706 fi 17707 17708 # Use eval to expand a potential ~ 17709 eval path="$path" 17710 if test ! -f "$path" && test ! -d "$path"; then 17711 as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5 17712 fi 17713 17714 dxsdk_path="`cd "$path"; $THEPWDCMD -L`" 17715 fi 17716 17717 17718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5 17719 $as_echo_n "checking for DirectX SDK lib dir... " >&6; } 17720 if test "x$with_dxsdk_lib" != x; then 17721 DXSDK_LIB_PATH="$with_dxsdk_lib" 17722 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 17723 DXSDK_LIB_PATH="$dxsdk_path/Lib/x64" 17724 else 17725 DXSDK_LIB_PATH="$dxsdk_path/Lib" 17726 fi 17727 # dsound.lib is linked to in jsoundds 17728 if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then 17729 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5 17730 fi 17731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5 17732 $as_echo "$DXSDK_LIB_PATH" >&6; } 17733 17734 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17735 17736 # Input might be given as Windows format, start by converting to 17737 # unix format. 17738 path="$DXSDK_LIB_PATH" 17739 new_path=`$CYGPATH -u "$path"` 17740 17741 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17742 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17743 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17744 # "foo.exe" is OK but "foo" is an error. 17745 # 17746 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17747 # It is also a way to make sure we got the proper file name for the real test later on. 17748 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17749 if test "x$test_shortpath" = x; then 17750 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5 17751 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 17752 as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5 17753 fi 17754 17755 # Call helper function which possibly converts this using DOS-style short mode. 17756 # If so, the updated path is stored in $new_path. 17757 17758 input_path="$new_path" 17759 # Check if we need to convert this using DOS-style short mode. If the path 17760 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17761 # take no chances and rewrite it. 17762 # Note: m4 eats our [], so we need to use [ and ] instead. 17763 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17764 if test "x$has_forbidden_chars" != x; then 17765 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17766 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17767 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17768 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17769 # Going to short mode and back again did indeed matter. Since short mode is 17770 # case insensitive, let's make it lowercase to improve readability. 17771 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17772 # Now convert it back to Unix-stile (cygpath) 17773 input_path=`$CYGPATH -u "$shortmode_path"` 17774 new_path="$input_path" 17775 fi 17776 fi 17777 17778 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17779 if test "x$test_cygdrive_prefix" = x; then 17780 # As a simple fix, exclude /usr/bin since it's not a real path. 17781 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17782 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17783 # a path prefixed by /cygdrive for fixpath to work. 17784 new_path="$CYGWIN_ROOT_PATH$input_path" 17785 fi 17786 fi 17787 17788 17789 if test "x$path" != "x$new_path"; then 17790 DXSDK_LIB_PATH="$new_path" 17791 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5 17792 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;} 17793 fi 17794 17795 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17796 17797 path="$DXSDK_LIB_PATH" 17798 has_colon=`$ECHO $path | $GREP ^.:` 17799 new_path="$path" 17800 if test "x$has_colon" = x; then 17801 # Not in mixed or Windows style, start by that. 17802 new_path=`cmd //c echo $path` 17803 fi 17804 17805 17806 input_path="$new_path" 17807 # Check if we need to convert this using DOS-style short mode. If the path 17808 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17809 # take no chances and rewrite it. 17810 # Note: m4 eats our [], so we need to use [ and ] instead. 17811 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17812 if test "x$has_forbidden_chars" != x; then 17813 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17814 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17815 fi 17816 17817 17818 windows_path="$new_path" 17819 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17820 unix_path=`$CYGPATH -u "$windows_path"` 17821 new_path="$unix_path" 17822 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17823 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17824 new_path="$unix_path" 17825 fi 17826 17827 if test "x$path" != "x$new_path"; then 17828 DXSDK_LIB_PATH="$new_path" 17829 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5 17830 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;} 17831 fi 17832 17833 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17834 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17835 17836 else 17837 # We're on a posix platform. Hooray! :) 17838 path="$DXSDK_LIB_PATH" 17839 has_space=`$ECHO "$path" | $GREP " "` 17840 if test "x$has_space" != x; then 17841 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5 17842 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 17843 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17844 fi 17845 17846 # Use eval to expand a potential ~ 17847 eval path="$path" 17848 if test ! -f "$path" && test ! -d "$path"; then 17849 as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 17850 fi 17851 17852 DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 17853 fi 17854 17855 17856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5 17857 $as_echo_n "checking for DirectX SDK include dir... " >&6; } 17858 if test "x$with_dxsdk_include" != x; then 17859 DXSDK_INCLUDE_PATH="$with_dxsdk_include" 17860 else 17861 DXSDK_INCLUDE_PATH="$dxsdk_path/Include" 17862 fi 17863 # dsound.h is included in jsoundds 17864 if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then 17865 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5 17866 fi 17867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5 17868 $as_echo "$DXSDK_INCLUDE_PATH" >&6; } 17869 17870 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17871 17872 # Input might be given as Windows format, start by converting to 17873 # unix format. 17874 path="$DXSDK_INCLUDE_PATH" 17875 new_path=`$CYGPATH -u "$path"` 17876 17877 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17878 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17879 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17880 # "foo.exe" is OK but "foo" is an error. 17881 # 17882 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17883 # It is also a way to make sure we got the proper file name for the real test later on. 17884 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17885 if test "x$test_shortpath" = x; then 17886 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 17887 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 17888 as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5 17889 fi 17890 17891 # Call helper function which possibly converts this using DOS-style short mode. 17892 # If so, the updated path is stored in $new_path. 17893 17894 input_path="$new_path" 17895 # Check if we need to convert this using DOS-style short mode. If the path 17896 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17897 # take no chances and rewrite it. 17898 # Note: m4 eats our [], so we need to use [ and ] instead. 17899 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17900 if test "x$has_forbidden_chars" != x; then 17901 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17902 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17903 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17904 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17905 # Going to short mode and back again did indeed matter. Since short mode is 17906 # case insensitive, let's make it lowercase to improve readability. 17907 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17908 # Now convert it back to Unix-stile (cygpath) 17909 input_path=`$CYGPATH -u "$shortmode_path"` 17910 new_path="$input_path" 17911 fi 17912 fi 17913 17914 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17915 if test "x$test_cygdrive_prefix" = x; then 17916 # As a simple fix, exclude /usr/bin since it's not a real path. 17917 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17918 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17919 # a path prefixed by /cygdrive for fixpath to work. 17920 new_path="$CYGWIN_ROOT_PATH$input_path" 17921 fi 17922 fi 17923 17924 17925 if test "x$path" != "x$new_path"; then 17926 DXSDK_INCLUDE_PATH="$new_path" 17927 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5 17928 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;} 17929 fi 17930 17931 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17932 17933 path="$DXSDK_INCLUDE_PATH" 17934 has_colon=`$ECHO $path | $GREP ^.:` 17935 new_path="$path" 17936 if test "x$has_colon" = x; then 17937 # Not in mixed or Windows style, start by that. 17938 new_path=`cmd //c echo $path` 17939 fi 17940 17941 17942 input_path="$new_path" 17943 # Check if we need to convert this using DOS-style short mode. If the path 17944 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17945 # take no chances and rewrite it. 17946 # Note: m4 eats our [], so we need to use [ and ] instead. 17947 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17948 if test "x$has_forbidden_chars" != x; then 17949 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17950 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17951 fi 17952 17953 17954 windows_path="$new_path" 17955 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17956 unix_path=`$CYGPATH -u "$windows_path"` 17957 new_path="$unix_path" 17958 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17959 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17960 new_path="$unix_path" 17961 fi 17962 17963 if test "x$path" != "x$new_path"; then 17964 DXSDK_INCLUDE_PATH="$new_path" 17965 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5 17966 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;} 17967 fi 17968 17969 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17970 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17971 17972 else 17973 # We're on a posix platform. Hooray! :) 17974 path="$DXSDK_INCLUDE_PATH" 17975 has_space=`$ECHO "$path" | $GREP " "` 17976 if test "x$has_space" != x; then 17977 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 17978 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 17979 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17980 fi 17981 17982 # Use eval to expand a potential ~ 17983 eval path="$path" 17984 if test ! -f "$path" && test ! -d "$path"; then 17985 as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 17986 fi 17987 17988 DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 17989 fi 17990 17991 17992 17993 17994 LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH" 17995 17996 fi 17997 17998 17999 18000 # If --build AND --host is set, then the configure script will find any 18001 # cross compilation tools in the PATH. Cross compilation tools 18002 # follows the cross compilation standard where they are prefixed with ${host}. 18003 # For example the binary i686-sun-solaris2.10-gcc 18004 # will cross compile for i686-sun-solaris2.10 18005 # If neither of build and host is not set, then build=host and the 18006 # default compiler found in the path will be used. 18007 # Setting only --host, does not seem to be really supported. 18008 # Please set both --build and --host if you want to cross compile. 18009 18010 if test "x$COMPILE_TYPE" = "xcross"; then 18011 # Now we to find a C/C++ compiler that can build executables for the build 18012 # platform. We can't use the AC_PROG_CC macro, since it can only be used 18013 # once. Also, we need to do this before adding a tools dir to the path, 18014 # otherwise we might pick up cross-compilers which don't use standard naming. 18015 # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have 18016 # to wait until they are properly discovered. 18017 for ac_prog in cl cc gcc 18018 do 18019 # Extract the first word of "$ac_prog", so it can be a program name with args. 18020 set dummy $ac_prog; ac_word=$2 18021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18022 $as_echo_n "checking for $ac_word... " >&6; } 18023 if ${ac_cv_path_BUILD_CC+:} false; then : 18024 $as_echo_n "(cached) " >&6 18025 else 18026 case $BUILD_CC in 18027 [\\/]* | ?:[\\/]*) 18028 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. 18029 ;; 18030 *) 18031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18032 for as_dir in $PATH 18033 do 18034 IFS=$as_save_IFS 18035 test -z "$as_dir" && as_dir=. 18036 for ac_exec_ext in '' $ac_executable_extensions; do 18037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 18038 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" 18039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18040 break 2 18041 fi 18042 done 18043 done 18044 IFS=$as_save_IFS 18045 18046 ;; 18047 esac 18048 fi 18049 BUILD_CC=$ac_cv_path_BUILD_CC 18050 if test -n "$BUILD_CC"; then 18051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 18052 $as_echo "$BUILD_CC" >&6; } 18053 else 18054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18055 $as_echo "no" >&6; } 18056 fi 18057 18058 18059 test -n "$BUILD_CC" && break 18060 done 18061 18062 18063 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18064 18065 # First separate the path from the arguments. This will split at the first 18066 # space. 18067 complete="$BUILD_CC" 18068 path="${complete%% *}" 18069 tmp="$complete EOL" 18070 arguments="${tmp#* }" 18071 18072 # Input might be given as Windows format, start by converting to 18073 # unix format. 18074 new_path=`$CYGPATH -u "$path"` 18075 18076 # Now try to locate executable using which 18077 new_path=`$WHICH "$new_path" 2> /dev/null` 18078 # bat and cmd files are not always considered executable in cygwin causing which 18079 # to not find them 18080 if test "x$new_path" = x \ 18081 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18082 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18083 new_path=`$CYGPATH -u "$path"` 18084 fi 18085 if test "x$new_path" = x; then 18086 # Oops. Which didn't find the executable. 18087 # The splitting of arguments from the executable at a space might have been incorrect, 18088 # since paths with space are more likely in Windows. Give it another try with the whole 18089 # argument. 18090 path="$complete" 18091 arguments="EOL" 18092 new_path=`$CYGPATH -u "$path"` 18093 new_path=`$WHICH "$new_path" 2> /dev/null` 18094 # bat and cmd files are not always considered executable in cygwin causing which 18095 # to not find them 18096 if test "x$new_path" = x \ 18097 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18098 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18099 new_path=`$CYGPATH -u "$path"` 18100 fi 18101 if test "x$new_path" = x; then 18102 # It's still not found. Now this is an unrecoverable error. 18103 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 18104 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 18105 has_space=`$ECHO "$complete" | $GREP " "` 18106 if test "x$has_space" != x; then 18107 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18108 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18109 fi 18110 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 18111 fi 18112 fi 18113 18114 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18115 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18116 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18117 # "foo.exe" is OK but "foo" is an error. 18118 # 18119 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18120 # It is also a way to make sure we got the proper file name for the real test later on. 18121 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18122 if test "x$test_shortpath" = x; then 18123 # Short path failed, file does not exist as specified. 18124 # Try adding .exe or .cmd 18125 if test -f "${new_path}.exe"; then 18126 input_to_shortpath="${new_path}.exe" 18127 elif test -f "${new_path}.cmd"; then 18128 input_to_shortpath="${new_path}.cmd" 18129 else 18130 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5 18131 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;} 18132 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18133 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18134 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 18135 fi 18136 else 18137 input_to_shortpath="$new_path" 18138 fi 18139 18140 # Call helper function which possibly converts this using DOS-style short mode. 18141 # If so, the updated path is stored in $new_path. 18142 new_path="$input_to_shortpath" 18143 18144 input_path="$input_to_shortpath" 18145 # Check if we need to convert this using DOS-style short mode. If the path 18146 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18147 # take no chances and rewrite it. 18148 # Note: m4 eats our [], so we need to use [ and ] instead. 18149 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18150 if test "x$has_forbidden_chars" != x; then 18151 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18152 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18153 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18154 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18155 # Going to short mode and back again did indeed matter. Since short mode is 18156 # case insensitive, let's make it lowercase to improve readability. 18157 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18158 # Now convert it back to Unix-stile (cygpath) 18159 input_path=`$CYGPATH -u "$shortmode_path"` 18160 new_path="$input_path" 18161 fi 18162 fi 18163 18164 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18165 if test "x$test_cygdrive_prefix" = x; then 18166 # As a simple fix, exclude /usr/bin since it's not a real path. 18167 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18168 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18169 # a path prefixed by /cygdrive for fixpath to work. 18170 new_path="$CYGWIN_ROOT_PATH$input_path" 18171 fi 18172 fi 18173 18174 # remove trailing .exe if any 18175 new_path="${new_path/%.exe/}" 18176 18177 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18178 18179 # First separate the path from the arguments. This will split at the first 18180 # space. 18181 complete="$BUILD_CC" 18182 path="${complete%% *}" 18183 tmp="$complete EOL" 18184 arguments="${tmp#* }" 18185 18186 # Input might be given as Windows format, start by converting to 18187 # unix format. 18188 new_path="$path" 18189 18190 windows_path="$new_path" 18191 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18192 unix_path=`$CYGPATH -u "$windows_path"` 18193 new_path="$unix_path" 18194 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18195 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18196 new_path="$unix_path" 18197 fi 18198 18199 18200 # Now try to locate executable using which 18201 new_path=`$WHICH "$new_path" 2> /dev/null` 18202 18203 if test "x$new_path" = x; then 18204 # Oops. Which didn't find the executable. 18205 # The splitting of arguments from the executable at a space might have been incorrect, 18206 # since paths with space are more likely in Windows. Give it another try with the whole 18207 # argument. 18208 path="$complete" 18209 arguments="EOL" 18210 new_path="$path" 18211 18212 windows_path="$new_path" 18213 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18214 unix_path=`$CYGPATH -u "$windows_path"` 18215 new_path="$unix_path" 18216 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18217 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18218 new_path="$unix_path" 18219 fi 18220 18221 18222 new_path=`$WHICH "$new_path" 2> /dev/null` 18223 18224 if test "x$new_path" = x; then 18225 # It's still not found. Now this is an unrecoverable error. 18226 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 18227 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 18228 has_space=`$ECHO "$complete" | $GREP " "` 18229 if test "x$has_space" != x; then 18230 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18231 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18232 fi 18233 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 18234 fi 18235 fi 18236 18237 # Now new_path has a complete unix path to the binary 18238 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18239 # Keep paths in /bin as-is, but remove trailing .exe if any 18240 new_path="${new_path/%.exe/}" 18241 # Do not save /bin paths to all_fixpath_prefixes! 18242 else 18243 # Not in mixed or Windows style, start by that. 18244 new_path=`cmd //c echo $new_path` 18245 18246 input_path="$new_path" 18247 # Check if we need to convert this using DOS-style short mode. If the path 18248 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18249 # take no chances and rewrite it. 18250 # Note: m4 eats our [], so we need to use [ and ] instead. 18251 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18252 if test "x$has_forbidden_chars" != x; then 18253 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18254 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18255 fi 18256 18257 # Output is in $new_path 18258 18259 windows_path="$new_path" 18260 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18261 unix_path=`$CYGPATH -u "$windows_path"` 18262 new_path="$unix_path" 18263 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18264 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18265 new_path="$unix_path" 18266 fi 18267 18268 # remove trailing .exe if any 18269 new_path="${new_path/%.exe/}" 18270 18271 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18272 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18273 fi 18274 18275 else 18276 # We're on a posix platform. Hooray! :) 18277 # First separate the path from the arguments. This will split at the first 18278 # space. 18279 complete="$BUILD_CC" 18280 path="${complete%% *}" 18281 tmp="$complete EOL" 18282 arguments="${tmp#* }" 18283 18284 # Cannot rely on the command "which" here since it doesn't always work. 18285 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18286 if test -z "$is_absolute_path"; then 18287 # Path to executable is not absolute. Find it. 18288 IFS_save="$IFS" 18289 IFS=: 18290 for p in $PATH; do 18291 if test -f "$p/$path" && test -x "$p/$path"; then 18292 new_path="$p/$path" 18293 break 18294 fi 18295 done 18296 IFS="$IFS_save" 18297 else 18298 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5 18299 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;} 18300 new_path="$path" 18301 fi 18302 18303 if test "x$new_path" = x; then 18304 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 18305 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 18306 has_space=`$ECHO "$complete" | $GREP " "` 18307 if test "x$has_space" != x; then 18308 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18309 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18310 fi 18311 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 18312 fi 18313 fi 18314 18315 # Now join together the path and the arguments once again 18316 if test "x$arguments" != xEOL; then 18317 new_complete="$new_path ${arguments% *}" 18318 else 18319 new_complete="$new_path" 18320 fi 18321 18322 if test "x$complete" != "x$new_complete"; then 18323 BUILD_CC="$new_complete" 18324 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5 18325 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;} 18326 fi 18327 18328 for ac_prog in cl CC g++ 18329 do 18330 # Extract the first word of "$ac_prog", so it can be a program name with args. 18331 set dummy $ac_prog; ac_word=$2 18332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18333 $as_echo_n "checking for $ac_word... " >&6; } 18334 if ${ac_cv_path_BUILD_CXX+:} false; then : 18335 $as_echo_n "(cached) " >&6 18336 else 18337 case $BUILD_CXX in 18338 [\\/]* | ?:[\\/]*) 18339 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. 18340 ;; 18341 *) 18342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18343 for as_dir in $PATH 18344 do 18345 IFS=$as_save_IFS 18346 test -z "$as_dir" && as_dir=. 18347 for ac_exec_ext in '' $ac_executable_extensions; do 18348 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 18349 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" 18350 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18351 break 2 18352 fi 18353 done 18354 done 18355 IFS=$as_save_IFS 18356 18357 ;; 18358 esac 18359 fi 18360 BUILD_CXX=$ac_cv_path_BUILD_CXX 18361 if test -n "$BUILD_CXX"; then 18362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 18363 $as_echo "$BUILD_CXX" >&6; } 18364 else 18365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18366 $as_echo "no" >&6; } 18367 fi 18368 18369 18370 test -n "$BUILD_CXX" && break 18371 done 18372 18373 18374 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18375 18376 # First separate the path from the arguments. This will split at the first 18377 # space. 18378 complete="$BUILD_CXX" 18379 path="${complete%% *}" 18380 tmp="$complete EOL" 18381 arguments="${tmp#* }" 18382 18383 # Input might be given as Windows format, start by converting to 18384 # unix format. 18385 new_path=`$CYGPATH -u "$path"` 18386 18387 # Now try to locate executable using which 18388 new_path=`$WHICH "$new_path" 2> /dev/null` 18389 # bat and cmd files are not always considered executable in cygwin causing which 18390 # to not find them 18391 if test "x$new_path" = x \ 18392 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18393 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18394 new_path=`$CYGPATH -u "$path"` 18395 fi 18396 if test "x$new_path" = x; then 18397 # Oops. Which didn't find the executable. 18398 # The splitting of arguments from the executable at a space might have been incorrect, 18399 # since paths with space are more likely in Windows. Give it another try with the whole 18400 # argument. 18401 path="$complete" 18402 arguments="EOL" 18403 new_path=`$CYGPATH -u "$path"` 18404 new_path=`$WHICH "$new_path" 2> /dev/null` 18405 # bat and cmd files are not always considered executable in cygwin causing which 18406 # to not find them 18407 if test "x$new_path" = x \ 18408 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18409 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18410 new_path=`$CYGPATH -u "$path"` 18411 fi 18412 if test "x$new_path" = x; then 18413 # It's still not found. Now this is an unrecoverable error. 18414 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18415 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18416 has_space=`$ECHO "$complete" | $GREP " "` 18417 if test "x$has_space" != x; then 18418 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18419 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18420 fi 18421 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18422 fi 18423 fi 18424 18425 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18426 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18427 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18428 # "foo.exe" is OK but "foo" is an error. 18429 # 18430 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18431 # It is also a way to make sure we got the proper file name for the real test later on. 18432 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18433 if test "x$test_shortpath" = x; then 18434 # Short path failed, file does not exist as specified. 18435 # Try adding .exe or .cmd 18436 if test -f "${new_path}.exe"; then 18437 input_to_shortpath="${new_path}.exe" 18438 elif test -f "${new_path}.cmd"; then 18439 input_to_shortpath="${new_path}.cmd" 18440 else 18441 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5 18442 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;} 18443 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18444 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18445 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18446 fi 18447 else 18448 input_to_shortpath="$new_path" 18449 fi 18450 18451 # Call helper function which possibly converts this using DOS-style short mode. 18452 # If so, the updated path is stored in $new_path. 18453 new_path="$input_to_shortpath" 18454 18455 input_path="$input_to_shortpath" 18456 # Check if we need to convert this using DOS-style short mode. If the path 18457 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18458 # take no chances and rewrite it. 18459 # Note: m4 eats our [], so we need to use [ and ] instead. 18460 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18461 if test "x$has_forbidden_chars" != x; then 18462 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18463 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18464 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18465 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18466 # Going to short mode and back again did indeed matter. Since short mode is 18467 # case insensitive, let's make it lowercase to improve readability. 18468 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18469 # Now convert it back to Unix-stile (cygpath) 18470 input_path=`$CYGPATH -u "$shortmode_path"` 18471 new_path="$input_path" 18472 fi 18473 fi 18474 18475 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18476 if test "x$test_cygdrive_prefix" = x; then 18477 # As a simple fix, exclude /usr/bin since it's not a real path. 18478 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18479 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18480 # a path prefixed by /cygdrive for fixpath to work. 18481 new_path="$CYGWIN_ROOT_PATH$input_path" 18482 fi 18483 fi 18484 18485 # remove trailing .exe if any 18486 new_path="${new_path/%.exe/}" 18487 18488 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18489 18490 # First separate the path from the arguments. This will split at the first 18491 # space. 18492 complete="$BUILD_CXX" 18493 path="${complete%% *}" 18494 tmp="$complete EOL" 18495 arguments="${tmp#* }" 18496 18497 # Input might be given as Windows format, start by converting to 18498 # unix format. 18499 new_path="$path" 18500 18501 windows_path="$new_path" 18502 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18503 unix_path=`$CYGPATH -u "$windows_path"` 18504 new_path="$unix_path" 18505 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18506 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18507 new_path="$unix_path" 18508 fi 18509 18510 18511 # Now try to locate executable using which 18512 new_path=`$WHICH "$new_path" 2> /dev/null` 18513 18514 if test "x$new_path" = x; then 18515 # Oops. Which didn't find the executable. 18516 # The splitting of arguments from the executable at a space might have been incorrect, 18517 # since paths with space are more likely in Windows. Give it another try with the whole 18518 # argument. 18519 path="$complete" 18520 arguments="EOL" 18521 new_path="$path" 18522 18523 windows_path="$new_path" 18524 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18525 unix_path=`$CYGPATH -u "$windows_path"` 18526 new_path="$unix_path" 18527 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18528 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18529 new_path="$unix_path" 18530 fi 18531 18532 18533 new_path=`$WHICH "$new_path" 2> /dev/null` 18534 18535 if test "x$new_path" = x; then 18536 # It's still not found. Now this is an unrecoverable error. 18537 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18538 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18539 has_space=`$ECHO "$complete" | $GREP " "` 18540 if test "x$has_space" != x; then 18541 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18542 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18543 fi 18544 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18545 fi 18546 fi 18547 18548 # Now new_path has a complete unix path to the binary 18549 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18550 # Keep paths in /bin as-is, but remove trailing .exe if any 18551 new_path="${new_path/%.exe/}" 18552 # Do not save /bin paths to all_fixpath_prefixes! 18553 else 18554 # Not in mixed or Windows style, start by that. 18555 new_path=`cmd //c echo $new_path` 18556 18557 input_path="$new_path" 18558 # Check if we need to convert this using DOS-style short mode. If the path 18559 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18560 # take no chances and rewrite it. 18561 # Note: m4 eats our [], so we need to use [ and ] instead. 18562 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18563 if test "x$has_forbidden_chars" != x; then 18564 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18565 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18566 fi 18567 18568 # Output is in $new_path 18569 18570 windows_path="$new_path" 18571 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18572 unix_path=`$CYGPATH -u "$windows_path"` 18573 new_path="$unix_path" 18574 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18575 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18576 new_path="$unix_path" 18577 fi 18578 18579 # remove trailing .exe if any 18580 new_path="${new_path/%.exe/}" 18581 18582 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18583 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18584 fi 18585 18586 else 18587 # We're on a posix platform. Hooray! :) 18588 # First separate the path from the arguments. This will split at the first 18589 # space. 18590 complete="$BUILD_CXX" 18591 path="${complete%% *}" 18592 tmp="$complete EOL" 18593 arguments="${tmp#* }" 18594 18595 # Cannot rely on the command "which" here since it doesn't always work. 18596 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18597 if test -z "$is_absolute_path"; then 18598 # Path to executable is not absolute. Find it. 18599 IFS_save="$IFS" 18600 IFS=: 18601 for p in $PATH; do 18602 if test -f "$p/$path" && test -x "$p/$path"; then 18603 new_path="$p/$path" 18604 break 18605 fi 18606 done 18607 IFS="$IFS_save" 18608 else 18609 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5 18610 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;} 18611 new_path="$path" 18612 fi 18613 18614 if test "x$new_path" = x; then 18615 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18616 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18617 has_space=`$ECHO "$complete" | $GREP " "` 18618 if test "x$has_space" != x; then 18619 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18620 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18621 fi 18622 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18623 fi 18624 fi 18625 18626 # Now join together the path and the arguments once again 18627 if test "x$arguments" != xEOL; then 18628 new_complete="$new_path ${arguments% *}" 18629 else 18630 new_complete="$new_path" 18631 fi 18632 18633 if test "x$complete" != "x$new_complete"; then 18634 BUILD_CXX="$new_complete" 18635 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5 18636 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;} 18637 fi 18638 18639 # Extract the first word of "ld", so it can be a program name with args. 18640 set dummy ld; ac_word=$2 18641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18642 $as_echo_n "checking for $ac_word... " >&6; } 18643 if ${ac_cv_path_BUILD_LD+:} false; then : 18644 $as_echo_n "(cached) " >&6 18645 else 18646 case $BUILD_LD in 18647 [\\/]* | ?:[\\/]*) 18648 ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. 18649 ;; 18650 *) 18651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18652 for as_dir in $PATH 18653 do 18654 IFS=$as_save_IFS 18655 test -z "$as_dir" && as_dir=. 18656 for ac_exec_ext in '' $ac_executable_extensions; do 18657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 18658 ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" 18659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18660 break 2 18661 fi 18662 done 18663 done 18664 IFS=$as_save_IFS 18665 18666 ;; 18667 esac 18668 fi 18669 BUILD_LD=$ac_cv_path_BUILD_LD 18670 if test -n "$BUILD_LD"; then 18671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 18672 $as_echo "$BUILD_LD" >&6; } 18673 else 18674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18675 $as_echo "no" >&6; } 18676 fi 18677 18678 18679 18680 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18681 18682 # First separate the path from the arguments. This will split at the first 18683 # space. 18684 complete="$BUILD_LD" 18685 path="${complete%% *}" 18686 tmp="$complete EOL" 18687 arguments="${tmp#* }" 18688 18689 # Input might be given as Windows format, start by converting to 18690 # unix format. 18691 new_path=`$CYGPATH -u "$path"` 18692 18693 # Now try to locate executable using which 18694 new_path=`$WHICH "$new_path" 2> /dev/null` 18695 # bat and cmd files are not always considered executable in cygwin causing which 18696 # to not find them 18697 if test "x$new_path" = x \ 18698 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18699 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18700 new_path=`$CYGPATH -u "$path"` 18701 fi 18702 if test "x$new_path" = x; then 18703 # Oops. Which didn't find the executable. 18704 # The splitting of arguments from the executable at a space might have been incorrect, 18705 # since paths with space are more likely in Windows. Give it another try with the whole 18706 # argument. 18707 path="$complete" 18708 arguments="EOL" 18709 new_path=`$CYGPATH -u "$path"` 18710 new_path=`$WHICH "$new_path" 2> /dev/null` 18711 # bat and cmd files are not always considered executable in cygwin causing which 18712 # to not find them 18713 if test "x$new_path" = x \ 18714 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18715 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18716 new_path=`$CYGPATH -u "$path"` 18717 fi 18718 if test "x$new_path" = x; then 18719 # It's still not found. Now this is an unrecoverable error. 18720 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18721 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18722 has_space=`$ECHO "$complete" | $GREP " "` 18723 if test "x$has_space" != x; then 18724 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18725 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18726 fi 18727 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18728 fi 18729 fi 18730 18731 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18732 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18733 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18734 # "foo.exe" is OK but "foo" is an error. 18735 # 18736 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18737 # It is also a way to make sure we got the proper file name for the real test later on. 18738 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18739 if test "x$test_shortpath" = x; then 18740 # Short path failed, file does not exist as specified. 18741 # Try adding .exe or .cmd 18742 if test -f "${new_path}.exe"; then 18743 input_to_shortpath="${new_path}.exe" 18744 elif test -f "${new_path}.cmd"; then 18745 input_to_shortpath="${new_path}.cmd" 18746 else 18747 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5 18748 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;} 18749 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18750 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18751 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18752 fi 18753 else 18754 input_to_shortpath="$new_path" 18755 fi 18756 18757 # Call helper function which possibly converts this using DOS-style short mode. 18758 # If so, the updated path is stored in $new_path. 18759 new_path="$input_to_shortpath" 18760 18761 input_path="$input_to_shortpath" 18762 # Check if we need to convert this using DOS-style short mode. If the path 18763 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18764 # take no chances and rewrite it. 18765 # Note: m4 eats our [], so we need to use [ and ] instead. 18766 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18767 if test "x$has_forbidden_chars" != x; then 18768 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18769 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18770 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18771 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18772 # Going to short mode and back again did indeed matter. Since short mode is 18773 # case insensitive, let's make it lowercase to improve readability. 18774 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18775 # Now convert it back to Unix-stile (cygpath) 18776 input_path=`$CYGPATH -u "$shortmode_path"` 18777 new_path="$input_path" 18778 fi 18779 fi 18780 18781 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18782 if test "x$test_cygdrive_prefix" = x; then 18783 # As a simple fix, exclude /usr/bin since it's not a real path. 18784 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18785 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18786 # a path prefixed by /cygdrive for fixpath to work. 18787 new_path="$CYGWIN_ROOT_PATH$input_path" 18788 fi 18789 fi 18790 18791 # remove trailing .exe if any 18792 new_path="${new_path/%.exe/}" 18793 18794 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18795 18796 # First separate the path from the arguments. This will split at the first 18797 # space. 18798 complete="$BUILD_LD" 18799 path="${complete%% *}" 18800 tmp="$complete EOL" 18801 arguments="${tmp#* }" 18802 18803 # Input might be given as Windows format, start by converting to 18804 # unix format. 18805 new_path="$path" 18806 18807 windows_path="$new_path" 18808 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18809 unix_path=`$CYGPATH -u "$windows_path"` 18810 new_path="$unix_path" 18811 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18812 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18813 new_path="$unix_path" 18814 fi 18815 18816 18817 # Now try to locate executable using which 18818 new_path=`$WHICH "$new_path" 2> /dev/null` 18819 18820 if test "x$new_path" = x; then 18821 # Oops. Which didn't find the executable. 18822 # The splitting of arguments from the executable at a space might have been incorrect, 18823 # since paths with space are more likely in Windows. Give it another try with the whole 18824 # argument. 18825 path="$complete" 18826 arguments="EOL" 18827 new_path="$path" 18828 18829 windows_path="$new_path" 18830 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18831 unix_path=`$CYGPATH -u "$windows_path"` 18832 new_path="$unix_path" 18833 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18834 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18835 new_path="$unix_path" 18836 fi 18837 18838 18839 new_path=`$WHICH "$new_path" 2> /dev/null` 18840 18841 if test "x$new_path" = x; then 18842 # It's still not found. Now this is an unrecoverable error. 18843 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18844 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18845 has_space=`$ECHO "$complete" | $GREP " "` 18846 if test "x$has_space" != x; then 18847 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18848 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18849 fi 18850 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18851 fi 18852 fi 18853 18854 # Now new_path has a complete unix path to the binary 18855 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18856 # Keep paths in /bin as-is, but remove trailing .exe if any 18857 new_path="${new_path/%.exe/}" 18858 # Do not save /bin paths to all_fixpath_prefixes! 18859 else 18860 # Not in mixed or Windows style, start by that. 18861 new_path=`cmd //c echo $new_path` 18862 18863 input_path="$new_path" 18864 # Check if we need to convert this using DOS-style short mode. If the path 18865 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18866 # take no chances and rewrite it. 18867 # Note: m4 eats our [], so we need to use [ and ] instead. 18868 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18869 if test "x$has_forbidden_chars" != x; then 18870 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18871 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18872 fi 18873 18874 # Output is in $new_path 18875 18876 windows_path="$new_path" 18877 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18878 unix_path=`$CYGPATH -u "$windows_path"` 18879 new_path="$unix_path" 18880 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18881 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18882 new_path="$unix_path" 18883 fi 18884 18885 # remove trailing .exe if any 18886 new_path="${new_path/%.exe/}" 18887 18888 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18889 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18890 fi 18891 18892 else 18893 # We're on a posix platform. Hooray! :) 18894 # First separate the path from the arguments. This will split at the first 18895 # space. 18896 complete="$BUILD_LD" 18897 path="${complete%% *}" 18898 tmp="$complete EOL" 18899 arguments="${tmp#* }" 18900 18901 # Cannot rely on the command "which" here since it doesn't always work. 18902 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18903 if test -z "$is_absolute_path"; then 18904 # Path to executable is not absolute. Find it. 18905 IFS_save="$IFS" 18906 IFS=: 18907 for p in $PATH; do 18908 if test -f "$p/$path" && test -x "$p/$path"; then 18909 new_path="$p/$path" 18910 break 18911 fi 18912 done 18913 IFS="$IFS_save" 18914 else 18915 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5 18916 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;} 18917 new_path="$path" 18918 fi 18919 18920 if test "x$new_path" = x; then 18921 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18922 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18923 has_space=`$ECHO "$complete" | $GREP " "` 18924 if test "x$has_space" != x; then 18925 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18926 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18927 fi 18928 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18929 fi 18930 fi 18931 18932 # Now join together the path and the arguments once again 18933 if test "x$arguments" != xEOL; then 18934 new_complete="$new_path ${arguments% *}" 18935 else 18936 new_complete="$new_path" 18937 fi 18938 18939 if test "x$complete" != "x$new_complete"; then 18940 BUILD_LD="$new_complete" 18941 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5 18942 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;} 18943 fi 18944 18945 fi 18946 18947 18948 18949 18950 # If a devkit is found on the builddeps server, then prepend its path to the 18951 # PATH variable. If there are cross compilers available in the devkit, these 18952 # will be found by AC_PROG_CC et al. 18953 DEVKIT= 18954 18955 18956 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 18957 # Source the builddeps file again, to make sure it uses the latest variables! 18958 . $builddepsfile 18959 # Look for a target and build machine specific resource! 18960 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 18961 if test "x$resource" = x; then 18962 # Ok, lets instead look for a target specific resource 18963 eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}} 18964 fi 18965 if test "x$resource" = x; then 18966 # Ok, lets instead look for a build specific resource 18967 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}} 18968 fi 18969 if test "x$resource" = x; then 18970 # Ok, lets instead look for a generic resource 18971 # (The devkit comes from M4 and not the shell, thus no need for eval here.) 18972 resource=${builddep_devkit} 18973 fi 18974 if test "x$resource" != x; then 18975 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5 18976 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;} 18977 # If the resource in the builddeps.conf file is an existing directory, 18978 # for example /java/linux/cups 18979 if test -d ${resource}; then 18980 depdir=${resource} 18981 else 18982 18983 # devkit is for example mymodule 18984 # $resource is for example libs/general/libmymod_1_2_3.zip 18985 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 18986 # $with_builddeps_dir is for example /localhome/builddeps 18987 # depdir is the name of the variable into which we store the depdir, eg MYMOD 18988 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 18989 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 18990 filename=`basename $resource` 18991 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 18992 filebase=${filename%%.*} 18993 extension=${filename#*.} 18994 installdir=$with_builddeps_dir/$filebase 18995 if test ! -f $installdir/$filename.unpacked; then 18996 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5 18997 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;} 18998 if test ! -d $installdir; then 18999 mkdir -p $installdir 19000 fi 19001 if test ! -d $installdir; then 19002 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 19003 fi 19004 tmpfile=`mktemp $installdir/devkit.XXXXXXXXX` 19005 touch $tmpfile 19006 if test ! -f $tmpfile; then 19007 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 19008 fi 19009 19010 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 19011 # $tmpfile is the local file name for the downloaded file. 19012 VALID_TOOL=no 19013 if test "x$BDEPS_FTP" = xwget; then 19014 VALID_TOOL=yes 19015 wget -O $tmpfile $with_builddeps_server/$resource 19016 fi 19017 if test "x$BDEPS_FTP" = xlftp; then 19018 VALID_TOOL=yes 19019 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 19020 fi 19021 if test "x$BDEPS_FTP" = xftp; then 19022 VALID_TOOL=yes 19023 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 19024 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 19025 FTPUSERPWD=${FTPSERVER%%@*} 19026 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 19027 FTPUSER=${userpwd%%:*} 19028 FTPPWD=${userpwd#*@} 19029 FTPSERVER=${FTPSERVER#*@} 19030 else 19031 FTPUSER=ftp 19032 FTPPWD=ftp 19033 fi 19034 # the "pass" command does not work on some 19035 # ftp clients (read ftp.exe) but if it works, 19036 # passive mode is better! 19037 (\ 19038 echo "user $FTPUSER $FTPPWD" ;\ 19039 echo "pass" ;\ 19040 echo "bin" ;\ 19041 echo "get $FTPPATH $tmpfile" ;\ 19042 ) | ftp -in $FTPSERVER 19043 fi 19044 if test "x$VALID_TOOL" != xyes; then 19045 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 19046 fi 19047 19048 mv $tmpfile $installdir/$filename 19049 if test ! -s $installdir/$filename; then 19050 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 19051 fi 19052 case "$extension" in 19053 zip) echo "Unzipping $installdir/$filename..." 19054 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 19055 ;; 19056 tar.gz) echo "Untaring $installdir/$filename..." 19057 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 19058 ;; 19059 tgz) echo "Untaring $installdir/$filename..." 19060 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 19061 ;; 19062 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 19063 ;; 19064 esac 19065 fi 19066 if test -f $installdir/$filename.unpacked; then 19067 depdir=$installdir 19068 fi 19069 19070 fi 19071 # Source the builddeps file again, because in the previous command, the depdir 19072 # was updated to point at the current build dependency install directory. 19073 . $builddepsfile 19074 # Now extract variables from the builddeps.conf files. 19075 theroot=${builddep_devkit_ROOT} 19076 thecflags=${builddep_devkit_CFLAGS} 19077 thelibs=${builddep_devkit_LIBS} 19078 if test "x$depdir" = x; then 19079 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5 19080 fi 19081 DEVKIT=$depdir 19082 if test "x$theroot" != x; then 19083 DEVKIT="$theroot" 19084 fi 19085 if test "x$thecflags" != x; then 19086 DEVKIT_CFLAGS="$thecflags" 19087 fi 19088 if test "x$thelibs" != x; then 19089 DEVKIT_LIBS="$thelibs" 19090 fi 19091 # Found devkit 19092 PATH="$DEVKIT/bin:$PATH" 19093 SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" 19094 if test "x$x_includes" = "xNONE"; then 19095 x_includes="$SYS_ROOT/usr/include/X11" 19096 fi 19097 if test "x$x_libraries" = "xNONE"; then 19098 x_libraries="$SYS_ROOT/usr/lib" 19099 fi 19100 19101 19102 fi 19103 19104 fi 19105 19106 19107 # Store the CFLAGS etal passed to the configure script. 19108 ORG_CFLAGS="$CFLAGS" 19109 ORG_CXXFLAGS="$CXXFLAGS" 19110 ORG_OBJCFLAGS="$OBJCFLAGS" 19111 19112 # autoconf magic only relies on PATH, so update it if tools dir is specified 19113 OLD_PATH="$PATH" 19114 if test "x$TOOLS_DIR" != x; then 19115 PATH=$TOOLS_DIR:$PATH 19116 fi 19117 19118 19119 ### Locate C compiler (CC) 19120 19121 # On windows, only cl.exe is supported. 19122 # On Solaris, cc is preferred to gcc. 19123 # Elsewhere, gcc is preferred to cc. 19124 19125 if test "x$CC" != x; then 19126 COMPILER_CHECK_LIST="$CC" 19127 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 19128 COMPILER_CHECK_LIST="cl" 19129 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 19130 COMPILER_CHECK_LIST="cc gcc" 19131 else 19132 COMPILER_CHECK_LIST="gcc cc" 19133 fi 19134 19135 19136 COMPILER_NAME=C 19137 19138 CC= 19139 # If TOOLS_DIR is set, check for all compiler names in there first 19140 # before checking the rest of the PATH. 19141 if test -n "$TOOLS_DIR"; then 19142 PATH_save="$PATH" 19143 PATH="$TOOLS_DIR" 19144 for ac_prog in $COMPILER_CHECK_LIST 19145 do 19146 # Extract the first word of "$ac_prog", so it can be a program name with args. 19147 set dummy $ac_prog; ac_word=$2 19148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19149 $as_echo_n "checking for $ac_word... " >&6; } 19150 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then : 19151 $as_echo_n "(cached) " >&6 19152 else 19153 case $TOOLS_DIR_CC in 19154 [\\/]* | ?:[\\/]*) 19155 ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path. 19156 ;; 19157 *) 19158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19159 for as_dir in $PATH 19160 do 19161 IFS=$as_save_IFS 19162 test -z "$as_dir" && as_dir=. 19163 for ac_exec_ext in '' $ac_executable_extensions; do 19164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 19165 ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext" 19166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19167 break 2 19168 fi 19169 done 19170 done 19171 IFS=$as_save_IFS 19172 19173 ;; 19174 esac 19175 fi 19176 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC 19177 if test -n "$TOOLS_DIR_CC"; then 19178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5 19179 $as_echo "$TOOLS_DIR_CC" >&6; } 19180 else 19181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19182 $as_echo "no" >&6; } 19183 fi 19184 19185 19186 test -n "$TOOLS_DIR_CC" && break 19187 done 19188 19189 CC=$TOOLS_DIR_CC 19190 PATH="$PATH_save" 19191 fi 19192 19193 # AC_PATH_PROGS can't be run multiple times with the same variable, 19194 # so create a new name for this run. 19195 if test "x$CC" = x; then 19196 for ac_prog in $COMPILER_CHECK_LIST 19197 do 19198 # Extract the first word of "$ac_prog", so it can be a program name with args. 19199 set dummy $ac_prog; ac_word=$2 19200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19201 $as_echo_n "checking for $ac_word... " >&6; } 19202 if ${ac_cv_path_POTENTIAL_CC+:} false; then : 19203 $as_echo_n "(cached) " >&6 19204 else 19205 case $POTENTIAL_CC in 19206 [\\/]* | ?:[\\/]*) 19207 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path. 19208 ;; 19209 *) 19210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19211 for as_dir in $PATH 19212 do 19213 IFS=$as_save_IFS 19214 test -z "$as_dir" && as_dir=. 19215 for ac_exec_ext in '' $ac_executable_extensions; do 19216 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 19217 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" 19218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19219 break 2 19220 fi 19221 done 19222 done 19223 IFS=$as_save_IFS 19224 19225 ;; 19226 esac 19227 fi 19228 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC 19229 if test -n "$POTENTIAL_CC"; then 19230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5 19231 $as_echo "$POTENTIAL_CC" >&6; } 19232 else 19233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19234 $as_echo "no" >&6; } 19235 fi 19236 19237 19238 test -n "$POTENTIAL_CC" && break 19239 done 19240 19241 CC=$POTENTIAL_CC 19242 fi 19243 19244 if test "x$CC" = x; then 19245 19246 # Print a helpful message on how to acquire the necessary build dependency. 19247 # devkit is the help tag: freetyp2, cups, pulse, alsa etc 19248 MISSING_DEPENDENCY=devkit 19249 PKGHANDLER_COMMAND= 19250 19251 case $PKGHANDLER in 19252 apt-get) 19253 apt_help $MISSING_DEPENDENCY ;; 19254 yum) 19255 yum_help $MISSING_DEPENDENCY ;; 19256 port) 19257 port_help $MISSING_DEPENDENCY ;; 19258 pkgutil) 19259 pkgutil_help $MISSING_DEPENDENCY ;; 19260 pkgadd) 19261 pkgadd_help $MISSING_DEPENDENCY ;; 19262 * ) 19263 break ;; 19264 esac 19265 19266 if test "x$PKGHANDLER_COMMAND" != x; then 19267 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 19268 fi 19269 19270 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 19271 fi 19272 19273 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19274 19275 # First separate the path from the arguments. This will split at the first 19276 # space. 19277 complete="$CC" 19278 path="${complete%% *}" 19279 tmp="$complete EOL" 19280 arguments="${tmp#* }" 19281 19282 # Input might be given as Windows format, start by converting to 19283 # unix format. 19284 new_path=`$CYGPATH -u "$path"` 19285 19286 # Now try to locate executable using which 19287 new_path=`$WHICH "$new_path" 2> /dev/null` 19288 # bat and cmd files are not always considered executable in cygwin causing which 19289 # to not find them 19290 if test "x$new_path" = x \ 19291 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19292 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19293 new_path=`$CYGPATH -u "$path"` 19294 fi 19295 if test "x$new_path" = x; then 19296 # Oops. Which didn't find the executable. 19297 # The splitting of arguments from the executable at a space might have been incorrect, 19298 # since paths with space are more likely in Windows. Give it another try with the whole 19299 # argument. 19300 path="$complete" 19301 arguments="EOL" 19302 new_path=`$CYGPATH -u "$path"` 19303 new_path=`$WHICH "$new_path" 2> /dev/null` 19304 # bat and cmd files are not always considered executable in cygwin causing which 19305 # to not find them 19306 if test "x$new_path" = x \ 19307 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19308 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19309 new_path=`$CYGPATH -u "$path"` 19310 fi 19311 if test "x$new_path" = x; then 19312 # It's still not found. Now this is an unrecoverable error. 19313 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 19314 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 19315 has_space=`$ECHO "$complete" | $GREP " "` 19316 if test "x$has_space" != x; then 19317 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19319 fi 19320 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19321 fi 19322 fi 19323 19324 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 19325 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 19326 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 19327 # "foo.exe" is OK but "foo" is an error. 19328 # 19329 # This test is therefore slightly more accurate than "test -f" to check for file precense. 19330 # It is also a way to make sure we got the proper file name for the real test later on. 19331 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 19332 if test "x$test_shortpath" = x; then 19333 # Short path failed, file does not exist as specified. 19334 # Try adding .exe or .cmd 19335 if test -f "${new_path}.exe"; then 19336 input_to_shortpath="${new_path}.exe" 19337 elif test -f "${new_path}.cmd"; then 19338 input_to_shortpath="${new_path}.cmd" 19339 else 19340 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5 19341 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;} 19342 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 19343 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 19344 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19345 fi 19346 else 19347 input_to_shortpath="$new_path" 19348 fi 19349 19350 # Call helper function which possibly converts this using DOS-style short mode. 19351 # If so, the updated path is stored in $new_path. 19352 new_path="$input_to_shortpath" 19353 19354 input_path="$input_to_shortpath" 19355 # Check if we need to convert this using DOS-style short mode. If the path 19356 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19357 # take no chances and rewrite it. 19358 # Note: m4 eats our [], so we need to use [ and ] instead. 19359 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 19360 if test "x$has_forbidden_chars" != x; then 19361 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19362 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 19363 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 19364 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 19365 # Going to short mode and back again did indeed matter. Since short mode is 19366 # case insensitive, let's make it lowercase to improve readability. 19367 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19368 # Now convert it back to Unix-stile (cygpath) 19369 input_path=`$CYGPATH -u "$shortmode_path"` 19370 new_path="$input_path" 19371 fi 19372 fi 19373 19374 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 19375 if test "x$test_cygdrive_prefix" = x; then 19376 # As a simple fix, exclude /usr/bin since it's not a real path. 19377 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 19378 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 19379 # a path prefixed by /cygdrive for fixpath to work. 19380 new_path="$CYGWIN_ROOT_PATH$input_path" 19381 fi 19382 fi 19383 19384 # remove trailing .exe if any 19385 new_path="${new_path/%.exe/}" 19386 19387 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19388 19389 # First separate the path from the arguments. This will split at the first 19390 # space. 19391 complete="$CC" 19392 path="${complete%% *}" 19393 tmp="$complete EOL" 19394 arguments="${tmp#* }" 19395 19396 # Input might be given as Windows format, start by converting to 19397 # unix format. 19398 new_path="$path" 19399 19400 windows_path="$new_path" 19401 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19402 unix_path=`$CYGPATH -u "$windows_path"` 19403 new_path="$unix_path" 19404 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19405 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19406 new_path="$unix_path" 19407 fi 19408 19409 19410 # Now try to locate executable using which 19411 new_path=`$WHICH "$new_path" 2> /dev/null` 19412 19413 if test "x$new_path" = x; then 19414 # Oops. Which didn't find the executable. 19415 # The splitting of arguments from the executable at a space might have been incorrect, 19416 # since paths with space are more likely in Windows. Give it another try with the whole 19417 # argument. 19418 path="$complete" 19419 arguments="EOL" 19420 new_path="$path" 19421 19422 windows_path="$new_path" 19423 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19424 unix_path=`$CYGPATH -u "$windows_path"` 19425 new_path="$unix_path" 19426 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19427 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19428 new_path="$unix_path" 19429 fi 19430 19431 19432 new_path=`$WHICH "$new_path" 2> /dev/null` 19433 19434 if test "x$new_path" = x; then 19435 # It's still not found. Now this is an unrecoverable error. 19436 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 19437 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 19438 has_space=`$ECHO "$complete" | $GREP " "` 19439 if test "x$has_space" != x; then 19440 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19442 fi 19443 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19444 fi 19445 fi 19446 19447 # Now new_path has a complete unix path to the binary 19448 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 19449 # Keep paths in /bin as-is, but remove trailing .exe if any 19450 new_path="${new_path/%.exe/}" 19451 # Do not save /bin paths to all_fixpath_prefixes! 19452 else 19453 # Not in mixed or Windows style, start by that. 19454 new_path=`cmd //c echo $new_path` 19455 19456 input_path="$new_path" 19457 # Check if we need to convert this using DOS-style short mode. If the path 19458 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19459 # take no chances and rewrite it. 19460 # Note: m4 eats our [], so we need to use [ and ] instead. 19461 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 19462 if test "x$has_forbidden_chars" != x; then 19463 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19464 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19465 fi 19466 19467 # Output is in $new_path 19468 19469 windows_path="$new_path" 19470 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19471 unix_path=`$CYGPATH -u "$windows_path"` 19472 new_path="$unix_path" 19473 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19474 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19475 new_path="$unix_path" 19476 fi 19477 19478 # remove trailing .exe if any 19479 new_path="${new_path/%.exe/}" 19480 19481 # Save the first 10 bytes of this path to the storage, so fixpath can work. 19482 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 19483 fi 19484 19485 else 19486 # We're on a posix platform. Hooray! :) 19487 # First separate the path from the arguments. This will split at the first 19488 # space. 19489 complete="$CC" 19490 path="${complete%% *}" 19491 tmp="$complete EOL" 19492 arguments="${tmp#* }" 19493 19494 # Cannot rely on the command "which" here since it doesn't always work. 19495 is_absolute_path=`$ECHO "$path" | $GREP ^/` 19496 if test -z "$is_absolute_path"; then 19497 # Path to executable is not absolute. Find it. 19498 IFS_save="$IFS" 19499 IFS=: 19500 for p in $PATH; do 19501 if test -f "$p/$path" && test -x "$p/$path"; then 19502 new_path="$p/$path" 19503 break 19504 fi 19505 done 19506 IFS="$IFS_save" 19507 else 19508 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5 19509 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;} 19510 new_path="$path" 19511 fi 19512 19513 if test "x$new_path" = x; then 19514 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 19515 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 19516 has_space=`$ECHO "$complete" | $GREP " "` 19517 if test "x$has_space" != x; then 19518 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 19519 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 19520 fi 19521 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19522 fi 19523 fi 19524 19525 # Now join together the path and the arguments once again 19526 if test "x$arguments" != xEOL; then 19527 new_complete="$new_path ${arguments% *}" 19528 else 19529 new_complete="$new_path" 19530 fi 19531 19532 if test "x$complete" != "x$new_complete"; then 19533 CC="$new_complete" 19534 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5 19535 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;} 19536 fi 19537 19538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 19539 $as_echo_n "checking resolved symbolic links for CC... " >&6; } 19540 TEST_COMPILER="$CC" 19541 19542 if test "x$OPENJDK_BUILD_OS" != xwindows; then 19543 # Follow a chain of symbolic links. Use readlink 19544 # where it exists, else fall back to horribly 19545 # complicated shell code. 19546 if test "x$READLINK_TESTED" != yes; then 19547 # On MacOSX there is a readlink tool with a different 19548 # purpose than the GNU readlink tool. Check the found readlink. 19549 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 19550 if test "x$ISGNU" = x; then 19551 # A readlink that we do not know how to use. 19552 # Are there other non-GNU readlinks out there? 19553 READLINK_TESTED=yes 19554 READLINK= 19555 fi 19556 fi 19557 19558 if test "x$READLINK" != x; then 19559 TEST_COMPILER=`$READLINK -f $TEST_COMPILER` 19560 else 19561 # Save the current directory for restoring afterwards 19562 STARTDIR=$PWD 19563 COUNTER=0 19564 sym_link_dir=`$DIRNAME $TEST_COMPILER` 19565 sym_link_file=`$BASENAME $TEST_COMPILER` 19566 cd $sym_link_dir 19567 # Use -P flag to resolve symlinks in directories. 19568 cd `$THEPWDCMD -P` 19569 sym_link_dir=`$THEPWDCMD -P` 19570 # Resolve file symlinks 19571 while test $COUNTER -lt 20; do 19572 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 19573 if test "x$ISLINK" == x; then 19574 # This is not a symbolic link! We are done! 19575 break 19576 fi 19577 # Again resolve directory symlinks since the target of the just found 19578 # link could be in a different directory 19579 cd `$DIRNAME $ISLINK` 19580 sym_link_dir=`$THEPWDCMD -P` 19581 sym_link_file=`$BASENAME $ISLINK` 19582 let COUNTER=COUNTER+1 19583 done 19584 cd $STARTDIR 19585 TEST_COMPILER=$sym_link_dir/$sym_link_file 19586 fi 19587 fi 19588 19589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 19590 $as_echo "$TEST_COMPILER" >&6; } 19591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5 19592 $as_echo_n "checking if CC is disguised ccache... " >&6; } 19593 19594 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 19595 if test "x$COMPILER_BASENAME" = "xccache"; then 19596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 19597 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } 19598 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. 19599 # We want to control ccache invocation ourselves, so ignore this cc and try 19600 # searching again. 19601 19602 # Remove the path to the fake ccache cc from the PATH 19603 RETRY_COMPILER_SAVED_PATH="$PATH" 19604 COMPILER_DIRNAME=`$DIRNAME $CC` 19605 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" 19606 19607 # Try again looking for our compiler 19608 if test -n "$ac_tool_prefix"; then 19609 for ac_prog in $COMPILER_CHECK_LIST 19610 do 19611 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 19612 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 19613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19614 $as_echo_n "checking for $ac_word... " >&6; } 19615 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then : 19616 $as_echo_n "(cached) " >&6 19617 else 19618 if test -n "$PROPER_COMPILER_CC"; then 19619 ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test. 19620 else 19621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19622 for as_dir in $PATH 19623 do 19624 IFS=$as_save_IFS 19625 test -z "$as_dir" && as_dir=. 19626 for ac_exec_ext in '' $ac_executable_extensions; do 19627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 19628 ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog" 19629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19630 break 2 19631 fi 19632 done 19633 done 19634 IFS=$as_save_IFS 19635 19636 fi 19637 fi 19638 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC 19639 if test -n "$PROPER_COMPILER_CC"; then 19640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 19641 $as_echo "$PROPER_COMPILER_CC" >&6; } 19642 else 19643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19644 $as_echo "no" >&6; } 19645 fi 19646 19647 19648 test -n "$PROPER_COMPILER_CC" && break 19649 done 19650 fi 19651 if test -z "$PROPER_COMPILER_CC"; then 19652 ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC 19653 for ac_prog in $COMPILER_CHECK_LIST 19654 do 19655 # Extract the first word of "$ac_prog", so it can be a program name with args. 19656 set dummy $ac_prog; ac_word=$2 19657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19658 $as_echo_n "checking for $ac_word... " >&6; } 19659 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then : 19660 $as_echo_n "(cached) " >&6 19661 else 19662 if test -n "$ac_ct_PROPER_COMPILER_CC"; then 19663 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test. 19664 else 19665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19666 for as_dir in $PATH 19667 do 19668 IFS=$as_save_IFS 19669 test -z "$as_dir" && as_dir=. 19670 for ac_exec_ext in '' $ac_executable_extensions; do 19671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 19672 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog" 19673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19674 break 2 19675 fi 19676 done 19677 done 19678 IFS=$as_save_IFS 19679 19680 fi 19681 fi 19682 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC 19683 if test -n "$ac_ct_PROPER_COMPILER_CC"; then 19684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5 19685 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; } 19686 else 19687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19688 $as_echo "no" >&6; } 19689 fi 19690 19691 19692 test -n "$ac_ct_PROPER_COMPILER_CC" && break 19693 done 19694 19695 if test "x$ac_ct_PROPER_COMPILER_CC" = x; then 19696 PROPER_COMPILER_CC="" 19697 else 19698 case $cross_compiling:$ac_tool_warned in 19699 yes:) 19700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 19701 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 19702 ac_tool_warned=yes ;; 19703 esac 19704 PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC 19705 fi 19706 fi 19707 19708 19709 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19710 19711 # First separate the path from the arguments. This will split at the first 19712 # space. 19713 complete="$PROPER_COMPILER_CC" 19714 path="${complete%% *}" 19715 tmp="$complete EOL" 19716 arguments="${tmp#* }" 19717 19718 # Input might be given as Windows format, start by converting to 19719 # unix format. 19720 new_path=`$CYGPATH -u "$path"` 19721 19722 # Now try to locate executable using which 19723 new_path=`$WHICH "$new_path" 2> /dev/null` 19724 # bat and cmd files are not always considered executable in cygwin causing which 19725 # to not find them 19726 if test "x$new_path" = x \ 19727 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19728 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19729 new_path=`$CYGPATH -u "$path"` 19730 fi 19731 if test "x$new_path" = x; then 19732 # Oops. Which didn't find the executable. 19733 # The splitting of arguments from the executable at a space might have been incorrect, 19734 # since paths with space are more likely in Windows. Give it another try with the whole 19735 # argument. 19736 path="$complete" 19737 arguments="EOL" 19738 new_path=`$CYGPATH -u "$path"` 19739 new_path=`$WHICH "$new_path" 2> /dev/null` 19740 # bat and cmd files are not always considered executable in cygwin causing which 19741 # to not find them 19742 if test "x$new_path" = x \ 19743 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19744 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19745 new_path=`$CYGPATH -u "$path"` 19746 fi 19747 if test "x$new_path" = x; then 19748 # It's still not found. Now this is an unrecoverable error. 19749 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19750 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19751 has_space=`$ECHO "$complete" | $GREP " "` 19752 if test "x$has_space" != x; then 19753 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19754 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19755 fi 19756 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19757 fi 19758 fi 19759 19760 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 19761 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 19762 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 19763 # "foo.exe" is OK but "foo" is an error. 19764 # 19765 # This test is therefore slightly more accurate than "test -f" to check for file precense. 19766 # It is also a way to make sure we got the proper file name for the real test later on. 19767 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 19768 if test "x$test_shortpath" = x; then 19769 # Short path failed, file does not exist as specified. 19770 # Try adding .exe or .cmd 19771 if test -f "${new_path}.exe"; then 19772 input_to_shortpath="${new_path}.exe" 19773 elif test -f "${new_path}.cmd"; then 19774 input_to_shortpath="${new_path}.cmd" 19775 else 19776 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5 19777 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;} 19778 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 19779 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 19780 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19781 fi 19782 else 19783 input_to_shortpath="$new_path" 19784 fi 19785 19786 # Call helper function which possibly converts this using DOS-style short mode. 19787 # If so, the updated path is stored in $new_path. 19788 new_path="$input_to_shortpath" 19789 19790 input_path="$input_to_shortpath" 19791 # Check if we need to convert this using DOS-style short mode. If the path 19792 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19793 # take no chances and rewrite it. 19794 # Note: m4 eats our [], so we need to use [ and ] instead. 19795 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 19796 if test "x$has_forbidden_chars" != x; then 19797 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19798 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 19799 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 19800 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 19801 # Going to short mode and back again did indeed matter. Since short mode is 19802 # case insensitive, let's make it lowercase to improve readability. 19803 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19804 # Now convert it back to Unix-stile (cygpath) 19805 input_path=`$CYGPATH -u "$shortmode_path"` 19806 new_path="$input_path" 19807 fi 19808 fi 19809 19810 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 19811 if test "x$test_cygdrive_prefix" = x; then 19812 # As a simple fix, exclude /usr/bin since it's not a real path. 19813 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 19814 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 19815 # a path prefixed by /cygdrive for fixpath to work. 19816 new_path="$CYGWIN_ROOT_PATH$input_path" 19817 fi 19818 fi 19819 19820 # remove trailing .exe if any 19821 new_path="${new_path/%.exe/}" 19822 19823 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19824 19825 # First separate the path from the arguments. This will split at the first 19826 # space. 19827 complete="$PROPER_COMPILER_CC" 19828 path="${complete%% *}" 19829 tmp="$complete EOL" 19830 arguments="${tmp#* }" 19831 19832 # Input might be given as Windows format, start by converting to 19833 # unix format. 19834 new_path="$path" 19835 19836 windows_path="$new_path" 19837 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19838 unix_path=`$CYGPATH -u "$windows_path"` 19839 new_path="$unix_path" 19840 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19841 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19842 new_path="$unix_path" 19843 fi 19844 19845 19846 # Now try to locate executable using which 19847 new_path=`$WHICH "$new_path" 2> /dev/null` 19848 19849 if test "x$new_path" = x; then 19850 # Oops. Which didn't find the executable. 19851 # The splitting of arguments from the executable at a space might have been incorrect, 19852 # since paths with space are more likely in Windows. Give it another try with the whole 19853 # argument. 19854 path="$complete" 19855 arguments="EOL" 19856 new_path="$path" 19857 19858 windows_path="$new_path" 19859 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19860 unix_path=`$CYGPATH -u "$windows_path"` 19861 new_path="$unix_path" 19862 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19863 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19864 new_path="$unix_path" 19865 fi 19866 19867 19868 new_path=`$WHICH "$new_path" 2> /dev/null` 19869 19870 if test "x$new_path" = x; then 19871 # It's still not found. Now this is an unrecoverable error. 19872 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19873 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19874 has_space=`$ECHO "$complete" | $GREP " "` 19875 if test "x$has_space" != x; then 19876 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19877 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19878 fi 19879 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19880 fi 19881 fi 19882 19883 # Now new_path has a complete unix path to the binary 19884 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 19885 # Keep paths in /bin as-is, but remove trailing .exe if any 19886 new_path="${new_path/%.exe/}" 19887 # Do not save /bin paths to all_fixpath_prefixes! 19888 else 19889 # Not in mixed or Windows style, start by that. 19890 new_path=`cmd //c echo $new_path` 19891 19892 input_path="$new_path" 19893 # Check if we need to convert this using DOS-style short mode. If the path 19894 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19895 # take no chances and rewrite it. 19896 # Note: m4 eats our [], so we need to use [ and ] instead. 19897 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 19898 if test "x$has_forbidden_chars" != x; then 19899 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19900 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19901 fi 19902 19903 # Output is in $new_path 19904 19905 windows_path="$new_path" 19906 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19907 unix_path=`$CYGPATH -u "$windows_path"` 19908 new_path="$unix_path" 19909 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19910 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19911 new_path="$unix_path" 19912 fi 19913 19914 # remove trailing .exe if any 19915 new_path="${new_path/%.exe/}" 19916 19917 # Save the first 10 bytes of this path to the storage, so fixpath can work. 19918 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 19919 fi 19920 19921 else 19922 # We're on a posix platform. Hooray! :) 19923 # First separate the path from the arguments. This will split at the first 19924 # space. 19925 complete="$PROPER_COMPILER_CC" 19926 path="${complete%% *}" 19927 tmp="$complete EOL" 19928 arguments="${tmp#* }" 19929 19930 # Cannot rely on the command "which" here since it doesn't always work. 19931 is_absolute_path=`$ECHO "$path" | $GREP ^/` 19932 if test -z "$is_absolute_path"; then 19933 # Path to executable is not absolute. Find it. 19934 IFS_save="$IFS" 19935 IFS=: 19936 for p in $PATH; do 19937 if test -f "$p/$path" && test -x "$p/$path"; then 19938 new_path="$p/$path" 19939 break 19940 fi 19941 done 19942 IFS="$IFS_save" 19943 else 19944 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5 19945 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;} 19946 new_path="$path" 19947 fi 19948 19949 if test "x$new_path" = x; then 19950 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19951 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19952 has_space=`$ECHO "$complete" | $GREP " "` 19953 if test "x$has_space" != x; then 19954 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 19955 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 19956 fi 19957 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19958 fi 19959 fi 19960 19961 # Now join together the path and the arguments once again 19962 if test "x$arguments" != xEOL; then 19963 new_complete="$new_path ${arguments% *}" 19964 else 19965 new_complete="$new_path" 19966 fi 19967 19968 if test "x$complete" != "x$new_complete"; then 19969 PROPER_COMPILER_CC="$new_complete" 19970 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 19971 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;} 19972 fi 19973 19974 PATH="$RETRY_COMPILER_SAVED_PATH" 19975 19976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5 19977 $as_echo_n "checking for resolved symbolic links for CC... " >&6; } 19978 19979 if test "x$OPENJDK_BUILD_OS" != xwindows; then 19980 # Follow a chain of symbolic links. Use readlink 19981 # where it exists, else fall back to horribly 19982 # complicated shell code. 19983 if test "x$READLINK_TESTED" != yes; then 19984 # On MacOSX there is a readlink tool with a different 19985 # purpose than the GNU readlink tool. Check the found readlink. 19986 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 19987 if test "x$ISGNU" = x; then 19988 # A readlink that we do not know how to use. 19989 # Are there other non-GNU readlinks out there? 19990 READLINK_TESTED=yes 19991 READLINK= 19992 fi 19993 fi 19994 19995 if test "x$READLINK" != x; then 19996 PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC` 19997 else 19998 # Save the current directory for restoring afterwards 19999 STARTDIR=$PWD 20000 COUNTER=0 20001 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC` 20002 sym_link_file=`$BASENAME $PROPER_COMPILER_CC` 20003 cd $sym_link_dir 20004 # Use -P flag to resolve symlinks in directories. 20005 cd `$THEPWDCMD -P` 20006 sym_link_dir=`$THEPWDCMD -P` 20007 # Resolve file symlinks 20008 while test $COUNTER -lt 20; do 20009 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 20010 if test "x$ISLINK" == x; then 20011 # This is not a symbolic link! We are done! 20012 break 20013 fi 20014 # Again resolve directory symlinks since the target of the just found 20015 # link could be in a different directory 20016 cd `$DIRNAME $ISLINK` 20017 sym_link_dir=`$THEPWDCMD -P` 20018 sym_link_file=`$BASENAME $ISLINK` 20019 let COUNTER=COUNTER+1 20020 done 20021 cd $STARTDIR 20022 PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file 20023 fi 20024 fi 20025 20026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 20027 $as_echo "$PROPER_COMPILER_CC" >&6; } 20028 CC="$PROPER_COMPILER_CC" 20029 else 20030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5 20031 $as_echo "no, keeping CC" >&6; } 20032 CC="$TEST_COMPILER" 20033 fi 20034 20035 COMPILER=$CC 20036 COMPILER_NAME=$COMPILER_NAME 20037 20038 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 20039 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work 20040 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` 20041 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 20042 if test $? -ne 0; then 20043 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 20044 20045 { $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 20046 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} 20047 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 20048 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} 20049 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 20050 else 20051 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` 20052 COMPILER_VENDOR="Sun Studio" 20053 fi 20054 elif test "x$OPENJDK_TARGET_OS" = xwindows; then 20055 # First line typically looks something like: 20056 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 20057 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` 20058 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` 20059 COMPILER_VENDOR="Microsoft CL.EXE" 20060 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` 20061 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then 20062 if test "x$COMPILER_CPU_TEST" != "x80x86"; then 20063 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 20064 fi 20065 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 20066 if test "x$COMPILER_CPU_TEST" != "xx64"; then 20067 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 20068 fi 20069 fi 20070 else 20071 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 20072 # Check that this is likely to be GCC. 20073 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null 20074 if test $? -ne 0; then 20075 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 20076 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} 20077 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 20078 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} 20079 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 20080 fi 20081 20082 # First line typically looks something like: 20083 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 20084 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` 20085 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` 20086 fi 20087 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) 20088 CC_VERSION="$COMPILER_VERSION" 20089 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) 20090 CC_VENDOR="$COMPILER_VENDOR" 20091 20092 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 20093 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} 20094 20095 20096 # Now that we have resolved CC ourself, let autoconf have its go at it 20097 ac_ext=c 20098 ac_cpp='$CPP $CPPFLAGS' 20099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 20100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 20101 ac_compiler_gnu=$ac_cv_c_compiler_gnu 20102 if test -n "$ac_tool_prefix"; then 20103 for ac_prog in $CC 20104 do 20105 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 20106 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 20107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20108 $as_echo_n "checking for $ac_word... " >&6; } 20109 if ${ac_cv_prog_CC+:} false; then : 20110 $as_echo_n "(cached) " >&6 20111 else 20112 if test -n "$CC"; then 20113 ac_cv_prog_CC="$CC" # Let the user override the test. 20114 else 20115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20116 for as_dir in $PATH 20117 do 20118 IFS=$as_save_IFS 20119 test -z "$as_dir" && as_dir=. 20120 for ac_exec_ext in '' $ac_executable_extensions; do 20121 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 20122 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 20123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20124 break 2 20125 fi 20126 done 20127 done 20128 IFS=$as_save_IFS 20129 20130 fi 20131 fi 20132 CC=$ac_cv_prog_CC 20133 if test -n "$CC"; then 20134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 20135 $as_echo "$CC" >&6; } 20136 else 20137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20138 $as_echo "no" >&6; } 20139 fi 20140 20141 20142 test -n "$CC" && break 20143 done 20144 fi 20145 if test -z "$CC"; then 20146 ac_ct_CC=$CC 20147 for ac_prog in $CC 20148 do 20149 # Extract the first word of "$ac_prog", so it can be a program name with args. 20150 set dummy $ac_prog; ac_word=$2 20151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20152 $as_echo_n "checking for $ac_word... " >&6; } 20153 if ${ac_cv_prog_ac_ct_CC+:} false; then : 20154 $as_echo_n "(cached) " >&6 20155 else 20156 if test -n "$ac_ct_CC"; then 20157 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 20158 else 20159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20160 for as_dir in $PATH 20161 do 20162 IFS=$as_save_IFS 20163 test -z "$as_dir" && as_dir=. 20164 for ac_exec_ext in '' $ac_executable_extensions; do 20165 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 20166 ac_cv_prog_ac_ct_CC="$ac_prog" 20167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20168 break 2 20169 fi 20170 done 20171 done 20172 IFS=$as_save_IFS 20173 20174 fi 20175 fi 20176 ac_ct_CC=$ac_cv_prog_ac_ct_CC 20177 if test -n "$ac_ct_CC"; then 20178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 20179 $as_echo "$ac_ct_CC" >&6; } 20180 else 20181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20182 $as_echo "no" >&6; } 20183 fi 20184 20185 20186 test -n "$ac_ct_CC" && break 20187 done 20188 20189 if test "x$ac_ct_CC" = x; then 20190 CC="" 20191 else 20192 case $cross_compiling:$ac_tool_warned in 20193 yes:) 20194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 20195 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 20196 ac_tool_warned=yes ;; 20197 esac 20198 CC=$ac_ct_CC 20199 fi 20200 fi 20201 20202 20203 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20204 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20205 as_fn_error $? "no acceptable C compiler found in \$PATH 20206 See \`config.log' for more details" "$LINENO" 5; } 20207 20208 # Provide some information about the compiler. 20209 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 20210 set X $ac_compile 20211 ac_compiler=$2 20212 for ac_option in --version -v -V -qversion; do 20213 { { ac_try="$ac_compiler $ac_option >&5" 20214 case "(($ac_try" in 20215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20216 *) ac_try_echo=$ac_try;; 20217 esac 20218 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20219 $as_echo "$ac_try_echo"; } >&5 20220 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 20221 ac_status=$? 20222 if test -s conftest.err; then 20223 sed '10a\ 20224 ... rest of stderr output deleted ... 20225 10q' conftest.err >conftest.er1 20226 cat conftest.er1 >&5 20227 fi 20228 rm -f conftest.er1 conftest.err 20229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20230 test $ac_status = 0; } 20231 done 20232 20233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20234 /* end confdefs.h. */ 20235 20236 int 20237 main () 20238 { 20239 20240 ; 20241 return 0; 20242 } 20243 _ACEOF 20244 ac_clean_files_save=$ac_clean_files 20245 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 20246 # Try to create an executable without -o first, disregard a.out. 20247 # It will help us diagnose broken compilers, and finding out an intuition 20248 # of exeext. 20249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 20250 $as_echo_n "checking whether the C compiler works... " >&6; } 20251 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 20252 20253 # The possible output files: 20254 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 20255 20256 ac_rmfiles= 20257 for ac_file in $ac_files 20258 do 20259 case $ac_file in 20260 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 20261 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 20262 esac 20263 done 20264 rm -f $ac_rmfiles 20265 20266 if { { ac_try="$ac_link_default" 20267 case "(($ac_try" in 20268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20269 *) ac_try_echo=$ac_try;; 20270 esac 20271 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20272 $as_echo "$ac_try_echo"; } >&5 20273 (eval "$ac_link_default") 2>&5 20274 ac_status=$? 20275 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20276 test $ac_status = 0; }; then : 20277 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 20278 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 20279 # in a Makefile. We should not override ac_cv_exeext if it was cached, 20280 # so that the user can short-circuit this test for compilers unknown to 20281 # Autoconf. 20282 for ac_file in $ac_files '' 20283 do 20284 test -f "$ac_file" || continue 20285 case $ac_file in 20286 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 20287 ;; 20288 [ab].out ) 20289 # We found the default executable, but exeext='' is most 20290 # certainly right. 20291 break;; 20292 *.* ) 20293 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 20294 then :; else 20295 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 20296 fi 20297 # We set ac_cv_exeext here because the later test for it is not 20298 # safe: cross compilers may not add the suffix if given an `-o' 20299 # argument, so we may need to know it at that point already. 20300 # Even if this section looks crufty: it has the advantage of 20301 # actually working. 20302 break;; 20303 * ) 20304 break;; 20305 esac 20306 done 20307 test "$ac_cv_exeext" = no && ac_cv_exeext= 20308 20309 else 20310 ac_file='' 20311 fi 20312 if test -z "$ac_file"; then : 20313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20314 $as_echo "no" >&6; } 20315 $as_echo "$as_me: failed program was:" >&5 20316 sed 's/^/| /' conftest.$ac_ext >&5 20317 20318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20319 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20320 as_fn_error 77 "C compiler cannot create executables 20321 See \`config.log' for more details" "$LINENO" 5; } 20322 else 20323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 20324 $as_echo "yes" >&6; } 20325 fi 20326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 20327 $as_echo_n "checking for C compiler default output file name... " >&6; } 20328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 20329 $as_echo "$ac_file" >&6; } 20330 ac_exeext=$ac_cv_exeext 20331 20332 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 20333 ac_clean_files=$ac_clean_files_save 20334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 20335 $as_echo_n "checking for suffix of executables... " >&6; } 20336 if { { ac_try="$ac_link" 20337 case "(($ac_try" in 20338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20339 *) ac_try_echo=$ac_try;; 20340 esac 20341 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20342 $as_echo "$ac_try_echo"; } >&5 20343 (eval "$ac_link") 2>&5 20344 ac_status=$? 20345 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20346 test $ac_status = 0; }; then : 20347 # If both `conftest.exe' and `conftest' are `present' (well, observable) 20348 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 20349 # work properly (i.e., refer to `conftest.exe'), while it won't with 20350 # `rm'. 20351 for ac_file in conftest.exe conftest conftest.*; do 20352 test -f "$ac_file" || continue 20353 case $ac_file in 20354 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 20355 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 20356 break;; 20357 * ) break;; 20358 esac 20359 done 20360 else 20361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20362 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20363 as_fn_error $? "cannot compute suffix of executables: cannot compile and link 20364 See \`config.log' for more details" "$LINENO" 5; } 20365 fi 20366 rm -f conftest conftest$ac_cv_exeext 20367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 20368 $as_echo "$ac_cv_exeext" >&6; } 20369 20370 rm -f conftest.$ac_ext 20371 EXEEXT=$ac_cv_exeext 20372 ac_exeext=$EXEEXT 20373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20374 /* end confdefs.h. */ 20375 #include <stdio.h> 20376 int 20377 main () 20378 { 20379 FILE *f = fopen ("conftest.out", "w"); 20380 return ferror (f) || fclose (f) != 0; 20381 20382 ; 20383 return 0; 20384 } 20385 _ACEOF 20386 ac_clean_files="$ac_clean_files conftest.out" 20387 # Check that the compiler produces executables we can run. If not, either 20388 # the compiler is broken, or we cross compile. 20389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 20390 $as_echo_n "checking whether we are cross compiling... " >&6; } 20391 if test "$cross_compiling" != yes; then 20392 { { ac_try="$ac_link" 20393 case "(($ac_try" in 20394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20395 *) ac_try_echo=$ac_try;; 20396 esac 20397 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20398 $as_echo "$ac_try_echo"; } >&5 20399 (eval "$ac_link") 2>&5 20400 ac_status=$? 20401 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20402 test $ac_status = 0; } 20403 if { ac_try='./conftest$ac_cv_exeext' 20404 { { case "(($ac_try" in 20405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20406 *) ac_try_echo=$ac_try;; 20407 esac 20408 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20409 $as_echo "$ac_try_echo"; } >&5 20410 (eval "$ac_try") 2>&5 20411 ac_status=$? 20412 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20413 test $ac_status = 0; }; }; then 20414 cross_compiling=no 20415 else 20416 if test "$cross_compiling" = maybe; then 20417 cross_compiling=yes 20418 else 20419 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20420 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20421 as_fn_error $? "cannot run C compiled programs. 20422 If you meant to cross compile, use \`--host'. 20423 See \`config.log' for more details" "$LINENO" 5; } 20424 fi 20425 fi 20426 fi 20427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 20428 $as_echo "$cross_compiling" >&6; } 20429 20430 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 20431 ac_clean_files=$ac_clean_files_save 20432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 20433 $as_echo_n "checking for suffix of object files... " >&6; } 20434 if ${ac_cv_objext+:} false; then : 20435 $as_echo_n "(cached) " >&6 20436 else 20437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20438 /* end confdefs.h. */ 20439 20440 int 20441 main () 20442 { 20443 20444 ; 20445 return 0; 20446 } 20447 _ACEOF 20448 rm -f conftest.o conftest.obj 20449 if { { ac_try="$ac_compile" 20450 case "(($ac_try" in 20451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20452 *) ac_try_echo=$ac_try;; 20453 esac 20454 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20455 $as_echo "$ac_try_echo"; } >&5 20456 (eval "$ac_compile") 2>&5 20457 ac_status=$? 20458 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20459 test $ac_status = 0; }; then : 20460 for ac_file in conftest.o conftest.obj conftest.*; do 20461 test -f "$ac_file" || continue; 20462 case $ac_file in 20463 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 20464 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 20465 break;; 20466 esac 20467 done 20468 else 20469 $as_echo "$as_me: failed program was:" >&5 20470 sed 's/^/| /' conftest.$ac_ext >&5 20471 20472 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20473 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20474 as_fn_error $? "cannot compute suffix of object files: cannot compile 20475 See \`config.log' for more details" "$LINENO" 5; } 20476 fi 20477 rm -f conftest.$ac_cv_objext conftest.$ac_ext 20478 fi 20479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 20480 $as_echo "$ac_cv_objext" >&6; } 20481 OBJEXT=$ac_cv_objext 20482 ac_objext=$OBJEXT 20483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 20484 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 20485 if ${ac_cv_c_compiler_gnu+:} false; then : 20486 $as_echo_n "(cached) " >&6 20487 else 20488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20489 /* end confdefs.h. */ 20490 20491 int 20492 main () 20493 { 20494 #ifndef __GNUC__ 20495 choke me 20496 #endif 20497 20498 ; 20499 return 0; 20500 } 20501 _ACEOF 20502 if ac_fn_c_try_compile "$LINENO"; then : 20503 ac_compiler_gnu=yes 20504 else 20505 ac_compiler_gnu=no 20506 fi 20507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20508 ac_cv_c_compiler_gnu=$ac_compiler_gnu 20509 20510 fi 20511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 20512 $as_echo "$ac_cv_c_compiler_gnu" >&6; } 20513 if test $ac_compiler_gnu = yes; then 20514 GCC=yes 20515 else 20516 GCC= 20517 fi 20518 ac_test_CFLAGS=${CFLAGS+set} 20519 ac_save_CFLAGS=$CFLAGS 20520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 20521 $as_echo_n "checking whether $CC accepts -g... " >&6; } 20522 if ${ac_cv_prog_cc_g+:} false; then : 20523 $as_echo_n "(cached) " >&6 20524 else 20525 ac_save_c_werror_flag=$ac_c_werror_flag 20526 ac_c_werror_flag=yes 20527 ac_cv_prog_cc_g=no 20528 CFLAGS="-g" 20529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20530 /* end confdefs.h. */ 20531 20532 int 20533 main () 20534 { 20535 20536 ; 20537 return 0; 20538 } 20539 _ACEOF 20540 if ac_fn_c_try_compile "$LINENO"; then : 20541 ac_cv_prog_cc_g=yes 20542 else 20543 CFLAGS="" 20544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20545 /* end confdefs.h. */ 20546 20547 int 20548 main () 20549 { 20550 20551 ; 20552 return 0; 20553 } 20554 _ACEOF 20555 if ac_fn_c_try_compile "$LINENO"; then : 20556 20557 else 20558 ac_c_werror_flag=$ac_save_c_werror_flag 20559 CFLAGS="-g" 20560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20561 /* end confdefs.h. */ 20562 20563 int 20564 main () 20565 { 20566 20567 ; 20568 return 0; 20569 } 20570 _ACEOF 20571 if ac_fn_c_try_compile "$LINENO"; then : 20572 ac_cv_prog_cc_g=yes 20573 fi 20574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20575 fi 20576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20577 fi 20578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20579 ac_c_werror_flag=$ac_save_c_werror_flag 20580 fi 20581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 20582 $as_echo "$ac_cv_prog_cc_g" >&6; } 20583 if test "$ac_test_CFLAGS" = set; then 20584 CFLAGS=$ac_save_CFLAGS 20585 elif test $ac_cv_prog_cc_g = yes; then 20586 if test "$GCC" = yes; then 20587 CFLAGS="-g -O2" 20588 else 20589 CFLAGS="-g" 20590 fi 20591 else 20592 if test "$GCC" = yes; then 20593 CFLAGS="-O2" 20594 else 20595 CFLAGS= 20596 fi 20597 fi 20598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 20599 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 20600 if ${ac_cv_prog_cc_c89+:} false; then : 20601 $as_echo_n "(cached) " >&6 20602 else 20603 ac_cv_prog_cc_c89=no 20604 ac_save_CC=$CC 20605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20606 /* end confdefs.h. */ 20607 #include <stdarg.h> 20608 #include <stdio.h> 20609 struct stat; 20610 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 20611 struct buf { int x; }; 20612 FILE * (*rcsopen) (struct buf *, struct stat *, int); 20613 static char *e (p, i) 20614 char **p; 20615 int i; 20616 { 20617 return p[i]; 20618 } 20619 static char *f (char * (*g) (char **, int), char **p, ...) 20620 { 20621 char *s; 20622 va_list v; 20623 va_start (v,p); 20624 s = g (p, va_arg (v,int)); 20625 va_end (v); 20626 return s; 20627 } 20628 20629 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 20630 function prototypes and stuff, but not '\xHH' hex character constants. 20631 These don't provoke an error unfortunately, instead are silently treated 20632 as 'x'. The following induces an error, until -std is added to get 20633 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 20634 array size at least. It's necessary to write '\x00'==0 to get something 20635 that's true only with -std. */ 20636 int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 20637 20638 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 20639 inside strings and character constants. */ 20640 #define FOO(x) 'x' 20641 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 20642 20643 int test (int i, double x); 20644 struct s1 {int (*f) (int a);}; 20645 struct s2 {int (*f) (double a);}; 20646 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 20647 int argc; 20648 char **argv; 20649 int 20650 main () 20651 { 20652 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 20653 ; 20654 return 0; 20655 } 20656 _ACEOF 20657 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 20658 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 20659 do 20660 CC="$ac_save_CC $ac_arg" 20661 if ac_fn_c_try_compile "$LINENO"; then : 20662 ac_cv_prog_cc_c89=$ac_arg 20663 fi 20664 rm -f core conftest.err conftest.$ac_objext 20665 test "x$ac_cv_prog_cc_c89" != "xno" && break 20666 done 20667 rm -f conftest.$ac_ext 20668 CC=$ac_save_CC 20669 20670 fi 20671 # AC_CACHE_VAL 20672 case "x$ac_cv_prog_cc_c89" in 20673 x) 20674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 20675 $as_echo "none needed" >&6; } ;; 20676 xno) 20677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 20678 $as_echo "unsupported" >&6; } ;; 20679 *) 20680 CC="$CC $ac_cv_prog_cc_c89" 20681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 20682 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 20683 esac 20684 if test "x$ac_cv_prog_cc_c89" != xno; then : 20685 20686 fi 20687 20688 ac_ext=cpp 20689 ac_cpp='$CXXCPP $CPPFLAGS' 20690 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 20691 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 20692 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 20693 20694 20695 ### Locate C++ compiler (CXX) 20696 20697 if test "x$CXX" != x; then 20698 COMPILER_CHECK_LIST="$CXX" 20699 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 20700 COMPILER_CHECK_LIST="cl" 20701 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 20702 COMPILER_CHECK_LIST="CC g++" 20703 else 20704 COMPILER_CHECK_LIST="g++ CC" 20705 fi 20706 20707 20708 COMPILER_NAME=C++ 20709 20710 CXX= 20711 # If TOOLS_DIR is set, check for all compiler names in there first 20712 # before checking the rest of the PATH. 20713 if test -n "$TOOLS_DIR"; then 20714 PATH_save="$PATH" 20715 PATH="$TOOLS_DIR" 20716 for ac_prog in $COMPILER_CHECK_LIST 20717 do 20718 # Extract the first word of "$ac_prog", so it can be a program name with args. 20719 set dummy $ac_prog; ac_word=$2 20720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20721 $as_echo_n "checking for $ac_word... " >&6; } 20722 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then : 20723 $as_echo_n "(cached) " >&6 20724 else 20725 case $TOOLS_DIR_CXX in 20726 [\\/]* | ?:[\\/]*) 20727 ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path. 20728 ;; 20729 *) 20730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20731 for as_dir in $PATH 20732 do 20733 IFS=$as_save_IFS 20734 test -z "$as_dir" && as_dir=. 20735 for ac_exec_ext in '' $ac_executable_extensions; do 20736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 20737 ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext" 20738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20739 break 2 20740 fi 20741 done 20742 done 20743 IFS=$as_save_IFS 20744 20745 ;; 20746 esac 20747 fi 20748 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX 20749 if test -n "$TOOLS_DIR_CXX"; then 20750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5 20751 $as_echo "$TOOLS_DIR_CXX" >&6; } 20752 else 20753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20754 $as_echo "no" >&6; } 20755 fi 20756 20757 20758 test -n "$TOOLS_DIR_CXX" && break 20759 done 20760 20761 CXX=$TOOLS_DIR_CXX 20762 PATH="$PATH_save" 20763 fi 20764 20765 # AC_PATH_PROGS can't be run multiple times with the same variable, 20766 # so create a new name for this run. 20767 if test "x$CXX" = x; then 20768 for ac_prog in $COMPILER_CHECK_LIST 20769 do 20770 # Extract the first word of "$ac_prog", so it can be a program name with args. 20771 set dummy $ac_prog; ac_word=$2 20772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20773 $as_echo_n "checking for $ac_word... " >&6; } 20774 if ${ac_cv_path_POTENTIAL_CXX+:} false; then : 20775 $as_echo_n "(cached) " >&6 20776 else 20777 case $POTENTIAL_CXX in 20778 [\\/]* | ?:[\\/]*) 20779 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path. 20780 ;; 20781 *) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 20789 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" 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 ;; 20798 esac 20799 fi 20800 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX 20801 if test -n "$POTENTIAL_CXX"; then 20802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5 20803 $as_echo "$POTENTIAL_CXX" >&6; } 20804 else 20805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20806 $as_echo "no" >&6; } 20807 fi 20808 20809 20810 test -n "$POTENTIAL_CXX" && break 20811 done 20812 20813 CXX=$POTENTIAL_CXX 20814 fi 20815 20816 if test "x$CXX" = x; then 20817 20818 # Print a helpful message on how to acquire the necessary build dependency. 20819 # devkit is the help tag: freetyp2, cups, pulse, alsa etc 20820 MISSING_DEPENDENCY=devkit 20821 PKGHANDLER_COMMAND= 20822 20823 case $PKGHANDLER in 20824 apt-get) 20825 apt_help $MISSING_DEPENDENCY ;; 20826 yum) 20827 yum_help $MISSING_DEPENDENCY ;; 20828 port) 20829 port_help $MISSING_DEPENDENCY ;; 20830 pkgutil) 20831 pkgutil_help $MISSING_DEPENDENCY ;; 20832 pkgadd) 20833 pkgadd_help $MISSING_DEPENDENCY ;; 20834 * ) 20835 break ;; 20836 esac 20837 20838 if test "x$PKGHANDLER_COMMAND" != x; then 20839 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 20840 fi 20841 20842 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 20843 fi 20844 20845 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20846 20847 # First separate the path from the arguments. This will split at the first 20848 # space. 20849 complete="$CXX" 20850 path="${complete%% *}" 20851 tmp="$complete EOL" 20852 arguments="${tmp#* }" 20853 20854 # Input might be given as Windows format, start by converting to 20855 # unix format. 20856 new_path=`$CYGPATH -u "$path"` 20857 20858 # Now try to locate executable using which 20859 new_path=`$WHICH "$new_path" 2> /dev/null` 20860 # bat and cmd files are not always considered executable in cygwin causing which 20861 # to not find them 20862 if test "x$new_path" = x \ 20863 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20864 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20865 new_path=`$CYGPATH -u "$path"` 20866 fi 20867 if test "x$new_path" = x; then 20868 # Oops. Which didn't find the executable. 20869 # The splitting of arguments from the executable at a space might have been incorrect, 20870 # since paths with space are more likely in Windows. Give it another try with the whole 20871 # argument. 20872 path="$complete" 20873 arguments="EOL" 20874 new_path=`$CYGPATH -u "$path"` 20875 new_path=`$WHICH "$new_path" 2> /dev/null` 20876 # bat and cmd files are not always considered executable in cygwin causing which 20877 # to not find them 20878 if test "x$new_path" = x \ 20879 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20880 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20881 new_path=`$CYGPATH -u "$path"` 20882 fi 20883 if test "x$new_path" = x; then 20884 # It's still not found. Now this is an unrecoverable error. 20885 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20886 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20887 has_space=`$ECHO "$complete" | $GREP " "` 20888 if test "x$has_space" != x; then 20889 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20890 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20891 fi 20892 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20893 fi 20894 fi 20895 20896 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 20897 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 20898 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 20899 # "foo.exe" is OK but "foo" is an error. 20900 # 20901 # This test is therefore slightly more accurate than "test -f" to check for file precense. 20902 # It is also a way to make sure we got the proper file name for the real test later on. 20903 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 20904 if test "x$test_shortpath" = x; then 20905 # Short path failed, file does not exist as specified. 20906 # Try adding .exe or .cmd 20907 if test -f "${new_path}.exe"; then 20908 input_to_shortpath="${new_path}.exe" 20909 elif test -f "${new_path}.cmd"; then 20910 input_to_shortpath="${new_path}.cmd" 20911 else 20912 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5 20913 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;} 20914 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 20915 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 20916 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20917 fi 20918 else 20919 input_to_shortpath="$new_path" 20920 fi 20921 20922 # Call helper function which possibly converts this using DOS-style short mode. 20923 # If so, the updated path is stored in $new_path. 20924 new_path="$input_to_shortpath" 20925 20926 input_path="$input_to_shortpath" 20927 # Check if we need to convert this using DOS-style short mode. If the path 20928 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20929 # take no chances and rewrite it. 20930 # Note: m4 eats our [], so we need to use [ and ] instead. 20931 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 20932 if test "x$has_forbidden_chars" != x; then 20933 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20934 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 20935 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 20936 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 20937 # Going to short mode and back again did indeed matter. Since short mode is 20938 # case insensitive, let's make it lowercase to improve readability. 20939 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20940 # Now convert it back to Unix-stile (cygpath) 20941 input_path=`$CYGPATH -u "$shortmode_path"` 20942 new_path="$input_path" 20943 fi 20944 fi 20945 20946 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 20947 if test "x$test_cygdrive_prefix" = x; then 20948 # As a simple fix, exclude /usr/bin since it's not a real path. 20949 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 20950 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 20951 # a path prefixed by /cygdrive for fixpath to work. 20952 new_path="$CYGWIN_ROOT_PATH$input_path" 20953 fi 20954 fi 20955 20956 # remove trailing .exe if any 20957 new_path="${new_path/%.exe/}" 20958 20959 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20960 20961 # First separate the path from the arguments. This will split at the first 20962 # space. 20963 complete="$CXX" 20964 path="${complete%% *}" 20965 tmp="$complete EOL" 20966 arguments="${tmp#* }" 20967 20968 # Input might be given as Windows format, start by converting to 20969 # unix format. 20970 new_path="$path" 20971 20972 windows_path="$new_path" 20973 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20974 unix_path=`$CYGPATH -u "$windows_path"` 20975 new_path="$unix_path" 20976 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20977 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20978 new_path="$unix_path" 20979 fi 20980 20981 20982 # Now try to locate executable using which 20983 new_path=`$WHICH "$new_path" 2> /dev/null` 20984 20985 if test "x$new_path" = x; then 20986 # Oops. Which didn't find the executable. 20987 # The splitting of arguments from the executable at a space might have been incorrect, 20988 # since paths with space are more likely in Windows. Give it another try with the whole 20989 # argument. 20990 path="$complete" 20991 arguments="EOL" 20992 new_path="$path" 20993 20994 windows_path="$new_path" 20995 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20996 unix_path=`$CYGPATH -u "$windows_path"` 20997 new_path="$unix_path" 20998 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20999 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21000 new_path="$unix_path" 21001 fi 21002 21003 21004 new_path=`$WHICH "$new_path" 2> /dev/null` 21005 21006 if test "x$new_path" = x; then 21007 # It's still not found. Now this is an unrecoverable error. 21008 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 21009 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 21010 has_space=`$ECHO "$complete" | $GREP " "` 21011 if test "x$has_space" != x; then 21012 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21013 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21014 fi 21015 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 21016 fi 21017 fi 21018 21019 # Now new_path has a complete unix path to the binary 21020 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 21021 # Keep paths in /bin as-is, but remove trailing .exe if any 21022 new_path="${new_path/%.exe/}" 21023 # Do not save /bin paths to all_fixpath_prefixes! 21024 else 21025 # Not in mixed or Windows style, start by that. 21026 new_path=`cmd //c echo $new_path` 21027 21028 input_path="$new_path" 21029 # Check if we need to convert this using DOS-style short mode. If the path 21030 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21031 # take no chances and rewrite it. 21032 # Note: m4 eats our [], so we need to use [ and ] instead. 21033 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 21034 if test "x$has_forbidden_chars" != x; then 21035 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21036 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21037 fi 21038 21039 # Output is in $new_path 21040 21041 windows_path="$new_path" 21042 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21043 unix_path=`$CYGPATH -u "$windows_path"` 21044 new_path="$unix_path" 21045 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21046 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21047 new_path="$unix_path" 21048 fi 21049 21050 # remove trailing .exe if any 21051 new_path="${new_path/%.exe/}" 21052 21053 # Save the first 10 bytes of this path to the storage, so fixpath can work. 21054 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 21055 fi 21056 21057 else 21058 # We're on a posix platform. Hooray! :) 21059 # First separate the path from the arguments. This will split at the first 21060 # space. 21061 complete="$CXX" 21062 path="${complete%% *}" 21063 tmp="$complete EOL" 21064 arguments="${tmp#* }" 21065 21066 # Cannot rely on the command "which" here since it doesn't always work. 21067 is_absolute_path=`$ECHO "$path" | $GREP ^/` 21068 if test -z "$is_absolute_path"; then 21069 # Path to executable is not absolute. Find it. 21070 IFS_save="$IFS" 21071 IFS=: 21072 for p in $PATH; do 21073 if test -f "$p/$path" && test -x "$p/$path"; then 21074 new_path="$p/$path" 21075 break 21076 fi 21077 done 21078 IFS="$IFS_save" 21079 else 21080 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5 21081 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;} 21082 new_path="$path" 21083 fi 21084 21085 if test "x$new_path" = x; then 21086 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 21087 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 21088 has_space=`$ECHO "$complete" | $GREP " "` 21089 if test "x$has_space" != x; then 21090 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 21091 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 21092 fi 21093 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 21094 fi 21095 fi 21096 21097 # Now join together the path and the arguments once again 21098 if test "x$arguments" != xEOL; then 21099 new_complete="$new_path ${arguments% *}" 21100 else 21101 new_complete="$new_path" 21102 fi 21103 21104 if test "x$complete" != "x$new_complete"; then 21105 CXX="$new_complete" 21106 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5 21107 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;} 21108 fi 21109 21110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 21111 $as_echo_n "checking resolved symbolic links for CXX... " >&6; } 21112 TEST_COMPILER="$CXX" 21113 21114 if test "x$OPENJDK_BUILD_OS" != xwindows; then 21115 # Follow a chain of symbolic links. Use readlink 21116 # where it exists, else fall back to horribly 21117 # complicated shell code. 21118 if test "x$READLINK_TESTED" != yes; then 21119 # On MacOSX there is a readlink tool with a different 21120 # purpose than the GNU readlink tool. Check the found readlink. 21121 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 21122 if test "x$ISGNU" = x; then 21123 # A readlink that we do not know how to use. 21124 # Are there other non-GNU readlinks out there? 21125 READLINK_TESTED=yes 21126 READLINK= 21127 fi 21128 fi 21129 21130 if test "x$READLINK" != x; then 21131 TEST_COMPILER=`$READLINK -f $TEST_COMPILER` 21132 else 21133 # Save the current directory for restoring afterwards 21134 STARTDIR=$PWD 21135 COUNTER=0 21136 sym_link_dir=`$DIRNAME $TEST_COMPILER` 21137 sym_link_file=`$BASENAME $TEST_COMPILER` 21138 cd $sym_link_dir 21139 # Use -P flag to resolve symlinks in directories. 21140 cd `$THEPWDCMD -P` 21141 sym_link_dir=`$THEPWDCMD -P` 21142 # Resolve file symlinks 21143 while test $COUNTER -lt 20; do 21144 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 21145 if test "x$ISLINK" == x; then 21146 # This is not a symbolic link! We are done! 21147 break 21148 fi 21149 # Again resolve directory symlinks since the target of the just found 21150 # link could be in a different directory 21151 cd `$DIRNAME $ISLINK` 21152 sym_link_dir=`$THEPWDCMD -P` 21153 sym_link_file=`$BASENAME $ISLINK` 21154 let COUNTER=COUNTER+1 21155 done 21156 cd $STARTDIR 21157 TEST_COMPILER=$sym_link_dir/$sym_link_file 21158 fi 21159 fi 21160 21161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 21162 $as_echo "$TEST_COMPILER" >&6; } 21163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5 21164 $as_echo_n "checking if CXX is disguised ccache... " >&6; } 21165 21166 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 21167 if test "x$COMPILER_BASENAME" = "xccache"; then 21168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 21169 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } 21170 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. 21171 # We want to control ccache invocation ourselves, so ignore this cc and try 21172 # searching again. 21173 21174 # Remove the path to the fake ccache cc from the PATH 21175 RETRY_COMPILER_SAVED_PATH="$PATH" 21176 COMPILER_DIRNAME=`$DIRNAME $CXX` 21177 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" 21178 21179 # Try again looking for our compiler 21180 if test -n "$ac_tool_prefix"; then 21181 for ac_prog in $COMPILER_CHECK_LIST 21182 do 21183 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21184 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21186 $as_echo_n "checking for $ac_word... " >&6; } 21187 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then : 21188 $as_echo_n "(cached) " >&6 21189 else 21190 if test -n "$PROPER_COMPILER_CXX"; then 21191 ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test. 21192 else 21193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21194 for as_dir in $PATH 21195 do 21196 IFS=$as_save_IFS 21197 test -z "$as_dir" && as_dir=. 21198 for ac_exec_ext in '' $ac_executable_extensions; do 21199 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21200 ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog" 21201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21202 break 2 21203 fi 21204 done 21205 done 21206 IFS=$as_save_IFS 21207 21208 fi 21209 fi 21210 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX 21211 if test -n "$PROPER_COMPILER_CXX"; then 21212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 21213 $as_echo "$PROPER_COMPILER_CXX" >&6; } 21214 else 21215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21216 $as_echo "no" >&6; } 21217 fi 21218 21219 21220 test -n "$PROPER_COMPILER_CXX" && break 21221 done 21222 fi 21223 if test -z "$PROPER_COMPILER_CXX"; then 21224 ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX 21225 for ac_prog in $COMPILER_CHECK_LIST 21226 do 21227 # Extract the first word of "$ac_prog", so it can be a program name with args. 21228 set dummy $ac_prog; ac_word=$2 21229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21230 $as_echo_n "checking for $ac_word... " >&6; } 21231 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then : 21232 $as_echo_n "(cached) " >&6 21233 else 21234 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then 21235 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test. 21236 else 21237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21238 for as_dir in $PATH 21239 do 21240 IFS=$as_save_IFS 21241 test -z "$as_dir" && as_dir=. 21242 for ac_exec_ext in '' $ac_executable_extensions; do 21243 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21244 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog" 21245 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21246 break 2 21247 fi 21248 done 21249 done 21250 IFS=$as_save_IFS 21251 21252 fi 21253 fi 21254 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX 21255 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then 21256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5 21257 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; } 21258 else 21259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21260 $as_echo "no" >&6; } 21261 fi 21262 21263 21264 test -n "$ac_ct_PROPER_COMPILER_CXX" && break 21265 done 21266 21267 if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then 21268 PROPER_COMPILER_CXX="" 21269 else 21270 case $cross_compiling:$ac_tool_warned in 21271 yes:) 21272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21273 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21274 ac_tool_warned=yes ;; 21275 esac 21276 PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX 21277 fi 21278 fi 21279 21280 21281 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21282 21283 # First separate the path from the arguments. This will split at the first 21284 # space. 21285 complete="$PROPER_COMPILER_CXX" 21286 path="${complete%% *}" 21287 tmp="$complete EOL" 21288 arguments="${tmp#* }" 21289 21290 # Input might be given as Windows format, start by converting to 21291 # unix format. 21292 new_path=`$CYGPATH -u "$path"` 21293 21294 # Now try to locate executable using which 21295 new_path=`$WHICH "$new_path" 2> /dev/null` 21296 # bat and cmd files are not always considered executable in cygwin causing which 21297 # to not find them 21298 if test "x$new_path" = x \ 21299 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 21300 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 21301 new_path=`$CYGPATH -u "$path"` 21302 fi 21303 if test "x$new_path" = x; then 21304 # Oops. Which didn't find the executable. 21305 # The splitting of arguments from the executable at a space might have been incorrect, 21306 # since paths with space are more likely in Windows. Give it another try with the whole 21307 # argument. 21308 path="$complete" 21309 arguments="EOL" 21310 new_path=`$CYGPATH -u "$path"` 21311 new_path=`$WHICH "$new_path" 2> /dev/null` 21312 # bat and cmd files are not always considered executable in cygwin causing which 21313 # to not find them 21314 if test "x$new_path" = x \ 21315 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 21316 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 21317 new_path=`$CYGPATH -u "$path"` 21318 fi 21319 if test "x$new_path" = x; then 21320 # It's still not found. Now this is an unrecoverable error. 21321 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 21322 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 21323 has_space=`$ECHO "$complete" | $GREP " "` 21324 if test "x$has_space" != x; then 21325 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21326 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21327 fi 21328 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21329 fi 21330 fi 21331 21332 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 21333 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 21334 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 21335 # "foo.exe" is OK but "foo" is an error. 21336 # 21337 # This test is therefore slightly more accurate than "test -f" to check for file precense. 21338 # It is also a way to make sure we got the proper file name for the real test later on. 21339 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 21340 if test "x$test_shortpath" = x; then 21341 # Short path failed, file does not exist as specified. 21342 # Try adding .exe or .cmd 21343 if test -f "${new_path}.exe"; then 21344 input_to_shortpath="${new_path}.exe" 21345 elif test -f "${new_path}.cmd"; then 21346 input_to_shortpath="${new_path}.cmd" 21347 else 21348 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5 21349 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;} 21350 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 21351 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 21352 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21353 fi 21354 else 21355 input_to_shortpath="$new_path" 21356 fi 21357 21358 # Call helper function which possibly converts this using DOS-style short mode. 21359 # If so, the updated path is stored in $new_path. 21360 new_path="$input_to_shortpath" 21361 21362 input_path="$input_to_shortpath" 21363 # Check if we need to convert this using DOS-style short mode. If the path 21364 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21365 # take no chances and rewrite it. 21366 # Note: m4 eats our [], so we need to use [ and ] instead. 21367 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 21368 if test "x$has_forbidden_chars" != x; then 21369 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21370 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 21371 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 21372 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 21373 # Going to short mode and back again did indeed matter. Since short mode is 21374 # case insensitive, let's make it lowercase to improve readability. 21375 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21376 # Now convert it back to Unix-stile (cygpath) 21377 input_path=`$CYGPATH -u "$shortmode_path"` 21378 new_path="$input_path" 21379 fi 21380 fi 21381 21382 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 21383 if test "x$test_cygdrive_prefix" = x; then 21384 # As a simple fix, exclude /usr/bin since it's not a real path. 21385 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 21386 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 21387 # a path prefixed by /cygdrive for fixpath to work. 21388 new_path="$CYGWIN_ROOT_PATH$input_path" 21389 fi 21390 fi 21391 21392 # remove trailing .exe if any 21393 new_path="${new_path/%.exe/}" 21394 21395 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21396 21397 # First separate the path from the arguments. This will split at the first 21398 # space. 21399 complete="$PROPER_COMPILER_CXX" 21400 path="${complete%% *}" 21401 tmp="$complete EOL" 21402 arguments="${tmp#* }" 21403 21404 # Input might be given as Windows format, start by converting to 21405 # unix format. 21406 new_path="$path" 21407 21408 windows_path="$new_path" 21409 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21410 unix_path=`$CYGPATH -u "$windows_path"` 21411 new_path="$unix_path" 21412 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21413 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21414 new_path="$unix_path" 21415 fi 21416 21417 21418 # Now try to locate executable using which 21419 new_path=`$WHICH "$new_path" 2> /dev/null` 21420 21421 if test "x$new_path" = x; then 21422 # Oops. Which didn't find the executable. 21423 # The splitting of arguments from the executable at a space might have been incorrect, 21424 # since paths with space are more likely in Windows. Give it another try with the whole 21425 # argument. 21426 path="$complete" 21427 arguments="EOL" 21428 new_path="$path" 21429 21430 windows_path="$new_path" 21431 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21432 unix_path=`$CYGPATH -u "$windows_path"` 21433 new_path="$unix_path" 21434 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21435 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21436 new_path="$unix_path" 21437 fi 21438 21439 21440 new_path=`$WHICH "$new_path" 2> /dev/null` 21441 21442 if test "x$new_path" = x; then 21443 # It's still not found. Now this is an unrecoverable error. 21444 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 21445 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 21446 has_space=`$ECHO "$complete" | $GREP " "` 21447 if test "x$has_space" != x; then 21448 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21449 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21450 fi 21451 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21452 fi 21453 fi 21454 21455 # Now new_path has a complete unix path to the binary 21456 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 21457 # Keep paths in /bin as-is, but remove trailing .exe if any 21458 new_path="${new_path/%.exe/}" 21459 # Do not save /bin paths to all_fixpath_prefixes! 21460 else 21461 # Not in mixed or Windows style, start by that. 21462 new_path=`cmd //c echo $new_path` 21463 21464 input_path="$new_path" 21465 # Check if we need to convert this using DOS-style short mode. If the path 21466 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21467 # take no chances and rewrite it. 21468 # Note: m4 eats our [], so we need to use [ and ] instead. 21469 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 21470 if test "x$has_forbidden_chars" != x; then 21471 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21472 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21473 fi 21474 21475 # Output is in $new_path 21476 21477 windows_path="$new_path" 21478 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21479 unix_path=`$CYGPATH -u "$windows_path"` 21480 new_path="$unix_path" 21481 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21482 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21483 new_path="$unix_path" 21484 fi 21485 21486 # remove trailing .exe if any 21487 new_path="${new_path/%.exe/}" 21488 21489 # Save the first 10 bytes of this path to the storage, so fixpath can work. 21490 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 21491 fi 21492 21493 else 21494 # We're on a posix platform. Hooray! :) 21495 # First separate the path from the arguments. This will split at the first 21496 # space. 21497 complete="$PROPER_COMPILER_CXX" 21498 path="${complete%% *}" 21499 tmp="$complete EOL" 21500 arguments="${tmp#* }" 21501 21502 # Cannot rely on the command "which" here since it doesn't always work. 21503 is_absolute_path=`$ECHO "$path" | $GREP ^/` 21504 if test -z "$is_absolute_path"; then 21505 # Path to executable is not absolute. Find it. 21506 IFS_save="$IFS" 21507 IFS=: 21508 for p in $PATH; do 21509 if test -f "$p/$path" && test -x "$p/$path"; then 21510 new_path="$p/$path" 21511 break 21512 fi 21513 done 21514 IFS="$IFS_save" 21515 else 21516 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5 21517 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;} 21518 new_path="$path" 21519 fi 21520 21521 if test "x$new_path" = x; then 21522 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 21523 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 21524 has_space=`$ECHO "$complete" | $GREP " "` 21525 if test "x$has_space" != x; then 21526 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 21527 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 21528 fi 21529 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21530 fi 21531 fi 21532 21533 # Now join together the path and the arguments once again 21534 if test "x$arguments" != xEOL; then 21535 new_complete="$new_path ${arguments% *}" 21536 else 21537 new_complete="$new_path" 21538 fi 21539 21540 if test "x$complete" != "x$new_complete"; then 21541 PROPER_COMPILER_CXX="$new_complete" 21542 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 21543 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;} 21544 fi 21545 21546 PATH="$RETRY_COMPILER_SAVED_PATH" 21547 21548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5 21549 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; } 21550 21551 if test "x$OPENJDK_BUILD_OS" != xwindows; then 21552 # Follow a chain of symbolic links. Use readlink 21553 # where it exists, else fall back to horribly 21554 # complicated shell code. 21555 if test "x$READLINK_TESTED" != yes; then 21556 # On MacOSX there is a readlink tool with a different 21557 # purpose than the GNU readlink tool. Check the found readlink. 21558 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 21559 if test "x$ISGNU" = x; then 21560 # A readlink that we do not know how to use. 21561 # Are there other non-GNU readlinks out there? 21562 READLINK_TESTED=yes 21563 READLINK= 21564 fi 21565 fi 21566 21567 if test "x$READLINK" != x; then 21568 PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX` 21569 else 21570 # Save the current directory for restoring afterwards 21571 STARTDIR=$PWD 21572 COUNTER=0 21573 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX` 21574 sym_link_file=`$BASENAME $PROPER_COMPILER_CXX` 21575 cd $sym_link_dir 21576 # Use -P flag to resolve symlinks in directories. 21577 cd `$THEPWDCMD -P` 21578 sym_link_dir=`$THEPWDCMD -P` 21579 # Resolve file symlinks 21580 while test $COUNTER -lt 20; do 21581 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 21582 if test "x$ISLINK" == x; then 21583 # This is not a symbolic link! We are done! 21584 break 21585 fi 21586 # Again resolve directory symlinks since the target of the just found 21587 # link could be in a different directory 21588 cd `$DIRNAME $ISLINK` 21589 sym_link_dir=`$THEPWDCMD -P` 21590 sym_link_file=`$BASENAME $ISLINK` 21591 let COUNTER=COUNTER+1 21592 done 21593 cd $STARTDIR 21594 PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file 21595 fi 21596 fi 21597 21598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 21599 $as_echo "$PROPER_COMPILER_CXX" >&6; } 21600 CXX="$PROPER_COMPILER_CXX" 21601 else 21602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5 21603 $as_echo "no, keeping CXX" >&6; } 21604 CXX="$TEST_COMPILER" 21605 fi 21606 21607 COMPILER=$CXX 21608 COMPILER_NAME=$COMPILER_NAME 21609 21610 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 21611 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work 21612 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` 21613 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 21614 if test $? -ne 0; then 21615 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 21616 21617 { $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 21618 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} 21619 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 21620 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} 21621 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 21622 else 21623 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` 21624 COMPILER_VENDOR="Sun Studio" 21625 fi 21626 elif test "x$OPENJDK_TARGET_OS" = xwindows; then 21627 # First line typically looks something like: 21628 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 21629 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` 21630 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` 21631 COMPILER_VENDOR="Microsoft CL.EXE" 21632 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` 21633 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then 21634 if test "x$COMPILER_CPU_TEST" != "x80x86"; then 21635 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 21636 fi 21637 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 21638 if test "x$COMPILER_CPU_TEST" != "xx64"; then 21639 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 21640 fi 21641 fi 21642 else 21643 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 21644 # Check that this is likely to be GCC. 21645 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null 21646 if test $? -ne 0; then 21647 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 21648 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} 21649 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 21650 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} 21651 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 21652 fi 21653 21654 # First line typically looks something like: 21655 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 21656 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` 21657 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` 21658 fi 21659 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) 21660 CXX_VERSION="$COMPILER_VERSION" 21661 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) 21662 CXX_VENDOR="$COMPILER_VENDOR" 21663 21664 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 21665 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} 21666 21667 21668 # Now that we have resolved CXX ourself, let autoconf have its go at it 21669 ac_ext=cpp 21670 ac_cpp='$CXXCPP $CPPFLAGS' 21671 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21672 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21673 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21674 if test -z "$CXX"; then 21675 if test -n "$CCC"; then 21676 CXX=$CCC 21677 else 21678 if test -n "$ac_tool_prefix"; then 21679 for ac_prog in $CXX 21680 do 21681 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21682 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21684 $as_echo_n "checking for $ac_word... " >&6; } 21685 if ${ac_cv_prog_CXX+:} false; then : 21686 $as_echo_n "(cached) " >&6 21687 else 21688 if test -n "$CXX"; then 21689 ac_cv_prog_CXX="$CXX" # Let the user override the test. 21690 else 21691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21692 for as_dir in $PATH 21693 do 21694 IFS=$as_save_IFS 21695 test -z "$as_dir" && as_dir=. 21696 for ac_exec_ext in '' $ac_executable_extensions; do 21697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21698 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 21699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21700 break 2 21701 fi 21702 done 21703 done 21704 IFS=$as_save_IFS 21705 21706 fi 21707 fi 21708 CXX=$ac_cv_prog_CXX 21709 if test -n "$CXX"; then 21710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 21711 $as_echo "$CXX" >&6; } 21712 else 21713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21714 $as_echo "no" >&6; } 21715 fi 21716 21717 21718 test -n "$CXX" && break 21719 done 21720 fi 21721 if test -z "$CXX"; then 21722 ac_ct_CXX=$CXX 21723 for ac_prog in $CXX 21724 do 21725 # Extract the first word of "$ac_prog", so it can be a program name with args. 21726 set dummy $ac_prog; ac_word=$2 21727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21728 $as_echo_n "checking for $ac_word... " >&6; } 21729 if ${ac_cv_prog_ac_ct_CXX+:} false; then : 21730 $as_echo_n "(cached) " >&6 21731 else 21732 if test -n "$ac_ct_CXX"; then 21733 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 21734 else 21735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21736 for as_dir in $PATH 21737 do 21738 IFS=$as_save_IFS 21739 test -z "$as_dir" && as_dir=. 21740 for ac_exec_ext in '' $ac_executable_extensions; do 21741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21742 ac_cv_prog_ac_ct_CXX="$ac_prog" 21743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21744 break 2 21745 fi 21746 done 21747 done 21748 IFS=$as_save_IFS 21749 21750 fi 21751 fi 21752 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 21753 if test -n "$ac_ct_CXX"; then 21754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 21755 $as_echo "$ac_ct_CXX" >&6; } 21756 else 21757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21758 $as_echo "no" >&6; } 21759 fi 21760 21761 21762 test -n "$ac_ct_CXX" && break 21763 done 21764 21765 if test "x$ac_ct_CXX" = x; then 21766 CXX="g++" 21767 else 21768 case $cross_compiling:$ac_tool_warned in 21769 yes:) 21770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21771 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21772 ac_tool_warned=yes ;; 21773 esac 21774 CXX=$ac_ct_CXX 21775 fi 21776 fi 21777 21778 fi 21779 fi 21780 # Provide some information about the compiler. 21781 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 21782 set X $ac_compile 21783 ac_compiler=$2 21784 for ac_option in --version -v -V -qversion; do 21785 { { ac_try="$ac_compiler $ac_option >&5" 21786 case "(($ac_try" in 21787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21788 *) ac_try_echo=$ac_try;; 21789 esac 21790 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 21791 $as_echo "$ac_try_echo"; } >&5 21792 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 21793 ac_status=$? 21794 if test -s conftest.err; then 21795 sed '10a\ 21796 ... rest of stderr output deleted ... 21797 10q' conftest.err >conftest.er1 21798 cat conftest.er1 >&5 21799 fi 21800 rm -f conftest.er1 conftest.err 21801 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 21802 test $ac_status = 0; } 21803 done 21804 21805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 21806 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } 21807 if ${ac_cv_cxx_compiler_gnu+:} false; then : 21808 $as_echo_n "(cached) " >&6 21809 else 21810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21811 /* end confdefs.h. */ 21812 21813 int 21814 main () 21815 { 21816 #ifndef __GNUC__ 21817 choke me 21818 #endif 21819 21820 ; 21821 return 0; 21822 } 21823 _ACEOF 21824 if ac_fn_cxx_try_compile "$LINENO"; then : 21825 ac_compiler_gnu=yes 21826 else 21827 ac_compiler_gnu=no 21828 fi 21829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21830 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 21831 21832 fi 21833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 21834 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } 21835 if test $ac_compiler_gnu = yes; then 21836 GXX=yes 21837 else 21838 GXX= 21839 fi 21840 ac_test_CXXFLAGS=${CXXFLAGS+set} 21841 ac_save_CXXFLAGS=$CXXFLAGS 21842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 21843 $as_echo_n "checking whether $CXX accepts -g... " >&6; } 21844 if ${ac_cv_prog_cxx_g+:} false; then : 21845 $as_echo_n "(cached) " >&6 21846 else 21847 ac_save_cxx_werror_flag=$ac_cxx_werror_flag 21848 ac_cxx_werror_flag=yes 21849 ac_cv_prog_cxx_g=no 21850 CXXFLAGS="-g" 21851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21852 /* end confdefs.h. */ 21853 21854 int 21855 main () 21856 { 21857 21858 ; 21859 return 0; 21860 } 21861 _ACEOF 21862 if ac_fn_cxx_try_compile "$LINENO"; then : 21863 ac_cv_prog_cxx_g=yes 21864 else 21865 CXXFLAGS="" 21866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21867 /* end confdefs.h. */ 21868 21869 int 21870 main () 21871 { 21872 21873 ; 21874 return 0; 21875 } 21876 _ACEOF 21877 if ac_fn_cxx_try_compile "$LINENO"; then : 21878 21879 else 21880 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21881 CXXFLAGS="-g" 21882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21883 /* end confdefs.h. */ 21884 21885 int 21886 main () 21887 { 21888 21889 ; 21890 return 0; 21891 } 21892 _ACEOF 21893 if ac_fn_cxx_try_compile "$LINENO"; then : 21894 ac_cv_prog_cxx_g=yes 21895 fi 21896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21897 fi 21898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21899 fi 21900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21901 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21902 fi 21903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 21904 $as_echo "$ac_cv_prog_cxx_g" >&6; } 21905 if test "$ac_test_CXXFLAGS" = set; then 21906 CXXFLAGS=$ac_save_CXXFLAGS 21907 elif test $ac_cv_prog_cxx_g = yes; then 21908 if test "$GXX" = yes; then 21909 CXXFLAGS="-g -O2" 21910 else 21911 CXXFLAGS="-g" 21912 fi 21913 else 21914 if test "$GXX" = yes; then 21915 CXXFLAGS="-O2" 21916 else 21917 CXXFLAGS= 21918 fi 21919 fi 21920 ac_ext=cpp 21921 ac_cpp='$CXXCPP $CPPFLAGS' 21922 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21923 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21924 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21925 21926 21927 ### Locate other tools 21928 21929 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 21930 ac_ext=m 21931 ac_cpp='$OBJCPP $CPPFLAGS' 21932 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21933 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21934 ac_compiler_gnu=$ac_cv_objc_compiler_gnu 21935 if test -n "$ac_tool_prefix"; then 21936 for ac_prog in gcc objcc objc cc CC 21937 do 21938 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21939 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21941 $as_echo_n "checking for $ac_word... " >&6; } 21942 if ${ac_cv_prog_OBJC+:} false; then : 21943 $as_echo_n "(cached) " >&6 21944 else 21945 if test -n "$OBJC"; then 21946 ac_cv_prog_OBJC="$OBJC" # Let the user override the test. 21947 else 21948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21949 for as_dir in $PATH 21950 do 21951 IFS=$as_save_IFS 21952 test -z "$as_dir" && as_dir=. 21953 for ac_exec_ext in '' $ac_executable_extensions; do 21954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21955 ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" 21956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21957 break 2 21958 fi 21959 done 21960 done 21961 IFS=$as_save_IFS 21962 21963 fi 21964 fi 21965 OBJC=$ac_cv_prog_OBJC 21966 if test -n "$OBJC"; then 21967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 21968 $as_echo "$OBJC" >&6; } 21969 else 21970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21971 $as_echo "no" >&6; } 21972 fi 21973 21974 21975 test -n "$OBJC" && break 21976 done 21977 fi 21978 if test -z "$OBJC"; then 21979 ac_ct_OBJC=$OBJC 21980 for ac_prog in gcc objcc objc cc CC 21981 do 21982 # Extract the first word of "$ac_prog", so it can be a program name with args. 21983 set dummy $ac_prog; ac_word=$2 21984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21985 $as_echo_n "checking for $ac_word... " >&6; } 21986 if ${ac_cv_prog_ac_ct_OBJC+:} false; then : 21987 $as_echo_n "(cached) " >&6 21988 else 21989 if test -n "$ac_ct_OBJC"; then 21990 ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. 21991 else 21992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21993 for as_dir in $PATH 21994 do 21995 IFS=$as_save_IFS 21996 test -z "$as_dir" && as_dir=. 21997 for ac_exec_ext in '' $ac_executable_extensions; do 21998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21999 ac_cv_prog_ac_ct_OBJC="$ac_prog" 22000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22001 break 2 22002 fi 22003 done 22004 done 22005 IFS=$as_save_IFS 22006 22007 fi 22008 fi 22009 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC 22010 if test -n "$ac_ct_OBJC"; then 22011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 22012 $as_echo "$ac_ct_OBJC" >&6; } 22013 else 22014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22015 $as_echo "no" >&6; } 22016 fi 22017 22018 22019 test -n "$ac_ct_OBJC" && break 22020 done 22021 22022 if test "x$ac_ct_OBJC" = x; then 22023 OBJC="gcc" 22024 else 22025 case $cross_compiling:$ac_tool_warned in 22026 yes:) 22027 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 22028 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 22029 ac_tool_warned=yes ;; 22030 esac 22031 OBJC=$ac_ct_OBJC 22032 fi 22033 fi 22034 22035 # Provide some information about the compiler. 22036 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 22037 set X $ac_compile 22038 ac_compiler=$2 22039 for ac_option in --version -v -V -qversion; do 22040 { { ac_try="$ac_compiler $ac_option >&5" 22041 case "(($ac_try" in 22042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22043 *) ac_try_echo=$ac_try;; 22044 esac 22045 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 22046 $as_echo "$ac_try_echo"; } >&5 22047 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 22048 ac_status=$? 22049 if test -s conftest.err; then 22050 sed '10a\ 22051 ... rest of stderr output deleted ... 22052 10q' conftest.err >conftest.er1 22053 cat conftest.er1 >&5 22054 fi 22055 rm -f conftest.er1 conftest.err 22056 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 22057 test $ac_status = 0; } 22058 done 22059 22060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5 22061 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; } 22062 if ${ac_cv_objc_compiler_gnu+:} false; then : 22063 $as_echo_n "(cached) " >&6 22064 else 22065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22066 /* end confdefs.h. */ 22067 22068 int 22069 main () 22070 { 22071 #ifndef __GNUC__ 22072 choke me 22073 #endif 22074 22075 ; 22076 return 0; 22077 } 22078 _ACEOF 22079 if ac_fn_objc_try_compile "$LINENO"; then : 22080 ac_compiler_gnu=yes 22081 else 22082 ac_compiler_gnu=no 22083 fi 22084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22085 ac_cv_objc_compiler_gnu=$ac_compiler_gnu 22086 22087 fi 22088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 22089 $as_echo "$ac_cv_objc_compiler_gnu" >&6; } 22090 if test $ac_compiler_gnu = yes; then 22091 GOBJC=yes 22092 else 22093 GOBJC= 22094 fi 22095 ac_test_OBJCFLAGS=${OBJCFLAGS+set} 22096 ac_save_OBJCFLAGS=$OBJCFLAGS 22097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 22098 $as_echo_n "checking whether $OBJC accepts -g... " >&6; } 22099 if ${ac_cv_prog_objc_g+:} false; then : 22100 $as_echo_n "(cached) " >&6 22101 else 22102 ac_save_objc_werror_flag=$ac_objc_werror_flag 22103 ac_objc_werror_flag=yes 22104 ac_cv_prog_objc_g=no 22105 OBJCFLAGS="-g" 22106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22107 /* end confdefs.h. */ 22108 22109 int 22110 main () 22111 { 22112 22113 ; 22114 return 0; 22115 } 22116 _ACEOF 22117 if ac_fn_objc_try_compile "$LINENO"; then : 22118 ac_cv_prog_objc_g=yes 22119 else 22120 OBJCFLAGS="" 22121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22122 /* end confdefs.h. */ 22123 22124 int 22125 main () 22126 { 22127 22128 ; 22129 return 0; 22130 } 22131 _ACEOF 22132 if ac_fn_objc_try_compile "$LINENO"; then : 22133 22134 else 22135 ac_objc_werror_flag=$ac_save_objc_werror_flag 22136 OBJCFLAGS="-g" 22137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22138 /* end confdefs.h. */ 22139 22140 int 22141 main () 22142 { 22143 22144 ; 22145 return 0; 22146 } 22147 _ACEOF 22148 if ac_fn_objc_try_compile "$LINENO"; then : 22149 ac_cv_prog_objc_g=yes 22150 fi 22151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22152 fi 22153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22154 fi 22155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22156 ac_objc_werror_flag=$ac_save_objc_werror_flag 22157 fi 22158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 22159 $as_echo "$ac_cv_prog_objc_g" >&6; } 22160 if test "$ac_test_OBJCFLAGS" = set; then 22161 OBJCFLAGS=$ac_save_OBJCFLAGS 22162 elif test $ac_cv_prog_objc_g = yes; then 22163 if test "$GOBJC" = yes; then 22164 OBJCFLAGS="-g -O2" 22165 else 22166 OBJCFLAGS="-g" 22167 fi 22168 else 22169 if test "$GOBJC" = yes; then 22170 OBJCFLAGS="-O2" 22171 else 22172 OBJCFLAGS= 22173 fi 22174 fi 22175 ac_ext=cpp 22176 ac_cpp='$CXXCPP $CPPFLAGS' 22177 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 22178 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 22179 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 22180 22181 22182 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22183 22184 # First separate the path from the arguments. This will split at the first 22185 # space. 22186 complete="$OBJC" 22187 path="${complete%% *}" 22188 tmp="$complete EOL" 22189 arguments="${tmp#* }" 22190 22191 # Input might be given as Windows format, start by converting to 22192 # unix format. 22193 new_path=`$CYGPATH -u "$path"` 22194 22195 # Now try to locate executable using which 22196 new_path=`$WHICH "$new_path" 2> /dev/null` 22197 # bat and cmd files are not always considered executable in cygwin causing which 22198 # to not find them 22199 if test "x$new_path" = x \ 22200 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22201 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22202 new_path=`$CYGPATH -u "$path"` 22203 fi 22204 if test "x$new_path" = x; then 22205 # Oops. Which didn't find the executable. 22206 # The splitting of arguments from the executable at a space might have been incorrect, 22207 # since paths with space are more likely in Windows. Give it another try with the whole 22208 # argument. 22209 path="$complete" 22210 arguments="EOL" 22211 new_path=`$CYGPATH -u "$path"` 22212 new_path=`$WHICH "$new_path" 2> /dev/null` 22213 # bat and cmd files are not always considered executable in cygwin causing which 22214 # to not find them 22215 if test "x$new_path" = x \ 22216 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22217 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22218 new_path=`$CYGPATH -u "$path"` 22219 fi 22220 if test "x$new_path" = x; then 22221 # It's still not found. Now this is an unrecoverable error. 22222 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 22223 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 22224 has_space=`$ECHO "$complete" | $GREP " "` 22225 if test "x$has_space" != x; then 22226 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22227 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22228 fi 22229 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 22230 fi 22231 fi 22232 22233 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22234 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22235 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22236 # "foo.exe" is OK but "foo" is an error. 22237 # 22238 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22239 # It is also a way to make sure we got the proper file name for the real test later on. 22240 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22241 if test "x$test_shortpath" = x; then 22242 # Short path failed, file does not exist as specified. 22243 # Try adding .exe or .cmd 22244 if test -f "${new_path}.exe"; then 22245 input_to_shortpath="${new_path}.exe" 22246 elif test -f "${new_path}.cmd"; then 22247 input_to_shortpath="${new_path}.cmd" 22248 else 22249 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5 22250 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;} 22251 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22252 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22253 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 22254 fi 22255 else 22256 input_to_shortpath="$new_path" 22257 fi 22258 22259 # Call helper function which possibly converts this using DOS-style short mode. 22260 # If so, the updated path is stored in $new_path. 22261 new_path="$input_to_shortpath" 22262 22263 input_path="$input_to_shortpath" 22264 # Check if we need to convert this using DOS-style short mode. If the path 22265 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22266 # take no chances and rewrite it. 22267 # Note: m4 eats our [], so we need to use [ and ] instead. 22268 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22269 if test "x$has_forbidden_chars" != x; then 22270 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22271 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22272 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22273 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22274 # Going to short mode and back again did indeed matter. Since short mode is 22275 # case insensitive, let's make it lowercase to improve readability. 22276 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22277 # Now convert it back to Unix-stile (cygpath) 22278 input_path=`$CYGPATH -u "$shortmode_path"` 22279 new_path="$input_path" 22280 fi 22281 fi 22282 22283 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22284 if test "x$test_cygdrive_prefix" = x; then 22285 # As a simple fix, exclude /usr/bin since it's not a real path. 22286 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22287 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22288 # a path prefixed by /cygdrive for fixpath to work. 22289 new_path="$CYGWIN_ROOT_PATH$input_path" 22290 fi 22291 fi 22292 22293 # remove trailing .exe if any 22294 new_path="${new_path/%.exe/}" 22295 22296 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22297 22298 # First separate the path from the arguments. This will split at the first 22299 # space. 22300 complete="$OBJC" 22301 path="${complete%% *}" 22302 tmp="$complete EOL" 22303 arguments="${tmp#* }" 22304 22305 # Input might be given as Windows format, start by converting to 22306 # unix format. 22307 new_path="$path" 22308 22309 windows_path="$new_path" 22310 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22311 unix_path=`$CYGPATH -u "$windows_path"` 22312 new_path="$unix_path" 22313 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22314 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22315 new_path="$unix_path" 22316 fi 22317 22318 22319 # Now try to locate executable using which 22320 new_path=`$WHICH "$new_path" 2> /dev/null` 22321 22322 if test "x$new_path" = x; then 22323 # Oops. Which didn't find the executable. 22324 # The splitting of arguments from the executable at a space might have been incorrect, 22325 # since paths with space are more likely in Windows. Give it another try with the whole 22326 # argument. 22327 path="$complete" 22328 arguments="EOL" 22329 new_path="$path" 22330 22331 windows_path="$new_path" 22332 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22333 unix_path=`$CYGPATH -u "$windows_path"` 22334 new_path="$unix_path" 22335 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22336 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22337 new_path="$unix_path" 22338 fi 22339 22340 22341 new_path=`$WHICH "$new_path" 2> /dev/null` 22342 22343 if test "x$new_path" = x; then 22344 # It's still not found. Now this is an unrecoverable error. 22345 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 22346 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 22347 has_space=`$ECHO "$complete" | $GREP " "` 22348 if test "x$has_space" != x; then 22349 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22350 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22351 fi 22352 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 22353 fi 22354 fi 22355 22356 # Now new_path has a complete unix path to the binary 22357 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22358 # Keep paths in /bin as-is, but remove trailing .exe if any 22359 new_path="${new_path/%.exe/}" 22360 # Do not save /bin paths to all_fixpath_prefixes! 22361 else 22362 # Not in mixed or Windows style, start by that. 22363 new_path=`cmd //c echo $new_path` 22364 22365 input_path="$new_path" 22366 # Check if we need to convert this using DOS-style short mode. If the path 22367 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22368 # take no chances and rewrite it. 22369 # Note: m4 eats our [], so we need to use [ and ] instead. 22370 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22371 if test "x$has_forbidden_chars" != x; then 22372 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22373 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22374 fi 22375 22376 # Output is in $new_path 22377 22378 windows_path="$new_path" 22379 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22380 unix_path=`$CYGPATH -u "$windows_path"` 22381 new_path="$unix_path" 22382 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22383 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22384 new_path="$unix_path" 22385 fi 22386 22387 # remove trailing .exe if any 22388 new_path="${new_path/%.exe/}" 22389 22390 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22391 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22392 fi 22393 22394 else 22395 # We're on a posix platform. Hooray! :) 22396 # First separate the path from the arguments. This will split at the first 22397 # space. 22398 complete="$OBJC" 22399 path="${complete%% *}" 22400 tmp="$complete EOL" 22401 arguments="${tmp#* }" 22402 22403 # Cannot rely on the command "which" here since it doesn't always work. 22404 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22405 if test -z "$is_absolute_path"; then 22406 # Path to executable is not absolute. Find it. 22407 IFS_save="$IFS" 22408 IFS=: 22409 for p in $PATH; do 22410 if test -f "$p/$path" && test -x "$p/$path"; then 22411 new_path="$p/$path" 22412 break 22413 fi 22414 done 22415 IFS="$IFS_save" 22416 else 22417 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5 22418 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;} 22419 new_path="$path" 22420 fi 22421 22422 if test "x$new_path" = x; then 22423 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 22424 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 22425 has_space=`$ECHO "$complete" | $GREP " "` 22426 if test "x$has_space" != x; then 22427 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 22428 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 22429 fi 22430 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 22431 fi 22432 fi 22433 22434 # Now join together the path and the arguments once again 22435 if test "x$arguments" != xEOL; then 22436 new_complete="$new_path ${arguments% *}" 22437 else 22438 new_complete="$new_path" 22439 fi 22440 22441 if test "x$complete" != "x$new_complete"; then 22442 OBJC="$new_complete" 22443 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5 22444 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;} 22445 fi 22446 22447 else 22448 OBJC= 22449 fi 22450 22451 # Restore the flags to the user specified values. 22452 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" 22453 CFLAGS="$ORG_CFLAGS" 22454 CXXFLAGS="$ORG_CXXFLAGS" 22455 OBJCFLAGS="$ORG_OBJCFLAGS" 22456 22457 LD="$CC" 22458 LDEXE="$CC" 22459 LDCXX="$CXX" 22460 LDEXECXX="$CXX" 22461 22462 # LDEXE is the linker to use, when creating executables. 22463 22464 # Linking C++ libraries. 22465 22466 # Linking C++ executables. 22467 22468 22469 if test "x$OPENJDK_TARGET_OS" != xwindows; then 22470 if test -n "$ac_tool_prefix"; then 22471 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 22472 set dummy ${ac_tool_prefix}ar; ac_word=$2 22473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22474 $as_echo_n "checking for $ac_word... " >&6; } 22475 if ${ac_cv_prog_AR+:} false; then : 22476 $as_echo_n "(cached) " >&6 22477 else 22478 if test -n "$AR"; then 22479 ac_cv_prog_AR="$AR" # Let the user override the test. 22480 else 22481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22482 for as_dir in $PATH 22483 do 22484 IFS=$as_save_IFS 22485 test -z "$as_dir" && as_dir=. 22486 for ac_exec_ext in '' $ac_executable_extensions; do 22487 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 22488 ac_cv_prog_AR="${ac_tool_prefix}ar" 22489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22490 break 2 22491 fi 22492 done 22493 done 22494 IFS=$as_save_IFS 22495 22496 fi 22497 fi 22498 AR=$ac_cv_prog_AR 22499 if test -n "$AR"; then 22500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 22501 $as_echo "$AR" >&6; } 22502 else 22503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22504 $as_echo "no" >&6; } 22505 fi 22506 22507 22508 fi 22509 if test -z "$ac_cv_prog_AR"; then 22510 ac_ct_AR=$AR 22511 # Extract the first word of "ar", so it can be a program name with args. 22512 set dummy ar; ac_word=$2 22513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22514 $as_echo_n "checking for $ac_word... " >&6; } 22515 if ${ac_cv_prog_ac_ct_AR+:} false; then : 22516 $as_echo_n "(cached) " >&6 22517 else 22518 if test -n "$ac_ct_AR"; then 22519 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 22520 else 22521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22522 for as_dir in $PATH 22523 do 22524 IFS=$as_save_IFS 22525 test -z "$as_dir" && as_dir=. 22526 for ac_exec_ext in '' $ac_executable_extensions; do 22527 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 22528 ac_cv_prog_ac_ct_AR="ar" 22529 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22530 break 2 22531 fi 22532 done 22533 done 22534 IFS=$as_save_IFS 22535 22536 fi 22537 fi 22538 ac_ct_AR=$ac_cv_prog_ac_ct_AR 22539 if test -n "$ac_ct_AR"; then 22540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 22541 $as_echo "$ac_ct_AR" >&6; } 22542 else 22543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22544 $as_echo "no" >&6; } 22545 fi 22546 22547 if test "x$ac_ct_AR" = x; then 22548 AR="" 22549 else 22550 case $cross_compiling:$ac_tool_warned in 22551 yes:) 22552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 22553 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 22554 ac_tool_warned=yes ;; 22555 esac 22556 AR=$ac_ct_AR 22557 fi 22558 else 22559 AR="$ac_cv_prog_AR" 22560 fi 22561 22562 22563 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22564 22565 # First separate the path from the arguments. This will split at the first 22566 # space. 22567 complete="$AR" 22568 path="${complete%% *}" 22569 tmp="$complete EOL" 22570 arguments="${tmp#* }" 22571 22572 # Input might be given as Windows format, start by converting to 22573 # unix format. 22574 new_path=`$CYGPATH -u "$path"` 22575 22576 # Now try to locate executable using which 22577 new_path=`$WHICH "$new_path" 2> /dev/null` 22578 # bat and cmd files are not always considered executable in cygwin causing which 22579 # to not find them 22580 if test "x$new_path" = x \ 22581 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22582 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22583 new_path=`$CYGPATH -u "$path"` 22584 fi 22585 if test "x$new_path" = x; then 22586 # Oops. Which didn't find the executable. 22587 # The splitting of arguments from the executable at a space might have been incorrect, 22588 # since paths with space are more likely in Windows. Give it another try with the whole 22589 # argument. 22590 path="$complete" 22591 arguments="EOL" 22592 new_path=`$CYGPATH -u "$path"` 22593 new_path=`$WHICH "$new_path" 2> /dev/null` 22594 # bat and cmd files are not always considered executable in cygwin causing which 22595 # to not find them 22596 if test "x$new_path" = x \ 22597 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22598 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22599 new_path=`$CYGPATH -u "$path"` 22600 fi 22601 if test "x$new_path" = x; then 22602 # It's still not found. Now this is an unrecoverable error. 22603 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22604 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22605 has_space=`$ECHO "$complete" | $GREP " "` 22606 if test "x$has_space" != x; then 22607 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22608 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22609 fi 22610 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22611 fi 22612 fi 22613 22614 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22615 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22616 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22617 # "foo.exe" is OK but "foo" is an error. 22618 # 22619 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22620 # It is also a way to make sure we got the proper file name for the real test later on. 22621 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22622 if test "x$test_shortpath" = x; then 22623 # Short path failed, file does not exist as specified. 22624 # Try adding .exe or .cmd 22625 if test -f "${new_path}.exe"; then 22626 input_to_shortpath="${new_path}.exe" 22627 elif test -f "${new_path}.cmd"; then 22628 input_to_shortpath="${new_path}.cmd" 22629 else 22630 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5 22631 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;} 22632 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22633 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22634 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22635 fi 22636 else 22637 input_to_shortpath="$new_path" 22638 fi 22639 22640 # Call helper function which possibly converts this using DOS-style short mode. 22641 # If so, the updated path is stored in $new_path. 22642 new_path="$input_to_shortpath" 22643 22644 input_path="$input_to_shortpath" 22645 # Check if we need to convert this using DOS-style short mode. If the path 22646 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22647 # take no chances and rewrite it. 22648 # Note: m4 eats our [], so we need to use [ and ] instead. 22649 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22650 if test "x$has_forbidden_chars" != x; then 22651 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22652 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22653 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22654 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22655 # Going to short mode and back again did indeed matter. Since short mode is 22656 # case insensitive, let's make it lowercase to improve readability. 22657 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22658 # Now convert it back to Unix-stile (cygpath) 22659 input_path=`$CYGPATH -u "$shortmode_path"` 22660 new_path="$input_path" 22661 fi 22662 fi 22663 22664 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22665 if test "x$test_cygdrive_prefix" = x; then 22666 # As a simple fix, exclude /usr/bin since it's not a real path. 22667 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22668 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22669 # a path prefixed by /cygdrive for fixpath to work. 22670 new_path="$CYGWIN_ROOT_PATH$input_path" 22671 fi 22672 fi 22673 22674 # remove trailing .exe if any 22675 new_path="${new_path/%.exe/}" 22676 22677 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22678 22679 # First separate the path from the arguments. This will split at the first 22680 # space. 22681 complete="$AR" 22682 path="${complete%% *}" 22683 tmp="$complete EOL" 22684 arguments="${tmp#* }" 22685 22686 # Input might be given as Windows format, start by converting to 22687 # unix format. 22688 new_path="$path" 22689 22690 windows_path="$new_path" 22691 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22692 unix_path=`$CYGPATH -u "$windows_path"` 22693 new_path="$unix_path" 22694 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22695 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22696 new_path="$unix_path" 22697 fi 22698 22699 22700 # Now try to locate executable using which 22701 new_path=`$WHICH "$new_path" 2> /dev/null` 22702 22703 if test "x$new_path" = x; then 22704 # Oops. Which didn't find the executable. 22705 # The splitting of arguments from the executable at a space might have been incorrect, 22706 # since paths with space are more likely in Windows. Give it another try with the whole 22707 # argument. 22708 path="$complete" 22709 arguments="EOL" 22710 new_path="$path" 22711 22712 windows_path="$new_path" 22713 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22714 unix_path=`$CYGPATH -u "$windows_path"` 22715 new_path="$unix_path" 22716 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22717 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22718 new_path="$unix_path" 22719 fi 22720 22721 22722 new_path=`$WHICH "$new_path" 2> /dev/null` 22723 22724 if test "x$new_path" = x; then 22725 # It's still not found. Now this is an unrecoverable error. 22726 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22727 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22728 has_space=`$ECHO "$complete" | $GREP " "` 22729 if test "x$has_space" != x; then 22730 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22731 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22732 fi 22733 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22734 fi 22735 fi 22736 22737 # Now new_path has a complete unix path to the binary 22738 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22739 # Keep paths in /bin as-is, but remove trailing .exe if any 22740 new_path="${new_path/%.exe/}" 22741 # Do not save /bin paths to all_fixpath_prefixes! 22742 else 22743 # Not in mixed or Windows style, start by that. 22744 new_path=`cmd //c echo $new_path` 22745 22746 input_path="$new_path" 22747 # Check if we need to convert this using DOS-style short mode. If the path 22748 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22749 # take no chances and rewrite it. 22750 # Note: m4 eats our [], so we need to use [ and ] instead. 22751 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22752 if test "x$has_forbidden_chars" != x; then 22753 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22754 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22755 fi 22756 22757 # Output is in $new_path 22758 22759 windows_path="$new_path" 22760 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22761 unix_path=`$CYGPATH -u "$windows_path"` 22762 new_path="$unix_path" 22763 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22764 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22765 new_path="$unix_path" 22766 fi 22767 22768 # remove trailing .exe if any 22769 new_path="${new_path/%.exe/}" 22770 22771 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22772 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22773 fi 22774 22775 else 22776 # We're on a posix platform. Hooray! :) 22777 # First separate the path from the arguments. This will split at the first 22778 # space. 22779 complete="$AR" 22780 path="${complete%% *}" 22781 tmp="$complete EOL" 22782 arguments="${tmp#* }" 22783 22784 # Cannot rely on the command "which" here since it doesn't always work. 22785 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22786 if test -z "$is_absolute_path"; then 22787 # Path to executable is not absolute. Find it. 22788 IFS_save="$IFS" 22789 IFS=: 22790 for p in $PATH; do 22791 if test -f "$p/$path" && test -x "$p/$path"; then 22792 new_path="$p/$path" 22793 break 22794 fi 22795 done 22796 IFS="$IFS_save" 22797 else 22798 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5 22799 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;} 22800 new_path="$path" 22801 fi 22802 22803 if test "x$new_path" = x; then 22804 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22805 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22806 has_space=`$ECHO "$complete" | $GREP " "` 22807 if test "x$has_space" != x; then 22808 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 22809 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 22810 fi 22811 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22812 fi 22813 fi 22814 22815 # Now join together the path and the arguments once again 22816 if test "x$arguments" != xEOL; then 22817 new_complete="$new_path ${arguments% *}" 22818 else 22819 new_complete="$new_path" 22820 fi 22821 22822 if test "x$complete" != "x$new_complete"; then 22823 AR="$new_complete" 22824 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5 22825 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;} 22826 fi 22827 22828 fi 22829 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 22830 ARFLAGS="-r" 22831 else 22832 ARFLAGS="" 22833 fi 22834 22835 22836 # For hotspot, we need these in Windows mixed path; other platforms keep them the same 22837 HOTSPOT_CXX="$CXX" 22838 HOTSPOT_LD="$LD" 22839 22840 22841 22842 COMPILER_NAME=gcc 22843 COMPILER_TYPE=CC 22844 if test "x$OPENJDK_TARGET_OS" = xwindows; then : 22845 22846 # For now, assume that we are always compiling using cl.exe. 22847 CC_OUT_OPTION=-Fo 22848 EXE_OUT_OPTION=-out: 22849 LD_OUT_OPTION=-out: 22850 AR_OUT_OPTION=-out: 22851 # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin 22852 # program for something completely different. 22853 # Extract the first word of "link", so it can be a program name with args. 22854 set dummy link; ac_word=$2 22855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22856 $as_echo_n "checking for $ac_word... " >&6; } 22857 if ${ac_cv_prog_WINLD+:} false; then : 22858 $as_echo_n "(cached) " >&6 22859 else 22860 if test -n "$WINLD"; then 22861 ac_cv_prog_WINLD="$WINLD" # Let the user override the test. 22862 else 22863 ac_prog_rejected=no 22864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22865 for as_dir in $PATH 22866 do 22867 IFS=$as_save_IFS 22868 test -z "$as_dir" && as_dir=. 22869 for ac_exec_ext in '' $ac_executable_extensions; do 22870 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 22871 if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then 22872 ac_prog_rejected=yes 22873 continue 22874 fi 22875 ac_cv_prog_WINLD="link" 22876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22877 break 2 22878 fi 22879 done 22880 done 22881 IFS=$as_save_IFS 22882 22883 if test $ac_prog_rejected = yes; then 22884 # We found a bogon in the path, so make sure we never use it. 22885 set dummy $ac_cv_prog_WINLD 22886 shift 22887 if test $# != 0; then 22888 # We chose a different compiler from the bogus one. 22889 # However, it has the same basename, so the bogon will be chosen 22890 # first if we set WINLD to just the basename; use the full file name. 22891 shift 22892 ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@" 22893 fi 22894 fi 22895 fi 22896 fi 22897 WINLD=$ac_cv_prog_WINLD 22898 if test -n "$WINLD"; then 22899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5 22900 $as_echo "$WINLD" >&6; } 22901 else 22902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22903 $as_echo "no" >&6; } 22904 fi 22905 22906 22907 # Since we must ignore the first found link, WINLD will contain 22908 # the full path to the link.exe program. 22909 22910 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22911 22912 # First separate the path from the arguments. This will split at the first 22913 # space. 22914 complete="$WINLD" 22915 path="${complete%% *}" 22916 tmp="$complete EOL" 22917 arguments="${tmp#* }" 22918 22919 # Input might be given as Windows format, start by converting to 22920 # unix format. 22921 new_path=`$CYGPATH -u "$path"` 22922 22923 # Now try to locate executable using which 22924 new_path=`$WHICH "$new_path" 2> /dev/null` 22925 # bat and cmd files are not always considered executable in cygwin causing which 22926 # to not find them 22927 if test "x$new_path" = x \ 22928 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22929 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22930 new_path=`$CYGPATH -u "$path"` 22931 fi 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=`$CYGPATH -u "$path"` 22940 new_path=`$WHICH "$new_path" 2> /dev/null` 22941 # bat and cmd files are not always considered executable in cygwin causing which 22942 # to not find them 22943 if test "x$new_path" = x \ 22944 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22945 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22946 new_path=`$CYGPATH -u "$path"` 22947 fi 22948 if test "x$new_path" = x; then 22949 # It's still not found. Now this is an unrecoverable error. 22950 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22951 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22952 has_space=`$ECHO "$complete" | $GREP " "` 22953 if test "x$has_space" != x; then 22954 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22955 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22956 fi 22957 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22958 fi 22959 fi 22960 22961 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22962 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22963 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22964 # "foo.exe" is OK but "foo" is an error. 22965 # 22966 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22967 # It is also a way to make sure we got the proper file name for the real test later on. 22968 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22969 if test "x$test_shortpath" = x; then 22970 # Short path failed, file does not exist as specified. 22971 # Try adding .exe or .cmd 22972 if test -f "${new_path}.exe"; then 22973 input_to_shortpath="${new_path}.exe" 22974 elif test -f "${new_path}.cmd"; then 22975 input_to_shortpath="${new_path}.cmd" 22976 else 22977 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5 22978 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;} 22979 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22980 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22981 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22982 fi 22983 else 22984 input_to_shortpath="$new_path" 22985 fi 22986 22987 # Call helper function which possibly converts this using DOS-style short mode. 22988 # If so, the updated path is stored in $new_path. 22989 new_path="$input_to_shortpath" 22990 22991 input_path="$input_to_shortpath" 22992 # Check if we need to convert this using DOS-style short mode. If the path 22993 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22994 # take no chances and rewrite it. 22995 # Note: m4 eats our [], so we need to use [ and ] instead. 22996 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22997 if test "x$has_forbidden_chars" != x; then 22998 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22999 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23000 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23001 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23002 # Going to short mode and back again did indeed matter. Since short mode is 23003 # case insensitive, let's make it lowercase to improve readability. 23004 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23005 # Now convert it back to Unix-stile (cygpath) 23006 input_path=`$CYGPATH -u "$shortmode_path"` 23007 new_path="$input_path" 23008 fi 23009 fi 23010 23011 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23012 if test "x$test_cygdrive_prefix" = x; then 23013 # As a simple fix, exclude /usr/bin since it's not a real path. 23014 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23015 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23016 # a path prefixed by /cygdrive for fixpath to work. 23017 new_path="$CYGWIN_ROOT_PATH$input_path" 23018 fi 23019 fi 23020 23021 # remove trailing .exe if any 23022 new_path="${new_path/%.exe/}" 23023 23024 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23025 23026 # First separate the path from the arguments. This will split at the first 23027 # space. 23028 complete="$WINLD" 23029 path="${complete%% *}" 23030 tmp="$complete EOL" 23031 arguments="${tmp#* }" 23032 23033 # Input might be given as Windows format, start by converting to 23034 # unix format. 23035 new_path="$path" 23036 23037 windows_path="$new_path" 23038 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23039 unix_path=`$CYGPATH -u "$windows_path"` 23040 new_path="$unix_path" 23041 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23042 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23043 new_path="$unix_path" 23044 fi 23045 23046 23047 # Now try to locate executable using which 23048 new_path=`$WHICH "$new_path" 2> /dev/null` 23049 23050 if test "x$new_path" = x; then 23051 # Oops. Which didn't find the executable. 23052 # The splitting of arguments from the executable at a space might have been incorrect, 23053 # since paths with space are more likely in Windows. Give it another try with the whole 23054 # argument. 23055 path="$complete" 23056 arguments="EOL" 23057 new_path="$path" 23058 23059 windows_path="$new_path" 23060 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23061 unix_path=`$CYGPATH -u "$windows_path"` 23062 new_path="$unix_path" 23063 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23064 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23065 new_path="$unix_path" 23066 fi 23067 23068 23069 new_path=`$WHICH "$new_path" 2> /dev/null` 23070 23071 if test "x$new_path" = x; then 23072 # It's still not found. Now this is an unrecoverable error. 23073 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 23074 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 23075 has_space=`$ECHO "$complete" | $GREP " "` 23076 if test "x$has_space" != x; then 23077 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23078 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23079 fi 23080 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 23081 fi 23082 fi 23083 23084 # Now new_path has a complete unix path to the binary 23085 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23086 # Keep paths in /bin as-is, but remove trailing .exe if any 23087 new_path="${new_path/%.exe/}" 23088 # Do not save /bin paths to all_fixpath_prefixes! 23089 else 23090 # Not in mixed or Windows style, start by that. 23091 new_path=`cmd //c echo $new_path` 23092 23093 input_path="$new_path" 23094 # Check if we need to convert this using DOS-style short mode. If the path 23095 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23096 # take no chances and rewrite it. 23097 # Note: m4 eats our [], so we need to use [ and ] instead. 23098 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23099 if test "x$has_forbidden_chars" != x; then 23100 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23101 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23102 fi 23103 23104 # Output is in $new_path 23105 23106 windows_path="$new_path" 23107 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23108 unix_path=`$CYGPATH -u "$windows_path"` 23109 new_path="$unix_path" 23110 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23111 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23112 new_path="$unix_path" 23113 fi 23114 23115 # remove trailing .exe if any 23116 new_path="${new_path/%.exe/}" 23117 23118 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23119 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23120 fi 23121 23122 else 23123 # We're on a posix platform. Hooray! :) 23124 # First separate the path from the arguments. This will split at the first 23125 # space. 23126 complete="$WINLD" 23127 path="${complete%% *}" 23128 tmp="$complete EOL" 23129 arguments="${tmp#* }" 23130 23131 # Cannot rely on the command "which" here since it doesn't always work. 23132 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23133 if test -z "$is_absolute_path"; then 23134 # Path to executable is not absolute. Find it. 23135 IFS_save="$IFS" 23136 IFS=: 23137 for p in $PATH; do 23138 if test -f "$p/$path" && test -x "$p/$path"; then 23139 new_path="$p/$path" 23140 break 23141 fi 23142 done 23143 IFS="$IFS_save" 23144 else 23145 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5 23146 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;} 23147 new_path="$path" 23148 fi 23149 23150 if test "x$new_path" = x; then 23151 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 23152 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 23153 has_space=`$ECHO "$complete" | $GREP " "` 23154 if test "x$has_space" != x; then 23155 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23156 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23157 fi 23158 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 23159 fi 23160 fi 23161 23162 # Now join together the path and the arguments once again 23163 if test "x$arguments" != xEOL; then 23164 new_complete="$new_path ${arguments% *}" 23165 else 23166 new_complete="$new_path" 23167 fi 23168 23169 if test "x$complete" != "x$new_complete"; then 23170 WINLD="$new_complete" 23171 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5 23172 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;} 23173 fi 23174 23175 printf "Windows linker was found at $WINLD\n" 23176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5 23177 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; } 23178 "$WINLD" --version > /dev/null 23179 if test $? -eq 0 ; then 23180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23181 $as_echo "no" >&6; } 23182 as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5 23183 else 23184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 23185 $as_echo "yes" >&6; } 23186 fi 23187 LD="$WINLD" 23188 LDEXE="$WINLD" 23189 LDCXX="$WINLD" 23190 LDEXECXX="$WINLD" 23191 23192 # Extract the first word of "mt", so it can be a program name with args. 23193 set dummy mt; ac_word=$2 23194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23195 $as_echo_n "checking for $ac_word... " >&6; } 23196 if ${ac_cv_prog_MT+:} false; then : 23197 $as_echo_n "(cached) " >&6 23198 else 23199 if test -n "$MT"; then 23200 ac_cv_prog_MT="$MT" # Let the user override the test. 23201 else 23202 ac_prog_rejected=no 23203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23204 for as_dir in $PATH 23205 do 23206 IFS=$as_save_IFS 23207 test -z "$as_dir" && as_dir=. 23208 for ac_exec_ext in '' $ac_executable_extensions; do 23209 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 23210 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then 23211 ac_prog_rejected=yes 23212 continue 23213 fi 23214 ac_cv_prog_MT="mt" 23215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23216 break 2 23217 fi 23218 done 23219 done 23220 IFS=$as_save_IFS 23221 23222 if test $ac_prog_rejected = yes; then 23223 # We found a bogon in the path, so make sure we never use it. 23224 set dummy $ac_cv_prog_MT 23225 shift 23226 if test $# != 0; then 23227 # We chose a different compiler from the bogus one. 23228 # However, it has the same basename, so the bogon will be chosen 23229 # first if we set MT to just the basename; use the full file name. 23230 shift 23231 ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@" 23232 fi 23233 fi 23234 fi 23235 fi 23236 MT=$ac_cv_prog_MT 23237 if test -n "$MT"; then 23238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5 23239 $as_echo "$MT" >&6; } 23240 else 23241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23242 $as_echo "no" >&6; } 23243 fi 23244 23245 23246 23247 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23248 23249 # First separate the path from the arguments. This will split at the first 23250 # space. 23251 complete="$MT" 23252 path="${complete%% *}" 23253 tmp="$complete EOL" 23254 arguments="${tmp#* }" 23255 23256 # Input might be given as Windows format, start by converting to 23257 # unix format. 23258 new_path=`$CYGPATH -u "$path"` 23259 23260 # Now try to locate executable using which 23261 new_path=`$WHICH "$new_path" 2> /dev/null` 23262 # bat and cmd files are not always considered executable in cygwin causing which 23263 # to not find them 23264 if test "x$new_path" = x \ 23265 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23266 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23267 new_path=`$CYGPATH -u "$path"` 23268 fi 23269 if test "x$new_path" = x; then 23270 # Oops. Which didn't find the executable. 23271 # The splitting of arguments from the executable at a space might have been incorrect, 23272 # since paths with space are more likely in Windows. Give it another try with the whole 23273 # argument. 23274 path="$complete" 23275 arguments="EOL" 23276 new_path=`$CYGPATH -u "$path"` 23277 new_path=`$WHICH "$new_path" 2> /dev/null` 23278 # bat and cmd files are not always considered executable in cygwin causing which 23279 # to not find them 23280 if test "x$new_path" = x \ 23281 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23282 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23283 new_path=`$CYGPATH -u "$path"` 23284 fi 23285 if test "x$new_path" = x; then 23286 # It's still not found. Now this is an unrecoverable error. 23287 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 23288 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 23289 has_space=`$ECHO "$complete" | $GREP " "` 23290 if test "x$has_space" != x; then 23291 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23292 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23293 fi 23294 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23295 fi 23296 fi 23297 23298 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23299 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23300 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23301 # "foo.exe" is OK but "foo" is an error. 23302 # 23303 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23304 # It is also a way to make sure we got the proper file name for the real test later on. 23305 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23306 if test "x$test_shortpath" = x; then 23307 # Short path failed, file does not exist as specified. 23308 # Try adding .exe or .cmd 23309 if test -f "${new_path}.exe"; then 23310 input_to_shortpath="${new_path}.exe" 23311 elif test -f "${new_path}.cmd"; then 23312 input_to_shortpath="${new_path}.cmd" 23313 else 23314 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5 23315 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;} 23316 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23317 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23318 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23319 fi 23320 else 23321 input_to_shortpath="$new_path" 23322 fi 23323 23324 # Call helper function which possibly converts this using DOS-style short mode. 23325 # If so, the updated path is stored in $new_path. 23326 new_path="$input_to_shortpath" 23327 23328 input_path="$input_to_shortpath" 23329 # Check if we need to convert this using DOS-style short mode. If the path 23330 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23331 # take no chances and rewrite it. 23332 # Note: m4 eats our [], so we need to use [ and ] instead. 23333 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23334 if test "x$has_forbidden_chars" != x; then 23335 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23336 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23337 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23338 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23339 # Going to short mode and back again did indeed matter. Since short mode is 23340 # case insensitive, let's make it lowercase to improve readability. 23341 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23342 # Now convert it back to Unix-stile (cygpath) 23343 input_path=`$CYGPATH -u "$shortmode_path"` 23344 new_path="$input_path" 23345 fi 23346 fi 23347 23348 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23349 if test "x$test_cygdrive_prefix" = x; then 23350 # As a simple fix, exclude /usr/bin since it's not a real path. 23351 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23352 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23353 # a path prefixed by /cygdrive for fixpath to work. 23354 new_path="$CYGWIN_ROOT_PATH$input_path" 23355 fi 23356 fi 23357 23358 # remove trailing .exe if any 23359 new_path="${new_path/%.exe/}" 23360 23361 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23362 23363 # First separate the path from the arguments. This will split at the first 23364 # space. 23365 complete="$MT" 23366 path="${complete%% *}" 23367 tmp="$complete EOL" 23368 arguments="${tmp#* }" 23369 23370 # Input might be given as Windows format, start by converting to 23371 # unix format. 23372 new_path="$path" 23373 23374 windows_path="$new_path" 23375 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23376 unix_path=`$CYGPATH -u "$windows_path"` 23377 new_path="$unix_path" 23378 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23379 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23380 new_path="$unix_path" 23381 fi 23382 23383 23384 # Now try to locate executable using which 23385 new_path=`$WHICH "$new_path" 2> /dev/null` 23386 23387 if test "x$new_path" = x; then 23388 # Oops. Which didn't find the executable. 23389 # The splitting of arguments from the executable at a space might have been incorrect, 23390 # since paths with space are more likely in Windows. Give it another try with the whole 23391 # argument. 23392 path="$complete" 23393 arguments="EOL" 23394 new_path="$path" 23395 23396 windows_path="$new_path" 23397 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23398 unix_path=`$CYGPATH -u "$windows_path"` 23399 new_path="$unix_path" 23400 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23401 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23402 new_path="$unix_path" 23403 fi 23404 23405 23406 new_path=`$WHICH "$new_path" 2> /dev/null` 23407 23408 if test "x$new_path" = x; then 23409 # It's still not found. Now this is an unrecoverable error. 23410 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 23411 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 23412 has_space=`$ECHO "$complete" | $GREP " "` 23413 if test "x$has_space" != x; then 23414 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23415 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23416 fi 23417 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23418 fi 23419 fi 23420 23421 # Now new_path has a complete unix path to the binary 23422 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23423 # Keep paths in /bin as-is, but remove trailing .exe if any 23424 new_path="${new_path/%.exe/}" 23425 # Do not save /bin paths to all_fixpath_prefixes! 23426 else 23427 # Not in mixed or Windows style, start by that. 23428 new_path=`cmd //c echo $new_path` 23429 23430 input_path="$new_path" 23431 # Check if we need to convert this using DOS-style short mode. If the path 23432 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23433 # take no chances and rewrite it. 23434 # Note: m4 eats our [], so we need to use [ and ] instead. 23435 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23436 if test "x$has_forbidden_chars" != x; then 23437 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23438 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23439 fi 23440 23441 # Output is in $new_path 23442 23443 windows_path="$new_path" 23444 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23445 unix_path=`$CYGPATH -u "$windows_path"` 23446 new_path="$unix_path" 23447 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23448 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23449 new_path="$unix_path" 23450 fi 23451 23452 # remove trailing .exe if any 23453 new_path="${new_path/%.exe/}" 23454 23455 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23456 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23457 fi 23458 23459 else 23460 # We're on a posix platform. Hooray! :) 23461 # First separate the path from the arguments. This will split at the first 23462 # space. 23463 complete="$MT" 23464 path="${complete%% *}" 23465 tmp="$complete EOL" 23466 arguments="${tmp#* }" 23467 23468 # Cannot rely on the command "which" here since it doesn't always work. 23469 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23470 if test -z "$is_absolute_path"; then 23471 # Path to executable is not absolute. Find it. 23472 IFS_save="$IFS" 23473 IFS=: 23474 for p in $PATH; do 23475 if test -f "$p/$path" && test -x "$p/$path"; then 23476 new_path="$p/$path" 23477 break 23478 fi 23479 done 23480 IFS="$IFS_save" 23481 else 23482 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5 23483 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;} 23484 new_path="$path" 23485 fi 23486 23487 if test "x$new_path" = x; then 23488 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 23489 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 23490 has_space=`$ECHO "$complete" | $GREP " "` 23491 if test "x$has_space" != x; then 23492 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23493 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23494 fi 23495 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23496 fi 23497 fi 23498 23499 # Now join together the path and the arguments once again 23500 if test "x$arguments" != xEOL; then 23501 new_complete="$new_path ${arguments% *}" 23502 else 23503 new_complete="$new_path" 23504 fi 23505 23506 if test "x$complete" != "x$new_complete"; then 23507 MT="$new_complete" 23508 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5 23509 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;} 23510 fi 23511 23512 # The resource compiler 23513 # Extract the first word of "rc", so it can be a program name with args. 23514 set dummy rc; ac_word=$2 23515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23516 $as_echo_n "checking for $ac_word... " >&6; } 23517 if ${ac_cv_prog_RC+:} false; then : 23518 $as_echo_n "(cached) " >&6 23519 else 23520 if test -n "$RC"; then 23521 ac_cv_prog_RC="$RC" # Let the user override the test. 23522 else 23523 ac_prog_rejected=no 23524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23525 for as_dir in $PATH 23526 do 23527 IFS=$as_save_IFS 23528 test -z "$as_dir" && as_dir=. 23529 for ac_exec_ext in '' $ac_executable_extensions; do 23530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 23531 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then 23532 ac_prog_rejected=yes 23533 continue 23534 fi 23535 ac_cv_prog_RC="rc" 23536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23537 break 2 23538 fi 23539 done 23540 done 23541 IFS=$as_save_IFS 23542 23543 if test $ac_prog_rejected = yes; then 23544 # We found a bogon in the path, so make sure we never use it. 23545 set dummy $ac_cv_prog_RC 23546 shift 23547 if test $# != 0; then 23548 # We chose a different compiler from the bogus one. 23549 # However, it has the same basename, so the bogon will be chosen 23550 # first if we set RC to just the basename; use the full file name. 23551 shift 23552 ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@" 23553 fi 23554 fi 23555 fi 23556 fi 23557 RC=$ac_cv_prog_RC 23558 if test -n "$RC"; then 23559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 23560 $as_echo "$RC" >&6; } 23561 else 23562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23563 $as_echo "no" >&6; } 23564 fi 23565 23566 23567 23568 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23569 23570 # First separate the path from the arguments. This will split at the first 23571 # space. 23572 complete="$RC" 23573 path="${complete%% *}" 23574 tmp="$complete EOL" 23575 arguments="${tmp#* }" 23576 23577 # Input might be given as Windows format, start by converting to 23578 # unix format. 23579 new_path=`$CYGPATH -u "$path"` 23580 23581 # Now try to locate executable using which 23582 new_path=`$WHICH "$new_path" 2> /dev/null` 23583 # bat and cmd files are not always considered executable in cygwin causing which 23584 # to not find them 23585 if test "x$new_path" = x \ 23586 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23587 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23588 new_path=`$CYGPATH -u "$path"` 23589 fi 23590 if test "x$new_path" = x; then 23591 # Oops. Which didn't find the executable. 23592 # The splitting of arguments from the executable at a space might have been incorrect, 23593 # since paths with space are more likely in Windows. Give it another try with the whole 23594 # argument. 23595 path="$complete" 23596 arguments="EOL" 23597 new_path=`$CYGPATH -u "$path"` 23598 new_path=`$WHICH "$new_path" 2> /dev/null` 23599 # bat and cmd files are not always considered executable in cygwin causing which 23600 # to not find them 23601 if test "x$new_path" = x \ 23602 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23603 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23604 new_path=`$CYGPATH -u "$path"` 23605 fi 23606 if test "x$new_path" = x; then 23607 # It's still not found. Now this is an unrecoverable error. 23608 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23609 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23610 has_space=`$ECHO "$complete" | $GREP " "` 23611 if test "x$has_space" != x; then 23612 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23614 fi 23615 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23616 fi 23617 fi 23618 23619 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23620 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23621 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23622 # "foo.exe" is OK but "foo" is an error. 23623 # 23624 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23625 # It is also a way to make sure we got the proper file name for the real test later on. 23626 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23627 if test "x$test_shortpath" = x; then 23628 # Short path failed, file does not exist as specified. 23629 # Try adding .exe or .cmd 23630 if test -f "${new_path}.exe"; then 23631 input_to_shortpath="${new_path}.exe" 23632 elif test -f "${new_path}.cmd"; then 23633 input_to_shortpath="${new_path}.cmd" 23634 else 23635 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5 23636 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;} 23637 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23638 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23639 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23640 fi 23641 else 23642 input_to_shortpath="$new_path" 23643 fi 23644 23645 # Call helper function which possibly converts this using DOS-style short mode. 23646 # If so, the updated path is stored in $new_path. 23647 new_path="$input_to_shortpath" 23648 23649 input_path="$input_to_shortpath" 23650 # Check if we need to convert this using DOS-style short mode. If the path 23651 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23652 # take no chances and rewrite it. 23653 # Note: m4 eats our [], so we need to use [ and ] instead. 23654 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23655 if test "x$has_forbidden_chars" != x; then 23656 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23657 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23658 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23659 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23660 # Going to short mode and back again did indeed matter. Since short mode is 23661 # case insensitive, let's make it lowercase to improve readability. 23662 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23663 # Now convert it back to Unix-stile (cygpath) 23664 input_path=`$CYGPATH -u "$shortmode_path"` 23665 new_path="$input_path" 23666 fi 23667 fi 23668 23669 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23670 if test "x$test_cygdrive_prefix" = x; then 23671 # As a simple fix, exclude /usr/bin since it's not a real path. 23672 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23673 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23674 # a path prefixed by /cygdrive for fixpath to work. 23675 new_path="$CYGWIN_ROOT_PATH$input_path" 23676 fi 23677 fi 23678 23679 # remove trailing .exe if any 23680 new_path="${new_path/%.exe/}" 23681 23682 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23683 23684 # First separate the path from the arguments. This will split at the first 23685 # space. 23686 complete="$RC" 23687 path="${complete%% *}" 23688 tmp="$complete EOL" 23689 arguments="${tmp#* }" 23690 23691 # Input might be given as Windows format, start by converting to 23692 # unix format. 23693 new_path="$path" 23694 23695 windows_path="$new_path" 23696 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23697 unix_path=`$CYGPATH -u "$windows_path"` 23698 new_path="$unix_path" 23699 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23700 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23701 new_path="$unix_path" 23702 fi 23703 23704 23705 # Now try to locate executable using which 23706 new_path=`$WHICH "$new_path" 2> /dev/null` 23707 23708 if test "x$new_path" = x; then 23709 # Oops. Which didn't find the executable. 23710 # The splitting of arguments from the executable at a space might have been incorrect, 23711 # since paths with space are more likely in Windows. Give it another try with the whole 23712 # argument. 23713 path="$complete" 23714 arguments="EOL" 23715 new_path="$path" 23716 23717 windows_path="$new_path" 23718 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23719 unix_path=`$CYGPATH -u "$windows_path"` 23720 new_path="$unix_path" 23721 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23722 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23723 new_path="$unix_path" 23724 fi 23725 23726 23727 new_path=`$WHICH "$new_path" 2> /dev/null` 23728 23729 if test "x$new_path" = x; then 23730 # It's still not found. Now this is an unrecoverable error. 23731 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23732 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23733 has_space=`$ECHO "$complete" | $GREP " "` 23734 if test "x$has_space" != x; then 23735 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23736 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23737 fi 23738 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23739 fi 23740 fi 23741 23742 # Now new_path has a complete unix path to the binary 23743 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23744 # Keep paths in /bin as-is, but remove trailing .exe if any 23745 new_path="${new_path/%.exe/}" 23746 # Do not save /bin paths to all_fixpath_prefixes! 23747 else 23748 # Not in mixed or Windows style, start by that. 23749 new_path=`cmd //c echo $new_path` 23750 23751 input_path="$new_path" 23752 # Check if we need to convert this using DOS-style short mode. If the path 23753 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23754 # take no chances and rewrite it. 23755 # Note: m4 eats our [], so we need to use [ and ] instead. 23756 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23757 if test "x$has_forbidden_chars" != x; then 23758 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23759 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23760 fi 23761 23762 # Output is in $new_path 23763 23764 windows_path="$new_path" 23765 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23766 unix_path=`$CYGPATH -u "$windows_path"` 23767 new_path="$unix_path" 23768 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23769 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23770 new_path="$unix_path" 23771 fi 23772 23773 # remove trailing .exe if any 23774 new_path="${new_path/%.exe/}" 23775 23776 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23777 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23778 fi 23779 23780 else 23781 # We're on a posix platform. Hooray! :) 23782 # First separate the path from the arguments. This will split at the first 23783 # space. 23784 complete="$RC" 23785 path="${complete%% *}" 23786 tmp="$complete EOL" 23787 arguments="${tmp#* }" 23788 23789 # Cannot rely on the command "which" here since it doesn't always work. 23790 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23791 if test -z "$is_absolute_path"; then 23792 # Path to executable is not absolute. Find it. 23793 IFS_save="$IFS" 23794 IFS=: 23795 for p in $PATH; do 23796 if test -f "$p/$path" && test -x "$p/$path"; then 23797 new_path="$p/$path" 23798 break 23799 fi 23800 done 23801 IFS="$IFS_save" 23802 else 23803 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5 23804 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;} 23805 new_path="$path" 23806 fi 23807 23808 if test "x$new_path" = x; then 23809 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23810 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23811 has_space=`$ECHO "$complete" | $GREP " "` 23812 if test "x$has_space" != x; then 23813 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23814 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23815 fi 23816 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23817 fi 23818 fi 23819 23820 # Now join together the path and the arguments once again 23821 if test "x$arguments" != xEOL; then 23822 new_complete="$new_path ${arguments% *}" 23823 else 23824 new_complete="$new_path" 23825 fi 23826 23827 if test "x$complete" != "x$new_complete"; then 23828 RC="$new_complete" 23829 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5 23830 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;} 23831 fi 23832 23833 23834 # For hotspot, we need these in Windows mixed path, 23835 # so rewrite them all. Need added .exe suffix. 23836 HOTSPOT_CXX="$CXX.exe" 23837 HOTSPOT_LD="$LD.exe" 23838 HOTSPOT_MT="$MT.exe" 23839 HOTSPOT_RC="$RC.exe" 23840 23841 unix_path="$HOTSPOT_CXX" 23842 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23843 windows_path=`$CYGPATH -m "$unix_path"` 23844 HOTSPOT_CXX="$windows_path" 23845 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23846 windows_path=`cmd //c echo $unix_path` 23847 HOTSPOT_CXX="$windows_path" 23848 fi 23849 23850 23851 unix_path="$HOTSPOT_LD" 23852 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23853 windows_path=`$CYGPATH -m "$unix_path"` 23854 HOTSPOT_LD="$windows_path" 23855 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23856 windows_path=`cmd //c echo $unix_path` 23857 HOTSPOT_LD="$windows_path" 23858 fi 23859 23860 23861 unix_path="$HOTSPOT_MT" 23862 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23863 windows_path=`$CYGPATH -m "$unix_path"` 23864 HOTSPOT_MT="$windows_path" 23865 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23866 windows_path=`cmd //c echo $unix_path` 23867 HOTSPOT_MT="$windows_path" 23868 fi 23869 23870 23871 unix_path="$HOTSPOT_RC" 23872 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23873 windows_path=`$CYGPATH -m "$unix_path"` 23874 HOTSPOT_RC="$windows_path" 23875 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23876 windows_path=`cmd //c echo $unix_path` 23877 HOTSPOT_RC="$windows_path" 23878 fi 23879 23880 23881 23882 23883 RC_FLAGS="-nologo -l 0x409 -r" 23884 if test "x$VARIANT" = xOPT; then : 23885 23886 RC_FLAGS="$RC_FLAGS -d NDEBUG" 23887 23888 fi 23889 23890 # The version variables used to create RC_FLAGS may be overridden 23891 # in a custom configure script, or possibly the command line. 23892 # Let those variables be expanded at make time in spec.gmk. 23893 # The \$ are escaped to the shell, and the $(...) variables 23894 # are evaluated by make. 23895 RC_FLAGS="$RC_FLAGS \ 23896 -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \ 23897 -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \ 23898 -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ 23899 -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \ 23900 -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ 23901 -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \ 23902 -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\"" 23903 23904 # lib.exe is used to create static libraries. 23905 # Extract the first word of "lib", so it can be a program name with args. 23906 set dummy lib; ac_word=$2 23907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23908 $as_echo_n "checking for $ac_word... " >&6; } 23909 if ${ac_cv_prog_WINAR+:} false; then : 23910 $as_echo_n "(cached) " >&6 23911 else 23912 if test -n "$WINAR"; then 23913 ac_cv_prog_WINAR="$WINAR" # Let the user override the test. 23914 else 23915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23916 for as_dir in $PATH 23917 do 23918 IFS=$as_save_IFS 23919 test -z "$as_dir" && as_dir=. 23920 for ac_exec_ext in '' $ac_executable_extensions; do 23921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 23922 ac_cv_prog_WINAR="lib" 23923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23924 break 2 23925 fi 23926 done 23927 done 23928 IFS=$as_save_IFS 23929 23930 fi 23931 fi 23932 WINAR=$ac_cv_prog_WINAR 23933 if test -n "$WINAR"; then 23934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5 23935 $as_echo "$WINAR" >&6; } 23936 else 23937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23938 $as_echo "no" >&6; } 23939 fi 23940 23941 23942 23943 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23944 23945 # First separate the path from the arguments. This will split at the first 23946 # space. 23947 complete="$WINAR" 23948 path="${complete%% *}" 23949 tmp="$complete EOL" 23950 arguments="${tmp#* }" 23951 23952 # Input might be given as Windows format, start by converting to 23953 # unix format. 23954 new_path=`$CYGPATH -u "$path"` 23955 23956 # Now try to locate executable using which 23957 new_path=`$WHICH "$new_path" 2> /dev/null` 23958 # bat and cmd files are not always considered executable in cygwin causing which 23959 # to not find them 23960 if test "x$new_path" = x \ 23961 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23962 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23963 new_path=`$CYGPATH -u "$path"` 23964 fi 23965 if test "x$new_path" = x; then 23966 # Oops. Which didn't find the executable. 23967 # The splitting of arguments from the executable at a space might have been incorrect, 23968 # since paths with space are more likely in Windows. Give it another try with the whole 23969 # argument. 23970 path="$complete" 23971 arguments="EOL" 23972 new_path=`$CYGPATH -u "$path"` 23973 new_path=`$WHICH "$new_path" 2> /dev/null` 23974 # bat and cmd files are not always considered executable in cygwin causing which 23975 # to not find them 23976 if test "x$new_path" = x \ 23977 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23978 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23979 new_path=`$CYGPATH -u "$path"` 23980 fi 23981 if test "x$new_path" = x; then 23982 # It's still not found. Now this is an unrecoverable error. 23983 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23984 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23985 has_space=`$ECHO "$complete" | $GREP " "` 23986 if test "x$has_space" != x; then 23987 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23988 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23989 fi 23990 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23991 fi 23992 fi 23993 23994 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23995 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23996 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23997 # "foo.exe" is OK but "foo" is an error. 23998 # 23999 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24000 # It is also a way to make sure we got the proper file name for the real test later on. 24001 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24002 if test "x$test_shortpath" = x; then 24003 # Short path failed, file does not exist as specified. 24004 # Try adding .exe or .cmd 24005 if test -f "${new_path}.exe"; then 24006 input_to_shortpath="${new_path}.exe" 24007 elif test -f "${new_path}.cmd"; then 24008 input_to_shortpath="${new_path}.cmd" 24009 else 24010 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5 24011 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;} 24012 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24013 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24014 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 24015 fi 24016 else 24017 input_to_shortpath="$new_path" 24018 fi 24019 24020 # Call helper function which possibly converts this using DOS-style short mode. 24021 # If so, the updated path is stored in $new_path. 24022 new_path="$input_to_shortpath" 24023 24024 input_path="$input_to_shortpath" 24025 # Check if we need to convert this using DOS-style short mode. If the path 24026 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24027 # take no chances and rewrite it. 24028 # Note: m4 eats our [], so we need to use [ and ] instead. 24029 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24030 if test "x$has_forbidden_chars" != x; then 24031 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24032 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24033 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24034 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24035 # Going to short mode and back again did indeed matter. Since short mode is 24036 # case insensitive, let's make it lowercase to improve readability. 24037 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24038 # Now convert it back to Unix-stile (cygpath) 24039 input_path=`$CYGPATH -u "$shortmode_path"` 24040 new_path="$input_path" 24041 fi 24042 fi 24043 24044 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24045 if test "x$test_cygdrive_prefix" = x; then 24046 # As a simple fix, exclude /usr/bin since it's not a real path. 24047 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24048 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24049 # a path prefixed by /cygdrive for fixpath to work. 24050 new_path="$CYGWIN_ROOT_PATH$input_path" 24051 fi 24052 fi 24053 24054 # remove trailing .exe if any 24055 new_path="${new_path/%.exe/}" 24056 24057 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24058 24059 # First separate the path from the arguments. This will split at the first 24060 # space. 24061 complete="$WINAR" 24062 path="${complete%% *}" 24063 tmp="$complete EOL" 24064 arguments="${tmp#* }" 24065 24066 # Input might be given as Windows format, start by converting to 24067 # unix format. 24068 new_path="$path" 24069 24070 windows_path="$new_path" 24071 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24072 unix_path=`$CYGPATH -u "$windows_path"` 24073 new_path="$unix_path" 24074 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24075 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24076 new_path="$unix_path" 24077 fi 24078 24079 24080 # Now try to locate executable using which 24081 new_path=`$WHICH "$new_path" 2> /dev/null` 24082 24083 if test "x$new_path" = x; then 24084 # Oops. Which didn't find the executable. 24085 # The splitting of arguments from the executable at a space might have been incorrect, 24086 # since paths with space are more likely in Windows. Give it another try with the whole 24087 # argument. 24088 path="$complete" 24089 arguments="EOL" 24090 new_path="$path" 24091 24092 windows_path="$new_path" 24093 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24094 unix_path=`$CYGPATH -u "$windows_path"` 24095 new_path="$unix_path" 24096 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24097 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24098 new_path="$unix_path" 24099 fi 24100 24101 24102 new_path=`$WHICH "$new_path" 2> /dev/null` 24103 24104 if test "x$new_path" = x; then 24105 # It's still not found. Now this is an unrecoverable error. 24106 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 24107 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 24108 has_space=`$ECHO "$complete" | $GREP " "` 24109 if test "x$has_space" != x; then 24110 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24111 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24112 fi 24113 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 24114 fi 24115 fi 24116 24117 # Now new_path has a complete unix path to the binary 24118 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24119 # Keep paths in /bin as-is, but remove trailing .exe if any 24120 new_path="${new_path/%.exe/}" 24121 # Do not save /bin paths to all_fixpath_prefixes! 24122 else 24123 # Not in mixed or Windows style, start by that. 24124 new_path=`cmd //c echo $new_path` 24125 24126 input_path="$new_path" 24127 # Check if we need to convert this using DOS-style short mode. If the path 24128 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24129 # take no chances and rewrite it. 24130 # Note: m4 eats our [], so we need to use [ and ] instead. 24131 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24132 if test "x$has_forbidden_chars" != x; then 24133 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24134 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24135 fi 24136 24137 # Output is in $new_path 24138 24139 windows_path="$new_path" 24140 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24141 unix_path=`$CYGPATH -u "$windows_path"` 24142 new_path="$unix_path" 24143 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24144 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24145 new_path="$unix_path" 24146 fi 24147 24148 # remove trailing .exe if any 24149 new_path="${new_path/%.exe/}" 24150 24151 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24152 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24153 fi 24154 24155 else 24156 # We're on a posix platform. Hooray! :) 24157 # First separate the path from the arguments. This will split at the first 24158 # space. 24159 complete="$WINAR" 24160 path="${complete%% *}" 24161 tmp="$complete EOL" 24162 arguments="${tmp#* }" 24163 24164 # Cannot rely on the command "which" here since it doesn't always work. 24165 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24166 if test -z "$is_absolute_path"; then 24167 # Path to executable is not absolute. Find it. 24168 IFS_save="$IFS" 24169 IFS=: 24170 for p in $PATH; do 24171 if test -f "$p/$path" && test -x "$p/$path"; then 24172 new_path="$p/$path" 24173 break 24174 fi 24175 done 24176 IFS="$IFS_save" 24177 else 24178 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5 24179 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;} 24180 new_path="$path" 24181 fi 24182 24183 if test "x$new_path" = x; then 24184 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 24185 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 24186 has_space=`$ECHO "$complete" | $GREP " "` 24187 if test "x$has_space" != x; then 24188 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24189 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24190 fi 24191 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 24192 fi 24193 fi 24194 24195 # Now join together the path and the arguments once again 24196 if test "x$arguments" != xEOL; then 24197 new_complete="$new_path ${arguments% *}" 24198 else 24199 new_complete="$new_path" 24200 fi 24201 24202 if test "x$complete" != "x$new_complete"; then 24203 WINAR="$new_complete" 24204 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5 24205 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;} 24206 fi 24207 24208 AR="$WINAR" 24209 ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" 24210 24211 # Extract the first word of "dumpbin", so it can be a program name with args. 24212 set dummy dumpbin; ac_word=$2 24213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 24214 $as_echo_n "checking for $ac_word... " >&6; } 24215 if ${ac_cv_prog_DUMPBIN+:} false; then : 24216 $as_echo_n "(cached) " >&6 24217 else 24218 if test -n "$DUMPBIN"; then 24219 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. 24220 else 24221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 24222 for as_dir in $PATH 24223 do 24224 IFS=$as_save_IFS 24225 test -z "$as_dir" && as_dir=. 24226 for ac_exec_ext in '' $ac_executable_extensions; do 24227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 24228 ac_cv_prog_DUMPBIN="dumpbin" 24229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 24230 break 2 24231 fi 24232 done 24233 done 24234 IFS=$as_save_IFS 24235 24236 fi 24237 fi 24238 DUMPBIN=$ac_cv_prog_DUMPBIN 24239 if test -n "$DUMPBIN"; then 24240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 24241 $as_echo "$DUMPBIN" >&6; } 24242 else 24243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 24244 $as_echo "no" >&6; } 24245 fi 24246 24247 24248 24249 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24250 24251 # First separate the path from the arguments. This will split at the first 24252 # space. 24253 complete="$DUMPBIN" 24254 path="${complete%% *}" 24255 tmp="$complete EOL" 24256 arguments="${tmp#* }" 24257 24258 # Input might be given as Windows format, start by converting to 24259 # unix format. 24260 new_path=`$CYGPATH -u "$path"` 24261 24262 # Now try to locate executable using which 24263 new_path=`$WHICH "$new_path" 2> /dev/null` 24264 # bat and cmd files are not always considered executable in cygwin causing which 24265 # to not find them 24266 if test "x$new_path" = x \ 24267 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24268 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24269 new_path=`$CYGPATH -u "$path"` 24270 fi 24271 if test "x$new_path" = x; then 24272 # Oops. Which didn't find the executable. 24273 # The splitting of arguments from the executable at a space might have been incorrect, 24274 # since paths with space are more likely in Windows. Give it another try with the whole 24275 # argument. 24276 path="$complete" 24277 arguments="EOL" 24278 new_path=`$CYGPATH -u "$path"` 24279 new_path=`$WHICH "$new_path" 2> /dev/null` 24280 # bat and cmd files are not always considered executable in cygwin causing which 24281 # to not find them 24282 if test "x$new_path" = x \ 24283 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24284 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24285 new_path=`$CYGPATH -u "$path"` 24286 fi 24287 if test "x$new_path" = x; then 24288 # It's still not found. Now this is an unrecoverable error. 24289 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 24290 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 24291 has_space=`$ECHO "$complete" | $GREP " "` 24292 if test "x$has_space" != x; then 24293 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24294 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24295 fi 24296 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24297 fi 24298 fi 24299 24300 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24301 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24302 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24303 # "foo.exe" is OK but "foo" is an error. 24304 # 24305 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24306 # It is also a way to make sure we got the proper file name for the real test later on. 24307 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24308 if test "x$test_shortpath" = x; then 24309 # Short path failed, file does not exist as specified. 24310 # Try adding .exe or .cmd 24311 if test -f "${new_path}.exe"; then 24312 input_to_shortpath="${new_path}.exe" 24313 elif test -f "${new_path}.cmd"; then 24314 input_to_shortpath="${new_path}.cmd" 24315 else 24316 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5 24317 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;} 24318 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24319 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24320 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24321 fi 24322 else 24323 input_to_shortpath="$new_path" 24324 fi 24325 24326 # Call helper function which possibly converts this using DOS-style short mode. 24327 # If so, the updated path is stored in $new_path. 24328 new_path="$input_to_shortpath" 24329 24330 input_path="$input_to_shortpath" 24331 # Check if we need to convert this using DOS-style short mode. If the path 24332 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24333 # take no chances and rewrite it. 24334 # Note: m4 eats our [], so we need to use [ and ] instead. 24335 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24336 if test "x$has_forbidden_chars" != x; then 24337 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24338 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24339 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24340 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24341 # Going to short mode and back again did indeed matter. Since short mode is 24342 # case insensitive, let's make it lowercase to improve readability. 24343 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24344 # Now convert it back to Unix-stile (cygpath) 24345 input_path=`$CYGPATH -u "$shortmode_path"` 24346 new_path="$input_path" 24347 fi 24348 fi 24349 24350 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24351 if test "x$test_cygdrive_prefix" = x; then 24352 # As a simple fix, exclude /usr/bin since it's not a real path. 24353 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24354 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24355 # a path prefixed by /cygdrive for fixpath to work. 24356 new_path="$CYGWIN_ROOT_PATH$input_path" 24357 fi 24358 fi 24359 24360 # remove trailing .exe if any 24361 new_path="${new_path/%.exe/}" 24362 24363 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24364 24365 # First separate the path from the arguments. This will split at the first 24366 # space. 24367 complete="$DUMPBIN" 24368 path="${complete%% *}" 24369 tmp="$complete EOL" 24370 arguments="${tmp#* }" 24371 24372 # Input might be given as Windows format, start by converting to 24373 # unix format. 24374 new_path="$path" 24375 24376 windows_path="$new_path" 24377 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24378 unix_path=`$CYGPATH -u "$windows_path"` 24379 new_path="$unix_path" 24380 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24381 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24382 new_path="$unix_path" 24383 fi 24384 24385 24386 # Now try to locate executable using which 24387 new_path=`$WHICH "$new_path" 2> /dev/null` 24388 24389 if test "x$new_path" = x; then 24390 # Oops. Which didn't find the executable. 24391 # The splitting of arguments from the executable at a space might have been incorrect, 24392 # since paths with space are more likely in Windows. Give it another try with the whole 24393 # argument. 24394 path="$complete" 24395 arguments="EOL" 24396 new_path="$path" 24397 24398 windows_path="$new_path" 24399 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24400 unix_path=`$CYGPATH -u "$windows_path"` 24401 new_path="$unix_path" 24402 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24403 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24404 new_path="$unix_path" 24405 fi 24406 24407 24408 new_path=`$WHICH "$new_path" 2> /dev/null` 24409 24410 if test "x$new_path" = x; then 24411 # It's still not found. Now this is an unrecoverable error. 24412 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 24413 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 24414 has_space=`$ECHO "$complete" | $GREP " "` 24415 if test "x$has_space" != x; then 24416 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24417 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24418 fi 24419 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24420 fi 24421 fi 24422 24423 # Now new_path has a complete unix path to the binary 24424 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24425 # Keep paths in /bin as-is, but remove trailing .exe if any 24426 new_path="${new_path/%.exe/}" 24427 # Do not save /bin paths to all_fixpath_prefixes! 24428 else 24429 # Not in mixed or Windows style, start by that. 24430 new_path=`cmd //c echo $new_path` 24431 24432 input_path="$new_path" 24433 # Check if we need to convert this using DOS-style short mode. If the path 24434 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24435 # take no chances and rewrite it. 24436 # Note: m4 eats our [], so we need to use [ and ] instead. 24437 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24438 if test "x$has_forbidden_chars" != x; then 24439 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24440 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24441 fi 24442 24443 # Output is in $new_path 24444 24445 windows_path="$new_path" 24446 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24447 unix_path=`$CYGPATH -u "$windows_path"` 24448 new_path="$unix_path" 24449 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24450 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24451 new_path="$unix_path" 24452 fi 24453 24454 # remove trailing .exe if any 24455 new_path="${new_path/%.exe/}" 24456 24457 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24458 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24459 fi 24460 24461 else 24462 # We're on a posix platform. Hooray! :) 24463 # First separate the path from the arguments. This will split at the first 24464 # space. 24465 complete="$DUMPBIN" 24466 path="${complete%% *}" 24467 tmp="$complete EOL" 24468 arguments="${tmp#* }" 24469 24470 # Cannot rely on the command "which" here since it doesn't always work. 24471 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24472 if test -z "$is_absolute_path"; then 24473 # Path to executable is not absolute. Find it. 24474 IFS_save="$IFS" 24475 IFS=: 24476 for p in $PATH; do 24477 if test -f "$p/$path" && test -x "$p/$path"; then 24478 new_path="$p/$path" 24479 break 24480 fi 24481 done 24482 IFS="$IFS_save" 24483 else 24484 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5 24485 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;} 24486 new_path="$path" 24487 fi 24488 24489 if test "x$new_path" = x; then 24490 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 24491 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 24492 has_space=`$ECHO "$complete" | $GREP " "` 24493 if test "x$has_space" != x; then 24494 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24495 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24496 fi 24497 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24498 fi 24499 fi 24500 24501 # Now join together the path and the arguments once again 24502 if test "x$arguments" != xEOL; then 24503 new_complete="$new_path ${arguments% *}" 24504 else 24505 new_complete="$new_path" 24506 fi 24507 24508 if test "x$complete" != "x$new_complete"; then 24509 DUMPBIN="$new_complete" 24510 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5 24511 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;} 24512 fi 24513 24514 24515 COMPILER_TYPE=CL 24516 CCXXFLAGS="$CCXXFLAGS -nologo" 24517 24518 fi 24519 24520 24521 24522 ac_ext=c 24523 ac_cpp='$CPP $CPPFLAGS' 24524 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24525 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24526 ac_compiler_gnu=$ac_cv_c_compiler_gnu 24527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 24528 $as_echo_n "checking how to run the C preprocessor... " >&6; } 24529 # On Suns, sometimes $CPP names a directory. 24530 if test -n "$CPP" && test -d "$CPP"; then 24531 CPP= 24532 fi 24533 if test -z "$CPP"; then 24534 if ${ac_cv_prog_CPP+:} false; then : 24535 $as_echo_n "(cached) " >&6 24536 else 24537 # Double quotes because CPP needs to be expanded 24538 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 24539 do 24540 ac_preproc_ok=false 24541 for ac_c_preproc_warn_flag in '' yes 24542 do 24543 # Use a header file that comes with gcc, so configuring glibc 24544 # with a fresh cross-compiler works. 24545 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24546 # <limits.h> exists even on freestanding compilers. 24547 # On the NeXT, cc -E runs the code through the compiler's parser, 24548 # not just through cpp. "Syntax error" is here to catch this case. 24549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24550 /* end confdefs.h. */ 24551 #ifdef __STDC__ 24552 # include <limits.h> 24553 #else 24554 # include <assert.h> 24555 #endif 24556 Syntax error 24557 _ACEOF 24558 if ac_fn_c_try_cpp "$LINENO"; then : 24559 24560 else 24561 # Broken: fails on valid input. 24562 continue 24563 fi 24564 rm -f conftest.err conftest.i conftest.$ac_ext 24565 24566 # OK, works on sane cases. Now check whether nonexistent headers 24567 # can be detected and how. 24568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24569 /* end confdefs.h. */ 24570 #include <ac_nonexistent.h> 24571 _ACEOF 24572 if ac_fn_c_try_cpp "$LINENO"; then : 24573 # Broken: success on invalid input. 24574 continue 24575 else 24576 # Passes both tests. 24577 ac_preproc_ok=: 24578 break 24579 fi 24580 rm -f conftest.err conftest.i conftest.$ac_ext 24581 24582 done 24583 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24584 rm -f conftest.i conftest.err conftest.$ac_ext 24585 if $ac_preproc_ok; then : 24586 break 24587 fi 24588 24589 done 24590 ac_cv_prog_CPP=$CPP 24591 24592 fi 24593 CPP=$ac_cv_prog_CPP 24594 else 24595 ac_cv_prog_CPP=$CPP 24596 fi 24597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 24598 $as_echo "$CPP" >&6; } 24599 ac_preproc_ok=false 24600 for ac_c_preproc_warn_flag in '' yes 24601 do 24602 # Use a header file that comes with gcc, so configuring glibc 24603 # with a fresh cross-compiler works. 24604 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24605 # <limits.h> exists even on freestanding compilers. 24606 # On the NeXT, cc -E runs the code through the compiler's parser, 24607 # not just through cpp. "Syntax error" is here to catch this case. 24608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24609 /* end confdefs.h. */ 24610 #ifdef __STDC__ 24611 # include <limits.h> 24612 #else 24613 # include <assert.h> 24614 #endif 24615 Syntax error 24616 _ACEOF 24617 if ac_fn_c_try_cpp "$LINENO"; then : 24618 24619 else 24620 # Broken: fails on valid input. 24621 continue 24622 fi 24623 rm -f conftest.err conftest.i conftest.$ac_ext 24624 24625 # OK, works on sane cases. Now check whether nonexistent headers 24626 # can be detected and how. 24627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24628 /* end confdefs.h. */ 24629 #include <ac_nonexistent.h> 24630 _ACEOF 24631 if ac_fn_c_try_cpp "$LINENO"; then : 24632 # Broken: success on invalid input. 24633 continue 24634 else 24635 # Passes both tests. 24636 ac_preproc_ok=: 24637 break 24638 fi 24639 rm -f conftest.err conftest.i conftest.$ac_ext 24640 24641 done 24642 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24643 rm -f conftest.i conftest.err conftest.$ac_ext 24644 if $ac_preproc_ok; then : 24645 24646 else 24647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 24648 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 24649 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 24650 See \`config.log' for more details" "$LINENO" 5; } 24651 fi 24652 24653 ac_ext=cpp 24654 ac_cpp='$CXXCPP $CPPFLAGS' 24655 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24656 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24657 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24658 24659 24660 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24661 24662 # First separate the path from the arguments. This will split at the first 24663 # space. 24664 complete="$CPP" 24665 path="${complete%% *}" 24666 tmp="$complete EOL" 24667 arguments="${tmp#* }" 24668 24669 # Input might be given as Windows format, start by converting to 24670 # unix format. 24671 new_path=`$CYGPATH -u "$path"` 24672 24673 # Now try to locate executable using which 24674 new_path=`$WHICH "$new_path" 2> /dev/null` 24675 # bat and cmd files are not always considered executable in cygwin causing which 24676 # to not find them 24677 if test "x$new_path" = x \ 24678 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24679 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24680 new_path=`$CYGPATH -u "$path"` 24681 fi 24682 if test "x$new_path" = x; then 24683 # Oops. Which didn't find the executable. 24684 # The splitting of arguments from the executable at a space might have been incorrect, 24685 # since paths with space are more likely in Windows. Give it another try with the whole 24686 # argument. 24687 path="$complete" 24688 arguments="EOL" 24689 new_path=`$CYGPATH -u "$path"` 24690 new_path=`$WHICH "$new_path" 2> /dev/null` 24691 # bat and cmd files are not always considered executable in cygwin causing which 24692 # to not find them 24693 if test "x$new_path" = x \ 24694 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24695 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24696 new_path=`$CYGPATH -u "$path"` 24697 fi 24698 if test "x$new_path" = x; then 24699 # It's still not found. Now this is an unrecoverable error. 24700 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24701 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24702 has_space=`$ECHO "$complete" | $GREP " "` 24703 if test "x$has_space" != x; then 24704 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24705 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24706 fi 24707 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24708 fi 24709 fi 24710 24711 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24712 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24713 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24714 # "foo.exe" is OK but "foo" is an error. 24715 # 24716 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24717 # It is also a way to make sure we got the proper file name for the real test later on. 24718 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24719 if test "x$test_shortpath" = x; then 24720 # Short path failed, file does not exist as specified. 24721 # Try adding .exe or .cmd 24722 if test -f "${new_path}.exe"; then 24723 input_to_shortpath="${new_path}.exe" 24724 elif test -f "${new_path}.cmd"; then 24725 input_to_shortpath="${new_path}.cmd" 24726 else 24727 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5 24728 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;} 24729 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24730 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24731 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24732 fi 24733 else 24734 input_to_shortpath="$new_path" 24735 fi 24736 24737 # Call helper function which possibly converts this using DOS-style short mode. 24738 # If so, the updated path is stored in $new_path. 24739 new_path="$input_to_shortpath" 24740 24741 input_path="$input_to_shortpath" 24742 # Check if we need to convert this using DOS-style short mode. If the path 24743 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24744 # take no chances and rewrite it. 24745 # Note: m4 eats our [], so we need to use [ and ] instead. 24746 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24747 if test "x$has_forbidden_chars" != x; then 24748 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24749 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24750 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24751 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24752 # Going to short mode and back again did indeed matter. Since short mode is 24753 # case insensitive, let's make it lowercase to improve readability. 24754 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24755 # Now convert it back to Unix-stile (cygpath) 24756 input_path=`$CYGPATH -u "$shortmode_path"` 24757 new_path="$input_path" 24758 fi 24759 fi 24760 24761 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24762 if test "x$test_cygdrive_prefix" = x; then 24763 # As a simple fix, exclude /usr/bin since it's not a real path. 24764 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24765 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24766 # a path prefixed by /cygdrive for fixpath to work. 24767 new_path="$CYGWIN_ROOT_PATH$input_path" 24768 fi 24769 fi 24770 24771 # remove trailing .exe if any 24772 new_path="${new_path/%.exe/}" 24773 24774 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24775 24776 # First separate the path from the arguments. This will split at the first 24777 # space. 24778 complete="$CPP" 24779 path="${complete%% *}" 24780 tmp="$complete EOL" 24781 arguments="${tmp#* }" 24782 24783 # Input might be given as Windows format, start by converting to 24784 # unix format. 24785 new_path="$path" 24786 24787 windows_path="$new_path" 24788 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24789 unix_path=`$CYGPATH -u "$windows_path"` 24790 new_path="$unix_path" 24791 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24792 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24793 new_path="$unix_path" 24794 fi 24795 24796 24797 # Now try to locate executable using which 24798 new_path=`$WHICH "$new_path" 2> /dev/null` 24799 24800 if test "x$new_path" = x; then 24801 # Oops. Which didn't find the executable. 24802 # The splitting of arguments from the executable at a space might have been incorrect, 24803 # since paths with space are more likely in Windows. Give it another try with the whole 24804 # argument. 24805 path="$complete" 24806 arguments="EOL" 24807 new_path="$path" 24808 24809 windows_path="$new_path" 24810 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24811 unix_path=`$CYGPATH -u "$windows_path"` 24812 new_path="$unix_path" 24813 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24814 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24815 new_path="$unix_path" 24816 fi 24817 24818 24819 new_path=`$WHICH "$new_path" 2> /dev/null` 24820 24821 if test "x$new_path" = x; then 24822 # It's still not found. Now this is an unrecoverable error. 24823 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24824 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24825 has_space=`$ECHO "$complete" | $GREP " "` 24826 if test "x$has_space" != x; then 24827 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24828 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24829 fi 24830 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24831 fi 24832 fi 24833 24834 # Now new_path has a complete unix path to the binary 24835 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24836 # Keep paths in /bin as-is, but remove trailing .exe if any 24837 new_path="${new_path/%.exe/}" 24838 # Do not save /bin paths to all_fixpath_prefixes! 24839 else 24840 # Not in mixed or Windows style, start by that. 24841 new_path=`cmd //c echo $new_path` 24842 24843 input_path="$new_path" 24844 # Check if we need to convert this using DOS-style short mode. If the path 24845 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24846 # take no chances and rewrite it. 24847 # Note: m4 eats our [], so we need to use [ and ] instead. 24848 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24849 if test "x$has_forbidden_chars" != x; then 24850 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24851 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24852 fi 24853 24854 # Output is in $new_path 24855 24856 windows_path="$new_path" 24857 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24858 unix_path=`$CYGPATH -u "$windows_path"` 24859 new_path="$unix_path" 24860 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24861 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24862 new_path="$unix_path" 24863 fi 24864 24865 # remove trailing .exe if any 24866 new_path="${new_path/%.exe/}" 24867 24868 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24869 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24870 fi 24871 24872 else 24873 # We're on a posix platform. Hooray! :) 24874 # First separate the path from the arguments. This will split at the first 24875 # space. 24876 complete="$CPP" 24877 path="${complete%% *}" 24878 tmp="$complete EOL" 24879 arguments="${tmp#* }" 24880 24881 # Cannot rely on the command "which" here since it doesn't always work. 24882 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24883 if test -z "$is_absolute_path"; then 24884 # Path to executable is not absolute. Find it. 24885 IFS_save="$IFS" 24886 IFS=: 24887 for p in $PATH; do 24888 if test -f "$p/$path" && test -x "$p/$path"; then 24889 new_path="$p/$path" 24890 break 24891 fi 24892 done 24893 IFS="$IFS_save" 24894 else 24895 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5 24896 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;} 24897 new_path="$path" 24898 fi 24899 24900 if test "x$new_path" = x; then 24901 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24902 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24903 has_space=`$ECHO "$complete" | $GREP " "` 24904 if test "x$has_space" != x; then 24905 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24906 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24907 fi 24908 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24909 fi 24910 fi 24911 24912 # Now join together the path and the arguments once again 24913 if test "x$arguments" != xEOL; then 24914 new_complete="$new_path ${arguments% *}" 24915 else 24916 new_complete="$new_path" 24917 fi 24918 24919 if test "x$complete" != "x$new_complete"; then 24920 CPP="$new_complete" 24921 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5 24922 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;} 24923 fi 24924 24925 24926 ac_ext=cpp 24927 ac_cpp='$CXXCPP $CPPFLAGS' 24928 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24929 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24930 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 24932 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } 24933 if test -z "$CXXCPP"; then 24934 if ${ac_cv_prog_CXXCPP+:} false; then : 24935 $as_echo_n "(cached) " >&6 24936 else 24937 # Double quotes because CXXCPP needs to be expanded 24938 for CXXCPP in "$CXX -E" "/lib/cpp" 24939 do 24940 ac_preproc_ok=false 24941 for ac_cxx_preproc_warn_flag in '' yes 24942 do 24943 # Use a header file that comes with gcc, so configuring glibc 24944 # with a fresh cross-compiler works. 24945 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24946 # <limits.h> exists even on freestanding compilers. 24947 # On the NeXT, cc -E runs the code through the compiler's parser, 24948 # not just through cpp. "Syntax error" is here to catch this case. 24949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24950 /* end confdefs.h. */ 24951 #ifdef __STDC__ 24952 # include <limits.h> 24953 #else 24954 # include <assert.h> 24955 #endif 24956 Syntax error 24957 _ACEOF 24958 if ac_fn_cxx_try_cpp "$LINENO"; then : 24959 24960 else 24961 # Broken: fails on valid input. 24962 continue 24963 fi 24964 rm -f conftest.err conftest.i conftest.$ac_ext 24965 24966 # OK, works on sane cases. Now check whether nonexistent headers 24967 # can be detected and how. 24968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24969 /* end confdefs.h. */ 24970 #include <ac_nonexistent.h> 24971 _ACEOF 24972 if ac_fn_cxx_try_cpp "$LINENO"; then : 24973 # Broken: success on invalid input. 24974 continue 24975 else 24976 # Passes both tests. 24977 ac_preproc_ok=: 24978 break 24979 fi 24980 rm -f conftest.err conftest.i conftest.$ac_ext 24981 24982 done 24983 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24984 rm -f conftest.i conftest.err conftest.$ac_ext 24985 if $ac_preproc_ok; then : 24986 break 24987 fi 24988 24989 done 24990 ac_cv_prog_CXXCPP=$CXXCPP 24991 24992 fi 24993 CXXCPP=$ac_cv_prog_CXXCPP 24994 else 24995 ac_cv_prog_CXXCPP=$CXXCPP 24996 fi 24997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 24998 $as_echo "$CXXCPP" >&6; } 24999 ac_preproc_ok=false 25000 for ac_cxx_preproc_warn_flag in '' yes 25001 do 25002 # Use a header file that comes with gcc, so configuring glibc 25003 # with a fresh cross-compiler works. 25004 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 25005 # <limits.h> exists even on freestanding compilers. 25006 # On the NeXT, cc -E runs the code through the compiler's parser, 25007 # not just through cpp. "Syntax error" is here to catch this case. 25008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25009 /* end confdefs.h. */ 25010 #ifdef __STDC__ 25011 # include <limits.h> 25012 #else 25013 # include <assert.h> 25014 #endif 25015 Syntax error 25016 _ACEOF 25017 if ac_fn_cxx_try_cpp "$LINENO"; then : 25018 25019 else 25020 # Broken: fails on valid input. 25021 continue 25022 fi 25023 rm -f conftest.err conftest.i conftest.$ac_ext 25024 25025 # OK, works on sane cases. Now check whether nonexistent headers 25026 # can be detected and how. 25027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25028 /* end confdefs.h. */ 25029 #include <ac_nonexistent.h> 25030 _ACEOF 25031 if ac_fn_cxx_try_cpp "$LINENO"; then : 25032 # Broken: success on invalid input. 25033 continue 25034 else 25035 # Passes both tests. 25036 ac_preproc_ok=: 25037 break 25038 fi 25039 rm -f conftest.err conftest.i conftest.$ac_ext 25040 25041 done 25042 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 25043 rm -f conftest.i conftest.err conftest.$ac_ext 25044 if $ac_preproc_ok; then : 25045 25046 else 25047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 25048 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 25049 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check 25050 See \`config.log' for more details" "$LINENO" 5; } 25051 fi 25052 25053 ac_ext=cpp 25054 ac_cpp='$CXXCPP $CPPFLAGS' 25055 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 25056 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 25057 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 25058 25059 25060 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25061 25062 # First separate the path from the arguments. This will split at the first 25063 # space. 25064 complete="$CXXCPP" 25065 path="${complete%% *}" 25066 tmp="$complete EOL" 25067 arguments="${tmp#* }" 25068 25069 # Input might be given as Windows format, start by converting to 25070 # unix format. 25071 new_path=`$CYGPATH -u "$path"` 25072 25073 # Now try to locate executable using which 25074 new_path=`$WHICH "$new_path" 2> /dev/null` 25075 # bat and cmd files are not always considered executable in cygwin causing which 25076 # to not find them 25077 if test "x$new_path" = x \ 25078 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25079 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25080 new_path=`$CYGPATH -u "$path"` 25081 fi 25082 if test "x$new_path" = x; then 25083 # Oops. Which didn't find the executable. 25084 # The splitting of arguments from the executable at a space might have been incorrect, 25085 # since paths with space are more likely in Windows. Give it another try with the whole 25086 # argument. 25087 path="$complete" 25088 arguments="EOL" 25089 new_path=`$CYGPATH -u "$path"` 25090 new_path=`$WHICH "$new_path" 2> /dev/null` 25091 # bat and cmd files are not always considered executable in cygwin causing which 25092 # to not find them 25093 if test "x$new_path" = x \ 25094 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25095 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25096 new_path=`$CYGPATH -u "$path"` 25097 fi 25098 if test "x$new_path" = x; then 25099 # It's still not found. Now this is an unrecoverable error. 25100 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 25101 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 25102 has_space=`$ECHO "$complete" | $GREP " "` 25103 if test "x$has_space" != x; then 25104 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25105 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25106 fi 25107 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 25108 fi 25109 fi 25110 25111 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25112 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25113 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25114 # "foo.exe" is OK but "foo" is an error. 25115 # 25116 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25117 # It is also a way to make sure we got the proper file name for the real test later on. 25118 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25119 if test "x$test_shortpath" = x; then 25120 # Short path failed, file does not exist as specified. 25121 # Try adding .exe or .cmd 25122 if test -f "${new_path}.exe"; then 25123 input_to_shortpath="${new_path}.exe" 25124 elif test -f "${new_path}.cmd"; then 25125 input_to_shortpath="${new_path}.cmd" 25126 else 25127 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5 25128 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;} 25129 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25130 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25131 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 25132 fi 25133 else 25134 input_to_shortpath="$new_path" 25135 fi 25136 25137 # Call helper function which possibly converts this using DOS-style short mode. 25138 # If so, the updated path is stored in $new_path. 25139 new_path="$input_to_shortpath" 25140 25141 input_path="$input_to_shortpath" 25142 # Check if we need to convert this using DOS-style short mode. If the path 25143 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25144 # take no chances and rewrite it. 25145 # Note: m4 eats our [], so we need to use [ and ] instead. 25146 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25147 if test "x$has_forbidden_chars" != x; then 25148 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25149 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25150 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25151 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25152 # Going to short mode and back again did indeed matter. Since short mode is 25153 # case insensitive, let's make it lowercase to improve readability. 25154 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25155 # Now convert it back to Unix-stile (cygpath) 25156 input_path=`$CYGPATH -u "$shortmode_path"` 25157 new_path="$input_path" 25158 fi 25159 fi 25160 25161 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25162 if test "x$test_cygdrive_prefix" = x; then 25163 # As a simple fix, exclude /usr/bin since it's not a real path. 25164 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25165 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25166 # a path prefixed by /cygdrive for fixpath to work. 25167 new_path="$CYGWIN_ROOT_PATH$input_path" 25168 fi 25169 fi 25170 25171 # remove trailing .exe if any 25172 new_path="${new_path/%.exe/}" 25173 25174 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25175 25176 # First separate the path from the arguments. This will split at the first 25177 # space. 25178 complete="$CXXCPP" 25179 path="${complete%% *}" 25180 tmp="$complete EOL" 25181 arguments="${tmp#* }" 25182 25183 # Input might be given as Windows format, start by converting to 25184 # unix format. 25185 new_path="$path" 25186 25187 windows_path="$new_path" 25188 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25189 unix_path=`$CYGPATH -u "$windows_path"` 25190 new_path="$unix_path" 25191 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25192 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25193 new_path="$unix_path" 25194 fi 25195 25196 25197 # Now try to locate executable using which 25198 new_path=`$WHICH "$new_path" 2> /dev/null` 25199 25200 if test "x$new_path" = x; then 25201 # Oops. Which didn't find the executable. 25202 # The splitting of arguments from the executable at a space might have been incorrect, 25203 # since paths with space are more likely in Windows. Give it another try with the whole 25204 # argument. 25205 path="$complete" 25206 arguments="EOL" 25207 new_path="$path" 25208 25209 windows_path="$new_path" 25210 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25211 unix_path=`$CYGPATH -u "$windows_path"` 25212 new_path="$unix_path" 25213 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25214 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25215 new_path="$unix_path" 25216 fi 25217 25218 25219 new_path=`$WHICH "$new_path" 2> /dev/null` 25220 25221 if test "x$new_path" = x; then 25222 # It's still not found. Now this is an unrecoverable error. 25223 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 25224 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 25225 has_space=`$ECHO "$complete" | $GREP " "` 25226 if test "x$has_space" != x; then 25227 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25228 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25229 fi 25230 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 25231 fi 25232 fi 25233 25234 # Now new_path has a complete unix path to the binary 25235 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25236 # Keep paths in /bin as-is, but remove trailing .exe if any 25237 new_path="${new_path/%.exe/}" 25238 # Do not save /bin paths to all_fixpath_prefixes! 25239 else 25240 # Not in mixed or Windows style, start by that. 25241 new_path=`cmd //c echo $new_path` 25242 25243 input_path="$new_path" 25244 # Check if we need to convert this using DOS-style short mode. If the path 25245 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25246 # take no chances and rewrite it. 25247 # Note: m4 eats our [], so we need to use [ and ] instead. 25248 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25249 if test "x$has_forbidden_chars" != x; then 25250 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25251 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25252 fi 25253 25254 # Output is in $new_path 25255 25256 windows_path="$new_path" 25257 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25258 unix_path=`$CYGPATH -u "$windows_path"` 25259 new_path="$unix_path" 25260 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25261 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25262 new_path="$unix_path" 25263 fi 25264 25265 # remove trailing .exe if any 25266 new_path="${new_path/%.exe/}" 25267 25268 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25269 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25270 fi 25271 25272 else 25273 # We're on a posix platform. Hooray! :) 25274 # First separate the path from the arguments. This will split at the first 25275 # space. 25276 complete="$CXXCPP" 25277 path="${complete%% *}" 25278 tmp="$complete EOL" 25279 arguments="${tmp#* }" 25280 25281 # Cannot rely on the command "which" here since it doesn't always work. 25282 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25283 if test -z "$is_absolute_path"; then 25284 # Path to executable is not absolute. Find it. 25285 IFS_save="$IFS" 25286 IFS=: 25287 for p in $PATH; do 25288 if test -f "$p/$path" && test -x "$p/$path"; then 25289 new_path="$p/$path" 25290 break 25291 fi 25292 done 25293 IFS="$IFS_save" 25294 else 25295 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5 25296 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;} 25297 new_path="$path" 25298 fi 25299 25300 if test "x$new_path" = x; then 25301 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 25302 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 25303 has_space=`$ECHO "$complete" | $GREP " "` 25304 if test "x$has_space" != x; then 25305 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25306 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25307 fi 25308 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 25309 fi 25310 fi 25311 25312 # Now join together the path and the arguments once again 25313 if test "x$arguments" != xEOL; then 25314 new_complete="$new_path ${arguments% *}" 25315 else 25316 new_complete="$new_path" 25317 fi 25318 25319 if test "x$complete" != "x$new_complete"; then 25320 CXXCPP="$new_complete" 25321 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5 25322 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;} 25323 fi 25324 25325 25326 if test "x$COMPILE_TYPE" != "xcross"; then 25327 # If we are not cross compiling, use the same compilers for 25328 # building the build platform executables. The cross-compilation 25329 # case needed to be done earlier, but this can only be done after 25330 # the native tools have been localized. 25331 BUILD_CC="$CC" 25332 BUILD_CXX="$CXX" 25333 BUILD_LD="$LD" 25334 fi 25335 25336 # for solaris we really need solaris tools, and not gnu equivalent 25337 # these seems to normally reside in /usr/ccs/bin so add that to path before 25338 # starting to probe 25339 # 25340 # NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH 25341 # so that it can be overriden --with-tools-dir 25342 if test "x$OPENJDK_BUILD_OS" = xsolaris; then 25343 PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" 25344 fi 25345 25346 # Find the right assembler. 25347 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 25348 # Extract the first word of "as", so it can be a program name with args. 25349 set dummy as; ac_word=$2 25350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25351 $as_echo_n "checking for $ac_word... " >&6; } 25352 if ${ac_cv_path_AS+:} false; then : 25353 $as_echo_n "(cached) " >&6 25354 else 25355 case $AS in 25356 [\\/]* | ?:[\\/]*) 25357 ac_cv_path_AS="$AS" # Let the user override the test with a path. 25358 ;; 25359 *) 25360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25361 for as_dir in $PATH 25362 do 25363 IFS=$as_save_IFS 25364 test -z "$as_dir" && as_dir=. 25365 for ac_exec_ext in '' $ac_executable_extensions; do 25366 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 25367 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" 25368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25369 break 2 25370 fi 25371 done 25372 done 25373 IFS=$as_save_IFS 25374 25375 ;; 25376 esac 25377 fi 25378 AS=$ac_cv_path_AS 25379 if test -n "$AS"; then 25380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 25381 $as_echo "$AS" >&6; } 25382 else 25383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25384 $as_echo "no" >&6; } 25385 fi 25386 25387 25388 25389 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25390 25391 # First separate the path from the arguments. This will split at the first 25392 # space. 25393 complete="$AS" 25394 path="${complete%% *}" 25395 tmp="$complete EOL" 25396 arguments="${tmp#* }" 25397 25398 # Input might be given as Windows format, start by converting to 25399 # unix format. 25400 new_path=`$CYGPATH -u "$path"` 25401 25402 # Now try to locate executable using which 25403 new_path=`$WHICH "$new_path" 2> /dev/null` 25404 # bat and cmd files are not always considered executable in cygwin causing which 25405 # to not find them 25406 if test "x$new_path" = x \ 25407 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25408 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25409 new_path=`$CYGPATH -u "$path"` 25410 fi 25411 if test "x$new_path" = x; then 25412 # Oops. Which didn't find the executable. 25413 # The splitting of arguments from the executable at a space might have been incorrect, 25414 # since paths with space are more likely in Windows. Give it another try with the whole 25415 # argument. 25416 path="$complete" 25417 arguments="EOL" 25418 new_path=`$CYGPATH -u "$path"` 25419 new_path=`$WHICH "$new_path" 2> /dev/null` 25420 # bat and cmd files are not always considered executable in cygwin causing which 25421 # to not find them 25422 if test "x$new_path" = x \ 25423 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25424 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25425 new_path=`$CYGPATH -u "$path"` 25426 fi 25427 if test "x$new_path" = x; then 25428 # It's still not found. Now this is an unrecoverable error. 25429 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25430 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25431 has_space=`$ECHO "$complete" | $GREP " "` 25432 if test "x$has_space" != x; then 25433 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25434 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25435 fi 25436 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25437 fi 25438 fi 25439 25440 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25441 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25442 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25443 # "foo.exe" is OK but "foo" is an error. 25444 # 25445 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25446 # It is also a way to make sure we got the proper file name for the real test later on. 25447 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25448 if test "x$test_shortpath" = x; then 25449 # Short path failed, file does not exist as specified. 25450 # Try adding .exe or .cmd 25451 if test -f "${new_path}.exe"; then 25452 input_to_shortpath="${new_path}.exe" 25453 elif test -f "${new_path}.cmd"; then 25454 input_to_shortpath="${new_path}.cmd" 25455 else 25456 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5 25457 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;} 25458 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25459 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25460 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25461 fi 25462 else 25463 input_to_shortpath="$new_path" 25464 fi 25465 25466 # Call helper function which possibly converts this using DOS-style short mode. 25467 # If so, the updated path is stored in $new_path. 25468 new_path="$input_to_shortpath" 25469 25470 input_path="$input_to_shortpath" 25471 # Check if we need to convert this using DOS-style short mode. If the path 25472 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25473 # take no chances and rewrite it. 25474 # Note: m4 eats our [], so we need to use [ and ] instead. 25475 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25476 if test "x$has_forbidden_chars" != x; then 25477 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25478 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25479 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25480 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25481 # Going to short mode and back again did indeed matter. Since short mode is 25482 # case insensitive, let's make it lowercase to improve readability. 25483 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25484 # Now convert it back to Unix-stile (cygpath) 25485 input_path=`$CYGPATH -u "$shortmode_path"` 25486 new_path="$input_path" 25487 fi 25488 fi 25489 25490 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25491 if test "x$test_cygdrive_prefix" = x; then 25492 # As a simple fix, exclude /usr/bin since it's not a real path. 25493 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25494 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25495 # a path prefixed by /cygdrive for fixpath to work. 25496 new_path="$CYGWIN_ROOT_PATH$input_path" 25497 fi 25498 fi 25499 25500 # remove trailing .exe if any 25501 new_path="${new_path/%.exe/}" 25502 25503 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25504 25505 # First separate the path from the arguments. This will split at the first 25506 # space. 25507 complete="$AS" 25508 path="${complete%% *}" 25509 tmp="$complete EOL" 25510 arguments="${tmp#* }" 25511 25512 # Input might be given as Windows format, start by converting to 25513 # unix format. 25514 new_path="$path" 25515 25516 windows_path="$new_path" 25517 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25518 unix_path=`$CYGPATH -u "$windows_path"` 25519 new_path="$unix_path" 25520 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25521 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25522 new_path="$unix_path" 25523 fi 25524 25525 25526 # Now try to locate executable using which 25527 new_path=`$WHICH "$new_path" 2> /dev/null` 25528 25529 if test "x$new_path" = x; then 25530 # Oops. Which didn't find the executable. 25531 # The splitting of arguments from the executable at a space might have been incorrect, 25532 # since paths with space are more likely in Windows. Give it another try with the whole 25533 # argument. 25534 path="$complete" 25535 arguments="EOL" 25536 new_path="$path" 25537 25538 windows_path="$new_path" 25539 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25540 unix_path=`$CYGPATH -u "$windows_path"` 25541 new_path="$unix_path" 25542 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25543 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25544 new_path="$unix_path" 25545 fi 25546 25547 25548 new_path=`$WHICH "$new_path" 2> /dev/null` 25549 25550 if test "x$new_path" = x; then 25551 # It's still not found. Now this is an unrecoverable error. 25552 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25553 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25554 has_space=`$ECHO "$complete" | $GREP " "` 25555 if test "x$has_space" != x; then 25556 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25557 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25558 fi 25559 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25560 fi 25561 fi 25562 25563 # Now new_path has a complete unix path to the binary 25564 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25565 # Keep paths in /bin as-is, but remove trailing .exe if any 25566 new_path="${new_path/%.exe/}" 25567 # Do not save /bin paths to all_fixpath_prefixes! 25568 else 25569 # Not in mixed or Windows style, start by that. 25570 new_path=`cmd //c echo $new_path` 25571 25572 input_path="$new_path" 25573 # Check if we need to convert this using DOS-style short mode. If the path 25574 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25575 # take no chances and rewrite it. 25576 # Note: m4 eats our [], so we need to use [ and ] instead. 25577 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25578 if test "x$has_forbidden_chars" != x; then 25579 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25580 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25581 fi 25582 25583 # Output is in $new_path 25584 25585 windows_path="$new_path" 25586 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25587 unix_path=`$CYGPATH -u "$windows_path"` 25588 new_path="$unix_path" 25589 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25590 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25591 new_path="$unix_path" 25592 fi 25593 25594 # remove trailing .exe if any 25595 new_path="${new_path/%.exe/}" 25596 25597 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25598 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25599 fi 25600 25601 else 25602 # We're on a posix platform. Hooray! :) 25603 # First separate the path from the arguments. This will split at the first 25604 # space. 25605 complete="$AS" 25606 path="${complete%% *}" 25607 tmp="$complete EOL" 25608 arguments="${tmp#* }" 25609 25610 # Cannot rely on the command "which" here since it doesn't always work. 25611 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25612 if test -z "$is_absolute_path"; then 25613 # Path to executable is not absolute. Find it. 25614 IFS_save="$IFS" 25615 IFS=: 25616 for p in $PATH; do 25617 if test -f "$p/$path" && test -x "$p/$path"; then 25618 new_path="$p/$path" 25619 break 25620 fi 25621 done 25622 IFS="$IFS_save" 25623 else 25624 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5 25625 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;} 25626 new_path="$path" 25627 fi 25628 25629 if test "x$new_path" = x; then 25630 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25631 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25632 has_space=`$ECHO "$complete" | $GREP " "` 25633 if test "x$has_space" != x; then 25634 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25635 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25636 fi 25637 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25638 fi 25639 fi 25640 25641 # Now join together the path and the arguments once again 25642 if test "x$arguments" != xEOL; then 25643 new_complete="$new_path ${arguments% *}" 25644 else 25645 new_complete="$new_path" 25646 fi 25647 25648 if test "x$complete" != "x$new_complete"; then 25649 AS="$new_complete" 25650 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5 25651 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;} 25652 fi 25653 25654 else 25655 AS="$CC -c" 25656 fi 25657 25658 25659 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 25660 # Extract the first word of "nm", so it can be a program name with args. 25661 set dummy nm; ac_word=$2 25662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25663 $as_echo_n "checking for $ac_word... " >&6; } 25664 if ${ac_cv_path_NM+:} false; then : 25665 $as_echo_n "(cached) " >&6 25666 else 25667 case $NM in 25668 [\\/]* | ?:[\\/]*) 25669 ac_cv_path_NM="$NM" # Let the user override the test with a path. 25670 ;; 25671 *) 25672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25673 for as_dir in $PATH 25674 do 25675 IFS=$as_save_IFS 25676 test -z "$as_dir" && as_dir=. 25677 for ac_exec_ext in '' $ac_executable_extensions; do 25678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 25679 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" 25680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25681 break 2 25682 fi 25683 done 25684 done 25685 IFS=$as_save_IFS 25686 25687 ;; 25688 esac 25689 fi 25690 NM=$ac_cv_path_NM 25691 if test -n "$NM"; then 25692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 25693 $as_echo "$NM" >&6; } 25694 else 25695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25696 $as_echo "no" >&6; } 25697 fi 25698 25699 25700 25701 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25702 25703 # First separate the path from the arguments. This will split at the first 25704 # space. 25705 complete="$NM" 25706 path="${complete%% *}" 25707 tmp="$complete EOL" 25708 arguments="${tmp#* }" 25709 25710 # Input might be given as Windows format, start by converting to 25711 # unix format. 25712 new_path=`$CYGPATH -u "$path"` 25713 25714 # Now try to locate executable using which 25715 new_path=`$WHICH "$new_path" 2> /dev/null` 25716 # bat and cmd files are not always considered executable in cygwin causing which 25717 # to not find them 25718 if test "x$new_path" = x \ 25719 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25720 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25721 new_path=`$CYGPATH -u "$path"` 25722 fi 25723 if test "x$new_path" = x; then 25724 # Oops. Which didn't find the executable. 25725 # The splitting of arguments from the executable at a space might have been incorrect, 25726 # since paths with space are more likely in Windows. Give it another try with the whole 25727 # argument. 25728 path="$complete" 25729 arguments="EOL" 25730 new_path=`$CYGPATH -u "$path"` 25731 new_path=`$WHICH "$new_path" 2> /dev/null` 25732 # bat and cmd files are not always considered executable in cygwin causing which 25733 # to not find them 25734 if test "x$new_path" = x \ 25735 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25736 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25737 new_path=`$CYGPATH -u "$path"` 25738 fi 25739 if test "x$new_path" = x; then 25740 # It's still not found. Now this is an unrecoverable error. 25741 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25742 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25743 has_space=`$ECHO "$complete" | $GREP " "` 25744 if test "x$has_space" != x; then 25745 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25746 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25747 fi 25748 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25749 fi 25750 fi 25751 25752 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25753 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25754 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25755 # "foo.exe" is OK but "foo" is an error. 25756 # 25757 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25758 # It is also a way to make sure we got the proper file name for the real test later on. 25759 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25760 if test "x$test_shortpath" = x; then 25761 # Short path failed, file does not exist as specified. 25762 # Try adding .exe or .cmd 25763 if test -f "${new_path}.exe"; then 25764 input_to_shortpath="${new_path}.exe" 25765 elif test -f "${new_path}.cmd"; then 25766 input_to_shortpath="${new_path}.cmd" 25767 else 25768 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 25769 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} 25770 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25771 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25772 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25773 fi 25774 else 25775 input_to_shortpath="$new_path" 25776 fi 25777 25778 # Call helper function which possibly converts this using DOS-style short mode. 25779 # If so, the updated path is stored in $new_path. 25780 new_path="$input_to_shortpath" 25781 25782 input_path="$input_to_shortpath" 25783 # Check if we need to convert this using DOS-style short mode. If the path 25784 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25785 # take no chances and rewrite it. 25786 # Note: m4 eats our [], so we need to use [ and ] instead. 25787 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25788 if test "x$has_forbidden_chars" != x; then 25789 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25790 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25791 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25792 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25793 # Going to short mode and back again did indeed matter. Since short mode is 25794 # case insensitive, let's make it lowercase to improve readability. 25795 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25796 # Now convert it back to Unix-stile (cygpath) 25797 input_path=`$CYGPATH -u "$shortmode_path"` 25798 new_path="$input_path" 25799 fi 25800 fi 25801 25802 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25803 if test "x$test_cygdrive_prefix" = x; then 25804 # As a simple fix, exclude /usr/bin since it's not a real path. 25805 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25806 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25807 # a path prefixed by /cygdrive for fixpath to work. 25808 new_path="$CYGWIN_ROOT_PATH$input_path" 25809 fi 25810 fi 25811 25812 # remove trailing .exe if any 25813 new_path="${new_path/%.exe/}" 25814 25815 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25816 25817 # First separate the path from the arguments. This will split at the first 25818 # space. 25819 complete="$NM" 25820 path="${complete%% *}" 25821 tmp="$complete EOL" 25822 arguments="${tmp#* }" 25823 25824 # Input might be given as Windows format, start by converting to 25825 # unix format. 25826 new_path="$path" 25827 25828 windows_path="$new_path" 25829 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25830 unix_path=`$CYGPATH -u "$windows_path"` 25831 new_path="$unix_path" 25832 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25833 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25834 new_path="$unix_path" 25835 fi 25836 25837 25838 # Now try to locate executable using which 25839 new_path=`$WHICH "$new_path" 2> /dev/null` 25840 25841 if test "x$new_path" = x; then 25842 # Oops. Which didn't find the executable. 25843 # The splitting of arguments from the executable at a space might have been incorrect, 25844 # since paths with space are more likely in Windows. Give it another try with the whole 25845 # argument. 25846 path="$complete" 25847 arguments="EOL" 25848 new_path="$path" 25849 25850 windows_path="$new_path" 25851 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25852 unix_path=`$CYGPATH -u "$windows_path"` 25853 new_path="$unix_path" 25854 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25855 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25856 new_path="$unix_path" 25857 fi 25858 25859 25860 new_path=`$WHICH "$new_path" 2> /dev/null` 25861 25862 if test "x$new_path" = x; then 25863 # It's still not found. Now this is an unrecoverable error. 25864 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25865 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25866 has_space=`$ECHO "$complete" | $GREP " "` 25867 if test "x$has_space" != x; then 25868 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25869 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25870 fi 25871 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25872 fi 25873 fi 25874 25875 # Now new_path has a complete unix path to the binary 25876 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25877 # Keep paths in /bin as-is, but remove trailing .exe if any 25878 new_path="${new_path/%.exe/}" 25879 # Do not save /bin paths to all_fixpath_prefixes! 25880 else 25881 # Not in mixed or Windows style, start by that. 25882 new_path=`cmd //c echo $new_path` 25883 25884 input_path="$new_path" 25885 # Check if we need to convert this using DOS-style short mode. If the path 25886 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25887 # take no chances and rewrite it. 25888 # Note: m4 eats our [], so we need to use [ and ] instead. 25889 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25890 if test "x$has_forbidden_chars" != x; then 25891 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25892 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25893 fi 25894 25895 # Output is in $new_path 25896 25897 windows_path="$new_path" 25898 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25899 unix_path=`$CYGPATH -u "$windows_path"` 25900 new_path="$unix_path" 25901 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25902 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25903 new_path="$unix_path" 25904 fi 25905 25906 # remove trailing .exe if any 25907 new_path="${new_path/%.exe/}" 25908 25909 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25910 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25911 fi 25912 25913 else 25914 # We're on a posix platform. Hooray! :) 25915 # First separate the path from the arguments. This will split at the first 25916 # space. 25917 complete="$NM" 25918 path="${complete%% *}" 25919 tmp="$complete EOL" 25920 arguments="${tmp#* }" 25921 25922 # Cannot rely on the command "which" here since it doesn't always work. 25923 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25924 if test -z "$is_absolute_path"; then 25925 # Path to executable is not absolute. Find it. 25926 IFS_save="$IFS" 25927 IFS=: 25928 for p in $PATH; do 25929 if test -f "$p/$path" && test -x "$p/$path"; then 25930 new_path="$p/$path" 25931 break 25932 fi 25933 done 25934 IFS="$IFS_save" 25935 else 25936 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 25937 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} 25938 new_path="$path" 25939 fi 25940 25941 if test "x$new_path" = x; then 25942 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25943 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25944 has_space=`$ECHO "$complete" | $GREP " "` 25945 if test "x$has_space" != x; then 25946 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25947 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25948 fi 25949 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25950 fi 25951 fi 25952 25953 # Now join together the path and the arguments once again 25954 if test "x$arguments" != xEOL; then 25955 new_complete="$new_path ${arguments% *}" 25956 else 25957 new_complete="$new_path" 25958 fi 25959 25960 if test "x$complete" != "x$new_complete"; then 25961 NM="$new_complete" 25962 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 25963 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} 25964 fi 25965 25966 # Extract the first word of "gnm", so it can be a program name with args. 25967 set dummy gnm; ac_word=$2 25968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25969 $as_echo_n "checking for $ac_word... " >&6; } 25970 if ${ac_cv_path_GNM+:} false; then : 25971 $as_echo_n "(cached) " >&6 25972 else 25973 case $GNM in 25974 [\\/]* | ?:[\\/]*) 25975 ac_cv_path_GNM="$GNM" # Let the user override the test with a path. 25976 ;; 25977 *) 25978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25979 for as_dir in $PATH 25980 do 25981 IFS=$as_save_IFS 25982 test -z "$as_dir" && as_dir=. 25983 for ac_exec_ext in '' $ac_executable_extensions; do 25984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 25985 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" 25986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25987 break 2 25988 fi 25989 done 25990 done 25991 IFS=$as_save_IFS 25992 25993 ;; 25994 esac 25995 fi 25996 GNM=$ac_cv_path_GNM 25997 if test -n "$GNM"; then 25998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 25999 $as_echo "$GNM" >&6; } 26000 else 26001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26002 $as_echo "no" >&6; } 26003 fi 26004 26005 26006 26007 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26008 26009 # First separate the path from the arguments. This will split at the first 26010 # space. 26011 complete="$GNM" 26012 path="${complete%% *}" 26013 tmp="$complete EOL" 26014 arguments="${tmp#* }" 26015 26016 # Input might be given as Windows format, start by converting to 26017 # unix format. 26018 new_path=`$CYGPATH -u "$path"` 26019 26020 # Now try to locate executable using which 26021 new_path=`$WHICH "$new_path" 2> /dev/null` 26022 # bat and cmd files are not always considered executable in cygwin causing which 26023 # to not find them 26024 if test "x$new_path" = x \ 26025 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26026 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26027 new_path=`$CYGPATH -u "$path"` 26028 fi 26029 if test "x$new_path" = x; then 26030 # Oops. Which didn't find the executable. 26031 # The splitting of arguments from the executable at a space might have been incorrect, 26032 # since paths with space are more likely in Windows. Give it another try with the whole 26033 # argument. 26034 path="$complete" 26035 arguments="EOL" 26036 new_path=`$CYGPATH -u "$path"` 26037 new_path=`$WHICH "$new_path" 2> /dev/null` 26038 # bat and cmd files are not always considered executable in cygwin causing which 26039 # to not find them 26040 if test "x$new_path" = x \ 26041 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26042 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26043 new_path=`$CYGPATH -u "$path"` 26044 fi 26045 if test "x$new_path" = x; then 26046 # It's still not found. Now this is an unrecoverable error. 26047 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 26048 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 26049 has_space=`$ECHO "$complete" | $GREP " "` 26050 if test "x$has_space" != x; then 26051 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26053 fi 26054 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 26055 fi 26056 fi 26057 26058 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26059 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26060 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26061 # "foo.exe" is OK but "foo" is an error. 26062 # 26063 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26064 # It is also a way to make sure we got the proper file name for the real test later on. 26065 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26066 if test "x$test_shortpath" = x; then 26067 # Short path failed, file does not exist as specified. 26068 # Try adding .exe or .cmd 26069 if test -f "${new_path}.exe"; then 26070 input_to_shortpath="${new_path}.exe" 26071 elif test -f "${new_path}.cmd"; then 26072 input_to_shortpath="${new_path}.cmd" 26073 else 26074 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5 26075 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;} 26076 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26077 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26078 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 26079 fi 26080 else 26081 input_to_shortpath="$new_path" 26082 fi 26083 26084 # Call helper function which possibly converts this using DOS-style short mode. 26085 # If so, the updated path is stored in $new_path. 26086 new_path="$input_to_shortpath" 26087 26088 input_path="$input_to_shortpath" 26089 # Check if we need to convert this using DOS-style short mode. If the path 26090 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26091 # take no chances and rewrite it. 26092 # Note: m4 eats our [], so we need to use [ and ] instead. 26093 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26094 if test "x$has_forbidden_chars" != x; then 26095 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26096 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26097 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26098 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26099 # Going to short mode and back again did indeed matter. Since short mode is 26100 # case insensitive, let's make it lowercase to improve readability. 26101 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26102 # Now convert it back to Unix-stile (cygpath) 26103 input_path=`$CYGPATH -u "$shortmode_path"` 26104 new_path="$input_path" 26105 fi 26106 fi 26107 26108 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26109 if test "x$test_cygdrive_prefix" = x; then 26110 # As a simple fix, exclude /usr/bin since it's not a real path. 26111 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26112 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26113 # a path prefixed by /cygdrive for fixpath to work. 26114 new_path="$CYGWIN_ROOT_PATH$input_path" 26115 fi 26116 fi 26117 26118 # remove trailing .exe if any 26119 new_path="${new_path/%.exe/}" 26120 26121 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26122 26123 # First separate the path from the arguments. This will split at the first 26124 # space. 26125 complete="$GNM" 26126 path="${complete%% *}" 26127 tmp="$complete EOL" 26128 arguments="${tmp#* }" 26129 26130 # Input might be given as Windows format, start by converting to 26131 # unix format. 26132 new_path="$path" 26133 26134 windows_path="$new_path" 26135 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26136 unix_path=`$CYGPATH -u "$windows_path"` 26137 new_path="$unix_path" 26138 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26139 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26140 new_path="$unix_path" 26141 fi 26142 26143 26144 # Now try to locate executable using which 26145 new_path=`$WHICH "$new_path" 2> /dev/null` 26146 26147 if test "x$new_path" = x; then 26148 # Oops. Which didn't find the executable. 26149 # The splitting of arguments from the executable at a space might have been incorrect, 26150 # since paths with space are more likely in Windows. Give it another try with the whole 26151 # argument. 26152 path="$complete" 26153 arguments="EOL" 26154 new_path="$path" 26155 26156 windows_path="$new_path" 26157 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26158 unix_path=`$CYGPATH -u "$windows_path"` 26159 new_path="$unix_path" 26160 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26161 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26162 new_path="$unix_path" 26163 fi 26164 26165 26166 new_path=`$WHICH "$new_path" 2> /dev/null` 26167 26168 if test "x$new_path" = x; then 26169 # It's still not found. Now this is an unrecoverable error. 26170 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 26171 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 26172 has_space=`$ECHO "$complete" | $GREP " "` 26173 if test "x$has_space" != x; then 26174 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26175 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26176 fi 26177 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 26178 fi 26179 fi 26180 26181 # Now new_path has a complete unix path to the binary 26182 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26183 # Keep paths in /bin as-is, but remove trailing .exe if any 26184 new_path="${new_path/%.exe/}" 26185 # Do not save /bin paths to all_fixpath_prefixes! 26186 else 26187 # Not in mixed or Windows style, start by that. 26188 new_path=`cmd //c echo $new_path` 26189 26190 input_path="$new_path" 26191 # Check if we need to convert this using DOS-style short mode. If the path 26192 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26193 # take no chances and rewrite it. 26194 # Note: m4 eats our [], so we need to use [ and ] instead. 26195 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26196 if test "x$has_forbidden_chars" != x; then 26197 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26198 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26199 fi 26200 26201 # Output is in $new_path 26202 26203 windows_path="$new_path" 26204 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26205 unix_path=`$CYGPATH -u "$windows_path"` 26206 new_path="$unix_path" 26207 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26208 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26209 new_path="$unix_path" 26210 fi 26211 26212 # remove trailing .exe if any 26213 new_path="${new_path/%.exe/}" 26214 26215 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26216 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26217 fi 26218 26219 else 26220 # We're on a posix platform. Hooray! :) 26221 # First separate the path from the arguments. This will split at the first 26222 # space. 26223 complete="$GNM" 26224 path="${complete%% *}" 26225 tmp="$complete EOL" 26226 arguments="${tmp#* }" 26227 26228 # Cannot rely on the command "which" here since it doesn't always work. 26229 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26230 if test -z "$is_absolute_path"; then 26231 # Path to executable is not absolute. Find it. 26232 IFS_save="$IFS" 26233 IFS=: 26234 for p in $PATH; do 26235 if test -f "$p/$path" && test -x "$p/$path"; then 26236 new_path="$p/$path" 26237 break 26238 fi 26239 done 26240 IFS="$IFS_save" 26241 else 26242 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5 26243 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;} 26244 new_path="$path" 26245 fi 26246 26247 if test "x$new_path" = x; then 26248 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 26249 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 26250 has_space=`$ECHO "$complete" | $GREP " "` 26251 if test "x$has_space" != x; then 26252 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26253 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26254 fi 26255 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 26256 fi 26257 fi 26258 26259 # Now join together the path and the arguments once again 26260 if test "x$arguments" != xEOL; then 26261 new_complete="$new_path ${arguments% *}" 26262 else 26263 new_complete="$new_path" 26264 fi 26265 26266 if test "x$complete" != "x$new_complete"; then 26267 GNM="$new_complete" 26268 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5 26269 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;} 26270 fi 26271 26272 # Extract the first word of "strip", so it can be a program name with args. 26273 set dummy strip; ac_word=$2 26274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26275 $as_echo_n "checking for $ac_word... " >&6; } 26276 if ${ac_cv_path_STRIP+:} false; then : 26277 $as_echo_n "(cached) " >&6 26278 else 26279 case $STRIP in 26280 [\\/]* | ?:[\\/]*) 26281 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. 26282 ;; 26283 *) 26284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26285 for as_dir in $PATH 26286 do 26287 IFS=$as_save_IFS 26288 test -z "$as_dir" && as_dir=. 26289 for ac_exec_ext in '' $ac_executable_extensions; do 26290 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 26291 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" 26292 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26293 break 2 26294 fi 26295 done 26296 done 26297 IFS=$as_save_IFS 26298 26299 ;; 26300 esac 26301 fi 26302 STRIP=$ac_cv_path_STRIP 26303 if test -n "$STRIP"; then 26304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 26305 $as_echo "$STRIP" >&6; } 26306 else 26307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26308 $as_echo "no" >&6; } 26309 fi 26310 26311 26312 26313 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26314 26315 # First separate the path from the arguments. This will split at the first 26316 # space. 26317 complete="$STRIP" 26318 path="${complete%% *}" 26319 tmp="$complete EOL" 26320 arguments="${tmp#* }" 26321 26322 # Input might be given as Windows format, start by converting to 26323 # unix format. 26324 new_path=`$CYGPATH -u "$path"` 26325 26326 # Now try to locate executable using which 26327 new_path=`$WHICH "$new_path" 2> /dev/null` 26328 # bat and cmd files are not always considered executable in cygwin causing which 26329 # to not find them 26330 if test "x$new_path" = x \ 26331 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26332 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26333 new_path=`$CYGPATH -u "$path"` 26334 fi 26335 if test "x$new_path" = x; then 26336 # Oops. Which didn't find the executable. 26337 # The splitting of arguments from the executable at a space might have been incorrect, 26338 # since paths with space are more likely in Windows. Give it another try with the whole 26339 # argument. 26340 path="$complete" 26341 arguments="EOL" 26342 new_path=`$CYGPATH -u "$path"` 26343 new_path=`$WHICH "$new_path" 2> /dev/null` 26344 # bat and cmd files are not always considered executable in cygwin causing which 26345 # to not find them 26346 if test "x$new_path" = x \ 26347 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26348 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26349 new_path=`$CYGPATH -u "$path"` 26350 fi 26351 if test "x$new_path" = x; then 26352 # It's still not found. Now this is an unrecoverable error. 26353 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26354 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26355 has_space=`$ECHO "$complete" | $GREP " "` 26356 if test "x$has_space" != x; then 26357 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26358 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26359 fi 26360 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26361 fi 26362 fi 26363 26364 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26365 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26366 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26367 # "foo.exe" is OK but "foo" is an error. 26368 # 26369 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26370 # It is also a way to make sure we got the proper file name for the real test later on. 26371 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26372 if test "x$test_shortpath" = x; then 26373 # Short path failed, file does not exist as specified. 26374 # Try adding .exe or .cmd 26375 if test -f "${new_path}.exe"; then 26376 input_to_shortpath="${new_path}.exe" 26377 elif test -f "${new_path}.cmd"; then 26378 input_to_shortpath="${new_path}.cmd" 26379 else 26380 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 26381 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} 26382 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26383 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26384 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26385 fi 26386 else 26387 input_to_shortpath="$new_path" 26388 fi 26389 26390 # Call helper function which possibly converts this using DOS-style short mode. 26391 # If so, the updated path is stored in $new_path. 26392 new_path="$input_to_shortpath" 26393 26394 input_path="$input_to_shortpath" 26395 # Check if we need to convert this using DOS-style short mode. If the path 26396 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26397 # take no chances and rewrite it. 26398 # Note: m4 eats our [], so we need to use [ and ] instead. 26399 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26400 if test "x$has_forbidden_chars" != x; then 26401 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26402 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26403 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26404 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26405 # Going to short mode and back again did indeed matter. Since short mode is 26406 # case insensitive, let's make it lowercase to improve readability. 26407 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26408 # Now convert it back to Unix-stile (cygpath) 26409 input_path=`$CYGPATH -u "$shortmode_path"` 26410 new_path="$input_path" 26411 fi 26412 fi 26413 26414 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26415 if test "x$test_cygdrive_prefix" = x; then 26416 # As a simple fix, exclude /usr/bin since it's not a real path. 26417 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26418 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26419 # a path prefixed by /cygdrive for fixpath to work. 26420 new_path="$CYGWIN_ROOT_PATH$input_path" 26421 fi 26422 fi 26423 26424 # remove trailing .exe if any 26425 new_path="${new_path/%.exe/}" 26426 26427 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26428 26429 # First separate the path from the arguments. This will split at the first 26430 # space. 26431 complete="$STRIP" 26432 path="${complete%% *}" 26433 tmp="$complete EOL" 26434 arguments="${tmp#* }" 26435 26436 # Input might be given as Windows format, start by converting to 26437 # unix format. 26438 new_path="$path" 26439 26440 windows_path="$new_path" 26441 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26442 unix_path=`$CYGPATH -u "$windows_path"` 26443 new_path="$unix_path" 26444 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26445 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26446 new_path="$unix_path" 26447 fi 26448 26449 26450 # Now try to locate executable using which 26451 new_path=`$WHICH "$new_path" 2> /dev/null` 26452 26453 if test "x$new_path" = x; then 26454 # Oops. Which didn't find the executable. 26455 # The splitting of arguments from the executable at a space might have been incorrect, 26456 # since paths with space are more likely in Windows. Give it another try with the whole 26457 # argument. 26458 path="$complete" 26459 arguments="EOL" 26460 new_path="$path" 26461 26462 windows_path="$new_path" 26463 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26464 unix_path=`$CYGPATH -u "$windows_path"` 26465 new_path="$unix_path" 26466 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26467 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26468 new_path="$unix_path" 26469 fi 26470 26471 26472 new_path=`$WHICH "$new_path" 2> /dev/null` 26473 26474 if test "x$new_path" = x; then 26475 # It's still not found. Now this is an unrecoverable error. 26476 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26477 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26478 has_space=`$ECHO "$complete" | $GREP " "` 26479 if test "x$has_space" != x; then 26480 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26481 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26482 fi 26483 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26484 fi 26485 fi 26486 26487 # Now new_path has a complete unix path to the binary 26488 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26489 # Keep paths in /bin as-is, but remove trailing .exe if any 26490 new_path="${new_path/%.exe/}" 26491 # Do not save /bin paths to all_fixpath_prefixes! 26492 else 26493 # Not in mixed or Windows style, start by that. 26494 new_path=`cmd //c echo $new_path` 26495 26496 input_path="$new_path" 26497 # Check if we need to convert this using DOS-style short mode. If the path 26498 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26499 # take no chances and rewrite it. 26500 # Note: m4 eats our [], so we need to use [ and ] instead. 26501 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26502 if test "x$has_forbidden_chars" != x; then 26503 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26504 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26505 fi 26506 26507 # Output is in $new_path 26508 26509 windows_path="$new_path" 26510 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26511 unix_path=`$CYGPATH -u "$windows_path"` 26512 new_path="$unix_path" 26513 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26514 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26515 new_path="$unix_path" 26516 fi 26517 26518 # remove trailing .exe if any 26519 new_path="${new_path/%.exe/}" 26520 26521 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26522 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26523 fi 26524 26525 else 26526 # We're on a posix platform. Hooray! :) 26527 # First separate the path from the arguments. This will split at the first 26528 # space. 26529 complete="$STRIP" 26530 path="${complete%% *}" 26531 tmp="$complete EOL" 26532 arguments="${tmp#* }" 26533 26534 # Cannot rely on the command "which" here since it doesn't always work. 26535 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26536 if test -z "$is_absolute_path"; then 26537 # Path to executable is not absolute. Find it. 26538 IFS_save="$IFS" 26539 IFS=: 26540 for p in $PATH; do 26541 if test -f "$p/$path" && test -x "$p/$path"; then 26542 new_path="$p/$path" 26543 break 26544 fi 26545 done 26546 IFS="$IFS_save" 26547 else 26548 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 26549 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} 26550 new_path="$path" 26551 fi 26552 26553 if test "x$new_path" = x; then 26554 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26555 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26556 has_space=`$ECHO "$complete" | $GREP " "` 26557 if test "x$has_space" != x; then 26558 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26559 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26560 fi 26561 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26562 fi 26563 fi 26564 26565 # Now join together the path and the arguments once again 26566 if test "x$arguments" != xEOL; then 26567 new_complete="$new_path ${arguments% *}" 26568 else 26569 new_complete="$new_path" 26570 fi 26571 26572 if test "x$complete" != "x$new_complete"; then 26573 STRIP="$new_complete" 26574 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 26575 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} 26576 fi 26577 26578 # Extract the first word of "mcs", so it can be a program name with args. 26579 set dummy mcs; ac_word=$2 26580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26581 $as_echo_n "checking for $ac_word... " >&6; } 26582 if ${ac_cv_path_MCS+:} false; then : 26583 $as_echo_n "(cached) " >&6 26584 else 26585 case $MCS in 26586 [\\/]* | ?:[\\/]*) 26587 ac_cv_path_MCS="$MCS" # Let the user override the test with a path. 26588 ;; 26589 *) 26590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26591 for as_dir in $PATH 26592 do 26593 IFS=$as_save_IFS 26594 test -z "$as_dir" && as_dir=. 26595 for ac_exec_ext in '' $ac_executable_extensions; do 26596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 26597 ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" 26598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26599 break 2 26600 fi 26601 done 26602 done 26603 IFS=$as_save_IFS 26604 26605 ;; 26606 esac 26607 fi 26608 MCS=$ac_cv_path_MCS 26609 if test -n "$MCS"; then 26610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 26611 $as_echo "$MCS" >&6; } 26612 else 26613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26614 $as_echo "no" >&6; } 26615 fi 26616 26617 26618 26619 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26620 26621 # First separate the path from the arguments. This will split at the first 26622 # space. 26623 complete="$MCS" 26624 path="${complete%% *}" 26625 tmp="$complete EOL" 26626 arguments="${tmp#* }" 26627 26628 # Input might be given as Windows format, start by converting to 26629 # unix format. 26630 new_path=`$CYGPATH -u "$path"` 26631 26632 # Now try to locate executable using which 26633 new_path=`$WHICH "$new_path" 2> /dev/null` 26634 # bat and cmd files are not always considered executable in cygwin causing which 26635 # to not find them 26636 if test "x$new_path" = x \ 26637 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26638 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26639 new_path=`$CYGPATH -u "$path"` 26640 fi 26641 if test "x$new_path" = x; then 26642 # Oops. Which didn't find the executable. 26643 # The splitting of arguments from the executable at a space might have been incorrect, 26644 # since paths with space are more likely in Windows. Give it another try with the whole 26645 # argument. 26646 path="$complete" 26647 arguments="EOL" 26648 new_path=`$CYGPATH -u "$path"` 26649 new_path=`$WHICH "$new_path" 2> /dev/null` 26650 # bat and cmd files are not always considered executable in cygwin causing which 26651 # to not find them 26652 if test "x$new_path" = x \ 26653 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26654 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26655 new_path=`$CYGPATH -u "$path"` 26656 fi 26657 if test "x$new_path" = x; then 26658 # It's still not found. Now this is an unrecoverable error. 26659 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26660 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26661 has_space=`$ECHO "$complete" | $GREP " "` 26662 if test "x$has_space" != x; then 26663 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26664 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26665 fi 26666 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26667 fi 26668 fi 26669 26670 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26671 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26672 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26673 # "foo.exe" is OK but "foo" is an error. 26674 # 26675 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26676 # It is also a way to make sure we got the proper file name for the real test later on. 26677 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26678 if test "x$test_shortpath" = x; then 26679 # Short path failed, file does not exist as specified. 26680 # Try adding .exe or .cmd 26681 if test -f "${new_path}.exe"; then 26682 input_to_shortpath="${new_path}.exe" 26683 elif test -f "${new_path}.cmd"; then 26684 input_to_shortpath="${new_path}.cmd" 26685 else 26686 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5 26687 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;} 26688 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26689 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26690 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26691 fi 26692 else 26693 input_to_shortpath="$new_path" 26694 fi 26695 26696 # Call helper function which possibly converts this using DOS-style short mode. 26697 # If so, the updated path is stored in $new_path. 26698 new_path="$input_to_shortpath" 26699 26700 input_path="$input_to_shortpath" 26701 # Check if we need to convert this using DOS-style short mode. If the path 26702 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26703 # take no chances and rewrite it. 26704 # Note: m4 eats our [], so we need to use [ and ] instead. 26705 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26706 if test "x$has_forbidden_chars" != x; then 26707 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26708 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26709 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26710 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26711 # Going to short mode and back again did indeed matter. Since short mode is 26712 # case insensitive, let's make it lowercase to improve readability. 26713 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26714 # Now convert it back to Unix-stile (cygpath) 26715 input_path=`$CYGPATH -u "$shortmode_path"` 26716 new_path="$input_path" 26717 fi 26718 fi 26719 26720 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26721 if test "x$test_cygdrive_prefix" = x; then 26722 # As a simple fix, exclude /usr/bin since it's not a real path. 26723 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26724 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26725 # a path prefixed by /cygdrive for fixpath to work. 26726 new_path="$CYGWIN_ROOT_PATH$input_path" 26727 fi 26728 fi 26729 26730 # remove trailing .exe if any 26731 new_path="${new_path/%.exe/}" 26732 26733 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26734 26735 # First separate the path from the arguments. This will split at the first 26736 # space. 26737 complete="$MCS" 26738 path="${complete%% *}" 26739 tmp="$complete EOL" 26740 arguments="${tmp#* }" 26741 26742 # Input might be given as Windows format, start by converting to 26743 # unix format. 26744 new_path="$path" 26745 26746 windows_path="$new_path" 26747 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26748 unix_path=`$CYGPATH -u "$windows_path"` 26749 new_path="$unix_path" 26750 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26751 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26752 new_path="$unix_path" 26753 fi 26754 26755 26756 # Now try to locate executable using which 26757 new_path=`$WHICH "$new_path" 2> /dev/null` 26758 26759 if test "x$new_path" = x; then 26760 # Oops. Which didn't find the executable. 26761 # The splitting of arguments from the executable at a space might have been incorrect, 26762 # since paths with space are more likely in Windows. Give it another try with the whole 26763 # argument. 26764 path="$complete" 26765 arguments="EOL" 26766 new_path="$path" 26767 26768 windows_path="$new_path" 26769 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26770 unix_path=`$CYGPATH -u "$windows_path"` 26771 new_path="$unix_path" 26772 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26773 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26774 new_path="$unix_path" 26775 fi 26776 26777 26778 new_path=`$WHICH "$new_path" 2> /dev/null` 26779 26780 if test "x$new_path" = x; then 26781 # It's still not found. Now this is an unrecoverable error. 26782 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26783 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26784 has_space=`$ECHO "$complete" | $GREP " "` 26785 if test "x$has_space" != x; then 26786 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26787 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26788 fi 26789 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26790 fi 26791 fi 26792 26793 # Now new_path has a complete unix path to the binary 26794 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26795 # Keep paths in /bin as-is, but remove trailing .exe if any 26796 new_path="${new_path/%.exe/}" 26797 # Do not save /bin paths to all_fixpath_prefixes! 26798 else 26799 # Not in mixed or Windows style, start by that. 26800 new_path=`cmd //c echo $new_path` 26801 26802 input_path="$new_path" 26803 # Check if we need to convert this using DOS-style short mode. If the path 26804 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26805 # take no chances and rewrite it. 26806 # Note: m4 eats our [], so we need to use [ and ] instead. 26807 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26808 if test "x$has_forbidden_chars" != x; then 26809 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26810 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26811 fi 26812 26813 # Output is in $new_path 26814 26815 windows_path="$new_path" 26816 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26817 unix_path=`$CYGPATH -u "$windows_path"` 26818 new_path="$unix_path" 26819 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26820 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26821 new_path="$unix_path" 26822 fi 26823 26824 # remove trailing .exe if any 26825 new_path="${new_path/%.exe/}" 26826 26827 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26828 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26829 fi 26830 26831 else 26832 # We're on a posix platform. Hooray! :) 26833 # First separate the path from the arguments. This will split at the first 26834 # space. 26835 complete="$MCS" 26836 path="${complete%% *}" 26837 tmp="$complete EOL" 26838 arguments="${tmp#* }" 26839 26840 # Cannot rely on the command "which" here since it doesn't always work. 26841 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26842 if test -z "$is_absolute_path"; then 26843 # Path to executable is not absolute. Find it. 26844 IFS_save="$IFS" 26845 IFS=: 26846 for p in $PATH; do 26847 if test -f "$p/$path" && test -x "$p/$path"; then 26848 new_path="$p/$path" 26849 break 26850 fi 26851 done 26852 IFS="$IFS_save" 26853 else 26854 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5 26855 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;} 26856 new_path="$path" 26857 fi 26858 26859 if test "x$new_path" = x; then 26860 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26861 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26862 has_space=`$ECHO "$complete" | $GREP " "` 26863 if test "x$has_space" != x; then 26864 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26865 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26866 fi 26867 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26868 fi 26869 fi 26870 26871 # Now join together the path and the arguments once again 26872 if test "x$arguments" != xEOL; then 26873 new_complete="$new_path ${arguments% *}" 26874 else 26875 new_complete="$new_path" 26876 fi 26877 26878 if test "x$complete" != "x$new_complete"; then 26879 MCS="$new_complete" 26880 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5 26881 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;} 26882 fi 26883 26884 elif test "x$OPENJDK_TARGET_OS" != xwindows; then 26885 if test -n "$ac_tool_prefix"; then 26886 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. 26887 set dummy ${ac_tool_prefix}nm; ac_word=$2 26888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26889 $as_echo_n "checking for $ac_word... " >&6; } 26890 if ${ac_cv_prog_NM+:} false; then : 26891 $as_echo_n "(cached) " >&6 26892 else 26893 if test -n "$NM"; then 26894 ac_cv_prog_NM="$NM" # Let the user override the test. 26895 else 26896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26897 for as_dir in $PATH 26898 do 26899 IFS=$as_save_IFS 26900 test -z "$as_dir" && as_dir=. 26901 for ac_exec_ext in '' $ac_executable_extensions; do 26902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 26903 ac_cv_prog_NM="${ac_tool_prefix}nm" 26904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26905 break 2 26906 fi 26907 done 26908 done 26909 IFS=$as_save_IFS 26910 26911 fi 26912 fi 26913 NM=$ac_cv_prog_NM 26914 if test -n "$NM"; then 26915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 26916 $as_echo "$NM" >&6; } 26917 else 26918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26919 $as_echo "no" >&6; } 26920 fi 26921 26922 26923 fi 26924 if test -z "$ac_cv_prog_NM"; then 26925 ac_ct_NM=$NM 26926 # Extract the first word of "nm", so it can be a program name with args. 26927 set dummy nm; ac_word=$2 26928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26929 $as_echo_n "checking for $ac_word... " >&6; } 26930 if ${ac_cv_prog_ac_ct_NM+:} false; then : 26931 $as_echo_n "(cached) " >&6 26932 else 26933 if test -n "$ac_ct_NM"; then 26934 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. 26935 else 26936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26937 for as_dir in $PATH 26938 do 26939 IFS=$as_save_IFS 26940 test -z "$as_dir" && as_dir=. 26941 for ac_exec_ext in '' $ac_executable_extensions; do 26942 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 26943 ac_cv_prog_ac_ct_NM="nm" 26944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26945 break 2 26946 fi 26947 done 26948 done 26949 IFS=$as_save_IFS 26950 26951 fi 26952 fi 26953 ac_ct_NM=$ac_cv_prog_ac_ct_NM 26954 if test -n "$ac_ct_NM"; then 26955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 26956 $as_echo "$ac_ct_NM" >&6; } 26957 else 26958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26959 $as_echo "no" >&6; } 26960 fi 26961 26962 if test "x$ac_ct_NM" = x; then 26963 NM="" 26964 else 26965 case $cross_compiling:$ac_tool_warned in 26966 yes:) 26967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 26968 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 26969 ac_tool_warned=yes ;; 26970 esac 26971 NM=$ac_ct_NM 26972 fi 26973 else 26974 NM="$ac_cv_prog_NM" 26975 fi 26976 26977 26978 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26979 26980 # First separate the path from the arguments. This will split at the first 26981 # space. 26982 complete="$NM" 26983 path="${complete%% *}" 26984 tmp="$complete EOL" 26985 arguments="${tmp#* }" 26986 26987 # Input might be given as Windows format, start by converting to 26988 # unix format. 26989 new_path=`$CYGPATH -u "$path"` 26990 26991 # Now try to locate executable using which 26992 new_path=`$WHICH "$new_path" 2> /dev/null` 26993 # bat and cmd files are not always considered executable in cygwin causing which 26994 # to not find them 26995 if test "x$new_path" = x \ 26996 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26997 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26998 new_path=`$CYGPATH -u "$path"` 26999 fi 27000 if test "x$new_path" = x; then 27001 # Oops. Which didn't find the executable. 27002 # The splitting of arguments from the executable at a space might have been incorrect, 27003 # since paths with space are more likely in Windows. Give it another try with the whole 27004 # argument. 27005 path="$complete" 27006 arguments="EOL" 27007 new_path=`$CYGPATH -u "$path"` 27008 new_path=`$WHICH "$new_path" 2> /dev/null` 27009 # bat and cmd files are not always considered executable in cygwin causing which 27010 # to not find them 27011 if test "x$new_path" = x \ 27012 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27013 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27014 new_path=`$CYGPATH -u "$path"` 27015 fi 27016 if test "x$new_path" = x; then 27017 # It's still not found. Now this is an unrecoverable error. 27018 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 27019 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 27020 has_space=`$ECHO "$complete" | $GREP " "` 27021 if test "x$has_space" != x; then 27022 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27023 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27024 fi 27025 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 27026 fi 27027 fi 27028 27029 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27030 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27031 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27032 # "foo.exe" is OK but "foo" is an error. 27033 # 27034 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27035 # It is also a way to make sure we got the proper file name for the real test later on. 27036 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27037 if test "x$test_shortpath" = x; then 27038 # Short path failed, file does not exist as specified. 27039 # Try adding .exe or .cmd 27040 if test -f "${new_path}.exe"; then 27041 input_to_shortpath="${new_path}.exe" 27042 elif test -f "${new_path}.cmd"; then 27043 input_to_shortpath="${new_path}.cmd" 27044 else 27045 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 27046 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} 27047 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27048 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27049 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 27050 fi 27051 else 27052 input_to_shortpath="$new_path" 27053 fi 27054 27055 # Call helper function which possibly converts this using DOS-style short mode. 27056 # If so, the updated path is stored in $new_path. 27057 new_path="$input_to_shortpath" 27058 27059 input_path="$input_to_shortpath" 27060 # Check if we need to convert this using DOS-style short mode. If the path 27061 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27062 # take no chances and rewrite it. 27063 # Note: m4 eats our [], so we need to use [ and ] instead. 27064 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27065 if test "x$has_forbidden_chars" != x; then 27066 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27067 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27068 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27069 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27070 # Going to short mode and back again did indeed matter. Since short mode is 27071 # case insensitive, let's make it lowercase to improve readability. 27072 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27073 # Now convert it back to Unix-stile (cygpath) 27074 input_path=`$CYGPATH -u "$shortmode_path"` 27075 new_path="$input_path" 27076 fi 27077 fi 27078 27079 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27080 if test "x$test_cygdrive_prefix" = x; then 27081 # As a simple fix, exclude /usr/bin since it's not a real path. 27082 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27083 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27084 # a path prefixed by /cygdrive for fixpath to work. 27085 new_path="$CYGWIN_ROOT_PATH$input_path" 27086 fi 27087 fi 27088 27089 # remove trailing .exe if any 27090 new_path="${new_path/%.exe/}" 27091 27092 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27093 27094 # First separate the path from the arguments. This will split at the first 27095 # space. 27096 complete="$NM" 27097 path="${complete%% *}" 27098 tmp="$complete EOL" 27099 arguments="${tmp#* }" 27100 27101 # Input might be given as Windows format, start by converting to 27102 # unix format. 27103 new_path="$path" 27104 27105 windows_path="$new_path" 27106 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27107 unix_path=`$CYGPATH -u "$windows_path"` 27108 new_path="$unix_path" 27109 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27110 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27111 new_path="$unix_path" 27112 fi 27113 27114 27115 # Now try to locate executable using which 27116 new_path=`$WHICH "$new_path" 2> /dev/null` 27117 27118 if test "x$new_path" = x; then 27119 # Oops. Which didn't find the executable. 27120 # The splitting of arguments from the executable at a space might have been incorrect, 27121 # since paths with space are more likely in Windows. Give it another try with the whole 27122 # argument. 27123 path="$complete" 27124 arguments="EOL" 27125 new_path="$path" 27126 27127 windows_path="$new_path" 27128 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27129 unix_path=`$CYGPATH -u "$windows_path"` 27130 new_path="$unix_path" 27131 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27132 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27133 new_path="$unix_path" 27134 fi 27135 27136 27137 new_path=`$WHICH "$new_path" 2> /dev/null` 27138 27139 if test "x$new_path" = x; then 27140 # It's still not found. Now this is an unrecoverable error. 27141 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 27142 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 27143 has_space=`$ECHO "$complete" | $GREP " "` 27144 if test "x$has_space" != x; then 27145 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27146 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27147 fi 27148 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 27149 fi 27150 fi 27151 27152 # Now new_path has a complete unix path to the binary 27153 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27154 # Keep paths in /bin as-is, but remove trailing .exe if any 27155 new_path="${new_path/%.exe/}" 27156 # Do not save /bin paths to all_fixpath_prefixes! 27157 else 27158 # Not in mixed or Windows style, start by that. 27159 new_path=`cmd //c echo $new_path` 27160 27161 input_path="$new_path" 27162 # Check if we need to convert this using DOS-style short mode. If the path 27163 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27164 # take no chances and rewrite it. 27165 # Note: m4 eats our [], so we need to use [ and ] instead. 27166 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27167 if test "x$has_forbidden_chars" != x; then 27168 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27169 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27170 fi 27171 27172 # Output is in $new_path 27173 27174 windows_path="$new_path" 27175 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27176 unix_path=`$CYGPATH -u "$windows_path"` 27177 new_path="$unix_path" 27178 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27179 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27180 new_path="$unix_path" 27181 fi 27182 27183 # remove trailing .exe if any 27184 new_path="${new_path/%.exe/}" 27185 27186 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27187 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27188 fi 27189 27190 else 27191 # We're on a posix platform. Hooray! :) 27192 # First separate the path from the arguments. This will split at the first 27193 # space. 27194 complete="$NM" 27195 path="${complete%% *}" 27196 tmp="$complete EOL" 27197 arguments="${tmp#* }" 27198 27199 # Cannot rely on the command "which" here since it doesn't always work. 27200 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27201 if test -z "$is_absolute_path"; then 27202 # Path to executable is not absolute. Find it. 27203 IFS_save="$IFS" 27204 IFS=: 27205 for p in $PATH; do 27206 if test -f "$p/$path" && test -x "$p/$path"; then 27207 new_path="$p/$path" 27208 break 27209 fi 27210 done 27211 IFS="$IFS_save" 27212 else 27213 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 27214 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} 27215 new_path="$path" 27216 fi 27217 27218 if test "x$new_path" = x; then 27219 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 27220 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 27221 has_space=`$ECHO "$complete" | $GREP " "` 27222 if test "x$has_space" != x; then 27223 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27224 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27225 fi 27226 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 27227 fi 27228 fi 27229 27230 # Now join together the path and the arguments once again 27231 if test "x$arguments" != xEOL; then 27232 new_complete="$new_path ${arguments% *}" 27233 else 27234 new_complete="$new_path" 27235 fi 27236 27237 if test "x$complete" != "x$new_complete"; then 27238 NM="$new_complete" 27239 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 27240 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} 27241 fi 27242 27243 GNM="$NM" 27244 27245 if test -n "$ac_tool_prefix"; then 27246 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 27247 set dummy ${ac_tool_prefix}strip; ac_word=$2 27248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27249 $as_echo_n "checking for $ac_word... " >&6; } 27250 if ${ac_cv_prog_STRIP+:} false; then : 27251 $as_echo_n "(cached) " >&6 27252 else 27253 if test -n "$STRIP"; then 27254 ac_cv_prog_STRIP="$STRIP" # Let the user override the test. 27255 else 27256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27257 for as_dir in $PATH 27258 do 27259 IFS=$as_save_IFS 27260 test -z "$as_dir" && as_dir=. 27261 for ac_exec_ext in '' $ac_executable_extensions; do 27262 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 27263 ac_cv_prog_STRIP="${ac_tool_prefix}strip" 27264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27265 break 2 27266 fi 27267 done 27268 done 27269 IFS=$as_save_IFS 27270 27271 fi 27272 fi 27273 STRIP=$ac_cv_prog_STRIP 27274 if test -n "$STRIP"; then 27275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 27276 $as_echo "$STRIP" >&6; } 27277 else 27278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27279 $as_echo "no" >&6; } 27280 fi 27281 27282 27283 fi 27284 if test -z "$ac_cv_prog_STRIP"; then 27285 ac_ct_STRIP=$STRIP 27286 # Extract the first word of "strip", so it can be a program name with args. 27287 set dummy strip; ac_word=$2 27288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27289 $as_echo_n "checking for $ac_word... " >&6; } 27290 if ${ac_cv_prog_ac_ct_STRIP+:} false; then : 27291 $as_echo_n "(cached) " >&6 27292 else 27293 if test -n "$ac_ct_STRIP"; then 27294 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. 27295 else 27296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27297 for as_dir in $PATH 27298 do 27299 IFS=$as_save_IFS 27300 test -z "$as_dir" && as_dir=. 27301 for ac_exec_ext in '' $ac_executable_extensions; do 27302 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 27303 ac_cv_prog_ac_ct_STRIP="strip" 27304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27305 break 2 27306 fi 27307 done 27308 done 27309 IFS=$as_save_IFS 27310 27311 fi 27312 fi 27313 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP 27314 if test -n "$ac_ct_STRIP"; then 27315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 27316 $as_echo "$ac_ct_STRIP" >&6; } 27317 else 27318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27319 $as_echo "no" >&6; } 27320 fi 27321 27322 if test "x$ac_ct_STRIP" = x; then 27323 STRIP="" 27324 else 27325 case $cross_compiling:$ac_tool_warned in 27326 yes:) 27327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27328 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27329 ac_tool_warned=yes ;; 27330 esac 27331 STRIP=$ac_ct_STRIP 27332 fi 27333 else 27334 STRIP="$ac_cv_prog_STRIP" 27335 fi 27336 27337 27338 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27339 27340 # First separate the path from the arguments. This will split at the first 27341 # space. 27342 complete="$STRIP" 27343 path="${complete%% *}" 27344 tmp="$complete EOL" 27345 arguments="${tmp#* }" 27346 27347 # Input might be given as Windows format, start by converting to 27348 # unix format. 27349 new_path=`$CYGPATH -u "$path"` 27350 27351 # Now try to locate executable using which 27352 new_path=`$WHICH "$new_path" 2> /dev/null` 27353 # bat and cmd files are not always considered executable in cygwin causing which 27354 # to not find them 27355 if test "x$new_path" = x \ 27356 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27357 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27358 new_path=`$CYGPATH -u "$path"` 27359 fi 27360 if test "x$new_path" = x; then 27361 # Oops. Which didn't find the executable. 27362 # The splitting of arguments from the executable at a space might have been incorrect, 27363 # since paths with space are more likely in Windows. Give it another try with the whole 27364 # argument. 27365 path="$complete" 27366 arguments="EOL" 27367 new_path=`$CYGPATH -u "$path"` 27368 new_path=`$WHICH "$new_path" 2> /dev/null` 27369 # bat and cmd files are not always considered executable in cygwin causing which 27370 # to not find them 27371 if test "x$new_path" = x \ 27372 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27373 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27374 new_path=`$CYGPATH -u "$path"` 27375 fi 27376 if test "x$new_path" = x; then 27377 # It's still not found. Now this is an unrecoverable error. 27378 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27379 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27380 has_space=`$ECHO "$complete" | $GREP " "` 27381 if test "x$has_space" != x; then 27382 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27383 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27384 fi 27385 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27386 fi 27387 fi 27388 27389 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27390 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27391 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27392 # "foo.exe" is OK but "foo" is an error. 27393 # 27394 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27395 # It is also a way to make sure we got the proper file name for the real test later on. 27396 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27397 if test "x$test_shortpath" = x; then 27398 # Short path failed, file does not exist as specified. 27399 # Try adding .exe or .cmd 27400 if test -f "${new_path}.exe"; then 27401 input_to_shortpath="${new_path}.exe" 27402 elif test -f "${new_path}.cmd"; then 27403 input_to_shortpath="${new_path}.cmd" 27404 else 27405 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 27406 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} 27407 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27408 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27409 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27410 fi 27411 else 27412 input_to_shortpath="$new_path" 27413 fi 27414 27415 # Call helper function which possibly converts this using DOS-style short mode. 27416 # If so, the updated path is stored in $new_path. 27417 new_path="$input_to_shortpath" 27418 27419 input_path="$input_to_shortpath" 27420 # Check if we need to convert this using DOS-style short mode. If the path 27421 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27422 # take no chances and rewrite it. 27423 # Note: m4 eats our [], so we need to use [ and ] instead. 27424 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27425 if test "x$has_forbidden_chars" != x; then 27426 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27427 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27428 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27429 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27430 # Going to short mode and back again did indeed matter. Since short mode is 27431 # case insensitive, let's make it lowercase to improve readability. 27432 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27433 # Now convert it back to Unix-stile (cygpath) 27434 input_path=`$CYGPATH -u "$shortmode_path"` 27435 new_path="$input_path" 27436 fi 27437 fi 27438 27439 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27440 if test "x$test_cygdrive_prefix" = x; then 27441 # As a simple fix, exclude /usr/bin since it's not a real path. 27442 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27443 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27444 # a path prefixed by /cygdrive for fixpath to work. 27445 new_path="$CYGWIN_ROOT_PATH$input_path" 27446 fi 27447 fi 27448 27449 # remove trailing .exe if any 27450 new_path="${new_path/%.exe/}" 27451 27452 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27453 27454 # First separate the path from the arguments. This will split at the first 27455 # space. 27456 complete="$STRIP" 27457 path="${complete%% *}" 27458 tmp="$complete EOL" 27459 arguments="${tmp#* }" 27460 27461 # Input might be given as Windows format, start by converting to 27462 # unix format. 27463 new_path="$path" 27464 27465 windows_path="$new_path" 27466 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27467 unix_path=`$CYGPATH -u "$windows_path"` 27468 new_path="$unix_path" 27469 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27470 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27471 new_path="$unix_path" 27472 fi 27473 27474 27475 # Now try to locate executable using which 27476 new_path=`$WHICH "$new_path" 2> /dev/null` 27477 27478 if test "x$new_path" = x; then 27479 # Oops. Which didn't find the executable. 27480 # The splitting of arguments from the executable at a space might have been incorrect, 27481 # since paths with space are more likely in Windows. Give it another try with the whole 27482 # argument. 27483 path="$complete" 27484 arguments="EOL" 27485 new_path="$path" 27486 27487 windows_path="$new_path" 27488 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27489 unix_path=`$CYGPATH -u "$windows_path"` 27490 new_path="$unix_path" 27491 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27492 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27493 new_path="$unix_path" 27494 fi 27495 27496 27497 new_path=`$WHICH "$new_path" 2> /dev/null` 27498 27499 if test "x$new_path" = x; then 27500 # It's still not found. Now this is an unrecoverable error. 27501 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27502 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27503 has_space=`$ECHO "$complete" | $GREP " "` 27504 if test "x$has_space" != x; then 27505 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27506 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27507 fi 27508 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27509 fi 27510 fi 27511 27512 # Now new_path has a complete unix path to the binary 27513 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27514 # Keep paths in /bin as-is, but remove trailing .exe if any 27515 new_path="${new_path/%.exe/}" 27516 # Do not save /bin paths to all_fixpath_prefixes! 27517 else 27518 # Not in mixed or Windows style, start by that. 27519 new_path=`cmd //c echo $new_path` 27520 27521 input_path="$new_path" 27522 # Check if we need to convert this using DOS-style short mode. If the path 27523 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27524 # take no chances and rewrite it. 27525 # Note: m4 eats our [], so we need to use [ and ] instead. 27526 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27527 if test "x$has_forbidden_chars" != x; then 27528 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27529 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27530 fi 27531 27532 # Output is in $new_path 27533 27534 windows_path="$new_path" 27535 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27536 unix_path=`$CYGPATH -u "$windows_path"` 27537 new_path="$unix_path" 27538 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27539 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27540 new_path="$unix_path" 27541 fi 27542 27543 # remove trailing .exe if any 27544 new_path="${new_path/%.exe/}" 27545 27546 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27547 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27548 fi 27549 27550 else 27551 # We're on a posix platform. Hooray! :) 27552 # First separate the path from the arguments. This will split at the first 27553 # space. 27554 complete="$STRIP" 27555 path="${complete%% *}" 27556 tmp="$complete EOL" 27557 arguments="${tmp#* }" 27558 27559 # Cannot rely on the command "which" here since it doesn't always work. 27560 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27561 if test -z "$is_absolute_path"; then 27562 # Path to executable is not absolute. Find it. 27563 IFS_save="$IFS" 27564 IFS=: 27565 for p in $PATH; do 27566 if test -f "$p/$path" && test -x "$p/$path"; then 27567 new_path="$p/$path" 27568 break 27569 fi 27570 done 27571 IFS="$IFS_save" 27572 else 27573 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 27574 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} 27575 new_path="$path" 27576 fi 27577 27578 if test "x$new_path" = x; then 27579 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27580 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27581 has_space=`$ECHO "$complete" | $GREP " "` 27582 if test "x$has_space" != x; then 27583 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27584 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27585 fi 27586 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27587 fi 27588 fi 27589 27590 # Now join together the path and the arguments once again 27591 if test "x$arguments" != xEOL; then 27592 new_complete="$new_path ${arguments% *}" 27593 else 27594 new_complete="$new_path" 27595 fi 27596 27597 if test "x$complete" != "x$new_complete"; then 27598 STRIP="$new_complete" 27599 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 27600 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} 27601 fi 27602 27603 fi 27604 27605 # objcopy is used for moving debug symbols to separate files when 27606 # full debug symbols are enabled. 27607 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then 27608 if test -n "$ac_tool_prefix"; then 27609 for ac_prog in gobjcopy objcopy 27610 do 27611 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 27612 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 27613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27614 $as_echo_n "checking for $ac_word... " >&6; } 27615 if ${ac_cv_prog_OBJCOPY+:} false; then : 27616 $as_echo_n "(cached) " >&6 27617 else 27618 if test -n "$OBJCOPY"; then 27619 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. 27620 else 27621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27622 for as_dir in $PATH 27623 do 27624 IFS=$as_save_IFS 27625 test -z "$as_dir" && as_dir=. 27626 for ac_exec_ext in '' $ac_executable_extensions; do 27627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 27628 ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" 27629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27630 break 2 27631 fi 27632 done 27633 done 27634 IFS=$as_save_IFS 27635 27636 fi 27637 fi 27638 OBJCOPY=$ac_cv_prog_OBJCOPY 27639 if test -n "$OBJCOPY"; then 27640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 27641 $as_echo "$OBJCOPY" >&6; } 27642 else 27643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27644 $as_echo "no" >&6; } 27645 fi 27646 27647 27648 test -n "$OBJCOPY" && break 27649 done 27650 fi 27651 if test -z "$OBJCOPY"; then 27652 ac_ct_OBJCOPY=$OBJCOPY 27653 for ac_prog in gobjcopy objcopy 27654 do 27655 # Extract the first word of "$ac_prog", so it can be a program name with args. 27656 set dummy $ac_prog; ac_word=$2 27657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27658 $as_echo_n "checking for $ac_word... " >&6; } 27659 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then : 27660 $as_echo_n "(cached) " >&6 27661 else 27662 if test -n "$ac_ct_OBJCOPY"; then 27663 ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. 27664 else 27665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27666 for as_dir in $PATH 27667 do 27668 IFS=$as_save_IFS 27669 test -z "$as_dir" && as_dir=. 27670 for ac_exec_ext in '' $ac_executable_extensions; do 27671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 27672 ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" 27673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27674 break 2 27675 fi 27676 done 27677 done 27678 IFS=$as_save_IFS 27679 27680 fi 27681 fi 27682 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY 27683 if test -n "$ac_ct_OBJCOPY"; then 27684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 27685 $as_echo "$ac_ct_OBJCOPY" >&6; } 27686 else 27687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27688 $as_echo "no" >&6; } 27689 fi 27690 27691 27692 test -n "$ac_ct_OBJCOPY" && break 27693 done 27694 27695 if test "x$ac_ct_OBJCOPY" = x; then 27696 OBJCOPY="" 27697 else 27698 case $cross_compiling:$ac_tool_warned in 27699 yes:) 27700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27701 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27702 ac_tool_warned=yes ;; 27703 esac 27704 OBJCOPY=$ac_ct_OBJCOPY 27705 fi 27706 fi 27707 27708 # Only call fixup if objcopy was found. 27709 if test -n "$OBJCOPY"; then 27710 27711 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27712 27713 # First separate the path from the arguments. This will split at the first 27714 # space. 27715 complete="$OBJCOPY" 27716 path="${complete%% *}" 27717 tmp="$complete EOL" 27718 arguments="${tmp#* }" 27719 27720 # Input might be given as Windows format, start by converting to 27721 # unix format. 27722 new_path=`$CYGPATH -u "$path"` 27723 27724 # Now try to locate executable using which 27725 new_path=`$WHICH "$new_path" 2> /dev/null` 27726 # bat and cmd files are not always considered executable in cygwin causing which 27727 # to not find them 27728 if test "x$new_path" = x \ 27729 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27730 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27731 new_path=`$CYGPATH -u "$path"` 27732 fi 27733 if test "x$new_path" = x; then 27734 # Oops. Which didn't find the executable. 27735 # The splitting of arguments from the executable at a space might have been incorrect, 27736 # since paths with space are more likely in Windows. Give it another try with the whole 27737 # argument. 27738 path="$complete" 27739 arguments="EOL" 27740 new_path=`$CYGPATH -u "$path"` 27741 new_path=`$WHICH "$new_path" 2> /dev/null` 27742 # bat and cmd files are not always considered executable in cygwin causing which 27743 # to not find them 27744 if test "x$new_path" = x \ 27745 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27746 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27747 new_path=`$CYGPATH -u "$path"` 27748 fi 27749 if test "x$new_path" = x; then 27750 # It's still not found. Now this is an unrecoverable error. 27751 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27752 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27753 has_space=`$ECHO "$complete" | $GREP " "` 27754 if test "x$has_space" != x; then 27755 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27756 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27757 fi 27758 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27759 fi 27760 fi 27761 27762 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27763 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27764 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27765 # "foo.exe" is OK but "foo" is an error. 27766 # 27767 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27768 # It is also a way to make sure we got the proper file name for the real test later on. 27769 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27770 if test "x$test_shortpath" = x; then 27771 # Short path failed, file does not exist as specified. 27772 # Try adding .exe or .cmd 27773 if test -f "${new_path}.exe"; then 27774 input_to_shortpath="${new_path}.exe" 27775 elif test -f "${new_path}.cmd"; then 27776 input_to_shortpath="${new_path}.cmd" 27777 else 27778 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5 27779 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;} 27780 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27781 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27782 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27783 fi 27784 else 27785 input_to_shortpath="$new_path" 27786 fi 27787 27788 # Call helper function which possibly converts this using DOS-style short mode. 27789 # If so, the updated path is stored in $new_path. 27790 new_path="$input_to_shortpath" 27791 27792 input_path="$input_to_shortpath" 27793 # Check if we need to convert this using DOS-style short mode. If the path 27794 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27795 # take no chances and rewrite it. 27796 # Note: m4 eats our [], so we need to use [ and ] instead. 27797 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27798 if test "x$has_forbidden_chars" != x; then 27799 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27800 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27801 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27802 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27803 # Going to short mode and back again did indeed matter. Since short mode is 27804 # case insensitive, let's make it lowercase to improve readability. 27805 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27806 # Now convert it back to Unix-stile (cygpath) 27807 input_path=`$CYGPATH -u "$shortmode_path"` 27808 new_path="$input_path" 27809 fi 27810 fi 27811 27812 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27813 if test "x$test_cygdrive_prefix" = x; then 27814 # As a simple fix, exclude /usr/bin since it's not a real path. 27815 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27816 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27817 # a path prefixed by /cygdrive for fixpath to work. 27818 new_path="$CYGWIN_ROOT_PATH$input_path" 27819 fi 27820 fi 27821 27822 # remove trailing .exe if any 27823 new_path="${new_path/%.exe/}" 27824 27825 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27826 27827 # First separate the path from the arguments. This will split at the first 27828 # space. 27829 complete="$OBJCOPY" 27830 path="${complete%% *}" 27831 tmp="$complete EOL" 27832 arguments="${tmp#* }" 27833 27834 # Input might be given as Windows format, start by converting to 27835 # unix format. 27836 new_path="$path" 27837 27838 windows_path="$new_path" 27839 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27840 unix_path=`$CYGPATH -u "$windows_path"` 27841 new_path="$unix_path" 27842 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27843 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27844 new_path="$unix_path" 27845 fi 27846 27847 27848 # Now try to locate executable using which 27849 new_path=`$WHICH "$new_path" 2> /dev/null` 27850 27851 if test "x$new_path" = x; then 27852 # Oops. Which didn't find the executable. 27853 # The splitting of arguments from the executable at a space might have been incorrect, 27854 # since paths with space are more likely in Windows. Give it another try with the whole 27855 # argument. 27856 path="$complete" 27857 arguments="EOL" 27858 new_path="$path" 27859 27860 windows_path="$new_path" 27861 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27862 unix_path=`$CYGPATH -u "$windows_path"` 27863 new_path="$unix_path" 27864 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27865 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27866 new_path="$unix_path" 27867 fi 27868 27869 27870 new_path=`$WHICH "$new_path" 2> /dev/null` 27871 27872 if test "x$new_path" = x; then 27873 # It's still not found. Now this is an unrecoverable error. 27874 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27875 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27876 has_space=`$ECHO "$complete" | $GREP " "` 27877 if test "x$has_space" != x; then 27878 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27880 fi 27881 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27882 fi 27883 fi 27884 27885 # Now new_path has a complete unix path to the binary 27886 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27887 # Keep paths in /bin as-is, but remove trailing .exe if any 27888 new_path="${new_path/%.exe/}" 27889 # Do not save /bin paths to all_fixpath_prefixes! 27890 else 27891 # Not in mixed or Windows style, start by that. 27892 new_path=`cmd //c echo $new_path` 27893 27894 input_path="$new_path" 27895 # Check if we need to convert this using DOS-style short mode. If the path 27896 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27897 # take no chances and rewrite it. 27898 # Note: m4 eats our [], so we need to use [ and ] instead. 27899 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27900 if test "x$has_forbidden_chars" != x; then 27901 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27902 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27903 fi 27904 27905 # Output is in $new_path 27906 27907 windows_path="$new_path" 27908 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27909 unix_path=`$CYGPATH -u "$windows_path"` 27910 new_path="$unix_path" 27911 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27912 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27913 new_path="$unix_path" 27914 fi 27915 27916 # remove trailing .exe if any 27917 new_path="${new_path/%.exe/}" 27918 27919 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27920 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27921 fi 27922 27923 else 27924 # We're on a posix platform. Hooray! :) 27925 # First separate the path from the arguments. This will split at the first 27926 # space. 27927 complete="$OBJCOPY" 27928 path="${complete%% *}" 27929 tmp="$complete EOL" 27930 arguments="${tmp#* }" 27931 27932 # Cannot rely on the command "which" here since it doesn't always work. 27933 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27934 if test -z "$is_absolute_path"; then 27935 # Path to executable is not absolute. Find it. 27936 IFS_save="$IFS" 27937 IFS=: 27938 for p in $PATH; do 27939 if test -f "$p/$path" && test -x "$p/$path"; then 27940 new_path="$p/$path" 27941 break 27942 fi 27943 done 27944 IFS="$IFS_save" 27945 else 27946 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5 27947 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;} 27948 new_path="$path" 27949 fi 27950 27951 if test "x$new_path" = x; then 27952 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27953 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27954 has_space=`$ECHO "$complete" | $GREP " "` 27955 if test "x$has_space" != x; then 27956 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27957 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27958 fi 27959 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27960 fi 27961 fi 27962 27963 # Now join together the path and the arguments once again 27964 if test "x$arguments" != xEOL; then 27965 new_complete="$new_path ${arguments% *}" 27966 else 27967 new_complete="$new_path" 27968 fi 27969 27970 if test "x$complete" != "x$new_complete"; then 27971 OBJCOPY="$new_complete" 27972 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5 27973 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;} 27974 fi 27975 27976 fi 27977 fi 27978 27979 if test -n "$ac_tool_prefix"; then 27980 for ac_prog in gobjdump objdump 27981 do 27982 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 27983 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 27984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27985 $as_echo_n "checking for $ac_word... " >&6; } 27986 if ${ac_cv_prog_OBJDUMP+:} false; then : 27987 $as_echo_n "(cached) " >&6 27988 else 27989 if test -n "$OBJDUMP"; then 27990 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. 27991 else 27992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27993 for as_dir in $PATH 27994 do 27995 IFS=$as_save_IFS 27996 test -z "$as_dir" && as_dir=. 27997 for ac_exec_ext in '' $ac_executable_extensions; do 27998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 27999 ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" 28000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 28001 break 2 28002 fi 28003 done 28004 done 28005 IFS=$as_save_IFS 28006 28007 fi 28008 fi 28009 OBJDUMP=$ac_cv_prog_OBJDUMP 28010 if test -n "$OBJDUMP"; then 28011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 28012 $as_echo "$OBJDUMP" >&6; } 28013 else 28014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 28015 $as_echo "no" >&6; } 28016 fi 28017 28018 28019 test -n "$OBJDUMP" && break 28020 done 28021 fi 28022 if test -z "$OBJDUMP"; then 28023 ac_ct_OBJDUMP=$OBJDUMP 28024 for ac_prog in gobjdump objdump 28025 do 28026 # Extract the first word of "$ac_prog", so it can be a program name with args. 28027 set dummy $ac_prog; ac_word=$2 28028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 28029 $as_echo_n "checking for $ac_word... " >&6; } 28030 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : 28031 $as_echo_n "(cached) " >&6 28032 else 28033 if test -n "$ac_ct_OBJDUMP"; then 28034 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. 28035 else 28036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 28037 for as_dir in $PATH 28038 do 28039 IFS=$as_save_IFS 28040 test -z "$as_dir" && as_dir=. 28041 for ac_exec_ext in '' $ac_executable_extensions; do 28042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 28043 ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" 28044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 28045 break 2 28046 fi 28047 done 28048 done 28049 IFS=$as_save_IFS 28050 28051 fi 28052 fi 28053 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP 28054 if test -n "$ac_ct_OBJDUMP"; then 28055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 28056 $as_echo "$ac_ct_OBJDUMP" >&6; } 28057 else 28058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 28059 $as_echo "no" >&6; } 28060 fi 28061 28062 28063 test -n "$ac_ct_OBJDUMP" && break 28064 done 28065 28066 if test "x$ac_ct_OBJDUMP" = x; then 28067 OBJDUMP="" 28068 else 28069 case $cross_compiling:$ac_tool_warned in 28070 yes:) 28071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 28072 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 28073 ac_tool_warned=yes ;; 28074 esac 28075 OBJDUMP=$ac_ct_OBJDUMP 28076 fi 28077 fi 28078 28079 if test "x$OBJDUMP" != x; then 28080 # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing. 28081 28082 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28083 28084 # First separate the path from the arguments. This will split at the first 28085 # space. 28086 complete="$OBJDUMP" 28087 path="${complete%% *}" 28088 tmp="$complete EOL" 28089 arguments="${tmp#* }" 28090 28091 # Input might be given as Windows format, start by converting to 28092 # unix format. 28093 new_path=`$CYGPATH -u "$path"` 28094 28095 # Now try to locate executable using which 28096 new_path=`$WHICH "$new_path" 2> /dev/null` 28097 # bat and cmd files are not always considered executable in cygwin causing which 28098 # to not find them 28099 if test "x$new_path" = x \ 28100 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 28101 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 28102 new_path=`$CYGPATH -u "$path"` 28103 fi 28104 if test "x$new_path" = x; then 28105 # Oops. Which didn't find the executable. 28106 # The splitting of arguments from the executable at a space might have been incorrect, 28107 # since paths with space are more likely in Windows. Give it another try with the whole 28108 # argument. 28109 path="$complete" 28110 arguments="EOL" 28111 new_path=`$CYGPATH -u "$path"` 28112 new_path=`$WHICH "$new_path" 2> /dev/null` 28113 # bat and cmd files are not always considered executable in cygwin causing which 28114 # to not find them 28115 if test "x$new_path" = x \ 28116 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 28117 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 28118 new_path=`$CYGPATH -u "$path"` 28119 fi 28120 if test "x$new_path" = x; then 28121 # It's still not found. Now this is an unrecoverable error. 28122 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 28123 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 28124 has_space=`$ECHO "$complete" | $GREP " "` 28125 if test "x$has_space" != x; then 28126 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28127 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28128 fi 28129 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 28130 fi 28131 fi 28132 28133 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 28134 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 28135 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 28136 # "foo.exe" is OK but "foo" is an error. 28137 # 28138 # This test is therefore slightly more accurate than "test -f" to check for file precense. 28139 # It is also a way to make sure we got the proper file name for the real test later on. 28140 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 28141 if test "x$test_shortpath" = x; then 28142 # Short path failed, file does not exist as specified. 28143 # Try adding .exe or .cmd 28144 if test -f "${new_path}.exe"; then 28145 input_to_shortpath="${new_path}.exe" 28146 elif test -f "${new_path}.cmd"; then 28147 input_to_shortpath="${new_path}.cmd" 28148 else 28149 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5 28150 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;} 28151 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 28152 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 28153 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 28154 fi 28155 else 28156 input_to_shortpath="$new_path" 28157 fi 28158 28159 # Call helper function which possibly converts this using DOS-style short mode. 28160 # If so, the updated path is stored in $new_path. 28161 new_path="$input_to_shortpath" 28162 28163 input_path="$input_to_shortpath" 28164 # Check if we need to convert this using DOS-style short mode. If the path 28165 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28166 # take no chances and rewrite it. 28167 # Note: m4 eats our [], so we need to use [ and ] instead. 28168 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 28169 if test "x$has_forbidden_chars" != x; then 28170 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28171 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 28172 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 28173 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 28174 # Going to short mode and back again did indeed matter. Since short mode is 28175 # case insensitive, let's make it lowercase to improve readability. 28176 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28177 # Now convert it back to Unix-stile (cygpath) 28178 input_path=`$CYGPATH -u "$shortmode_path"` 28179 new_path="$input_path" 28180 fi 28181 fi 28182 28183 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 28184 if test "x$test_cygdrive_prefix" = x; then 28185 # As a simple fix, exclude /usr/bin since it's not a real path. 28186 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 28187 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 28188 # a path prefixed by /cygdrive for fixpath to work. 28189 new_path="$CYGWIN_ROOT_PATH$input_path" 28190 fi 28191 fi 28192 28193 # remove trailing .exe if any 28194 new_path="${new_path/%.exe/}" 28195 28196 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28197 28198 # First separate the path from the arguments. This will split at the first 28199 # space. 28200 complete="$OBJDUMP" 28201 path="${complete%% *}" 28202 tmp="$complete EOL" 28203 arguments="${tmp#* }" 28204 28205 # Input might be given as Windows format, start by converting to 28206 # unix format. 28207 new_path="$path" 28208 28209 windows_path="$new_path" 28210 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28211 unix_path=`$CYGPATH -u "$windows_path"` 28212 new_path="$unix_path" 28213 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28214 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28215 new_path="$unix_path" 28216 fi 28217 28218 28219 # Now try to locate executable using which 28220 new_path=`$WHICH "$new_path" 2> /dev/null` 28221 28222 if test "x$new_path" = x; then 28223 # Oops. Which didn't find the executable. 28224 # The splitting of arguments from the executable at a space might have been incorrect, 28225 # since paths with space are more likely in Windows. Give it another try with the whole 28226 # argument. 28227 path="$complete" 28228 arguments="EOL" 28229 new_path="$path" 28230 28231 windows_path="$new_path" 28232 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28233 unix_path=`$CYGPATH -u "$windows_path"` 28234 new_path="$unix_path" 28235 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28236 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28237 new_path="$unix_path" 28238 fi 28239 28240 28241 new_path=`$WHICH "$new_path" 2> /dev/null` 28242 28243 if test "x$new_path" = x; then 28244 # It's still not found. Now this is an unrecoverable error. 28245 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 28246 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 28247 has_space=`$ECHO "$complete" | $GREP " "` 28248 if test "x$has_space" != x; then 28249 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28250 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28251 fi 28252 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 28253 fi 28254 fi 28255 28256 # Now new_path has a complete unix path to the binary 28257 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 28258 # Keep paths in /bin as-is, but remove trailing .exe if any 28259 new_path="${new_path/%.exe/}" 28260 # Do not save /bin paths to all_fixpath_prefixes! 28261 else 28262 # Not in mixed or Windows style, start by that. 28263 new_path=`cmd //c echo $new_path` 28264 28265 input_path="$new_path" 28266 # Check if we need to convert this using DOS-style short mode. If the path 28267 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28268 # take no chances and rewrite it. 28269 # Note: m4 eats our [], so we need to use [ and ] instead. 28270 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 28271 if test "x$has_forbidden_chars" != x; then 28272 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28273 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28274 fi 28275 28276 # Output is in $new_path 28277 28278 windows_path="$new_path" 28279 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28280 unix_path=`$CYGPATH -u "$windows_path"` 28281 new_path="$unix_path" 28282 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28283 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28284 new_path="$unix_path" 28285 fi 28286 28287 # remove trailing .exe if any 28288 new_path="${new_path/%.exe/}" 28289 28290 # Save the first 10 bytes of this path to the storage, so fixpath can work. 28291 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 28292 fi 28293 28294 else 28295 # We're on a posix platform. Hooray! :) 28296 # First separate the path from the arguments. This will split at the first 28297 # space. 28298 complete="$OBJDUMP" 28299 path="${complete%% *}" 28300 tmp="$complete EOL" 28301 arguments="${tmp#* }" 28302 28303 # Cannot rely on the command "which" here since it doesn't always work. 28304 is_absolute_path=`$ECHO "$path" | $GREP ^/` 28305 if test -z "$is_absolute_path"; then 28306 # Path to executable is not absolute. Find it. 28307 IFS_save="$IFS" 28308 IFS=: 28309 for p in $PATH; do 28310 if test -f "$p/$path" && test -x "$p/$path"; then 28311 new_path="$p/$path" 28312 break 28313 fi 28314 done 28315 IFS="$IFS_save" 28316 else 28317 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5 28318 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;} 28319 new_path="$path" 28320 fi 28321 28322 if test "x$new_path" = x; then 28323 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 28324 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 28325 has_space=`$ECHO "$complete" | $GREP " "` 28326 if test "x$has_space" != x; then 28327 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 28328 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 28329 fi 28330 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 28331 fi 28332 fi 28333 28334 # Now join together the path and the arguments once again 28335 if test "x$arguments" != xEOL; then 28336 new_complete="$new_path ${arguments% *}" 28337 else 28338 new_complete="$new_path" 28339 fi 28340 28341 if test "x$complete" != "x$new_complete"; then 28342 OBJDUMP="$new_complete" 28343 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 28344 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} 28345 fi 28346 28347 fi 28348 28349 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 28350 # Extract the first word of "lipo", so it can be a program name with args. 28351 set dummy lipo; ac_word=$2 28352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 28353 $as_echo_n "checking for $ac_word... " >&6; } 28354 if ${ac_cv_path_LIPO+:} false; then : 28355 $as_echo_n "(cached) " >&6 28356 else 28357 case $LIPO in 28358 [\\/]* | ?:[\\/]*) 28359 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. 28360 ;; 28361 *) 28362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 28363 for as_dir in $PATH 28364 do 28365 IFS=$as_save_IFS 28366 test -z "$as_dir" && as_dir=. 28367 for ac_exec_ext in '' $ac_executable_extensions; do 28368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 28369 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" 28370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 28371 break 2 28372 fi 28373 done 28374 done 28375 IFS=$as_save_IFS 28376 28377 ;; 28378 esac 28379 fi 28380 LIPO=$ac_cv_path_LIPO 28381 if test -n "$LIPO"; then 28382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 28383 $as_echo "$LIPO" >&6; } 28384 else 28385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 28386 $as_echo "no" >&6; } 28387 fi 28388 28389 28390 28391 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28392 28393 # First separate the path from the arguments. This will split at the first 28394 # space. 28395 complete="$LIPO" 28396 path="${complete%% *}" 28397 tmp="$complete EOL" 28398 arguments="${tmp#* }" 28399 28400 # Input might be given as Windows format, start by converting to 28401 # unix format. 28402 new_path=`$CYGPATH -u "$path"` 28403 28404 # Now try to locate executable using which 28405 new_path=`$WHICH "$new_path" 2> /dev/null` 28406 # bat and cmd files are not always considered executable in cygwin causing which 28407 # to not find them 28408 if test "x$new_path" = x \ 28409 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 28410 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 28411 new_path=`$CYGPATH -u "$path"` 28412 fi 28413 if test "x$new_path" = x; then 28414 # Oops. Which didn't find the executable. 28415 # The splitting of arguments from the executable at a space might have been incorrect, 28416 # since paths with space are more likely in Windows. Give it another try with the whole 28417 # argument. 28418 path="$complete" 28419 arguments="EOL" 28420 new_path=`$CYGPATH -u "$path"` 28421 new_path=`$WHICH "$new_path" 2> /dev/null` 28422 # bat and cmd files are not always considered executable in cygwin causing which 28423 # to not find them 28424 if test "x$new_path" = x \ 28425 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 28426 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 28427 new_path=`$CYGPATH -u "$path"` 28428 fi 28429 if test "x$new_path" = x; then 28430 # It's still not found. Now this is an unrecoverable error. 28431 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28432 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28433 has_space=`$ECHO "$complete" | $GREP " "` 28434 if test "x$has_space" != x; then 28435 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28436 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28437 fi 28438 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28439 fi 28440 fi 28441 28442 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 28443 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 28444 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 28445 # "foo.exe" is OK but "foo" is an error. 28446 # 28447 # This test is therefore slightly more accurate than "test -f" to check for file precense. 28448 # It is also a way to make sure we got the proper file name for the real test later on. 28449 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 28450 if test "x$test_shortpath" = x; then 28451 # Short path failed, file does not exist as specified. 28452 # Try adding .exe or .cmd 28453 if test -f "${new_path}.exe"; then 28454 input_to_shortpath="${new_path}.exe" 28455 elif test -f "${new_path}.cmd"; then 28456 input_to_shortpath="${new_path}.cmd" 28457 else 28458 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5 28459 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;} 28460 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 28461 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 28462 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28463 fi 28464 else 28465 input_to_shortpath="$new_path" 28466 fi 28467 28468 # Call helper function which possibly converts this using DOS-style short mode. 28469 # If so, the updated path is stored in $new_path. 28470 new_path="$input_to_shortpath" 28471 28472 input_path="$input_to_shortpath" 28473 # Check if we need to convert this using DOS-style short mode. If the path 28474 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28475 # take no chances and rewrite it. 28476 # Note: m4 eats our [], so we need to use [ and ] instead. 28477 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 28478 if test "x$has_forbidden_chars" != x; then 28479 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28480 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 28481 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 28482 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 28483 # Going to short mode and back again did indeed matter. Since short mode is 28484 # case insensitive, let's make it lowercase to improve readability. 28485 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28486 # Now convert it back to Unix-stile (cygpath) 28487 input_path=`$CYGPATH -u "$shortmode_path"` 28488 new_path="$input_path" 28489 fi 28490 fi 28491 28492 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 28493 if test "x$test_cygdrive_prefix" = x; then 28494 # As a simple fix, exclude /usr/bin since it's not a real path. 28495 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 28496 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 28497 # a path prefixed by /cygdrive for fixpath to work. 28498 new_path="$CYGWIN_ROOT_PATH$input_path" 28499 fi 28500 fi 28501 28502 # remove trailing .exe if any 28503 new_path="${new_path/%.exe/}" 28504 28505 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28506 28507 # First separate the path from the arguments. This will split at the first 28508 # space. 28509 complete="$LIPO" 28510 path="${complete%% *}" 28511 tmp="$complete EOL" 28512 arguments="${tmp#* }" 28513 28514 # Input might be given as Windows format, start by converting to 28515 # unix format. 28516 new_path="$path" 28517 28518 windows_path="$new_path" 28519 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28520 unix_path=`$CYGPATH -u "$windows_path"` 28521 new_path="$unix_path" 28522 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28523 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28524 new_path="$unix_path" 28525 fi 28526 28527 28528 # Now try to locate executable using which 28529 new_path=`$WHICH "$new_path" 2> /dev/null` 28530 28531 if test "x$new_path" = x; then 28532 # Oops. Which didn't find the executable. 28533 # The splitting of arguments from the executable at a space might have been incorrect, 28534 # since paths with space are more likely in Windows. Give it another try with the whole 28535 # argument. 28536 path="$complete" 28537 arguments="EOL" 28538 new_path="$path" 28539 28540 windows_path="$new_path" 28541 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28542 unix_path=`$CYGPATH -u "$windows_path"` 28543 new_path="$unix_path" 28544 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28545 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28546 new_path="$unix_path" 28547 fi 28548 28549 28550 new_path=`$WHICH "$new_path" 2> /dev/null` 28551 28552 if test "x$new_path" = x; then 28553 # It's still not found. Now this is an unrecoverable error. 28554 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28555 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28556 has_space=`$ECHO "$complete" | $GREP " "` 28557 if test "x$has_space" != x; then 28558 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28559 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28560 fi 28561 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28562 fi 28563 fi 28564 28565 # Now new_path has a complete unix path to the binary 28566 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 28567 # Keep paths in /bin as-is, but remove trailing .exe if any 28568 new_path="${new_path/%.exe/}" 28569 # Do not save /bin paths to all_fixpath_prefixes! 28570 else 28571 # Not in mixed or Windows style, start by that. 28572 new_path=`cmd //c echo $new_path` 28573 28574 input_path="$new_path" 28575 # Check if we need to convert this using DOS-style short mode. If the path 28576 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28577 # take no chances and rewrite it. 28578 # Note: m4 eats our [], so we need to use [ and ] instead. 28579 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 28580 if test "x$has_forbidden_chars" != x; then 28581 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28582 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28583 fi 28584 28585 # Output is in $new_path 28586 28587 windows_path="$new_path" 28588 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28589 unix_path=`$CYGPATH -u "$windows_path"` 28590 new_path="$unix_path" 28591 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28592 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28593 new_path="$unix_path" 28594 fi 28595 28596 # remove trailing .exe if any 28597 new_path="${new_path/%.exe/}" 28598 28599 # Save the first 10 bytes of this path to the storage, so fixpath can work. 28600 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 28601 fi 28602 28603 else 28604 # We're on a posix platform. Hooray! :) 28605 # First separate the path from the arguments. This will split at the first 28606 # space. 28607 complete="$LIPO" 28608 path="${complete%% *}" 28609 tmp="$complete EOL" 28610 arguments="${tmp#* }" 28611 28612 # Cannot rely on the command "which" here since it doesn't always work. 28613 is_absolute_path=`$ECHO "$path" | $GREP ^/` 28614 if test -z "$is_absolute_path"; then 28615 # Path to executable is not absolute. Find it. 28616 IFS_save="$IFS" 28617 IFS=: 28618 for p in $PATH; do 28619 if test -f "$p/$path" && test -x "$p/$path"; then 28620 new_path="$p/$path" 28621 break 28622 fi 28623 done 28624 IFS="$IFS_save" 28625 else 28626 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5 28627 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;} 28628 new_path="$path" 28629 fi 28630 28631 if test "x$new_path" = x; then 28632 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28633 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28634 has_space=`$ECHO "$complete" | $GREP " "` 28635 if test "x$has_space" != x; then 28636 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 28637 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 28638 fi 28639 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28640 fi 28641 fi 28642 28643 # Now join together the path and the arguments once again 28644 if test "x$arguments" != xEOL; then 28645 new_complete="$new_path ${arguments% *}" 28646 else 28647 new_complete="$new_path" 28648 fi 28649 28650 if test "x$complete" != "x$new_complete"; then 28651 LIPO="$new_complete" 28652 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 28653 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} 28654 fi 28655 28656 fi 28657 28658 28659 28660 # Restore old path without tools dir 28661 PATH="$OLD_PATH" 28662 28663 28664 # FIXME: Currently we must test this after paths but before flags. Fix! 28665 28666 # And we can test some aspects on the target using configure macros. 28667 28668 28669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 28670 $as_echo_n "checking for ANSI C header files... " >&6; } 28671 if ${ac_cv_header_stdc+:} false; then : 28672 $as_echo_n "(cached) " >&6 28673 else 28674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28675 /* end confdefs.h. */ 28676 #include <stdlib.h> 28677 #include <stdarg.h> 28678 #include <string.h> 28679 #include <float.h> 28680 28681 int 28682 main () 28683 { 28684 28685 ; 28686 return 0; 28687 } 28688 _ACEOF 28689 if ac_fn_cxx_try_compile "$LINENO"; then : 28690 ac_cv_header_stdc=yes 28691 else 28692 ac_cv_header_stdc=no 28693 fi 28694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28695 28696 if test $ac_cv_header_stdc = yes; then 28697 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 28698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28699 /* end confdefs.h. */ 28700 #include <string.h> 28701 28702 _ACEOF 28703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28704 $EGREP "memchr" >/dev/null 2>&1; then : 28705 28706 else 28707 ac_cv_header_stdc=no 28708 fi 28709 rm -f conftest* 28710 28711 fi 28712 28713 if test $ac_cv_header_stdc = yes; then 28714 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 28715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28716 /* end confdefs.h. */ 28717 #include <stdlib.h> 28718 28719 _ACEOF 28720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28721 $EGREP "free" >/dev/null 2>&1; then : 28722 28723 else 28724 ac_cv_header_stdc=no 28725 fi 28726 rm -f conftest* 28727 28728 fi 28729 28730 if test $ac_cv_header_stdc = yes; then 28731 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 28732 if test "$cross_compiling" = yes; then : 28733 : 28734 else 28735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28736 /* end confdefs.h. */ 28737 #include <ctype.h> 28738 #include <stdlib.h> 28739 #if ((' ' & 0x0FF) == 0x020) 28740 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 28741 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 28742 #else 28743 # define ISLOWER(c) \ 28744 (('a' <= (c) && (c) <= 'i') \ 28745 || ('j' <= (c) && (c) <= 'r') \ 28746 || ('s' <= (c) && (c) <= 'z')) 28747 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 28748 #endif 28749 28750 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 28751 int 28752 main () 28753 { 28754 int i; 28755 for (i = 0; i < 256; i++) 28756 if (XOR (islower (i), ISLOWER (i)) 28757 || toupper (i) != TOUPPER (i)) 28758 return 2; 28759 return 0; 28760 } 28761 _ACEOF 28762 if ac_fn_cxx_try_run "$LINENO"; then : 28763 28764 else 28765 ac_cv_header_stdc=no 28766 fi 28767 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28768 conftest.$ac_objext conftest.beam conftest.$ac_ext 28769 fi 28770 28771 fi 28772 fi 28773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 28774 $as_echo "$ac_cv_header_stdc" >&6; } 28775 if test $ac_cv_header_stdc = yes; then 28776 28777 $as_echo "#define STDC_HEADERS 1" >>confdefs.h 28778 28779 fi 28780 28781 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 28782 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 28783 inttypes.h stdint.h unistd.h 28784 do : 28785 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 28786 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 28787 " 28788 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 28789 cat >>confdefs.h <<_ACEOF 28790 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 28791 _ACEOF 28792 28793 fi 28794 28795 done 28796 28797 28798 28799 ############################################################################### 28800 # 28801 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. 28802 # (The JVM can use 32 or 64 bit Java pointers but that decision 28803 # is made at runtime.) 28804 # 28805 28806 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 28807 # Always specify -m flags on Solaris 28808 28809 # keep track of c/cxx flags that we added outselves... 28810 # to prevent emitting warning... 28811 TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" 28812 28813 28814 CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}" 28815 CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}" 28816 LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}" 28817 28818 CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}" 28819 CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}" 28820 LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}" 28821 28822 elif test "x$COMPILE_TYPE" = xreduced; then 28823 if test "x$OPENJDK_TARGET_OS" != xwindows; then 28824 # Specify -m if running reduced on other Posix platforms 28825 28826 # keep track of c/cxx flags that we added outselves... 28827 # to prevent emitting warning... 28828 TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" 28829 28830 28831 CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}" 28832 CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}" 28833 LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}" 28834 28835 CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}" 28836 CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}" 28837 LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}" 28838 28839 fi 28840 fi 28841 28842 # Make compilation sanity check 28843 for ac_header in stdio.h 28844 do : 28845 ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" 28846 if test "x$ac_cv_header_stdio_h" = xyes; then : 28847 cat >>confdefs.h <<_ACEOF 28848 #define HAVE_STDIO_H 1 28849 _ACEOF 28850 28851 else 28852 28853 { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5 28854 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;} 28855 if test "x$COMPILE_TYPE" = xreduced; then 28856 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5 28857 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;} 28858 elif test "x$COMPILE_TYPE" = xcross; then 28859 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5 28860 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;} 28861 fi 28862 as_fn_error $? "Cannot continue." "$LINENO" 5 28863 28864 fi 28865 28866 done 28867 28868 28869 # The cast to long int works around a bug in the HP C Compiler 28870 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 28871 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 28872 # This bug is HP SR number 8606223364. 28873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5 28874 $as_echo_n "checking size of int *... " >&6; } 28875 if ${ac_cv_sizeof_int_p+:} false; then : 28876 $as_echo_n "(cached) " >&6 28877 else 28878 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then : 28879 28880 else 28881 if test "$ac_cv_type_int_p" = yes; then 28882 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 28883 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 28884 as_fn_error 77 "cannot compute sizeof (int *) 28885 See \`config.log' for more details" "$LINENO" 5; } 28886 else 28887 ac_cv_sizeof_int_p=0 28888 fi 28889 fi 28890 28891 fi 28892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5 28893 $as_echo "$ac_cv_sizeof_int_p" >&6; } 28894 28895 28896 28897 cat >>confdefs.h <<_ACEOF 28898 #define SIZEOF_INT_P $ac_cv_sizeof_int_p 28899 _ACEOF 28900 28901 28902 28903 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then 28904 # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html 28905 SIZEOF_INT_P="$ac_cv_sizeof_int_p" 28906 fi 28907 28908 if test "x$SIZEOF_INT_P" = x; then 28909 # The test failed, lets stick to the assumed value. 28910 { $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 28911 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;} 28912 else 28913 TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P` 28914 28915 if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then 28916 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 28917 fi 28918 fi 28919 28920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5 28921 $as_echo_n "checking for target address size... " >&6; } 28922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5 28923 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; } 28924 28925 28926 ############################################################################### 28927 # 28928 # Is the target little of big endian? 28929 # 28930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 28931 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } 28932 if ${ac_cv_c_bigendian+:} false; then : 28933 $as_echo_n "(cached) " >&6 28934 else 28935 ac_cv_c_bigendian=unknown 28936 # See if we're dealing with a universal compiler. 28937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28938 /* end confdefs.h. */ 28939 #ifndef __APPLE_CC__ 28940 not a universal capable compiler 28941 #endif 28942 typedef int dummy; 28943 28944 _ACEOF 28945 if ac_fn_cxx_try_compile "$LINENO"; then : 28946 28947 # Check for potential -arch flags. It is not universal unless 28948 # there are at least two -arch flags with different values. 28949 ac_arch= 28950 ac_prev= 28951 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 28952 if test -n "$ac_prev"; then 28953 case $ac_word in 28954 i?86 | x86_64 | ppc | ppc64) 28955 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 28956 ac_arch=$ac_word 28957 else 28958 ac_cv_c_bigendian=universal 28959 break 28960 fi 28961 ;; 28962 esac 28963 ac_prev= 28964 elif test "x$ac_word" = "x-arch"; then 28965 ac_prev=arch 28966 fi 28967 done 28968 fi 28969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28970 if test $ac_cv_c_bigendian = unknown; then 28971 # See if sys/param.h defines the BYTE_ORDER macro. 28972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28973 /* end confdefs.h. */ 28974 #include <sys/types.h> 28975 #include <sys/param.h> 28976 28977 int 28978 main () 28979 { 28980 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 28981 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 28982 && LITTLE_ENDIAN) 28983 bogus endian macros 28984 #endif 28985 28986 ; 28987 return 0; 28988 } 28989 _ACEOF 28990 if ac_fn_cxx_try_compile "$LINENO"; then : 28991 # It does; now see whether it defined to BIG_ENDIAN or not. 28992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28993 /* end confdefs.h. */ 28994 #include <sys/types.h> 28995 #include <sys/param.h> 28996 28997 int 28998 main () 28999 { 29000 #if BYTE_ORDER != BIG_ENDIAN 29001 not big endian 29002 #endif 29003 29004 ; 29005 return 0; 29006 } 29007 _ACEOF 29008 if ac_fn_cxx_try_compile "$LINENO"; then : 29009 ac_cv_c_bigendian=yes 29010 else 29011 ac_cv_c_bigendian=no 29012 fi 29013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29014 fi 29015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29016 fi 29017 if test $ac_cv_c_bigendian = unknown; then 29018 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 29019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29020 /* end confdefs.h. */ 29021 #include <limits.h> 29022 29023 int 29024 main () 29025 { 29026 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 29027 bogus endian macros 29028 #endif 29029 29030 ; 29031 return 0; 29032 } 29033 _ACEOF 29034 if ac_fn_cxx_try_compile "$LINENO"; then : 29035 # It does; now see whether it defined to _BIG_ENDIAN or not. 29036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29037 /* end confdefs.h. */ 29038 #include <limits.h> 29039 29040 int 29041 main () 29042 { 29043 #ifndef _BIG_ENDIAN 29044 not big endian 29045 #endif 29046 29047 ; 29048 return 0; 29049 } 29050 _ACEOF 29051 if ac_fn_cxx_try_compile "$LINENO"; then : 29052 ac_cv_c_bigendian=yes 29053 else 29054 ac_cv_c_bigendian=no 29055 fi 29056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29057 fi 29058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29059 fi 29060 if test $ac_cv_c_bigendian = unknown; then 29061 # Compile a test program. 29062 if test "$cross_compiling" = yes; then : 29063 # Try to guess by grepping values from an object file. 29064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29065 /* end confdefs.h. */ 29066 short int ascii_mm[] = 29067 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 29068 short int ascii_ii[] = 29069 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 29070 int use_ascii (int i) { 29071 return ascii_mm[i] + ascii_ii[i]; 29072 } 29073 short int ebcdic_ii[] = 29074 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 29075 short int ebcdic_mm[] = 29076 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 29077 int use_ebcdic (int i) { 29078 return ebcdic_mm[i] + ebcdic_ii[i]; 29079 } 29080 extern int foo; 29081 29082 int 29083 main () 29084 { 29085 return use_ascii (foo) == use_ebcdic (foo); 29086 ; 29087 return 0; 29088 } 29089 _ACEOF 29090 if ac_fn_cxx_try_compile "$LINENO"; then : 29091 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 29092 ac_cv_c_bigendian=yes 29093 fi 29094 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 29095 if test "$ac_cv_c_bigendian" = unknown; then 29096 ac_cv_c_bigendian=no 29097 else 29098 # finding both strings is unlikely to happen, but who knows? 29099 ac_cv_c_bigendian=unknown 29100 fi 29101 fi 29102 fi 29103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29104 else 29105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29106 /* end confdefs.h. */ 29107 $ac_includes_default 29108 int 29109 main () 29110 { 29111 29112 /* Are we little or big endian? From Harbison&Steele. */ 29113 union 29114 { 29115 long int l; 29116 char c[sizeof (long int)]; 29117 } u; 29118 u.l = 1; 29119 return u.c[sizeof (long int) - 1] == 1; 29120 29121 ; 29122 return 0; 29123 } 29124 _ACEOF 29125 if ac_fn_cxx_try_run "$LINENO"; then : 29126 ac_cv_c_bigendian=no 29127 else 29128 ac_cv_c_bigendian=yes 29129 fi 29130 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 29131 conftest.$ac_objext conftest.beam conftest.$ac_ext 29132 fi 29133 29134 fi 29135 fi 29136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 29137 $as_echo "$ac_cv_c_bigendian" >&6; } 29138 case $ac_cv_c_bigendian in #( 29139 yes) 29140 ENDIAN="big";; #( 29141 no) 29142 ENDIAN="little" ;; #( 29143 universal) 29144 ENDIAN="universal_endianness" 29145 ;; #( 29146 *) 29147 ENDIAN="unknown" ;; 29148 esac 29149 29150 29151 if test "x$ENDIAN" = xuniversal_endianness; then 29152 as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5 29153 fi 29154 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then 29155 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 29156 fi 29157 29158 29159 # Configure flags for the tools 29160 29161 29162 ############################################################################### 29163 # 29164 # How to compile shared libraries. 29165 # 29166 29167 if test "x$GCC" = xyes; then 29168 COMPILER_NAME=gcc 29169 PICFLAG="-fPIC" 29170 LIBRARY_PREFIX=lib 29171 SHARED_LIBRARY='lib$1.so' 29172 STATIC_LIBRARY='lib$1.a' 29173 SHARED_LIBRARY_FLAGS="-shared" 29174 SHARED_LIBRARY_SUFFIX='.so' 29175 STATIC_LIBRARY_SUFFIX='.a' 29176 OBJ_SUFFIX='.o' 29177 EXE_SUFFIX='' 29178 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1' 29179 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1' 29180 C_FLAG_REORDER='' 29181 CXX_FLAG_REORDER='' 29182 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1' 29183 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1' 29184 LD="$CC" 29185 LDEXE="$CC" 29186 LDCXX="$CXX" 29187 LDEXECXX="$CXX" 29188 POST_STRIP_CMD="$STRIP -g" 29189 29190 # Linking is different on MacOSX 29191 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29192 # Might change in the future to clang. 29193 COMPILER_NAME=gcc 29194 SHARED_LIBRARY='lib$1.dylib' 29195 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" 29196 SHARED_LIBRARY_SUFFIX='.dylib' 29197 EXE_SUFFIX='' 29198 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1' 29199 SET_SHARED_LIBRARY_MAPFILE='' 29200 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' 29201 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 29202 POST_STRIP_CMD="$STRIP -S" 29203 fi 29204 else 29205 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29206 # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler 29207 COMPILER_NAME=ossc 29208 PICFLAG="-KPIC" 29209 LIBRARY_PREFIX=lib 29210 SHARED_LIBRARY='lib$1.so' 29211 STATIC_LIBRARY='lib$1.a' 29212 SHARED_LIBRARY_FLAGS="-G" 29213 SHARED_LIBRARY_SUFFIX='.so' 29214 STATIC_LIBRARY_SUFFIX='.a' 29215 OBJ_SUFFIX='.o' 29216 EXE_SUFFIX='' 29217 SET_SHARED_LIBRARY_NAME='' 29218 SET_SHARED_LIBRARY_MAPFILE='-M$1' 29219 C_FLAG_REORDER='-xF' 29220 CXX_FLAG_REORDER='-xF' 29221 SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1' 29222 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 29223 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" 29224 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" 29225 CFLAGS_JDKLIB_EXTRA='-xstrconst' 29226 POST_STRIP_CMD="$STRIP -x" 29227 POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" 29228 fi 29229 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29230 # If it is not gcc, then assume it is the MS Visual Studio compiler 29231 COMPILER_NAME=cl 29232 PICFLAG="" 29233 LIBRARY_PREFIX= 29234 SHARED_LIBRARY='$1.dll' 29235 STATIC_LIBRARY='$1.lib' 29236 SHARED_LIBRARY_FLAGS="-LD" 29237 SHARED_LIBRARY_SUFFIX='.dll' 29238 STATIC_LIBRARY_SUFFIX='.lib' 29239 OBJ_SUFFIX='.obj' 29240 EXE_SUFFIX='.exe' 29241 SET_SHARED_LIBRARY_NAME='' 29242 SET_SHARED_LIBRARY_MAPFILE='' 29243 SET_SHARED_LIBRARY_ORIGIN='' 29244 SET_EXECUTABLE_ORIGIN='' 29245 fi 29246 fi 29247 29248 29249 29250 29251 29252 29253 29254 29255 29256 29257 29258 29259 29260 29261 29262 29263 29264 29265 29266 # The (cross) compiler is now configured, we can now test capabilities 29267 # of the target platform. 29268 29269 29270 29271 ############################################################################### 29272 # 29273 # Setup the opt flags for different compilers 29274 # and different operating systems. 29275 # 29276 29277 # 29278 # NOTE: check for -mstackrealign needs to be below potential addition of -m32 29279 # 29280 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then 29281 # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. 29282 # While waiting for a better solution, the current workaround is to use -mstackrealign. 29283 CFLAGS="$CFLAGS -mstackrealign" 29284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5 29285 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; } 29286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29287 /* end confdefs.h. */ 29288 int main() { return 0; } 29289 _ACEOF 29290 if ac_fn_cxx_try_link "$LINENO"; then : 29291 29292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 29293 $as_echo "yes" >&6; } 29294 29295 else 29296 29297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 29298 $as_echo "no" >&6; } 29299 as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5 29300 29301 fi 29302 rm -f core conftest.err conftest.$ac_objext \ 29303 conftest$ac_exeext conftest.$ac_ext 29304 fi 29305 29306 C_FLAG_DEPS="-MMD -MF" 29307 CXX_FLAG_DEPS="-MMD -MF" 29308 29309 case $COMPILER_TYPE in 29310 CC ) 29311 case $COMPILER_NAME in 29312 gcc ) 29313 case $OPENJDK_TARGET_OS in 29314 macosx ) 29315 # On MacOSX we optimize for size, something 29316 # we should do for all platforms? 29317 C_O_FLAG_HI="-Os" 29318 C_O_FLAG_NORM="-Os" 29319 C_O_FLAG_NONE="" 29320 ;; 29321 *) 29322 C_O_FLAG_HI="-O3" 29323 C_O_FLAG_NORM="-O2" 29324 C_O_FLAG_NONE="-O0" 29325 ;; 29326 esac 29327 CXX_O_FLAG_HI="$C_O_FLAG_HI" 29328 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 29329 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 29330 CFLAGS_DEBUG_SYMBOLS="-g" 29331 CXXFLAGS_DEBUG_SYMBOLS="-g" 29332 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then 29333 CFLAGS_DEBUG_SYMBOLS="-g1" 29334 CXXFLAGS_DEBUG_SYMBOLS="-g1" 29335 fi 29336 ;; 29337 ossc ) 29338 # 29339 # Forte has different names for this with their C++ compiler... 29340 # 29341 C_FLAG_DEPS="-xMMD -xMF" 29342 CXX_FLAG_DEPS="-xMMD -xMF" 29343 29344 # Extra options used with HIGHEST 29345 # 29346 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be 29347 # done with care, there are some assumptions below that need to 29348 # be understood about the use of pointers, and IEEE behavior. 29349 # 29350 # Use non-standard floating point mode (not IEEE 754) 29351 CC_HIGHEST="$CC_HIGHEST -fns" 29352 # Do some simplification of floating point arithmetic (not IEEE 754) 29353 CC_HIGHEST="$CC_HIGHEST -fsimple" 29354 # Use single precision floating point with 'float' 29355 CC_HIGHEST="$CC_HIGHEST -fsingle" 29356 # Assume memory references via basic pointer types do not alias 29357 # (Source with excessing pointer casting and data access with mixed 29358 # pointer types are not recommended) 29359 CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" 29360 # Use intrinsic or inline versions for math/std functions 29361 # (If you expect perfect errno behavior, do not use this) 29362 CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all" 29363 # Loop data dependency optimizations (need -xO3 or higher) 29364 CC_HIGHEST="$CC_HIGHEST -xdepend" 29365 # Pointer parameters to functions do not overlap 29366 # (Similar to -xalias_level=basic usage, but less obvious sometimes. 29367 # If you pass in multiple pointers to the same data, do not use this) 29368 CC_HIGHEST="$CC_HIGHEST -xrestrict" 29369 # Inline some library routines 29370 # (If you expect perfect errno behavior, do not use this) 29371 CC_HIGHEST="$CC_HIGHEST -xlibmil" 29372 # Use optimized math routines 29373 # (If you expect perfect errno behavior, do not use this) 29374 # Can cause undefined external on Solaris 8 X86 on __sincos, removing for now 29375 #CC_HIGHEST="$CC_HIGHEST -xlibmopt" 29376 29377 if test "x$OPENJDK_TARGET_CPU" = xsparc; then 29378 CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" 29379 CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" 29380 fi 29381 29382 case $OPENJDK_TARGET_CPU_ARCH in 29383 x86) 29384 C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr" 29385 C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr" 29386 C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr" 29387 C_O_FLAG_NONE="-xregs=no%frameptr" 29388 CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr" 29389 CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr" 29390 CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr" 29391 CXX_O_FLAG_NONE="-xregs=no%frameptr" 29392 if test "x$OPENJDK_TARGET_CPU" = xx86; then 29393 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium" 29394 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium" 29395 fi 29396 ;; 29397 sparc) 29398 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 29399 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 29400 C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 29401 C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" 29402 C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" 29403 C_O_FLAG_NONE="" 29404 CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 29405 CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 29406 CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 29407 CXX_O_FLAG_NONE="" 29408 ;; 29409 esac 29410 29411 CFLAGS_DEBUG_SYMBOLS="-g -xs" 29412 CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" 29413 esac 29414 ;; 29415 CL ) 29416 C_O_FLAG_HIGHEST="-O2" 29417 C_O_FLAG_HI="-O1" 29418 C_O_FLAG_NORM="-O1" 29419 C_O_FLAG_NONE="-Od" 29420 CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" 29421 CXX_O_FLAG_HI="$C_O_FLAG_HI" 29422 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 29423 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 29424 ;; 29425 esac 29426 29427 if test -z "$C_O_FLAG_HIGHEST"; then 29428 C_O_FLAG_HIGHEST="$C_O_FLAG_HI" 29429 fi 29430 29431 if test -z "$CXX_O_FLAG_HIGHEST"; then 29432 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" 29433 fi 29434 29435 29436 29437 29438 29439 29440 29441 29442 29443 29444 29445 29446 29447 29448 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then 29449 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5 29450 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;} 29451 fi 29452 29453 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then 29454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5 29455 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;} 29456 fi 29457 29458 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then 29459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5 29460 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;} 29461 fi 29462 29463 29464 # Check whether --with-extra-cflags was given. 29465 if test "${with_extra_cflags+set}" = set; then : 29466 withval=$with_extra_cflags; 29467 fi 29468 29469 29470 29471 # Check whether --with-extra-cxxflags was given. 29472 if test "${with_extra_cxxflags+set}" = set; then : 29473 withval=$with_extra_cxxflags; 29474 fi 29475 29476 29477 29478 # Check whether --with-extra-ldflags was given. 29479 if test "${with_extra_ldflags+set}" = set; then : 29480 withval=$with_extra_ldflags; 29481 fi 29482 29483 29484 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" 29485 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" 29486 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" 29487 29488 # Hotspot needs these set in their legacy form 29489 LEGACY_EXTRA_CFLAGS=$with_extra_cflags 29490 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags 29491 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags 29492 29493 29494 29495 29496 29497 ############################################################################### 29498 # 29499 # Now setup the CFLAGS and LDFLAGS for the JDK build. 29500 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. 29501 # 29502 case $COMPILER_NAME in 29503 gcc ) 29504 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ 29505 -pipe \ 29506 -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" 29507 case $OPENJDK_TARGET_CPU_ARCH in 29508 arm ) 29509 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing 29510 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 29511 ;; 29512 ppc ) 29513 # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing 29514 ;; 29515 * ) 29516 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" 29517 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 29518 ;; 29519 esac 29520 ;; 29521 ossc ) 29522 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" 29523 case $OPENJDK_TARGET_CPU_ARCH in 29524 x86 ) 29525 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" 29526 CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" 29527 ;; 29528 esac 29529 29530 CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal" 29531 CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib" 29532 29533 LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext" 29534 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" 29535 ;; 29536 cl ) 29537 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ 29538 -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ 29539 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ 29540 -DWIN32 -DIAL" 29541 case $OPENJDK_TARGET_CPU in 29542 x86 ) 29543 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" 29544 ;; 29545 x86_64 ) 29546 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" 29547 ;; 29548 esac 29549 ;; 29550 esac 29551 29552 ############################################################################### 29553 29554 # Adjust flags according to debug level. 29555 case $DEBUG_LEVEL in 29556 fastdebug ) 29557 CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS" 29558 CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS" 29559 C_O_FLAG_HI="$C_O_FLAG_NORM" 29560 C_O_FLAG_NORM="$C_O_FLAG_NORM" 29561 CXX_O_FLAG_HI="$CXX_O_FLAG_NORM" 29562 CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM" 29563 JAVAC_FLAGS="$JAVAC_FLAGS -g" 29564 ;; 29565 slowdebug ) 29566 CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS" 29567 CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS" 29568 C_O_FLAG_HI="$C_O_FLAG_NONE" 29569 C_O_FLAG_NORM="$C_O_FLAG_NONE" 29570 CXX_O_FLAG_HI="$CXX_O_FLAG_NONE" 29571 CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" 29572 JAVAC_FLAGS="$JAVAC_FLAGS -g" 29573 ;; 29574 esac 29575 29576 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" 29577 29578 # The package path is used only on macosx? 29579 PACKAGE_PATH=/opt/local 29580 29581 29582 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then 29583 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the 29584 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN 29585 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). 29586 # Note: -Dmacro is the same as #define macro 1 29587 # -Dmacro= is the same as #define macro 29588 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29589 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN=" 29590 else 29591 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" 29592 fi 29593 else 29594 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" 29595 fi 29596 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29597 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" 29598 fi 29599 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29600 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" 29601 fi 29602 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29603 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" 29604 fi 29605 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29606 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT" 29607 # Setting these parameters makes it an error to link to macosx APIs that are 29608 # newer than the given OS version and makes the linked binaries compatible even 29609 # if built on a newer version of the OS. 29610 # The expected format is X.Y.Z 29611 MACOSX_VERSION_MIN=10.7.0 29612 29613 # The macro takes the version with no dots, ex: 1070 29614 # Let the flags variables get resolved in make for easier override on make 29615 # command line. 29616 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" 29617 LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" 29618 fi 29619 if test "x$OPENJDK_TARGET_OS" = xbsd; then 29620 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" 29621 fi 29622 if test "x$DEBUG_LEVEL" = xrelease; then 29623 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" 29624 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29625 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" 29626 fi 29627 else 29628 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" 29629 fi 29630 29631 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" 29632 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" 29633 29634 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ 29635 -I${JDK_OUTPUTDIR}/include \ 29636 -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ 29637 -I${JDK_TOPDIR}/src/share/javavm/export \ 29638 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \ 29639 -I${JDK_TOPDIR}/src/share/native/common \ 29640 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common" 29641 29642 # The shared libraries are compiled using the picflag. 29643 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" 29644 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA " 29645 29646 # Executable flags 29647 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" 29648 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" 29649 29650 # Now this is odd. The JDK native libraries have to link against libjvm.so 29651 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server. 29652 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library 29653 # is identical for client and server? Yes. Which is picked at runtime (client or server)? 29654 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following 29655 # libraries will link to whatever is in memory. Yuck. 29656 # 29657 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. 29658 if test "x$COMPILER_NAME" = xcl; then 29659 LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" 29660 if test "x$OPENJDK_TARGET_CPU" = xx86; then 29661 LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" 29662 fi 29663 # TODO: make -debug optional "--disable-full-debug-symbols" 29664 LDFLAGS_JDK="$LDFLAGS_JDK -debug" 29665 LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib" 29666 LDFLAGS_JDKLIB_SUFFIX="" 29667 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 29668 LDFLAGS_STACK_SIZE=1048576 29669 else 29670 LDFLAGS_STACK_SIZE=327680 29671 fi 29672 LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" 29673 else 29674 if test "x$COMPILER_NAME" = xgcc; then 29675 # If this is a --hash-style=gnu system, use --hash-style=both, why? 29676 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` 29677 if test -n "$HAS_GNU_HASH"; then 29678 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " 29679 fi 29680 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29681 # And since we now know that the linker is gnu, then add -z defs, to forbid 29682 # undefined symbols in object files. 29683 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" 29684 if test "x$DEBUG_LEVEL" = "xrelease"; then 29685 # When building release libraries, tell the linker optimize them. 29686 # Should this be supplied to the OSS linker as well? 29687 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1" 29688 fi 29689 fi 29690 fi 29691 LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \ 29692 -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}" 29693 29694 # On some platforms (mac) the linker warns about non existing -L dirs. 29695 # Add server first if available. Linking aginst client does not always produce the same results. 29696 # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1. 29697 # Default to server for other variants. 29698 if test "x$JVM_VARIANT_SERVER" = xtrue; then 29699 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 29700 elif test "x$JVM_VARIANT_CLIENT" = xtrue; then 29701 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client" 29702 elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 29703 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal" 29704 else 29705 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 29706 fi 29707 29708 LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm" 29709 if test "x$COMPILER_NAME" = xossc; then 29710 LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" 29711 fi 29712 29713 LDFLAGS_JDKEXE="${LDFLAGS_JDK}" 29714 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29715 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined" 29716 fi 29717 fi 29718 29719 29720 29721 29722 29723 29724 29725 29726 29727 29728 29729 29730 29731 29732 29733 # Some Zero and Shark settings. 29734 # ZERO_ARCHFLAG tells the compiler which mode to build for 29735 case "${OPENJDK_TARGET_CPU}" in 29736 s390) 29737 ZERO_ARCHFLAG="-m31" 29738 ;; 29739 *) 29740 ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}" 29741 esac 29742 29743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5 29744 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; } 29745 supports=yes 29746 29747 saved_cflags="$CFLAGS" 29748 CFLAGS="$CFLAGS $ZERO_ARCHFLAG" 29749 ac_ext=c 29750 ac_cpp='$CPP $CPPFLAGS' 29751 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29752 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29753 ac_compiler_gnu=$ac_cv_c_compiler_gnu 29754 29755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29756 /* end confdefs.h. */ 29757 29758 int i; 29759 29760 _ACEOF 29761 if ac_fn_c_try_compile "$LINENO"; then : 29762 29763 else 29764 supports=no 29765 fi 29766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29767 ac_ext=cpp 29768 ac_cpp='$CXXCPP $CPPFLAGS' 29769 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29770 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29771 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29772 29773 CFLAGS="$saved_cflags" 29774 29775 saved_cxxflags="$CXXFLAGS" 29776 CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG" 29777 ac_ext=cpp 29778 ac_cpp='$CXXCPP $CPPFLAGS' 29779 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29780 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29781 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29782 29783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29784 /* end confdefs.h. */ 29785 29786 int i; 29787 29788 _ACEOF 29789 if ac_fn_cxx_try_compile "$LINENO"; then : 29790 29791 else 29792 supports=no 29793 fi 29794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29795 ac_ext=cpp 29796 ac_cpp='$CXXCPP $CPPFLAGS' 29797 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29798 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29799 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29800 29801 CXXFLAGS="$saved_cxxflags" 29802 29803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 29804 $as_echo "$supports" >&6; } 29805 if test "x$supports" = "xyes" ; then 29806 : 29807 else 29808 ZERO_ARCHFLAG="" 29809 fi 29810 29811 29812 29813 # Check that the compiler supports -mX flags 29814 # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does 29815 29816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5 29817 $as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; } 29818 supports=yes 29819 29820 saved_cflags="$CFLAGS" 29821 CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}" 29822 ac_ext=c 29823 ac_cpp='$CPP $CPPFLAGS' 29824 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29825 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29826 ac_compiler_gnu=$ac_cv_c_compiler_gnu 29827 29828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29829 /* end confdefs.h. */ 29830 29831 int i; 29832 29833 _ACEOF 29834 if ac_fn_c_try_compile "$LINENO"; then : 29835 29836 else 29837 supports=no 29838 fi 29839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29840 ac_ext=cpp 29841 ac_cpp='$CXXCPP $CPPFLAGS' 29842 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29843 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29844 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29845 29846 CFLAGS="$saved_cflags" 29847 29848 saved_cxxflags="$CXXFLAGS" 29849 CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}" 29850 ac_ext=cpp 29851 ac_cpp='$CXXCPP $CPPFLAGS' 29852 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29853 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29854 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29855 29856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29857 /* end confdefs.h. */ 29858 29859 int i; 29860 29861 _ACEOF 29862 if ac_fn_cxx_try_compile "$LINENO"; then : 29863 29864 else 29865 supports=no 29866 fi 29867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29868 ac_ext=cpp 29869 ac_cpp='$CXXCPP $CPPFLAGS' 29870 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29871 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29872 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29873 29874 CXXFLAGS="$saved_cxxflags" 29875 29876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 29877 $as_echo "$supports" >&6; } 29878 if test "x$supports" = "xyes" ; then 29879 COMPILER_SUPPORTS_TARGET_BITS_FLAG=true 29880 else 29881 COMPILER_SUPPORTS_TARGET_BITS_FLAG=false 29882 fi 29883 29884 29885 29886 29887 # Setup debug symbols (need objcopy from the toolchain for that) 29888 29889 # 29890 # ENABLE_DEBUG_SYMBOLS 29891 # This must be done after the toolchain is setup, since we're looking at objcopy. 29892 # 29893 # Check whether --enable-debug-symbols was given. 29894 if test "${enable_debug_symbols+set}" = set; then : 29895 enableval=$enable_debug_symbols; 29896 fi 29897 29898 29899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5 29900 $as_echo_n "checking if we should generate debug symbols... " >&6; } 29901 29902 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then 29903 # explicit enabling of enable-debug-symbols and can't find objcopy 29904 # this is an error 29905 as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5 29906 fi 29907 29908 if test "x$enable_debug_symbols" = "xyes"; then 29909 ENABLE_DEBUG_SYMBOLS=true 29910 elif test "x$enable_debug_symbols" = "xno"; then 29911 ENABLE_DEBUG_SYMBOLS=false 29912 else 29913 # default on macosx is false 29914 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29915 ENABLE_DEBUG_SYMBOLS=false 29916 # Default is on if objcopy is found, otherwise off 29917 elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then 29918 ENABLE_DEBUG_SYMBOLS=true 29919 else 29920 ENABLE_DEBUG_SYMBOLS=false 29921 fi 29922 fi 29923 29924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5 29925 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; } 29926 29927 # 29928 # ZIP_DEBUGINFO_FILES 29929 # 29930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5 29931 $as_echo_n "checking if we should zip debug-info files... " >&6; } 29932 # Check whether --enable-zip-debug-info was given. 29933 if test "${enable_zip_debug_info+set}" = set; then : 29934 enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}" 29935 else 29936 enable_zip_debug_info="yes" 29937 fi 29938 29939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5 29940 $as_echo "${enable_zip_debug_info}" >&6; } 29941 29942 if test "x${enable_zip_debug_info}" = "xno"; then 29943 ZIP_DEBUGINFO_FILES=false 29944 else 29945 ZIP_DEBUGINFO_FILES=true 29946 fi 29947 29948 29949 29950 29951 29952 29953 29954 ############################################################################### 29955 # 29956 # Check dependencies for external and internal libraries. 29957 # 29958 ############################################################################### 29959 29960 29961 29962 ############################################################################### 29963 # 29964 # OS specific settings that we never will need to probe. 29965 # 29966 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5 29968 $as_echo_n "checking what is not needed on Linux?... " >&6; } 29969 PULSE_NOT_NEEDED=yes 29970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5 29971 $as_echo "pulse" >&6; } 29972 fi 29973 29974 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5 29976 $as_echo_n "checking what is not needed on Solaris?... " >&6; } 29977 ALSA_NOT_NEEDED=yes 29978 PULSE_NOT_NEEDED=yes 29979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 29980 $as_echo "alsa pulse" >&6; } 29981 fi 29982 29983 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5 29985 $as_echo_n "checking what is not needed on Windows?... " >&6; } 29986 CUPS_NOT_NEEDED=yes 29987 ALSA_NOT_NEEDED=yes 29988 PULSE_NOT_NEEDED=yes 29989 X11_NOT_NEEDED=yes 29990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5 29991 $as_echo "alsa cups pulse x11" >&6; } 29992 fi 29993 29994 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5 29996 $as_echo_n "checking what is not needed on MacOSX?... " >&6; } 29997 ALSA_NOT_NEEDED=yes 29998 PULSE_NOT_NEEDED=yes 29999 X11_NOT_NEEDED=yes 30000 FREETYPE2_NOT_NEEDED=yes 30001 # If the java runtime framework is disabled, then we need X11. 30002 # This will be adjusted below. 30003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5 30004 $as_echo "alsa pulse x11" >&6; } 30005 fi 30006 30007 if test "x$OPENJDK_TARGET_OS" = xbsd; then 30008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5 30009 $as_echo_n "checking what is not needed on bsd?... " >&6; } 30010 ALSA_NOT_NEEDED=yes 30011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5 30012 $as_echo "alsa" >&6; } 30013 fi 30014 30015 if test "x$OPENJDK" = "xfalse"; then 30016 FREETYPE2_NOT_NEEDED=yes 30017 fi 30018 30019 if test "x$SUPPORT_HEADFUL" = xno; then 30020 X11_NOT_NEEDED=yes 30021 fi 30022 30023 ############################################################################### 30024 # 30025 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM 30026 # that uses this API. 30027 # 30028 # Check whether --enable-macosx-runtime-support was given. 30029 if test "${enable_macosx_runtime_support+set}" = set; then : 30030 enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}" 30031 else 30032 MACOSX_RUNTIME_SUPPORT="no" 30033 fi 30034 30035 30036 USE_MACOSX_RUNTIME_SUPPORT=no 30037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5 30038 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; } 30039 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 30040 if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then 30041 MACOSX_RUNTIME_SUPPORT=yes 30042 USE_MACOSX_RUNTIME_SUPPORT=yes 30043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5 30044 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; } 30045 else 30046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5 30047 $as_echo "yes, but explicitly disabled." >&6; } 30048 fi 30049 else 30050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30051 $as_echo "no" >&6; } 30052 fi 30053 30054 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then 30055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5 30056 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; } 30057 X11_NOT_NEEDED= 30058 FREETYPE2_NOT_NEEDED= 30059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 30060 $as_echo "alsa pulse" >&6; } 30061 fi 30062 30063 30064 30065 ############################################################################### 30066 # 30067 # Check for X Windows 30068 # 30069 30070 # Check if the user has specified sysroot, but not --x-includes or --x-libraries. 30071 # Make a simple check for the libraries at the sysroot, and setup --x-includes and 30072 # --x-libraries for the sysroot, if that seems to be correct. 30073 if test "x$SYS_ROOT" != "x/"; then 30074 if test "x$x_includes" = xNONE; then 30075 if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then 30076 x_includes="$SYS_ROOT/usr/X11R6/include" 30077 elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then 30078 x_includes="$SYS_ROOT/usr/include" 30079 fi 30080 fi 30081 if test "x$x_libraries" = xNONE; then 30082 if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then 30083 x_libraries="$SYS_ROOT/usr/X11R6/lib" 30084 elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 30085 x_libraries="$SYS_ROOT/usr/lib64" 30086 elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then 30087 x_libraries="$SYS_ROOT/usr/lib" 30088 fi 30089 fi 30090 fi 30091 30092 # Now let autoconf do it's magic 30093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 30094 $as_echo_n "checking for X... " >&6; } 30095 30096 30097 # Check whether --with-x was given. 30098 if test "${with_x+set}" = set; then : 30099 withval=$with_x; 30100 fi 30101 30102 # $have_x is `yes', `no', `disabled', or empty when we do not yet know. 30103 if test "x$with_x" = xno; then 30104 # The user explicitly disabled X. 30105 have_x=disabled 30106 else 30107 case $x_includes,$x_libraries in #( 30108 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( 30109 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : 30110 $as_echo_n "(cached) " >&6 30111 else 30112 # One or both of the vars are not set, and there is no cached value. 30113 ac_x_includes=no ac_x_libraries=no 30114 rm -f -r conftest.dir 30115 if mkdir conftest.dir; then 30116 cd conftest.dir 30117 cat >Imakefile <<'_ACEOF' 30118 incroot: 30119 @echo incroot='${INCROOT}' 30120 usrlibdir: 30121 @echo usrlibdir='${USRLIBDIR}' 30122 libdir: 30123 @echo libdir='${LIBDIR}' 30124 _ACEOF 30125 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then 30126 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 30127 for ac_var in incroot usrlibdir libdir; do 30128 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" 30129 done 30130 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. 30131 for ac_extension in a so sl dylib la dll; do 30132 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && 30133 test -f "$ac_im_libdir/libX11.$ac_extension"; then 30134 ac_im_usrlibdir=$ac_im_libdir; break 30135 fi 30136 done 30137 # Screen out bogus values from the imake configuration. They are 30138 # bogus both because they are the default anyway, and because 30139 # using them would break gcc on systems where it needs fixed includes. 30140 case $ac_im_incroot in 30141 /usr/include) ac_x_includes= ;; 30142 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; 30143 esac 30144 case $ac_im_usrlibdir in 30145 /usr/lib | /usr/lib64 | /lib | /lib64) ;; 30146 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; 30147 esac 30148 fi 30149 cd .. 30150 rm -f -r conftest.dir 30151 fi 30152 30153 # Standard set of common directories for X headers. 30154 # Check X11 before X11Rn because it is often a symlink to the current release. 30155 ac_x_header_dirs=' 30156 /usr/X11/include 30157 /usr/X11R7/include 30158 /usr/X11R6/include 30159 /usr/X11R5/include 30160 /usr/X11R4/include 30161 30162 /usr/include/X11 30163 /usr/include/X11R7 30164 /usr/include/X11R6 30165 /usr/include/X11R5 30166 /usr/include/X11R4 30167 30168 /usr/local/X11/include 30169 /usr/local/X11R7/include 30170 /usr/local/X11R6/include 30171 /usr/local/X11R5/include 30172 /usr/local/X11R4/include 30173 30174 /usr/local/include/X11 30175 /usr/local/include/X11R7 30176 /usr/local/include/X11R6 30177 /usr/local/include/X11R5 30178 /usr/local/include/X11R4 30179 30180 /usr/X386/include 30181 /usr/x386/include 30182 /usr/XFree86/include/X11 30183 30184 /usr/include 30185 /usr/local/include 30186 /usr/unsupported/include 30187 /usr/athena/include 30188 /usr/local/x11r5/include 30189 /usr/lpp/Xamples/include 30190 30191 /usr/openwin/include 30192 /usr/openwin/share/include' 30193 30194 if test "$ac_x_includes" = no; then 30195 # Guess where to find include files, by looking for Xlib.h. 30196 # First, try using that file with no special directory specified. 30197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30198 /* end confdefs.h. */ 30199 #include <X11/Xlib.h> 30200 _ACEOF 30201 if ac_fn_cxx_try_cpp "$LINENO"; then : 30202 # We can compile using X headers with no special include directory. 30203 ac_x_includes= 30204 else 30205 for ac_dir in $ac_x_header_dirs; do 30206 if test -r "$ac_dir/X11/Xlib.h"; then 30207 ac_x_includes=$ac_dir 30208 break 30209 fi 30210 done 30211 fi 30212 rm -f conftest.err conftest.i conftest.$ac_ext 30213 fi # $ac_x_includes = no 30214 30215 if test "$ac_x_libraries" = no; then 30216 # Check for the libraries. 30217 # See if we find them without any special options. 30218 # Don't add to $LIBS permanently. 30219 ac_save_LIBS=$LIBS 30220 LIBS="-lX11 $LIBS" 30221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30222 /* end confdefs.h. */ 30223 #include <X11/Xlib.h> 30224 int 30225 main () 30226 { 30227 XrmInitialize () 30228 ; 30229 return 0; 30230 } 30231 _ACEOF 30232 if ac_fn_cxx_try_link "$LINENO"; then : 30233 LIBS=$ac_save_LIBS 30234 # We can link X programs with no special library path. 30235 ac_x_libraries= 30236 else 30237 LIBS=$ac_save_LIBS 30238 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` 30239 do 30240 # Don't even attempt the hair of trying to link an X program! 30241 for ac_extension in a so sl dylib la dll; do 30242 if test -r "$ac_dir/libX11.$ac_extension"; then 30243 ac_x_libraries=$ac_dir 30244 break 2 30245 fi 30246 done 30247 done 30248 fi 30249 rm -f core conftest.err conftest.$ac_objext \ 30250 conftest$ac_exeext conftest.$ac_ext 30251 fi # $ac_x_libraries = no 30252 30253 case $ac_x_includes,$ac_x_libraries in #( 30254 no,* | *,no | *\'*) 30255 # Didn't find X, or a directory has "'" in its name. 30256 ac_cv_have_x="have_x=no";; #( 30257 *) 30258 # Record where we found X for the cache. 30259 ac_cv_have_x="have_x=yes\ 30260 ac_x_includes='$ac_x_includes'\ 30261 ac_x_libraries='$ac_x_libraries'" 30262 esac 30263 fi 30264 ;; #( 30265 *) have_x=yes;; 30266 esac 30267 eval "$ac_cv_have_x" 30268 fi # $with_x != no 30269 30270 if test "$have_x" != yes; then 30271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 30272 $as_echo "$have_x" >&6; } 30273 no_x=yes 30274 else 30275 # If each of the values was on the command line, it overrides each guess. 30276 test "x$x_includes" = xNONE && x_includes=$ac_x_includes 30277 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries 30278 # Update the cache value to reflect the command line values. 30279 ac_cv_have_x="have_x=yes\ 30280 ac_x_includes='$x_includes'\ 30281 ac_x_libraries='$x_libraries'" 30282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 30283 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } 30284 fi 30285 30286 if test "$no_x" = yes; then 30287 # Not all programs may use this symbol, but it does not hurt to define it. 30288 30289 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h 30290 30291 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= 30292 else 30293 if test -n "$x_includes"; then 30294 X_CFLAGS="$X_CFLAGS -I$x_includes" 30295 fi 30296 30297 # It would also be nice to do this for all -L options, not just this one. 30298 if test -n "$x_libraries"; then 30299 X_LIBS="$X_LIBS -L$x_libraries" 30300 # For Solaris; some versions of Sun CC require a space after -R and 30301 # others require no space. Words are not sufficient . . . . 30302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 30303 $as_echo_n "checking whether -R must be followed by a space... " >&6; } 30304 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" 30305 ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag 30306 ac_cxx_werror_flag=yes 30307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30308 /* end confdefs.h. */ 30309 30310 int 30311 main () 30312 { 30313 30314 ; 30315 return 0; 30316 } 30317 _ACEOF 30318 if ac_fn_cxx_try_link "$LINENO"; then : 30319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30320 $as_echo "no" >&6; } 30321 X_LIBS="$X_LIBS -R$x_libraries" 30322 else 30323 LIBS="$ac_xsave_LIBS -R $x_libraries" 30324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30325 /* end confdefs.h. */ 30326 30327 int 30328 main () 30329 { 30330 30331 ; 30332 return 0; 30333 } 30334 _ACEOF 30335 if ac_fn_cxx_try_link "$LINENO"; then : 30336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 30337 $as_echo "yes" >&6; } 30338 X_LIBS="$X_LIBS -R $x_libraries" 30339 else 30340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 30341 $as_echo "neither works" >&6; } 30342 fi 30343 rm -f core conftest.err conftest.$ac_objext \ 30344 conftest$ac_exeext conftest.$ac_ext 30345 fi 30346 rm -f core conftest.err conftest.$ac_objext \ 30347 conftest$ac_exeext conftest.$ac_ext 30348 ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag 30349 LIBS=$ac_xsave_LIBS 30350 fi 30351 30352 # Check for system-dependent libraries X programs must link with. 30353 # Do this before checking for the system-independent R6 libraries 30354 # (-lICE), since we may need -lsocket or whatever for X linking. 30355 30356 if test "$ISC" = yes; then 30357 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" 30358 else 30359 # Martyn Johnson says this is needed for Ultrix, if the X 30360 # libraries were built with DECnet support. And Karl Berry says 30361 # the Alpha needs dnet_stub (dnet does not exist). 30362 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" 30363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30364 /* end confdefs.h. */ 30365 30366 /* Override any GCC internal prototype to avoid an error. 30367 Use char because int might match the return type of a GCC 30368 builtin and then its argument prototype would still apply. */ 30369 #ifdef __cplusplus 30370 extern "C" 30371 #endif 30372 char XOpenDisplay (); 30373 int 30374 main () 30375 { 30376 return XOpenDisplay (); 30377 ; 30378 return 0; 30379 } 30380 _ACEOF 30381 if ac_fn_cxx_try_link "$LINENO"; then : 30382 30383 else 30384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 30385 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } 30386 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : 30387 $as_echo_n "(cached) " >&6 30388 else 30389 ac_check_lib_save_LIBS=$LIBS 30390 LIBS="-ldnet $LIBS" 30391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30392 /* end confdefs.h. */ 30393 30394 /* Override any GCC internal prototype to avoid an error. 30395 Use char because int might match the return type of a GCC 30396 builtin and then its argument prototype would still apply. */ 30397 #ifdef __cplusplus 30398 extern "C" 30399 #endif 30400 char dnet_ntoa (); 30401 int 30402 main () 30403 { 30404 return dnet_ntoa (); 30405 ; 30406 return 0; 30407 } 30408 _ACEOF 30409 if ac_fn_cxx_try_link "$LINENO"; then : 30410 ac_cv_lib_dnet_dnet_ntoa=yes 30411 else 30412 ac_cv_lib_dnet_dnet_ntoa=no 30413 fi 30414 rm -f core conftest.err conftest.$ac_objext \ 30415 conftest$ac_exeext conftest.$ac_ext 30416 LIBS=$ac_check_lib_save_LIBS 30417 fi 30418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 30419 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } 30420 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : 30421 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" 30422 fi 30423 30424 if test $ac_cv_lib_dnet_dnet_ntoa = no; then 30425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 30426 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } 30427 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : 30428 $as_echo_n "(cached) " >&6 30429 else 30430 ac_check_lib_save_LIBS=$LIBS 30431 LIBS="-ldnet_stub $LIBS" 30432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30433 /* end confdefs.h. */ 30434 30435 /* Override any GCC internal prototype to avoid an error. 30436 Use char because int might match the return type of a GCC 30437 builtin and then its argument prototype would still apply. */ 30438 #ifdef __cplusplus 30439 extern "C" 30440 #endif 30441 char dnet_ntoa (); 30442 int 30443 main () 30444 { 30445 return dnet_ntoa (); 30446 ; 30447 return 0; 30448 } 30449 _ACEOF 30450 if ac_fn_cxx_try_link "$LINENO"; then : 30451 ac_cv_lib_dnet_stub_dnet_ntoa=yes 30452 else 30453 ac_cv_lib_dnet_stub_dnet_ntoa=no 30454 fi 30455 rm -f core conftest.err conftest.$ac_objext \ 30456 conftest$ac_exeext conftest.$ac_ext 30457 LIBS=$ac_check_lib_save_LIBS 30458 fi 30459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 30460 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } 30461 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : 30462 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" 30463 fi 30464 30465 fi 30466 fi 30467 rm -f core conftest.err conftest.$ac_objext \ 30468 conftest$ac_exeext conftest.$ac_ext 30469 LIBS="$ac_xsave_LIBS" 30470 30471 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, 30472 # to get the SysV transport functions. 30473 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) 30474 # needs -lnsl. 30475 # The nsl library prevents programs from opening the X display 30476 # on Irix 5.2, according to T.E. Dickey. 30477 # The functions gethostbyname, getservbyname, and inet_addr are 30478 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. 30479 ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" 30480 if test "x$ac_cv_func_gethostbyname" = xyes; then : 30481 30482 fi 30483 30484 if test $ac_cv_func_gethostbyname = no; then 30485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 30486 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } 30487 if ${ac_cv_lib_nsl_gethostbyname+:} false; then : 30488 $as_echo_n "(cached) " >&6 30489 else 30490 ac_check_lib_save_LIBS=$LIBS 30491 LIBS="-lnsl $LIBS" 30492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30493 /* end confdefs.h. */ 30494 30495 /* Override any GCC internal prototype to avoid an error. 30496 Use char because int might match the return type of a GCC 30497 builtin and then its argument prototype would still apply. */ 30498 #ifdef __cplusplus 30499 extern "C" 30500 #endif 30501 char gethostbyname (); 30502 int 30503 main () 30504 { 30505 return gethostbyname (); 30506 ; 30507 return 0; 30508 } 30509 _ACEOF 30510 if ac_fn_cxx_try_link "$LINENO"; then : 30511 ac_cv_lib_nsl_gethostbyname=yes 30512 else 30513 ac_cv_lib_nsl_gethostbyname=no 30514 fi 30515 rm -f core conftest.err conftest.$ac_objext \ 30516 conftest$ac_exeext conftest.$ac_ext 30517 LIBS=$ac_check_lib_save_LIBS 30518 fi 30519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 30520 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } 30521 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : 30522 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" 30523 fi 30524 30525 if test $ac_cv_lib_nsl_gethostbyname = no; then 30526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 30527 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } 30528 if ${ac_cv_lib_bsd_gethostbyname+:} false; then : 30529 $as_echo_n "(cached) " >&6 30530 else 30531 ac_check_lib_save_LIBS=$LIBS 30532 LIBS="-lbsd $LIBS" 30533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30534 /* end confdefs.h. */ 30535 30536 /* Override any GCC internal prototype to avoid an error. 30537 Use char because int might match the return type of a GCC 30538 builtin and then its argument prototype would still apply. */ 30539 #ifdef __cplusplus 30540 extern "C" 30541 #endif 30542 char gethostbyname (); 30543 int 30544 main () 30545 { 30546 return gethostbyname (); 30547 ; 30548 return 0; 30549 } 30550 _ACEOF 30551 if ac_fn_cxx_try_link "$LINENO"; then : 30552 ac_cv_lib_bsd_gethostbyname=yes 30553 else 30554 ac_cv_lib_bsd_gethostbyname=no 30555 fi 30556 rm -f core conftest.err conftest.$ac_objext \ 30557 conftest$ac_exeext conftest.$ac_ext 30558 LIBS=$ac_check_lib_save_LIBS 30559 fi 30560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 30561 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } 30562 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : 30563 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" 30564 fi 30565 30566 fi 30567 fi 30568 30569 # lieder@skyler.mavd.honeywell.com says without -lsocket, 30570 # socket/setsockopt and other routines are undefined under SCO ODT 30571 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary 30572 # on later versions), says Simon Leinen: it contains gethostby* 30573 # variants that don't use the name server (or something). -lsocket 30574 # must be given before -lnsl if both are needed. We assume that 30575 # if connect needs -lnsl, so does gethostbyname. 30576 ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" 30577 if test "x$ac_cv_func_connect" = xyes; then : 30578 30579 fi 30580 30581 if test $ac_cv_func_connect = no; then 30582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 30583 $as_echo_n "checking for connect in -lsocket... " >&6; } 30584 if ${ac_cv_lib_socket_connect+:} false; then : 30585 $as_echo_n "(cached) " >&6 30586 else 30587 ac_check_lib_save_LIBS=$LIBS 30588 LIBS="-lsocket $X_EXTRA_LIBS $LIBS" 30589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30590 /* end confdefs.h. */ 30591 30592 /* Override any GCC internal prototype to avoid an error. 30593 Use char because int might match the return type of a GCC 30594 builtin and then its argument prototype would still apply. */ 30595 #ifdef __cplusplus 30596 extern "C" 30597 #endif 30598 char connect (); 30599 int 30600 main () 30601 { 30602 return connect (); 30603 ; 30604 return 0; 30605 } 30606 _ACEOF 30607 if ac_fn_cxx_try_link "$LINENO"; then : 30608 ac_cv_lib_socket_connect=yes 30609 else 30610 ac_cv_lib_socket_connect=no 30611 fi 30612 rm -f core conftest.err conftest.$ac_objext \ 30613 conftest$ac_exeext conftest.$ac_ext 30614 LIBS=$ac_check_lib_save_LIBS 30615 fi 30616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 30617 $as_echo "$ac_cv_lib_socket_connect" >&6; } 30618 if test "x$ac_cv_lib_socket_connect" = xyes; then : 30619 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" 30620 fi 30621 30622 fi 30623 30624 # Guillermo Gomez says -lposix is necessary on A/UX. 30625 ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" 30626 if test "x$ac_cv_func_remove" = xyes; then : 30627 30628 fi 30629 30630 if test $ac_cv_func_remove = no; then 30631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 30632 $as_echo_n "checking for remove in -lposix... " >&6; } 30633 if ${ac_cv_lib_posix_remove+:} false; then : 30634 $as_echo_n "(cached) " >&6 30635 else 30636 ac_check_lib_save_LIBS=$LIBS 30637 LIBS="-lposix $LIBS" 30638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30639 /* end confdefs.h. */ 30640 30641 /* Override any GCC internal prototype to avoid an error. 30642 Use char because int might match the return type of a GCC 30643 builtin and then its argument prototype would still apply. */ 30644 #ifdef __cplusplus 30645 extern "C" 30646 #endif 30647 char remove (); 30648 int 30649 main () 30650 { 30651 return remove (); 30652 ; 30653 return 0; 30654 } 30655 _ACEOF 30656 if ac_fn_cxx_try_link "$LINENO"; then : 30657 ac_cv_lib_posix_remove=yes 30658 else 30659 ac_cv_lib_posix_remove=no 30660 fi 30661 rm -f core conftest.err conftest.$ac_objext \ 30662 conftest$ac_exeext conftest.$ac_ext 30663 LIBS=$ac_check_lib_save_LIBS 30664 fi 30665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 30666 $as_echo "$ac_cv_lib_posix_remove" >&6; } 30667 if test "x$ac_cv_lib_posix_remove" = xyes; then : 30668 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" 30669 fi 30670 30671 fi 30672 30673 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. 30674 ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" 30675 if test "x$ac_cv_func_shmat" = xyes; then : 30676 30677 fi 30678 30679 if test $ac_cv_func_shmat = no; then 30680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 30681 $as_echo_n "checking for shmat in -lipc... " >&6; } 30682 if ${ac_cv_lib_ipc_shmat+:} false; then : 30683 $as_echo_n "(cached) " >&6 30684 else 30685 ac_check_lib_save_LIBS=$LIBS 30686 LIBS="-lipc $LIBS" 30687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30688 /* end confdefs.h. */ 30689 30690 /* Override any GCC internal prototype to avoid an error. 30691 Use char because int might match the return type of a GCC 30692 builtin and then its argument prototype would still apply. */ 30693 #ifdef __cplusplus 30694 extern "C" 30695 #endif 30696 char shmat (); 30697 int 30698 main () 30699 { 30700 return shmat (); 30701 ; 30702 return 0; 30703 } 30704 _ACEOF 30705 if ac_fn_cxx_try_link "$LINENO"; then : 30706 ac_cv_lib_ipc_shmat=yes 30707 else 30708 ac_cv_lib_ipc_shmat=no 30709 fi 30710 rm -f core conftest.err conftest.$ac_objext \ 30711 conftest$ac_exeext conftest.$ac_ext 30712 LIBS=$ac_check_lib_save_LIBS 30713 fi 30714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 30715 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } 30716 if test "x$ac_cv_lib_ipc_shmat" = xyes; then : 30717 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" 30718 fi 30719 30720 fi 30721 fi 30722 30723 # Check for libraries that X11R6 Xt/Xaw programs need. 30724 ac_save_LDFLAGS=$LDFLAGS 30725 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" 30726 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to 30727 # check for ICE first), but we must link in the order -lSM -lICE or 30728 # we get undefined symbols. So assume we have SM if we have ICE. 30729 # These have to be linked with before -lX11, unlike the other 30730 # libraries we check for below, so use a different variable. 30731 # John Interrante, Karl Berry 30732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 30733 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } 30734 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : 30735 $as_echo_n "(cached) " >&6 30736 else 30737 ac_check_lib_save_LIBS=$LIBS 30738 LIBS="-lICE $X_EXTRA_LIBS $LIBS" 30739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30740 /* end confdefs.h. */ 30741 30742 /* Override any GCC internal prototype to avoid an error. 30743 Use char because int might match the return type of a GCC 30744 builtin and then its argument prototype would still apply. */ 30745 #ifdef __cplusplus 30746 extern "C" 30747 #endif 30748 char IceConnectionNumber (); 30749 int 30750 main () 30751 { 30752 return IceConnectionNumber (); 30753 ; 30754 return 0; 30755 } 30756 _ACEOF 30757 if ac_fn_cxx_try_link "$LINENO"; then : 30758 ac_cv_lib_ICE_IceConnectionNumber=yes 30759 else 30760 ac_cv_lib_ICE_IceConnectionNumber=no 30761 fi 30762 rm -f core conftest.err conftest.$ac_objext \ 30763 conftest$ac_exeext conftest.$ac_ext 30764 LIBS=$ac_check_lib_save_LIBS 30765 fi 30766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 30767 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } 30768 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : 30769 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" 30770 fi 30771 30772 LDFLAGS=$ac_save_LDFLAGS 30773 30774 fi 30775 30776 30777 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling 30778 # this doesn't make sense so we remove it. 30779 if test "x$COMPILE_TYPE" = xcross; then 30780 X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'` 30781 fi 30782 30783 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 30784 30785 # Print a helpful message on how to acquire the necessary build dependency. 30786 # x11 is the help tag: freetyp2, cups, pulse, alsa etc 30787 MISSING_DEPENDENCY=x11 30788 PKGHANDLER_COMMAND= 30789 30790 case $PKGHANDLER in 30791 apt-get) 30792 apt_help $MISSING_DEPENDENCY ;; 30793 yum) 30794 yum_help $MISSING_DEPENDENCY ;; 30795 port) 30796 port_help $MISSING_DEPENDENCY ;; 30797 pkgutil) 30798 pkgutil_help $MISSING_DEPENDENCY ;; 30799 pkgadd) 30800 pkgadd_help $MISSING_DEPENDENCY ;; 30801 * ) 30802 break ;; 30803 esac 30804 30805 if test "x$PKGHANDLER_COMMAND" != x; then 30806 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30807 fi 30808 30809 as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5 30810 fi 30811 30812 # Some of the old makefiles require a setting of OPENWIN_HOME 30813 # Since the X11R6 directory has disappeared on later Linuxes, 30814 # we need to probe for it. 30815 if test "x$OPENJDK_TARGET_OS" = xlinux; then 30816 if test -d "$SYS_ROOT/usr/X11R6"; then 30817 OPENWIN_HOME="$SYS_ROOT/usr/X11R6" 30818 elif test -d "$SYS_ROOT/usr/include/X11"; then 30819 OPENWIN_HOME="$SYS_ROOT/usr" 30820 fi 30821 fi 30822 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 30823 OPENWIN_HOME="/usr/openwin" 30824 fi 30825 30826 30827 30828 # 30829 # Weird Sol10 something check...TODO change to try compile 30830 # 30831 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then 30832 if test "`uname -r`" = "5.10"; then 30833 if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then 30834 X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" 30835 fi 30836 fi 30837 fi 30838 30839 ac_ext=c 30840 ac_cpp='$CPP $CPPFLAGS' 30841 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 30842 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 30843 ac_compiler_gnu=$ac_cv_c_compiler_gnu 30844 30845 OLD_CFLAGS="$CFLAGS" 30846 CFLAGS="$CFLAGS $X_CFLAGS" 30847 30848 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 30849 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h 30850 do : 30851 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 30852 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h> 30853 # include <X11/Xutil.h> 30854 30855 " 30856 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 30857 cat >>confdefs.h <<_ACEOF 30858 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 30859 _ACEOF 30860 X11_A_OK=yes 30861 else 30862 X11_A_OK=no; break 30863 fi 30864 30865 done 30866 30867 30868 CFLAGS="$OLD_CFLAGS" 30869 ac_ext=cpp 30870 ac_cpp='$CXXCPP $CPPFLAGS' 30871 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 30872 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 30873 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 30874 30875 30876 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 30877 30878 # Print a helpful message on how to acquire the necessary build dependency. 30879 # x11 is the help tag: freetyp2, cups, pulse, alsa etc 30880 MISSING_DEPENDENCY=x11 30881 PKGHANDLER_COMMAND= 30882 30883 case $PKGHANDLER in 30884 apt-get) 30885 apt_help $MISSING_DEPENDENCY ;; 30886 yum) 30887 yum_help $MISSING_DEPENDENCY ;; 30888 port) 30889 port_help $MISSING_DEPENDENCY ;; 30890 pkgutil) 30891 pkgutil_help $MISSING_DEPENDENCY ;; 30892 pkgadd) 30893 pkgadd_help $MISSING_DEPENDENCY ;; 30894 * ) 30895 break ;; 30896 esac 30897 30898 if test "x$PKGHANDLER_COMMAND" != x; then 30899 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30900 fi 30901 30902 as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5 30903 fi 30904 30905 30906 30907 30908 30909 30910 ############################################################################### 30911 # 30912 # The common unix printing system cups is used to print from java. 30913 # 30914 30915 # Check whether --with-cups was given. 30916 if test "${with_cups+set}" = set; then : 30917 withval=$with_cups; 30918 fi 30919 30920 30921 # Check whether --with-cups-include was given. 30922 if test "${with_cups_include+set}" = set; then : 30923 withval=$with_cups_include; 30924 fi 30925 30926 30927 if test "x$CUPS_NOT_NEEDED" = xyes; then 30928 if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then 30929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5 30930 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;} 30931 fi 30932 CUPS_CFLAGS= 30933 else 30934 CUPS_FOUND=no 30935 30936 if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then 30937 as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5 30938 fi 30939 30940 if test "x${with_cups}" != x; then 30941 CUPS_CFLAGS="-I${with_cups}/include" 30942 CUPS_FOUND=yes 30943 fi 30944 if test "x${with_cups_include}" != x; then 30945 CUPS_CFLAGS="-I${with_cups_include}" 30946 CUPS_FOUND=yes 30947 fi 30948 if test "x$CUPS_FOUND" = xno; then 30949 30950 30951 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 30952 # Source the builddeps file again, to make sure it uses the latest variables! 30953 . $builddepsfile 30954 # Look for a target and build machine specific resource! 30955 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 30956 if test "x$resource" = x; then 30957 # Ok, lets instead look for a target specific resource 30958 eval resource=\${builddep_cups_TARGET_${rewritten_target_var}} 30959 fi 30960 if test "x$resource" = x; then 30961 # Ok, lets instead look for a build specific resource 30962 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}} 30963 fi 30964 if test "x$resource" = x; then 30965 # Ok, lets instead look for a generic resource 30966 # (The cups comes from M4 and not the shell, thus no need for eval here.) 30967 resource=${builddep_cups} 30968 fi 30969 if test "x$resource" != x; then 30970 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5 30971 $as_echo "$as_me: Using builddeps $resource for cups" >&6;} 30972 # If the resource in the builddeps.conf file is an existing directory, 30973 # for example /java/linux/cups 30974 if test -d ${resource}; then 30975 depdir=${resource} 30976 else 30977 30978 # cups is for example mymodule 30979 # $resource is for example libs/general/libmymod_1_2_3.zip 30980 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 30981 # $with_builddeps_dir is for example /localhome/builddeps 30982 # depdir is the name of the variable into which we store the depdir, eg MYMOD 30983 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 30984 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 30985 filename=`basename $resource` 30986 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 30987 filebase=${filename%%.*} 30988 extension=${filename#*.} 30989 installdir=$with_builddeps_dir/$filebase 30990 if test ! -f $installdir/$filename.unpacked; then 30991 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5 30992 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;} 30993 if test ! -d $installdir; then 30994 mkdir -p $installdir 30995 fi 30996 if test ! -d $installdir; then 30997 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 30998 fi 30999 tmpfile=`mktemp $installdir/cups.XXXXXXXXX` 31000 touch $tmpfile 31001 if test ! -f $tmpfile; then 31002 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 31003 fi 31004 31005 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 31006 # $tmpfile is the local file name for the downloaded file. 31007 VALID_TOOL=no 31008 if test "x$BDEPS_FTP" = xwget; then 31009 VALID_TOOL=yes 31010 wget -O $tmpfile $with_builddeps_server/$resource 31011 fi 31012 if test "x$BDEPS_FTP" = xlftp; then 31013 VALID_TOOL=yes 31014 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 31015 fi 31016 if test "x$BDEPS_FTP" = xftp; then 31017 VALID_TOOL=yes 31018 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 31019 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 31020 FTPUSERPWD=${FTPSERVER%%@*} 31021 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 31022 FTPUSER=${userpwd%%:*} 31023 FTPPWD=${userpwd#*@} 31024 FTPSERVER=${FTPSERVER#*@} 31025 else 31026 FTPUSER=ftp 31027 FTPPWD=ftp 31028 fi 31029 # the "pass" command does not work on some 31030 # ftp clients (read ftp.exe) but if it works, 31031 # passive mode is better! 31032 (\ 31033 echo "user $FTPUSER $FTPPWD" ;\ 31034 echo "pass" ;\ 31035 echo "bin" ;\ 31036 echo "get $FTPPATH $tmpfile" ;\ 31037 ) | ftp -in $FTPSERVER 31038 fi 31039 if test "x$VALID_TOOL" != xyes; then 31040 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 31041 fi 31042 31043 mv $tmpfile $installdir/$filename 31044 if test ! -s $installdir/$filename; then 31045 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 31046 fi 31047 case "$extension" in 31048 zip) echo "Unzipping $installdir/$filename..." 31049 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 31050 ;; 31051 tar.gz) echo "Untaring $installdir/$filename..." 31052 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31053 ;; 31054 tgz) echo "Untaring $installdir/$filename..." 31055 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31056 ;; 31057 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 31058 ;; 31059 esac 31060 fi 31061 if test -f $installdir/$filename.unpacked; then 31062 depdir=$installdir 31063 fi 31064 31065 fi 31066 # Source the builddeps file again, because in the previous command, the depdir 31067 # was updated to point at the current build dependency install directory. 31068 . $builddepsfile 31069 # Now extract variables from the builddeps.conf files. 31070 theroot=${builddep_cups_ROOT} 31071 thecflags=${builddep_cups_CFLAGS} 31072 thelibs=${builddep_cups_LIBS} 31073 if test "x$depdir" = x; then 31074 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5 31075 fi 31076 CUPS=$depdir 31077 if test "x$theroot" != x; then 31078 CUPS="$theroot" 31079 fi 31080 if test "x$thecflags" != x; then 31081 CUPS_CFLAGS="$thecflags" 31082 fi 31083 if test "x$thelibs" != x; then 31084 CUPS_LIBS="$thelibs" 31085 fi 31086 CUPS_FOUND=yes 31087 31088 fi 31089 31090 fi 31091 31092 fi 31093 if test "x$CUPS_FOUND" = xno; then 31094 # Are the cups headers installed in the default /usr/include location? 31095 for ac_header in cups/cups.h cups/ppd.h 31096 do : 31097 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 31098 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 31099 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 31100 cat >>confdefs.h <<_ACEOF 31101 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 31102 _ACEOF 31103 CUPS_FOUND=yes 31104 CUPS_CFLAGS= 31105 DEFAULT_CUPS=yes 31106 fi 31107 31108 done 31109 31110 fi 31111 if test "x$CUPS_FOUND" = xno; then 31112 # Getting nervous now? Lets poke around for standard Solaris third-party 31113 # package installation locations. 31114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5 31115 $as_echo_n "checking for cups headers... " >&6; } 31116 if test -s /opt/sfw/cups/include/cups/cups.h; then 31117 # An SFW package seems to be installed! 31118 CUPS_FOUND=yes 31119 CUPS_CFLAGS="-I/opt/sfw/cups/include" 31120 elif test -s /opt/csw/include/cups/cups.h; then 31121 # A CSW package seems to be installed! 31122 CUPS_FOUND=yes 31123 CUPS_CFLAGS="-I/opt/csw/include" 31124 fi 31125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 31126 $as_echo "$CUPS_FOUND" >&6; } 31127 fi 31128 if test "x$CUPS_FOUND" = xno; then 31129 31130 # Print a helpful message on how to acquire the necessary build dependency. 31131 # cups is the help tag: freetyp2, cups, pulse, alsa etc 31132 MISSING_DEPENDENCY=cups 31133 PKGHANDLER_COMMAND= 31134 31135 case $PKGHANDLER in 31136 apt-get) 31137 apt_help $MISSING_DEPENDENCY ;; 31138 yum) 31139 yum_help $MISSING_DEPENDENCY ;; 31140 port) 31141 port_help $MISSING_DEPENDENCY ;; 31142 pkgutil) 31143 pkgutil_help $MISSING_DEPENDENCY ;; 31144 pkgadd) 31145 pkgadd_help $MISSING_DEPENDENCY ;; 31146 * ) 31147 break ;; 31148 esac 31149 31150 if test "x$PKGHANDLER_COMMAND" != x; then 31151 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 31152 fi 31153 31154 as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5 31155 fi 31156 fi 31157 31158 31159 31160 31161 31162 31163 ############################################################################### 31164 # 31165 # The ubiquitous freetype2 library is used to render fonts. 31166 # 31167 31168 # Check whether --with-freetype was given. 31169 if test "${with_freetype+set}" = set; then : 31170 withval=$with_freetype; 31171 fi 31172 31173 31174 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree 31175 USING_SYSTEM_FT_LIB=false 31176 31177 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then 31178 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 31179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5 31180 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;} 31181 fi 31182 FREETYPE2_CFLAGS= 31183 FREETYPE2_LIBS= 31184 FREETYPE2_LIB_PATH= 31185 else 31186 FREETYPE2_FOUND=no 31187 31188 if test "x$with_freetype" != x; then 31189 31190 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31191 31192 # Input might be given as Windows format, start by converting to 31193 # unix format. 31194 path="$with_freetype" 31195 new_path=`$CYGPATH -u "$path"` 31196 31197 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 31198 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 31199 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 31200 # "foo.exe" is OK but "foo" is an error. 31201 # 31202 # This test is therefore slightly more accurate than "test -f" to check for file precense. 31203 # It is also a way to make sure we got the proper file name for the real test later on. 31204 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 31205 if test "x$test_shortpath" = x; then 31206 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 31207 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 31208 as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5 31209 fi 31210 31211 # Call helper function which possibly converts this using DOS-style short mode. 31212 # If so, the updated path is stored in $new_path. 31213 31214 input_path="$new_path" 31215 # Check if we need to convert this using DOS-style short mode. If the path 31216 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31217 # take no chances and rewrite it. 31218 # Note: m4 eats our [], so we need to use [ and ] instead. 31219 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 31220 if test "x$has_forbidden_chars" != x; then 31221 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31222 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 31223 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 31224 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 31225 # Going to short mode and back again did indeed matter. Since short mode is 31226 # case insensitive, let's make it lowercase to improve readability. 31227 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31228 # Now convert it back to Unix-stile (cygpath) 31229 input_path=`$CYGPATH -u "$shortmode_path"` 31230 new_path="$input_path" 31231 fi 31232 fi 31233 31234 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 31235 if test "x$test_cygdrive_prefix" = x; then 31236 # As a simple fix, exclude /usr/bin since it's not a real path. 31237 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 31238 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 31239 # a path prefixed by /cygdrive for fixpath to work. 31240 new_path="$CYGWIN_ROOT_PATH$input_path" 31241 fi 31242 fi 31243 31244 31245 if test "x$path" != "x$new_path"; then 31246 with_freetype="$new_path" 31247 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 31248 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 31249 fi 31250 31251 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31252 31253 path="$with_freetype" 31254 has_colon=`$ECHO $path | $GREP ^.:` 31255 new_path="$path" 31256 if test "x$has_colon" = x; then 31257 # Not in mixed or Windows style, start by that. 31258 new_path=`cmd //c echo $path` 31259 fi 31260 31261 31262 input_path="$new_path" 31263 # Check if we need to convert this using DOS-style short mode. If the path 31264 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31265 # take no chances and rewrite it. 31266 # Note: m4 eats our [], so we need to use [ and ] instead. 31267 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 31268 if test "x$has_forbidden_chars" != x; then 31269 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31270 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31271 fi 31272 31273 31274 windows_path="$new_path" 31275 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31276 unix_path=`$CYGPATH -u "$windows_path"` 31277 new_path="$unix_path" 31278 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31279 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 31280 new_path="$unix_path" 31281 fi 31282 31283 if test "x$path" != "x$new_path"; then 31284 with_freetype="$new_path" 31285 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 31286 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 31287 fi 31288 31289 # Save the first 10 bytes of this path to the storage, so fixpath can work. 31290 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 31291 31292 else 31293 # We're on a posix platform. Hooray! :) 31294 path="$with_freetype" 31295 has_space=`$ECHO "$path" | $GREP " "` 31296 if test "x$has_space" != x; then 31297 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 31298 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 31299 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 31300 fi 31301 31302 # Use eval to expand a potential ~ 31303 eval path="$path" 31304 if test ! -f "$path" && test ! -d "$path"; then 31305 as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5 31306 fi 31307 31308 with_freetype="`cd "$path"; $THEPWDCMD -L`" 31309 fi 31310 31311 FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" 31312 FREETYPE2_LIB_PATH="$with_freetype/lib" 31313 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then 31314 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype" 31315 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64" 31316 fi 31317 if test "x$OPENJDK_TARGET_OS" = xwindows; then 31318 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" 31319 fi 31320 FREETYPE2_CFLAGS="-I$with_freetype/include" 31321 if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then 31322 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" 31323 fi 31324 FREETYPE2_FOUND=yes 31325 if test "x$FREETYPE2_FOUND" = xyes; then 31326 # Verify that the directories exist 31327 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then 31328 as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5 31329 fi 31330 # List the contents of the lib. 31331 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` 31332 if test "x$FREETYPELIB" = x; then 31333 as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5 31334 fi 31335 # Check one h-file 31336 if ! test -s "$with_freetype/include/ft2build.h"; then 31337 as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5 31338 fi 31339 fi 31340 fi 31341 if test "x$FREETYPE2_FOUND" = xno; then 31342 31343 31344 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 31345 # Source the builddeps file again, to make sure it uses the latest variables! 31346 . $builddepsfile 31347 # Look for a target and build machine specific resource! 31348 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 31349 if test "x$resource" = x; then 31350 # Ok, lets instead look for a target specific resource 31351 eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}} 31352 fi 31353 if test "x$resource" = x; then 31354 # Ok, lets instead look for a build specific resource 31355 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}} 31356 fi 31357 if test "x$resource" = x; then 31358 # Ok, lets instead look for a generic resource 31359 # (The freetype2 comes from M4 and not the shell, thus no need for eval here.) 31360 resource=${builddep_freetype2} 31361 fi 31362 if test "x$resource" != x; then 31363 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5 31364 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;} 31365 # If the resource in the builddeps.conf file is an existing directory, 31366 # for example /java/linux/cups 31367 if test -d ${resource}; then 31368 depdir=${resource} 31369 else 31370 31371 # freetype2 is for example mymodule 31372 # $resource is for example libs/general/libmymod_1_2_3.zip 31373 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 31374 # $with_builddeps_dir is for example /localhome/builddeps 31375 # depdir is the name of the variable into which we store the depdir, eg MYMOD 31376 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 31377 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 31378 filename=`basename $resource` 31379 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 31380 filebase=${filename%%.*} 31381 extension=${filename#*.} 31382 installdir=$with_builddeps_dir/$filebase 31383 if test ! -f $installdir/$filename.unpacked; then 31384 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5 31385 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;} 31386 if test ! -d $installdir; then 31387 mkdir -p $installdir 31388 fi 31389 if test ! -d $installdir; then 31390 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 31391 fi 31392 tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX` 31393 touch $tmpfile 31394 if test ! -f $tmpfile; then 31395 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 31396 fi 31397 31398 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 31399 # $tmpfile is the local file name for the downloaded file. 31400 VALID_TOOL=no 31401 if test "x$BDEPS_FTP" = xwget; then 31402 VALID_TOOL=yes 31403 wget -O $tmpfile $with_builddeps_server/$resource 31404 fi 31405 if test "x$BDEPS_FTP" = xlftp; then 31406 VALID_TOOL=yes 31407 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 31408 fi 31409 if test "x$BDEPS_FTP" = xftp; then 31410 VALID_TOOL=yes 31411 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 31412 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 31413 FTPUSERPWD=${FTPSERVER%%@*} 31414 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 31415 FTPUSER=${userpwd%%:*} 31416 FTPPWD=${userpwd#*@} 31417 FTPSERVER=${FTPSERVER#*@} 31418 else 31419 FTPUSER=ftp 31420 FTPPWD=ftp 31421 fi 31422 # the "pass" command does not work on some 31423 # ftp clients (read ftp.exe) but if it works, 31424 # passive mode is better! 31425 (\ 31426 echo "user $FTPUSER $FTPPWD" ;\ 31427 echo "pass" ;\ 31428 echo "bin" ;\ 31429 echo "get $FTPPATH $tmpfile" ;\ 31430 ) | ftp -in $FTPSERVER 31431 fi 31432 if test "x$VALID_TOOL" != xyes; then 31433 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 31434 fi 31435 31436 mv $tmpfile $installdir/$filename 31437 if test ! -s $installdir/$filename; then 31438 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 31439 fi 31440 case "$extension" in 31441 zip) echo "Unzipping $installdir/$filename..." 31442 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 31443 ;; 31444 tar.gz) echo "Untaring $installdir/$filename..." 31445 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31446 ;; 31447 tgz) echo "Untaring $installdir/$filename..." 31448 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31449 ;; 31450 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 31451 ;; 31452 esac 31453 fi 31454 if test -f $installdir/$filename.unpacked; then 31455 depdir=$installdir 31456 fi 31457 31458 fi 31459 # Source the builddeps file again, because in the previous command, the depdir 31460 # was updated to point at the current build dependency install directory. 31461 . $builddepsfile 31462 # Now extract variables from the builddeps.conf files. 31463 theroot=${builddep_freetype2_ROOT} 31464 thecflags=${builddep_freetype2_CFLAGS} 31465 thelibs=${builddep_freetype2_LIBS} 31466 if test "x$depdir" = x; then 31467 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5 31468 fi 31469 FREETYPE2=$depdir 31470 if test "x$theroot" != x; then 31471 FREETYPE2="$theroot" 31472 fi 31473 if test "x$thecflags" != x; then 31474 FREETYPE2_CFLAGS="$thecflags" 31475 fi 31476 if test "x$thelibs" != x; then 31477 FREETYPE2_LIBS="$thelibs" 31478 fi 31479 FREETYPE2_FOUND=yes 31480 else FREETYPE2_FOUND=no 31481 31482 fi 31483 else FREETYPE2_FOUND=no 31484 31485 fi 31486 31487 USING_SYSTEM_FT_LIB=true 31488 fi 31489 if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then 31490 FREETYPELOCATION="$PROGRAMFILES/GnuWin32" 31491 31492 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31493 31494 # Input might be given as Windows format, start by converting to 31495 # unix format. 31496 path="$FREETYPELOCATION" 31497 new_path=`$CYGPATH -u "$path"` 31498 31499 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 31500 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 31501 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 31502 # "foo.exe" is OK but "foo" is an error. 31503 # 31504 # This test is therefore slightly more accurate than "test -f" to check for file precense. 31505 # It is also a way to make sure we got the proper file name for the real test later on. 31506 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 31507 if test "x$test_shortpath" = x; then 31508 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 31509 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 31510 as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5 31511 fi 31512 31513 # Call helper function which possibly converts this using DOS-style short mode. 31514 # If so, the updated path is stored in $new_path. 31515 31516 input_path="$new_path" 31517 # Check if we need to convert this using DOS-style short mode. If the path 31518 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31519 # take no chances and rewrite it. 31520 # Note: m4 eats our [], so we need to use [ and ] instead. 31521 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 31522 if test "x$has_forbidden_chars" != x; then 31523 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31524 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 31525 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 31526 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 31527 # Going to short mode and back again did indeed matter. Since short mode is 31528 # case insensitive, let's make it lowercase to improve readability. 31529 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31530 # Now convert it back to Unix-stile (cygpath) 31531 input_path=`$CYGPATH -u "$shortmode_path"` 31532 new_path="$input_path" 31533 fi 31534 fi 31535 31536 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 31537 if test "x$test_cygdrive_prefix" = x; then 31538 # As a simple fix, exclude /usr/bin since it's not a real path. 31539 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 31540 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 31541 # a path prefixed by /cygdrive for fixpath to work. 31542 new_path="$CYGWIN_ROOT_PATH$input_path" 31543 fi 31544 fi 31545 31546 31547 if test "x$path" != "x$new_path"; then 31548 FREETYPELOCATION="$new_path" 31549 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 31550 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 31551 fi 31552 31553 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31554 31555 path="$FREETYPELOCATION" 31556 has_colon=`$ECHO $path | $GREP ^.:` 31557 new_path="$path" 31558 if test "x$has_colon" = x; then 31559 # Not in mixed or Windows style, start by that. 31560 new_path=`cmd //c echo $path` 31561 fi 31562 31563 31564 input_path="$new_path" 31565 # Check if we need to convert this using DOS-style short mode. If the path 31566 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31567 # take no chances and rewrite it. 31568 # Note: m4 eats our [], so we need to use [ and ] instead. 31569 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 31570 if test "x$has_forbidden_chars" != x; then 31571 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31572 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31573 fi 31574 31575 31576 windows_path="$new_path" 31577 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31578 unix_path=`$CYGPATH -u "$windows_path"` 31579 new_path="$unix_path" 31580 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31581 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 31582 new_path="$unix_path" 31583 fi 31584 31585 if test "x$path" != "x$new_path"; then 31586 FREETYPELOCATION="$new_path" 31587 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 31588 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 31589 fi 31590 31591 # Save the first 10 bytes of this path to the storage, so fixpath can work. 31592 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 31593 31594 else 31595 # We're on a posix platform. Hooray! :) 31596 path="$FREETYPELOCATION" 31597 has_space=`$ECHO "$path" | $GREP " "` 31598 if test "x$has_space" != x; then 31599 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 31600 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 31601 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 31602 fi 31603 31604 # Use eval to expand a potential ~ 31605 eval path="$path" 31606 if test ! -f "$path" && test ! -d "$path"; then 31607 as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5 31608 fi 31609 31610 FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`" 31611 fi 31612 31613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5 31614 $as_echo_n "checking for freetype in some standard windows locations... " >&6; } 31615 if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then 31616 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include" 31617 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib" 31618 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib" 31619 if ! test -s "$FREETYPE2_LIBS"; then 31620 as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5 31621 fi 31622 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then 31623 as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5 31624 fi 31625 USING_SYSTEM_FT_LIB=true 31626 FREETYPE2_FOUND=yes 31627 fi 31628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 31629 $as_echo "$FREETYPE2_FOUND" >&6; } 31630 fi 31631 if test "x$FREETYPE2_FOUND" = xno; then 31632 31633 pkg_failed=no 31634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5 31635 $as_echo_n "checking for FREETYPE2... " >&6; } 31636 31637 if test -n "$FREETYPE2_CFLAGS"; then 31638 pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS" 31639 elif test -n "$PKG_CONFIG"; then 31640 if test -n "$PKG_CONFIG" && \ 31641 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 31642 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 31643 ac_status=$? 31644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31645 test $ac_status = 0; }; then 31646 pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` 31647 else 31648 pkg_failed=yes 31649 fi 31650 else 31651 pkg_failed=untried 31652 fi 31653 if test -n "$FREETYPE2_LIBS"; then 31654 pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS" 31655 elif test -n "$PKG_CONFIG"; then 31656 if test -n "$PKG_CONFIG" && \ 31657 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 31658 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 31659 ac_status=$? 31660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31661 test $ac_status = 0; }; then 31662 pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` 31663 else 31664 pkg_failed=yes 31665 fi 31666 else 31667 pkg_failed=untried 31668 fi 31669 31670 31671 31672 if test $pkg_failed = yes; then 31673 31674 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 31675 _pkg_short_errors_supported=yes 31676 else 31677 _pkg_short_errors_supported=no 31678 fi 31679 if test $_pkg_short_errors_supported = yes; then 31680 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1` 31681 else 31682 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1` 31683 fi 31684 # Put the nasty error message in config.log where it belongs 31685 echo "$FREETYPE2_PKG_ERRORS" >&5 31686 31687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 31688 $as_echo "no" >&6; } 31689 FREETYPE2_FOUND=no 31690 elif test $pkg_failed = untried; then 31691 FREETYPE2_FOUND=no 31692 else 31693 FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS 31694 FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS 31695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 31696 $as_echo "yes" >&6; } 31697 FREETYPE2_FOUND=yes 31698 fi 31699 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. 31700 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` 31701 USING_SYSTEM_FT_LIB=true 31702 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 31703 if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 31704 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'` 31705 fi 31706 fi 31707 if test "x$FREETYPE2_FOUND" = xno; then 31708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5 31709 $as_echo_n "checking for freetype in some standard locations... " >&6; } 31710 31711 if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then 31712 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include" 31713 DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype" 31714 fi 31715 if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then 31716 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2" 31717 DEFAULT_FREETYPE_LIBS="-lfreetype" 31718 fi 31719 31720 PREV_CXXCFLAGS="$CXXFLAGS" 31721 PREV_LDFLAGS="$LDFLAGS" 31722 CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" 31723 LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" 31724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31725 /* end confdefs.h. */ 31726 #include<ft2build.h> 31727 #include FT_FREETYPE_H 31728 int main() { return 0; } 31729 31730 _ACEOF 31731 if ac_fn_cxx_try_link "$LINENO"; then : 31732 31733 # Yes, the default cflags and libs did the trick. 31734 FREETYPE2_FOUND=yes 31735 FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" 31736 FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" 31737 31738 else 31739 31740 FREETYPE2_FOUND=no 31741 31742 fi 31743 rm -f core conftest.err conftest.$ac_objext \ 31744 conftest$ac_exeext conftest.$ac_ext 31745 CXXCFLAGS="$PREV_CXXFLAGS" 31746 LDFLAGS="$PREV_LDFLAGS" 31747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 31748 $as_echo "$FREETYPE2_FOUND" >&6; } 31749 USING_SYSTEM_FT_LIB=true 31750 fi 31751 if test "x$FREETYPE2_FOUND" = xno; then 31752 31753 # Print a helpful message on how to acquire the necessary build dependency. 31754 # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc 31755 MISSING_DEPENDENCY=freetype2 31756 PKGHANDLER_COMMAND= 31757 31758 case $PKGHANDLER in 31759 apt-get) 31760 apt_help $MISSING_DEPENDENCY ;; 31761 yum) 31762 yum_help $MISSING_DEPENDENCY ;; 31763 port) 31764 port_help $MISSING_DEPENDENCY ;; 31765 pkgutil) 31766 pkgutil_help $MISSING_DEPENDENCY ;; 31767 pkgadd) 31768 pkgadd_help $MISSING_DEPENDENCY ;; 31769 * ) 31770 break ;; 31771 esac 31772 31773 if test "x$PKGHANDLER_COMMAND" != x; then 31774 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 31775 fi 31776 31777 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 31778 fi 31779 31780 if test "x$OPENJDK_TARGET_OS" != xwindows; then 31781 # AC_CHECK_LIB does not support use of cl.exe 31782 PREV_LDFLAGS="$LDFLAGS" 31783 LDFLAGS="$FREETYPE2_LIBS" 31784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5 31785 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; } 31786 if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then : 31787 $as_echo_n "(cached) " >&6 31788 else 31789 ac_check_lib_save_LIBS=$LIBS 31790 LIBS="-lfreetype $LIBS" 31791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31792 /* end confdefs.h. */ 31793 31794 /* Override any GCC internal prototype to avoid an error. 31795 Use char because int might match the return type of a GCC 31796 builtin and then its argument prototype would still apply. */ 31797 #ifdef __cplusplus 31798 extern "C" 31799 #endif 31800 char FT_Init_FreeType (); 31801 int 31802 main () 31803 { 31804 return FT_Init_FreeType (); 31805 ; 31806 return 0; 31807 } 31808 _ACEOF 31809 if ac_fn_cxx_try_link "$LINENO"; then : 31810 ac_cv_lib_freetype_FT_Init_FreeType=yes 31811 else 31812 ac_cv_lib_freetype_FT_Init_FreeType=no 31813 fi 31814 rm -f core conftest.err conftest.$ac_objext \ 31815 conftest$ac_exeext conftest.$ac_ext 31816 LIBS=$ac_check_lib_save_LIBS 31817 fi 31818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 31819 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; } 31820 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then : 31821 FREETYPE2_FOUND=true 31822 else 31823 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 31824 fi 31825 31826 LDFLAGS="$PREV_LDFLAGS" 31827 fi 31828 fi 31829 31830 31831 31832 31833 31834 31835 31836 31837 31838 ############################################################################### 31839 # 31840 # Check for alsa headers and libraries. Used on Linux/GNU systems. 31841 # 31842 31843 # Check whether --with-alsa was given. 31844 if test "${with_alsa+set}" = set; then : 31845 withval=$with_alsa; 31846 fi 31847 31848 31849 # Check whether --with-alsa-include was given. 31850 if test "${with_alsa_include+set}" = set; then : 31851 withval=$with_alsa_include; 31852 fi 31853 31854 31855 # Check whether --with-alsa-lib was given. 31856 if test "${with_alsa_lib+set}" = set; then : 31857 withval=$with_alsa_lib; 31858 fi 31859 31860 31861 if test "x$ALSA_NOT_NEEDED" = xyes; then 31862 if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then 31863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5 31864 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;} 31865 fi 31866 ALSA_CFLAGS= 31867 ALSA_LIBS= 31868 else 31869 ALSA_FOUND=no 31870 31871 if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then 31872 as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5 31873 fi 31874 31875 if test "x${with_alsa}" != x; then 31876 ALSA_LIBS="-L${with_alsa}/lib -lalsa" 31877 ALSA_CFLAGS="-I${with_alsa}/include" 31878 ALSA_FOUND=yes 31879 fi 31880 if test "x${with_alsa_include}" != x; then 31881 ALSA_CFLAGS="-I${with_alsa_include}" 31882 ALSA_FOUND=yes 31883 fi 31884 if test "x${with_alsa_lib}" != x; then 31885 ALSA_LIBS="-L${with_alsa_lib} -lalsa" 31886 ALSA_FOUND=yes 31887 fi 31888 if test "x$ALSA_FOUND" = xno; then 31889 31890 31891 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 31892 # Source the builddeps file again, to make sure it uses the latest variables! 31893 . $builddepsfile 31894 # Look for a target and build machine specific resource! 31895 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 31896 if test "x$resource" = x; then 31897 # Ok, lets instead look for a target specific resource 31898 eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}} 31899 fi 31900 if test "x$resource" = x; then 31901 # Ok, lets instead look for a build specific resource 31902 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}} 31903 fi 31904 if test "x$resource" = x; then 31905 # Ok, lets instead look for a generic resource 31906 # (The alsa comes from M4 and not the shell, thus no need for eval here.) 31907 resource=${builddep_alsa} 31908 fi 31909 if test "x$resource" != x; then 31910 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5 31911 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;} 31912 # If the resource in the builddeps.conf file is an existing directory, 31913 # for example /java/linux/cups 31914 if test -d ${resource}; then 31915 depdir=${resource} 31916 else 31917 31918 # alsa is for example mymodule 31919 # $resource is for example libs/general/libmymod_1_2_3.zip 31920 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 31921 # $with_builddeps_dir is for example /localhome/builddeps 31922 # depdir is the name of the variable into which we store the depdir, eg MYMOD 31923 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 31924 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 31925 filename=`basename $resource` 31926 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 31927 filebase=${filename%%.*} 31928 extension=${filename#*.} 31929 installdir=$with_builddeps_dir/$filebase 31930 if test ! -f $installdir/$filename.unpacked; then 31931 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5 31932 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;} 31933 if test ! -d $installdir; then 31934 mkdir -p $installdir 31935 fi 31936 if test ! -d $installdir; then 31937 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 31938 fi 31939 tmpfile=`mktemp $installdir/alsa.XXXXXXXXX` 31940 touch $tmpfile 31941 if test ! -f $tmpfile; then 31942 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 31943 fi 31944 31945 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 31946 # $tmpfile is the local file name for the downloaded file. 31947 VALID_TOOL=no 31948 if test "x$BDEPS_FTP" = xwget; then 31949 VALID_TOOL=yes 31950 wget -O $tmpfile $with_builddeps_server/$resource 31951 fi 31952 if test "x$BDEPS_FTP" = xlftp; then 31953 VALID_TOOL=yes 31954 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 31955 fi 31956 if test "x$BDEPS_FTP" = xftp; then 31957 VALID_TOOL=yes 31958 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 31959 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 31960 FTPUSERPWD=${FTPSERVER%%@*} 31961 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 31962 FTPUSER=${userpwd%%:*} 31963 FTPPWD=${userpwd#*@} 31964 FTPSERVER=${FTPSERVER#*@} 31965 else 31966 FTPUSER=ftp 31967 FTPPWD=ftp 31968 fi 31969 # the "pass" command does not work on some 31970 # ftp clients (read ftp.exe) but if it works, 31971 # passive mode is better! 31972 (\ 31973 echo "user $FTPUSER $FTPPWD" ;\ 31974 echo "pass" ;\ 31975 echo "bin" ;\ 31976 echo "get $FTPPATH $tmpfile" ;\ 31977 ) | ftp -in $FTPSERVER 31978 fi 31979 if test "x$VALID_TOOL" != xyes; then 31980 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 31981 fi 31982 31983 mv $tmpfile $installdir/$filename 31984 if test ! -s $installdir/$filename; then 31985 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 31986 fi 31987 case "$extension" in 31988 zip) echo "Unzipping $installdir/$filename..." 31989 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 31990 ;; 31991 tar.gz) echo "Untaring $installdir/$filename..." 31992 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31993 ;; 31994 tgz) echo "Untaring $installdir/$filename..." 31995 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31996 ;; 31997 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 31998 ;; 31999 esac 32000 fi 32001 if test -f $installdir/$filename.unpacked; then 32002 depdir=$installdir 32003 fi 32004 32005 fi 32006 # Source the builddeps file again, because in the previous command, the depdir 32007 # was updated to point at the current build dependency install directory. 32008 . $builddepsfile 32009 # Now extract variables from the builddeps.conf files. 32010 theroot=${builddep_alsa_ROOT} 32011 thecflags=${builddep_alsa_CFLAGS} 32012 thelibs=${builddep_alsa_LIBS} 32013 if test "x$depdir" = x; then 32014 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5 32015 fi 32016 ALSA=$depdir 32017 if test "x$theroot" != x; then 32018 ALSA="$theroot" 32019 fi 32020 if test "x$thecflags" != x; then 32021 ALSA_CFLAGS="$thecflags" 32022 fi 32023 if test "x$thelibs" != x; then 32024 ALSA_LIBS="$thelibs" 32025 fi 32026 ALSA_FOUND=yes 32027 else ALSA_FOUND=no 32028 32029 fi 32030 else ALSA_FOUND=no 32031 32032 fi 32033 32034 fi 32035 if test "x$ALSA_FOUND" = xno; then 32036 32037 pkg_failed=no 32038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5 32039 $as_echo_n "checking for ALSA... " >&6; } 32040 32041 if test -n "$ALSA_CFLAGS"; then 32042 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" 32043 elif test -n "$PKG_CONFIG"; then 32044 if test -n "$PKG_CONFIG" && \ 32045 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 32046 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 32047 ac_status=$? 32048 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32049 test $ac_status = 0; }; then 32050 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` 32051 else 32052 pkg_failed=yes 32053 fi 32054 else 32055 pkg_failed=untried 32056 fi 32057 if test -n "$ALSA_LIBS"; then 32058 pkg_cv_ALSA_LIBS="$ALSA_LIBS" 32059 elif test -n "$PKG_CONFIG"; then 32060 if test -n "$PKG_CONFIG" && \ 32061 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 32062 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 32063 ac_status=$? 32064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32065 test $ac_status = 0; }; then 32066 pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` 32067 else 32068 pkg_failed=yes 32069 fi 32070 else 32071 pkg_failed=untried 32072 fi 32073 32074 32075 32076 if test $pkg_failed = yes; then 32077 32078 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 32079 _pkg_short_errors_supported=yes 32080 else 32081 _pkg_short_errors_supported=no 32082 fi 32083 if test $_pkg_short_errors_supported = yes; then 32084 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1` 32085 else 32086 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1` 32087 fi 32088 # Put the nasty error message in config.log where it belongs 32089 echo "$ALSA_PKG_ERRORS" >&5 32090 32091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32092 $as_echo "no" >&6; } 32093 ALSA_FOUND=no 32094 elif test $pkg_failed = untried; then 32095 ALSA_FOUND=no 32096 else 32097 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS 32098 ALSA_LIBS=$pkg_cv_ALSA_LIBS 32099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32100 $as_echo "yes" >&6; } 32101 ALSA_FOUND=yes 32102 fi 32103 fi 32104 if test "x$ALSA_FOUND" = xno; then 32105 for ac_header in alsa/asoundlib.h 32106 do : 32107 ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default" 32108 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then : 32109 cat >>confdefs.h <<_ACEOF 32110 #define HAVE_ALSA_ASOUNDLIB_H 1 32111 _ACEOF 32112 ALSA_FOUND=yes 32113 ALSA_CFLAGS=-Iignoreme 32114 ALSA_LIBS=-lasound 32115 DEFAULT_ALSA=yes 32116 else 32117 ALSA_FOUND=no 32118 fi 32119 32120 done 32121 32122 fi 32123 if test "x$ALSA_FOUND" = xno; then 32124 32125 # Print a helpful message on how to acquire the necessary build dependency. 32126 # alsa is the help tag: freetyp2, cups, pulse, alsa etc 32127 MISSING_DEPENDENCY=alsa 32128 PKGHANDLER_COMMAND= 32129 32130 case $PKGHANDLER in 32131 apt-get) 32132 apt_help $MISSING_DEPENDENCY ;; 32133 yum) 32134 yum_help $MISSING_DEPENDENCY ;; 32135 port) 32136 port_help $MISSING_DEPENDENCY ;; 32137 pkgutil) 32138 pkgutil_help $MISSING_DEPENDENCY ;; 32139 pkgadd) 32140 pkgadd_help $MISSING_DEPENDENCY ;; 32141 * ) 32142 break ;; 32143 esac 32144 32145 if test "x$PKGHANDLER_COMMAND" != x; then 32146 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 32147 fi 32148 32149 as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5 32150 fi 32151 fi 32152 32153 32154 32155 32156 32157 32158 32159 ############################################################################### 32160 # 32161 # Check for the jpeg library 32162 # 32163 32164 USE_EXTERNAL_LIBJPEG=true 32165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 32166 $as_echo_n "checking for main in -ljpeg... " >&6; } 32167 if ${ac_cv_lib_jpeg_main+:} false; then : 32168 $as_echo_n "(cached) " >&6 32169 else 32170 ac_check_lib_save_LIBS=$LIBS 32171 LIBS="-ljpeg $LIBS" 32172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32173 /* end confdefs.h. */ 32174 32175 32176 int 32177 main () 32178 { 32179 return main (); 32180 ; 32181 return 0; 32182 } 32183 _ACEOF 32184 if ac_fn_cxx_try_link "$LINENO"; then : 32185 ac_cv_lib_jpeg_main=yes 32186 else 32187 ac_cv_lib_jpeg_main=no 32188 fi 32189 rm -f core conftest.err conftest.$ac_objext \ 32190 conftest$ac_exeext conftest.$ac_ext 32191 LIBS=$ac_check_lib_save_LIBS 32192 fi 32193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5 32194 $as_echo "$ac_cv_lib_jpeg_main" >&6; } 32195 if test "x$ac_cv_lib_jpeg_main" = xyes; then : 32196 cat >>confdefs.h <<_ACEOF 32197 #define HAVE_LIBJPEG 1 32198 _ACEOF 32199 32200 LIBS="-ljpeg $LIBS" 32201 32202 else 32203 USE_EXTERNAL_LIBJPEG=false 32204 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5 32205 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;} 32206 32207 fi 32208 32209 32210 32211 ############################################################################### 32212 # 32213 # Check for the gif library 32214 # 32215 32216 32217 # Check whether --with-giflib was given. 32218 if test "${with_giflib+set}" = set; then : 32219 withval=$with_giflib; 32220 fi 32221 32222 32223 32224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5 32225 $as_echo_n "checking for which giflib to use... " >&6; } 32226 32227 # default is bundled 32228 DEFAULT_GIFLIB=bundled 32229 32230 # 32231 # if user didn't specify, use DEFAULT_GIFLIB 32232 # 32233 if test "x${with_giflib}" = "x"; then 32234 with_giflib=${DEFAULT_GIFLIB} 32235 fi 32236 32237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5 32238 $as_echo "${with_giflib}" >&6; } 32239 32240 if test "x${with_giflib}" = "xbundled"; then 32241 USE_EXTERNAL_LIBGIF=false 32242 elif test "x${with_giflib}" = "xsystem"; then 32243 ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" 32244 if test "x$ac_cv_header_gif_lib_h" = xyes; then : 32245 32246 else 32247 as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5 32248 fi 32249 32250 32251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5 32252 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; } 32253 if ${ac_cv_lib_gif_DGifGetCode+:} false; then : 32254 $as_echo_n "(cached) " >&6 32255 else 32256 ac_check_lib_save_LIBS=$LIBS 32257 LIBS="-lgif $LIBS" 32258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32259 /* end confdefs.h. */ 32260 32261 /* Override any GCC internal prototype to avoid an error. 32262 Use char because int might match the return type of a GCC 32263 builtin and then its argument prototype would still apply. */ 32264 #ifdef __cplusplus 32265 extern "C" 32266 #endif 32267 char DGifGetCode (); 32268 int 32269 main () 32270 { 32271 return DGifGetCode (); 32272 ; 32273 return 0; 32274 } 32275 _ACEOF 32276 if ac_fn_cxx_try_link "$LINENO"; then : 32277 ac_cv_lib_gif_DGifGetCode=yes 32278 else 32279 ac_cv_lib_gif_DGifGetCode=no 32280 fi 32281 rm -f core conftest.err conftest.$ac_objext \ 32282 conftest$ac_exeext conftest.$ac_ext 32283 LIBS=$ac_check_lib_save_LIBS 32284 fi 32285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5 32286 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; } 32287 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then : 32288 cat >>confdefs.h <<_ACEOF 32289 #define HAVE_LIBGIF 1 32290 _ACEOF 32291 32292 LIBS="-lgif $LIBS" 32293 32294 else 32295 as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5 32296 fi 32297 32298 32299 USE_EXTERNAL_LIBGIF=true 32300 else 32301 as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5 32302 fi 32303 32304 32305 ############################################################################### 32306 # 32307 # Check for the zlib library 32308 # 32309 32310 32311 # Check whether --with-zlib was given. 32312 if test "${with_zlib+set}" = set; then : 32313 withval=$with_zlib; 32314 fi 32315 32316 32317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 32318 $as_echo_n "checking for compress in -lz... " >&6; } 32319 if ${ac_cv_lib_z_compress+:} false; then : 32320 $as_echo_n "(cached) " >&6 32321 else 32322 ac_check_lib_save_LIBS=$LIBS 32323 LIBS="-lz $LIBS" 32324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32325 /* end confdefs.h. */ 32326 32327 /* Override any GCC internal prototype to avoid an error. 32328 Use char because int might match the return type of a GCC 32329 builtin and then its argument prototype would still apply. */ 32330 #ifdef __cplusplus 32331 extern "C" 32332 #endif 32333 char compress (); 32334 int 32335 main () 32336 { 32337 return compress (); 32338 ; 32339 return 0; 32340 } 32341 _ACEOF 32342 if ac_fn_cxx_try_link "$LINENO"; then : 32343 ac_cv_lib_z_compress=yes 32344 else 32345 ac_cv_lib_z_compress=no 32346 fi 32347 rm -f core conftest.err conftest.$ac_objext \ 32348 conftest$ac_exeext conftest.$ac_ext 32349 LIBS=$ac_check_lib_save_LIBS 32350 fi 32351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 32352 $as_echo "$ac_cv_lib_z_compress" >&6; } 32353 if test "x$ac_cv_lib_z_compress" = xyes; then : 32354 ZLIB_FOUND=yes 32355 else 32356 ZLIB_FOUND=no 32357 fi 32358 32359 32360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5 32361 $as_echo_n "checking for which zlib to use... " >&6; } 32362 32363 DEFAULT_ZLIB=bundled 32364 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 32365 # 32366 # On macosx default is system...on others default is 32367 # 32368 DEFAULT_ZLIB=system 32369 fi 32370 32371 if test "x${ZLIB_FOUND}" != "xyes"; then 32372 # 32373 # If we don't find any system...set default to bundled 32374 # 32375 DEFAULT_ZLIB=bundled 32376 fi 32377 32378 # 32379 # If user didn't specify, use DEFAULT_ZLIB 32380 # 32381 if test "x${with_zlib}" = "x"; then 32382 with_zlib=${DEFAULT_ZLIB} 32383 fi 32384 32385 if test "x${with_zlib}" = "xbundled"; then 32386 USE_EXTERNAL_LIBZ=false 32387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5 32388 $as_echo "bundled" >&6; } 32389 elif test "x${with_zlib}" = "xsystem"; then 32390 if test "x${ZLIB_FOUND}" = "xyes"; then 32391 USE_EXTERNAL_LIBZ=true 32392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 32393 $as_echo "system" >&6; } 32394 else 32395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5 32396 $as_echo "system not found" >&6; } 32397 as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5 32398 fi 32399 else 32400 as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5 32401 fi 32402 32403 32404 32405 ############################################################################### 32406 LIBZIP_CAN_USE_MMAP=true 32407 32408 32409 32410 ############################################################################### 32411 # 32412 # Check if altzone exists in time.h 32413 # 32414 32415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32416 /* end confdefs.h. */ 32417 #include <time.h> 32418 int 32419 main () 32420 { 32421 return (int)altzone; 32422 ; 32423 return 0; 32424 } 32425 _ACEOF 32426 if ac_fn_cxx_try_link "$LINENO"; then : 32427 has_altzone=yes 32428 else 32429 has_altzone=no 32430 fi 32431 rm -f core conftest.err conftest.$ac_objext \ 32432 conftest$ac_exeext conftest.$ac_ext 32433 if test "x$has_altzone" = xyes; then 32434 32435 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h 32436 32437 fi 32438 32439 ############################################################################### 32440 # 32441 # Check the maths library 32442 # 32443 32444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 32445 $as_echo_n "checking for cos in -lm... " >&6; } 32446 if ${ac_cv_lib_m_cos+:} false; then : 32447 $as_echo_n "(cached) " >&6 32448 else 32449 ac_check_lib_save_LIBS=$LIBS 32450 LIBS="-lm $LIBS" 32451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32452 /* end confdefs.h. */ 32453 32454 /* Override any GCC internal prototype to avoid an error. 32455 Use char because int might match the return type of a GCC 32456 builtin and then its argument prototype would still apply. */ 32457 #ifdef __cplusplus 32458 extern "C" 32459 #endif 32460 char cos (); 32461 int 32462 main () 32463 { 32464 return cos (); 32465 ; 32466 return 0; 32467 } 32468 _ACEOF 32469 if ac_fn_cxx_try_link "$LINENO"; then : 32470 ac_cv_lib_m_cos=yes 32471 else 32472 ac_cv_lib_m_cos=no 32473 fi 32474 rm -f core conftest.err conftest.$ac_objext \ 32475 conftest$ac_exeext conftest.$ac_ext 32476 LIBS=$ac_check_lib_save_LIBS 32477 fi 32478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 32479 $as_echo "$ac_cv_lib_m_cos" >&6; } 32480 if test "x$ac_cv_lib_m_cos" = xyes; then : 32481 cat >>confdefs.h <<_ACEOF 32482 #define HAVE_LIBM 1 32483 _ACEOF 32484 32485 LIBS="-lm $LIBS" 32486 32487 else 32488 32489 { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5 32490 $as_echo "$as_me: Maths library was not found" >&6;} 32491 32492 fi 32493 32494 32495 32496 ############################################################################### 32497 # 32498 # Check for libdl.so 32499 32500 save_LIBS="$LIBS" 32501 LIBS="" 32502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 32503 $as_echo_n "checking for dlopen in -ldl... " >&6; } 32504 if ${ac_cv_lib_dl_dlopen+:} false; then : 32505 $as_echo_n "(cached) " >&6 32506 else 32507 ac_check_lib_save_LIBS=$LIBS 32508 LIBS="-ldl $LIBS" 32509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32510 /* end confdefs.h. */ 32511 32512 /* Override any GCC internal prototype to avoid an error. 32513 Use char because int might match the return type of a GCC 32514 builtin and then its argument prototype would still apply. */ 32515 #ifdef __cplusplus 32516 extern "C" 32517 #endif 32518 char dlopen (); 32519 int 32520 main () 32521 { 32522 return dlopen (); 32523 ; 32524 return 0; 32525 } 32526 _ACEOF 32527 if ac_fn_cxx_try_link "$LINENO"; then : 32528 ac_cv_lib_dl_dlopen=yes 32529 else 32530 ac_cv_lib_dl_dlopen=no 32531 fi 32532 rm -f core conftest.err conftest.$ac_objext \ 32533 conftest$ac_exeext conftest.$ac_ext 32534 LIBS=$ac_check_lib_save_LIBS 32535 fi 32536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 32537 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } 32538 if test "x$ac_cv_lib_dl_dlopen" = xyes; then : 32539 cat >>confdefs.h <<_ACEOF 32540 #define HAVE_LIBDL 1 32541 _ACEOF 32542 32543 LIBS="-ldl $LIBS" 32544 32545 fi 32546 32547 LIBDL="$LIBS" 32548 32549 LIBS="$save_LIBS" 32550 32551 32552 32553 ############################################################################### 32554 # 32555 # statically link libstdc++ before C++ ABI is stablized on Linux unless 32556 # dynamic build is configured on command line. 32557 # 32558 32559 # Check whether --with-stdc++lib was given. 32560 if test "${with_stdc__lib+set}" = set; then : 32561 withval=$with_stdc__lib; 32562 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ 32563 && test "x$with_stdc__lib" != xdefault; then 32564 as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5 32565 fi 32566 32567 else 32568 with_stdc__lib=default 32569 32570 fi 32571 32572 32573 if test "x$OPENJDK_TARGET_OS" = xlinux; then 32574 # Test if -lstdc++ works. 32575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5 32576 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; } 32577 ac_ext=cpp 32578 ac_cpp='$CXXCPP $CPPFLAGS' 32579 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32580 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32581 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32582 32583 OLD_CXXFLAGS="$CXXFLAGS" 32584 CXXFLAGS="$CXXFLAGS -lstdc++" 32585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32586 /* end confdefs.h. */ 32587 32588 int 32589 main () 32590 { 32591 return 0; 32592 ; 32593 return 0; 32594 } 32595 _ACEOF 32596 if ac_fn_cxx_try_link "$LINENO"; then : 32597 has_dynamic_libstdcxx=yes 32598 else 32599 has_dynamic_libstdcxx=no 32600 fi 32601 rm -f core conftest.err conftest.$ac_objext \ 32602 conftest$ac_exeext conftest.$ac_ext 32603 CXXFLAGS="$OLD_CXXFLAGS" 32604 ac_ext=cpp 32605 ac_cpp='$CXXCPP $CPPFLAGS' 32606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32607 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32609 32610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5 32611 $as_echo "$has_dynamic_libstdcxx" >&6; } 32612 32613 # Test if stdc++ can be linked statically. 32614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5 32615 $as_echo_n "checking if static link of stdc++ is possible... " >&6; } 32616 STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" 32617 ac_ext=cpp 32618 ac_cpp='$CXXCPP $CPPFLAGS' 32619 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32620 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32621 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32622 32623 OLD_LIBS="$LIBS" 32624 OLD_CXX="$CXX" 32625 LIBS="$STATIC_STDCXX_FLAGS" 32626 CXX="$CC" 32627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32628 /* end confdefs.h. */ 32629 32630 int 32631 main () 32632 { 32633 return 0; 32634 ; 32635 return 0; 32636 } 32637 _ACEOF 32638 if ac_fn_cxx_try_link "$LINENO"; then : 32639 has_static_libstdcxx=yes 32640 else 32641 has_static_libstdcxx=no 32642 fi 32643 rm -f core conftest.err conftest.$ac_objext \ 32644 conftest$ac_exeext conftest.$ac_ext 32645 LIBS="$OLD_LIBS" 32646 CXX="$OLD_CXX" 32647 ac_ext=cpp 32648 ac_cpp='$CXXCPP $CPPFLAGS' 32649 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32650 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32651 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32652 32653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5 32654 $as_echo "$has_static_libstdcxx" >&6; } 32655 32656 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then 32657 as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5 32658 fi 32659 32660 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then 32661 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5 32662 fi 32663 32664 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then 32665 as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5 32666 fi 32667 32668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5 32669 $as_echo_n "checking how to link with libstdc++... " >&6; } 32670 # If dynamic was requested, it's available since it would fail above otherwise. 32671 # If dynamic wasn't requested, go with static unless it isn't available. 32672 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32673 LIBCXX="$LIBCXX -lstdc++" 32674 LDCXX="$CXX" 32675 STATIC_CXX_SETTING="STATIC_CXX=false" 32676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5 32677 $as_echo "dynamic" >&6; } 32678 else 32679 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" 32680 LDCXX="$CC" 32681 STATIC_CXX_SETTING="STATIC_CXX=true" 32682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 32683 $as_echo "static" >&6; } 32684 fi 32685 fi 32686 32687 32688 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32689 # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS 32690 32691 pkg_failed=no 32692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5 32693 $as_echo_n "checking for LIBFFI... " >&6; } 32694 32695 if test -n "$LIBFFI_CFLAGS"; then 32696 pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS" 32697 elif test -n "$PKG_CONFIG"; then 32698 if test -n "$PKG_CONFIG" && \ 32699 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 32700 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 32701 ac_status=$? 32702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32703 test $ac_status = 0; }; then 32704 pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null` 32705 else 32706 pkg_failed=yes 32707 fi 32708 else 32709 pkg_failed=untried 32710 fi 32711 if test -n "$LIBFFI_LIBS"; then 32712 pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS" 32713 elif test -n "$PKG_CONFIG"; then 32714 if test -n "$PKG_CONFIG" && \ 32715 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 32716 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 32717 ac_status=$? 32718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32719 test $ac_status = 0; }; then 32720 pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null` 32721 else 32722 pkg_failed=yes 32723 fi 32724 else 32725 pkg_failed=untried 32726 fi 32727 32728 32729 32730 if test $pkg_failed = yes; then 32731 32732 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 32733 _pkg_short_errors_supported=yes 32734 else 32735 _pkg_short_errors_supported=no 32736 fi 32737 if test $_pkg_short_errors_supported = yes; then 32738 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1` 32739 else 32740 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1` 32741 fi 32742 # Put the nasty error message in config.log where it belongs 32743 echo "$LIBFFI_PKG_ERRORS" >&5 32744 32745 as_fn_error $? "Package requirements (libffi) were not met: 32746 32747 $LIBFFI_PKG_ERRORS 32748 32749 Consider adjusting the PKG_CONFIG_PATH environment variable if you 32750 installed software in a non-standard prefix. 32751 32752 Alternatively, you may set the environment variables LIBFFI_CFLAGS 32753 and LIBFFI_LIBS to avoid the need to call pkg-config. 32754 See the pkg-config man page for more details. 32755 " "$LINENO" 5 32756 elif test $pkg_failed = untried; then 32757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 32758 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 32759 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 32760 is in your PATH or set the PKG_CONFIG environment variable to the full 32761 path to pkg-config. 32762 32763 Alternatively, you may set the environment variables LIBFFI_CFLAGS 32764 and LIBFFI_LIBS to avoid the need to call pkg-config. 32765 See the pkg-config man page for more details. 32766 32767 To get pkg-config, see <http://pkg-config.freedesktop.org/>. 32768 See \`config.log' for more details" "$LINENO" 5; } 32769 else 32770 LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS 32771 LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS 32772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32773 $as_echo "yes" >&6; } 32774 : 32775 fi 32776 32777 fi 32778 32779 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32780 # Extract the first word of "llvm-config", so it can be a program name with args. 32781 set dummy llvm-config; ac_word=$2 32782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 32783 $as_echo_n "checking for $ac_word... " >&6; } 32784 if ${ac_cv_prog_LLVM_CONFIG+:} false; then : 32785 $as_echo_n "(cached) " >&6 32786 else 32787 if test -n "$LLVM_CONFIG"; then 32788 ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test. 32789 else 32790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 32791 for as_dir in $PATH 32792 do 32793 IFS=$as_save_IFS 32794 test -z "$as_dir" && as_dir=. 32795 for ac_exec_ext in '' $ac_executable_extensions; do 32796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 32797 ac_cv_prog_LLVM_CONFIG="llvm-config" 32798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 32799 break 2 32800 fi 32801 done 32802 done 32803 IFS=$as_save_IFS 32804 32805 fi 32806 fi 32807 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG 32808 if test -n "$LLVM_CONFIG"; then 32809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5 32810 $as_echo "$LLVM_CONFIG" >&6; } 32811 else 32812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32813 $as_echo "no" >&6; } 32814 fi 32815 32816 32817 32818 if test "x$LLVM_CONFIG" != xllvm-config; then 32819 as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5 32820 fi 32821 32822 llvm_components="jit mcjit engine nativecodegen native" 32823 unset LLVM_CFLAGS 32824 for flag in $("$LLVM_CONFIG" --cxxflags); do 32825 if echo "${flag}" | grep -q '^-[ID]'; then 32826 if test "${flag}" != "-D_DEBUG" ; then 32827 if test "${LLVM_CFLAGS}" != "" ; then 32828 LLVM_CFLAGS="${LLVM_CFLAGS} " 32829 fi 32830 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" 32831 fi 32832 fi 32833 done 32834 llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') 32835 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" 32836 32837 unset LLVM_LDFLAGS 32838 for flag in $("${LLVM_CONFIG}" --ldflags); do 32839 if echo "${flag}" | grep -q '^-L'; then 32840 if test "${LLVM_LDFLAGS}" != ""; then 32841 LLVM_LDFLAGS="${LLVM_LDFLAGS} " 32842 fi 32843 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" 32844 fi 32845 done 32846 32847 unset LLVM_LIBS 32848 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do 32849 if echo "${flag}" | grep -q '^-l'; then 32850 if test "${LLVM_LIBS}" != ""; then 32851 LLVM_LIBS="${LLVM_LIBS} " 32852 fi 32853 LLVM_LIBS="${LLVM_LIBS}${flag}" 32854 fi 32855 done 32856 32857 32858 32859 32860 fi 32861 32862 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) 32863 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then 32864 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" 32865 fi 32866 32867 # TODO better (platform agnostic) test 32868 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then 32869 LIBCXX="-lstdc++" 32870 fi 32871 32872 32873 32874 32875 32876 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper 32877 32878 # When using cygwin or msys, we need a wrapper binary that renames 32879 # /cygdrive/c/ arguments into c:/ arguments and peeks into 32880 # @files and rewrites these too! This wrapper binary is 32881 # called fixpath. 32882 FIXPATH= 32883 if test "x$OPENJDK_BUILD_OS" = xwindows; then 32884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5 32885 $as_echo_n "checking if fixpath can be created... " >&6; } 32886 FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" 32887 FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe" 32888 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 32889 FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC` 32890 FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN` 32891 # Important to keep the .exe suffix on Cygwin for Hotspot makefiles 32892 FIXPATH="$OUTPUT_ROOT/fixpath.exe -c" 32893 elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then 32894 FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC` 32895 FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN` 32896 32897 # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line 32898 # @ was chosen as separator to minimize risk of other tools messing around with it 32899 all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq` 32900 fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` 32901 32902 FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list" 32903 fi 32904 rm -f $OUTPUT_ROOT/fixpath* 32905 cd $OUTPUT_ROOT 32906 $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1 32907 cd $CURDIR 32908 32909 if test ! -x $OUTPUT_ROOT/fixpath.exe; then 32910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32911 $as_echo "no" >&6; } 32912 cat $OUTPUT_ROOT/fixpath1.log 32913 as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5 32914 fi 32915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32916 $as_echo "yes" >&6; } 32917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5 32918 $as_echo_n "checking if fixpath.exe works... " >&6; } 32919 cd $OUTPUT_ROOT 32920 $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 32921 cd $CURDIR 32922 if test ! -x $OUTPUT_ROOT/fixpath2.exe; then 32923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32924 $as_echo "no" >&6; } 32925 cat $OUTPUT_ROOT/fixpath2.log 32926 as_fn_error $? "fixpath did not work!" "$LINENO" 5 32927 fi 32928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32929 $as_echo "yes" >&6; } 32930 rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj 32931 fi 32932 32933 32934 32935 32936 ############################################################################### 32937 # 32938 # We need to do some final tweaking, when everything else is done. 32939 # 32940 ############################################################################### 32941 32942 32943 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" 32944 32945 32946 # The name of the Service Agent jar. 32947 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" 32948 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 32949 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" 32950 fi 32951 32952 32953 32954 32955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5 32956 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; } 32957 32958 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then 32959 ENABLE_INTREE_EC=yes 32960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32961 $as_echo "yes" >&6; } 32962 else 32963 ENABLE_INTREE_EC=no 32964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32965 $as_echo "no" >&6; } 32966 fi 32967 32968 32969 32970 32971 ############################################################################### 32972 # 32973 # Configure parts of the build that only affect the build performance, 32974 # not the result. 32975 # 32976 ############################################################################### 32977 32978 32979 # How many cores do we have on this build system? 32980 32981 # Check whether --with-num-cores was given. 32982 if test "${with_num_cores+set}" = set; then : 32983 withval=$with_num_cores; 32984 fi 32985 32986 if test "x$with_num_cores" = x; then 32987 # The number of cores were not specified, try to probe them. 32988 32989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5 32990 $as_echo_n "checking for number of cores... " >&6; } 32991 NUM_CORES=1 32992 FOUND_CORES=no 32993 32994 if test -f /proc/cpuinfo; then 32995 # Looks like a Linux (or cygwin) system 32996 NUM_CORES=`cat /proc/cpuinfo | grep -c processor` 32997 FOUND_CORES=yes 32998 elif test -x /usr/sbin/psrinfo; then 32999 # Looks like a Solaris system 33000 NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line` 33001 FOUND_CORES=yes 33002 elif test -x /usr/sbin/system_profiler; then 33003 # Looks like a MacOSX system 33004 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'` 33005 FOUND_CORES=yes 33006 elif test -n "$NUMBER_OF_PROCESSORS"; then 33007 # On windows, look in the env 33008 NUM_CORES=$NUMBER_OF_PROCESSORS 33009 FOUND_CORES=yes 33010 fi 33011 33012 if test "x$FOUND_CORES" = xyes; then 33013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5 33014 $as_echo "$NUM_CORES" >&6; } 33015 else 33016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5 33017 $as_echo "could not detect number of cores, defaulting to 1" >&6; } 33018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5 33019 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;} 33020 fi 33021 33022 33023 else 33024 NUM_CORES=$with_num_cores 33025 fi 33026 33027 33028 33029 # How much memory do we have on this build system? 33030 33031 # Check whether --with-memory-size was given. 33032 if test "${with_memory_size+set}" = set; then : 33033 withval=$with_memory_size; 33034 fi 33035 33036 if test "x$with_memory_size" = x; then 33037 # The memory size was not specified, try to probe it. 33038 33039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5 33040 $as_echo_n "checking for memory size... " >&6; } 33041 # Default to 1024 MB 33042 MEMORY_SIZE=1024 33043 FOUND_MEM=no 33044 33045 if test -f /proc/meminfo; then 33046 # Looks like a Linux (or cygwin) system 33047 MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'` 33048 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024` 33049 FOUND_MEM=yes 33050 elif test -x /usr/sbin/prtconf; then 33051 # Looks like a Solaris system 33052 MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'` 33053 FOUND_MEM=yes 33054 elif test -x /usr/sbin/system_profiler; then 33055 # Looks like a MacOSX system 33056 MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'` 33057 MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024` 33058 FOUND_MEM=yes 33059 elif test "x$OPENJDK_BUILD_OS" = xwindows; then 33060 # Windows, but without cygwin 33061 MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-` 33062 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024` 33063 FOUND_MEM=yes 33064 fi 33065 33066 if test "x$FOUND_MEM" = xyes; then 33067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5 33068 $as_echo "$MEMORY_SIZE MB" >&6; } 33069 else 33070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5 33071 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; } 33072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5 33073 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;} 33074 fi 33075 33076 else 33077 MEMORY_SIZE=$with_memory_size 33078 fi 33079 33080 33081 33082 # Provide a decent default number of parallel jobs for make depending on 33083 # number of cores, amount of memory and machine architecture. 33084 33085 # Check whether --with-jobs was given. 33086 if test "${with_jobs+set}" = set; then : 33087 withval=$with_jobs; 33088 fi 33089 33090 if test "x$with_jobs" = x; then 33091 # Number of jobs was not specified, calculate. 33092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5 33093 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; } 33094 # Approximate memory in GB, rounding up a bit. 33095 memory_gb=`expr $MEMORY_SIZE / 1100` 33096 # Pick the lowest of memory in gb and number of cores. 33097 if test "$memory_gb" -lt "$NUM_CORES"; then 33098 JOBS="$memory_gb" 33099 else 33100 JOBS="$NUM_CORES" 33101 # On bigger machines, leave some room for other processes to run 33102 if test "$JOBS" -gt "4"; then 33103 JOBS=`expr $JOBS '*' 90 / 100` 33104 fi 33105 fi 33106 # Cap number of jobs to 16 33107 if test "$JOBS" -gt "16"; then 33108 JOBS=16 33109 fi 33110 if test "$JOBS" -eq "0"; then 33111 JOBS=1 33112 fi 33113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5 33114 $as_echo "$JOBS" >&6; } 33115 else 33116 JOBS=$with_jobs 33117 fi 33118 33119 33120 33121 # Setup smart javac (after cores and memory have been setup) 33122 33123 33124 # Check whether --with-sjavac-server-java was given. 33125 if test "${with_sjavac_server_java+set}" = set; then : 33126 withval=$with_sjavac_server_java; 33127 fi 33128 33129 33130 if test "x$with_sjavac_server_java" != x; then 33131 SJAVAC_SERVER_JAVA="$with_sjavac_server_java" 33132 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""` 33133 if test "x$FOUND_VERSION" = x; then 33134 as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5 33135 fi 33136 else 33137 SJAVAC_SERVER_JAVA="" 33138 # Hotspot specific options. 33139 33140 $ECHO "Check if jvm arg is ok: -verbosegc" >&5 33141 $ECHO "Command: $JAVA -verbosegc -version" >&5 33142 OUTPUT=`$JAVA -verbosegc -version 2>&1` 33143 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33144 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33145 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33146 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc" 33147 JVM_ARG_OK=true 33148 else 33149 $ECHO "Arg failed:" >&5 33150 $ECHO "$OUTPUT" >&5 33151 JVM_ARG_OK=false 33152 fi 33153 33154 # JRockit specific options. 33155 33156 $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5 33157 $ECHO "Command: $JAVA -Xverbose:gc -version" >&5 33158 OUTPUT=`$JAVA -Xverbose:gc -version 2>&1` 33159 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33160 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33161 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33162 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc" 33163 JVM_ARG_OK=true 33164 else 33165 $ECHO "Arg failed:" >&5 33166 $ECHO "$OUTPUT" >&5 33167 JVM_ARG_OK=false 33168 fi 33169 33170 SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA" 33171 fi 33172 33173 33174 if test "$MEMORY_SIZE" -gt "2500"; then 33175 33176 $ECHO "Check if jvm arg is ok: -d64" >&5 33177 $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5 33178 OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1` 33179 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33180 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33181 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33182 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" 33183 JVM_ARG_OK=true 33184 else 33185 $ECHO "Arg failed:" >&5 33186 $ECHO "$OUTPUT" >&5 33187 JVM_ARG_OK=false 33188 fi 33189 33190 if test "$JVM_ARG_OK" = true; then 33191 JVM_64BIT=true 33192 JVM_ARG_OK=false 33193 fi 33194 fi 33195 33196 if test "$JVM_64BIT" = true; then 33197 if test "$MEMORY_SIZE" -gt "17000"; then 33198 33199 $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5 33200 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5 33201 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1` 33202 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33203 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33204 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33205 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G" 33206 JVM_ARG_OK=true 33207 else 33208 $ECHO "Arg failed:" >&5 33209 $ECHO "$OUTPUT" >&5 33210 JVM_ARG_OK=false 33211 fi 33212 33213 fi 33214 if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then 33215 33216 $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5 33217 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5 33218 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1` 33219 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33220 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33221 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33222 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G" 33223 JVM_ARG_OK=true 33224 else 33225 $ECHO "Arg failed:" >&5 33226 $ECHO "$OUTPUT" >&5 33227 JVM_ARG_OK=false 33228 fi 33229 33230 fi 33231 if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then 33232 33233 $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5 33234 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5 33235 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1` 33236 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33237 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33238 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33239 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G" 33240 JVM_ARG_OK=true 33241 else 33242 $ECHO "Arg failed:" >&5 33243 $ECHO "$OUTPUT" >&5 33244 JVM_ARG_OK=false 33245 fi 33246 33247 fi 33248 if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then 33249 33250 $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5 33251 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5 33252 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1` 33253 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33254 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33255 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33256 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M" 33257 JVM_ARG_OK=true 33258 else 33259 $ECHO "Arg failed:" >&5 33260 $ECHO "$OUTPUT" >&5 33261 JVM_ARG_OK=false 33262 fi 33263 33264 fi 33265 fi 33266 if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then 33267 33268 $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5 33269 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5 33270 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1` 33271 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33272 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33273 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33274 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M" 33275 JVM_ARG_OK=true 33276 else 33277 $ECHO "Arg failed:" >&5 33278 $ECHO "$OUTPUT" >&5 33279 JVM_ARG_OK=false 33280 fi 33281 33282 fi 33283 if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then 33284 33285 $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5 33286 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5 33287 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1` 33288 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33289 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33290 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33291 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M" 33292 JVM_ARG_OK=true 33293 else 33294 $ECHO "Arg failed:" >&5 33295 $ECHO "$OUTPUT" >&5 33296 JVM_ARG_OK=false 33297 fi 33298 33299 fi 33300 if test "$JVM_ARG_OK" = false; then 33301 33302 $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5 33303 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5 33304 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1` 33305 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33306 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33307 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33308 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M" 33309 JVM_ARG_OK=true 33310 else 33311 $ECHO "Arg failed:" >&5 33312 $ECHO "$OUTPUT" >&5 33313 JVM_ARG_OK=false 33314 fi 33315 33316 fi 33317 33318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5 33319 $as_echo_n "checking whether to use sjavac... " >&6; } 33320 # Check whether --enable-sjavac was given. 33321 if test "${enable_sjavac+set}" = set; then : 33322 enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}" 33323 else 33324 ENABLE_SJAVAC='no' 33325 fi 33326 33327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5 33328 $as_echo "$ENABLE_SJAVAC" >&6; } 33329 33330 33331 if test "x$ENABLE_SJAVAC" = xyes; then 33332 SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers" 33333 else 33334 SJAVAC_SERVER_DIR= 33335 fi 33336 33337 33338 33339 33340 # Can the C/C++ compiler use precompiled headers? 33341 33342 33343 ############################################################################### 33344 # 33345 # Can the C/C++ compiler use precompiled headers? 33346 # 33347 # Check whether --enable-precompiled-headers was given. 33348 if test "${enable_precompiled_headers+set}" = set; then : 33349 enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers} 33350 else 33351 ENABLE_PRECOMPH=yes 33352 fi 33353 33354 33355 USE_PRECOMPILED_HEADER=1 33356 if test "x$ENABLE_PRECOMPH" = xno; then 33357 USE_PRECOMPILED_HEADER=0 33358 fi 33359 33360 if test "x$ENABLE_PRECOMPH" = xyes; then 33361 # Check that the compiler actually supports precomp headers. 33362 if test "x$GCC" = xyes; then 33363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5 33364 $as_echo_n "checking that precompiled headers work... " >&6; } 33365 echo "int alfa();" > conftest.h 33366 $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5 33367 if test ! -f conftest.hpp.gch; then 33368 USE_PRECOMPILED_HEADER=0 33369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 33370 $as_echo "no" >&6; } 33371 else 33372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 33373 $as_echo "yes" >&6; } 33374 fi 33375 rm -f conftest.h conftest.hpp.gch 33376 fi 33377 fi 33378 33379 33380 33381 33382 # Setup use of ccache, if available 33383 33384 # Check whether --enable-ccache was given. 33385 if test "${enable_ccache+set}" = set; then : 33386 enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache} 33387 else 33388 ENABLE_CCACHE=yes 33389 fi 33390 33391 if test "x$ENABLE_CCACHE" = xyes; then 33392 OLD_PATH="$PATH" 33393 if test "x$TOOLS_DIR" != x; then 33394 PATH=$TOOLS_DIR:$PATH 33395 fi 33396 # Extract the first word of "ccache", so it can be a program name with args. 33397 set dummy ccache; ac_word=$2 33398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 33399 $as_echo_n "checking for $ac_word... " >&6; } 33400 if ${ac_cv_path_CCACHE+:} false; then : 33401 $as_echo_n "(cached) " >&6 33402 else 33403 case $CCACHE in 33404 [\\/]* | ?:[\\/]*) 33405 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path. 33406 ;; 33407 *) 33408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 33409 for as_dir in $PATH 33410 do 33411 IFS=$as_save_IFS 33412 test -z "$as_dir" && as_dir=. 33413 for ac_exec_ext in '' $ac_executable_extensions; do 33414 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 33415 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" 33416 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 33417 break 2 33418 fi 33419 done 33420 done 33421 IFS=$as_save_IFS 33422 33423 ;; 33424 esac 33425 fi 33426 CCACHE=$ac_cv_path_CCACHE 33427 if test -n "$CCACHE"; then 33428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5 33429 $as_echo "$CCACHE" >&6; } 33430 else 33431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 33432 $as_echo "no" >&6; } 33433 fi 33434 33435 33436 PATH="$OLD_PATH" 33437 else 33438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5 33439 $as_echo_n "checking for ccache... " >&6; } 33440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5 33441 $as_echo "explicitly disabled" >&6; } 33442 CCACHE= 33443 fi 33444 33445 33446 33447 # Check whether --with-ccache-dir was given. 33448 if test "${with_ccache_dir+set}" = set; then : 33449 withval=$with_ccache_dir; 33450 fi 33451 33452 33453 if test "x$with_ccache_dir" != x; then 33454 # When using a non home ccache directory, assume the use is to share ccache files 33455 # with other users. Thus change the umask. 33456 SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002" 33457 fi 33458 CCACHE_FOUND="" 33459 if test "x$CCACHE" != x; then 33460 33461 if test "x$CCACHE" != x; then 33462 CCACHE_FOUND="true" 33463 # Only use ccache if it is 3.1.4 or later, which supports 33464 # precompiled headers. 33465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5 33466 $as_echo_n "checking if ccache supports precompiled headers... " >&6; } 33467 HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null` 33468 if test "x$HAS_GOOD_CCACHE" = x; then 33469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5 33470 $as_echo "no, disabling ccache" >&6; } 33471 CCACHE= 33472 else 33473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 33474 $as_echo "yes" >&6; } 33475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5 33476 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; } 33477 PUSHED_FLAGS="$CXXFLAGS" 33478 CXXFLAGS="-fpch-preprocess $CXXFLAGS" 33479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 33480 /* end confdefs.h. */ 33481 33482 int 33483 main () 33484 { 33485 33486 ; 33487 return 0; 33488 } 33489 _ACEOF 33490 if ac_fn_cxx_try_compile "$LINENO"; then : 33491 CC_KNOWS_CCACHE_TRICK=yes 33492 else 33493 CC_KNOWS_CCACHE_TRICK=no 33494 fi 33495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 33496 CXXFLAGS="$PUSHED_FLAGS" 33497 if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then 33498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 33499 $as_echo "yes" >&6; } 33500 else 33501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5 33502 $as_echo "no, disabling ccaching of precompiled headers" >&6; } 33503 CCACHE= 33504 fi 33505 fi 33506 fi 33507 33508 if test "x$CCACHE" != x; then 33509 CCACHE_SLOPPINESS=time_macros 33510 CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" 33511 CCACHE_FLAGS=-fpch-preprocess 33512 33513 if test "x$SET_CCACHE_DIR" != x; then 33514 mkdir -p $CCACHE_DIR > /dev/null 2>&1 33515 chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 33516 fi 33517 fi 33518 33519 fi 33520 33521 33522 ############################################################################### 33523 # 33524 # And now the finish... 33525 # 33526 ############################################################################### 33527 33528 # Check for some common pitfalls 33529 33530 if test x"$OPENJDK_BUILD_OS" = xwindows; then 33531 file_to_test="$SRC_ROOT/LICENSE" 33532 if test `$STAT -c '%a' "$file_to_test"` -lt 400; then 33533 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 33534 fi 33535 fi 33536 33537 33538 33539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5 33540 $as_echo_n "checking if build directory is on local disk... " >&6; } 33541 33542 # df -l lists only local disks; if the given directory is not found then 33543 # a non-zero exit code is given 33544 if test "x$DF" = x; then 33545 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 33546 # msys does not have df; use Windows "net use" instead. 33547 IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:` 33548 if test "x$IS_NETWORK_DISK" = x; then 33549 OUTPUT_DIR_IS_LOCAL="yes" 33550 else 33551 OUTPUT_DIR_IS_LOCAL="no" 33552 fi 33553 else 33554 # No df here, say it's local 33555 OUTPUT_DIR_IS_LOCAL="yes" 33556 fi 33557 else 33558 if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then 33559 OUTPUT_DIR_IS_LOCAL="yes" 33560 else 33561 OUTPUT_DIR_IS_LOCAL="no" 33562 fi 33563 fi 33564 33565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5 33566 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; } 33567 33568 33569 33570 # Check if the user has any old-style ALT_ variables set. 33571 FOUND_ALT_VARIABLES=`env | grep ^ALT_` 33572 33573 # Before generating output files, test if they exist. If they do, this is a reconfigure. 33574 # Since we can't properly handle the dependencies for this, warn the user about the situation 33575 if test -e $OUTPUT_ROOT/spec.gmk; then 33576 IS_RECONFIGURE=yes 33577 else 33578 IS_RECONFIGURE=no 33579 fi 33580 33581 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then 33582 HIDE_PERFORMANCE_HINTS=yes 33583 else 33584 HIDE_PERFORMANCE_HINTS=no 33585 # Hide it the next time around... 33586 $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1 33587 fi 33588 33589 33590 33591 # At the end, call the custom hook. (Dummy macro if no custom sources available) 33592 33593 33594 # We're messing a bit with internal autoconf variables to put the config.status 33595 # in the output directory instead of the current directory. 33596 CONFIG_STATUS="$OUTPUT_ROOT/config.status" 33597 # Create the actual output files. Now the main work of configure is done. 33598 cat >confcache <<\_ACEOF 33599 # This file is a shell script that caches the results of configure 33600 # tests run on this system so they can be shared between configure 33601 # scripts and configure runs, see configure's option --config-cache. 33602 # It is not useful on other systems. If it contains results you don't 33603 # want to keep, you may remove or edit it. 33604 # 33605 # config.status only pays attention to the cache file if you give it 33606 # the --recheck option to rerun configure. 33607 # 33608 # `ac_cv_env_foo' variables (set or unset) will be overridden when 33609 # loading this file, other *unset* `ac_cv_foo' will be assigned the 33610 # following values. 33611 33612 _ACEOF 33613 33614 # The following way of writing the cache mishandles newlines in values, 33615 # but we know of no workaround that is simple, portable, and efficient. 33616 # So, we kill variables containing newlines. 33617 # Ultrix sh set writes to stderr and can't be redirected directly, 33618 # and sets the high bit in the cache file unless we assign to the vars. 33619 ( 33620 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 33621 eval ac_val=\$$ac_var 33622 case $ac_val in #( 33623 *${as_nl}*) 33624 case $ac_var in #( 33625 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 33626 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 33627 esac 33628 case $ac_var in #( 33629 _ | IFS | as_nl) ;; #( 33630 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 33631 *) { eval $ac_var=; unset $ac_var;} ;; 33632 esac ;; 33633 esac 33634 done 33635 33636 (set) 2>&1 | 33637 case $as_nl`(ac_space=' '; set) 2>&1` in #( 33638 *${as_nl}ac_space=\ *) 33639 # `set' does not quote correctly, so add quotes: double-quote 33640 # substitution turns \\\\ into \\, and sed turns \\ into \. 33641 sed -n \ 33642 "s/'/'\\\\''/g; 33643 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 33644 ;; #( 33645 *) 33646 # `set' quotes correctly as required by POSIX, so do not add quotes. 33647 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 33648 ;; 33649 esac | 33650 sort 33651 ) | 33652 sed ' 33653 /^ac_cv_env_/b end 33654 t clear 33655 :clear 33656 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 33657 t end 33658 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 33659 :end' >>confcache 33660 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 33661 if test -w "$cache_file"; then 33662 if test "x$cache_file" != "x/dev/null"; then 33663 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 33664 $as_echo "$as_me: updating cache $cache_file" >&6;} 33665 if test ! -f "$cache_file" || test -h "$cache_file"; then 33666 cat confcache >"$cache_file" 33667 else 33668 case $cache_file in #( 33669 */* | ?:*) 33670 mv -f confcache "$cache_file"$$ && 33671 mv -f "$cache_file"$$ "$cache_file" ;; #( 33672 *) 33673 mv -f confcache "$cache_file" ;; 33674 esac 33675 fi 33676 fi 33677 else 33678 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 33679 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 33680 fi 33681 fi 33682 rm -f confcache 33683 33684 test "x$prefix" = xNONE && prefix=$ac_default_prefix 33685 # Let make expand exec_prefix. 33686 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 33687 33688 DEFS=-DHAVE_CONFIG_H 33689 33690 ac_libobjs= 33691 ac_ltlibobjs= 33692 U= 33693 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 33694 # 1. Remove the extension, and $U if already installed. 33695 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 33696 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 33697 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 33698 # will be set to the directory where LIBOBJS objects are built. 33699 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 33700 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 33701 done 33702 LIBOBJS=$ac_libobjs 33703 33704 LTLIBOBJS=$ac_ltlibobjs 33705 33706 33707 33708 : "${CONFIG_STATUS=./config.status}" 33709 ac_write_fail=0 33710 ac_clean_files_save=$ac_clean_files 33711 ac_clean_files="$ac_clean_files $CONFIG_STATUS" 33712 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 33713 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 33714 as_write_fail=0 33715 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 33716 #! $SHELL 33717 # Generated by $as_me. 33718 # Run this file to recreate the current configuration. 33719 # Compiler output produced by configure, useful for debugging 33720 # configure, is in config.log if it exists. 33721 33722 debug=false 33723 ac_cs_recheck=false 33724 ac_cs_silent=false 33725 33726 SHELL=\${CONFIG_SHELL-$SHELL} 33727 export SHELL 33728 _ASEOF 33729 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 33730 ## -------------------- ## 33731 ## M4sh Initialization. ## 33732 ## -------------------- ## 33733 33734 # Be more Bourne compatible 33735 DUALCASE=1; export DUALCASE # for MKS sh 33736 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 33737 emulate sh 33738 NULLCMD=: 33739 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 33740 # is contrary to our usage. Disable this feature. 33741 alias -g '${1+"$@"}'='"$@"' 33742 setopt NO_GLOB_SUBST 33743 else 33744 case `(set -o) 2>/dev/null` in #( 33745 *posix*) : 33746 set -o posix ;; #( 33747 *) : 33748 ;; 33749 esac 33750 fi 33751 33752 33753 as_nl=' 33754 ' 33755 export as_nl 33756 # Printing a long string crashes Solaris 7 /usr/bin/printf. 33757 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 33758 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 33759 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 33760 # Prefer a ksh shell builtin over an external printf program on Solaris, 33761 # but without wasting forks for bash or zsh. 33762 if test -z "$BASH_VERSION$ZSH_VERSION" \ 33763 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 33764 as_echo='print -r --' 33765 as_echo_n='print -rn --' 33766 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 33767 as_echo='printf %s\n' 33768 as_echo_n='printf %s' 33769 else 33770 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 33771 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 33772 as_echo_n='/usr/ucb/echo -n' 33773 else 33774 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 33775 as_echo_n_body='eval 33776 arg=$1; 33777 case $arg in #( 33778 *"$as_nl"*) 33779 expr "X$arg" : "X\\(.*\\)$as_nl"; 33780 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 33781 esac; 33782 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 33783 ' 33784 export as_echo_n_body 33785 as_echo_n='sh -c $as_echo_n_body as_echo' 33786 fi 33787 export as_echo_body 33788 as_echo='sh -c $as_echo_body as_echo' 33789 fi 33790 33791 # The user is always right. 33792 if test "${PATH_SEPARATOR+set}" != set; then 33793 PATH_SEPARATOR=: 33794 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 33795 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 33796 PATH_SEPARATOR=';' 33797 } 33798 fi 33799 33800 33801 # IFS 33802 # We need space, tab and new line, in precisely that order. Quoting is 33803 # there to prevent editors from complaining about space-tab. 33804 # (If _AS_PATH_WALK were called with IFS unset, it would disable word 33805 # splitting by setting IFS to empty value.) 33806 IFS=" "" $as_nl" 33807 33808 # Find who we are. Look in the path if we contain no directory separator. 33809 as_myself= 33810 case $0 in #(( 33811 *[\\/]* ) as_myself=$0 ;; 33812 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 33813 for as_dir in $PATH 33814 do 33815 IFS=$as_save_IFS 33816 test -z "$as_dir" && as_dir=. 33817 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 33818 done 33819 IFS=$as_save_IFS 33820 33821 ;; 33822 esac 33823 # We did not find ourselves, most probably we were run as `sh COMMAND' 33824 # in which case we are not to be found in the path. 33825 if test "x$as_myself" = x; then 33826 as_myself=$0 33827 fi 33828 if test ! -f "$as_myself"; then 33829 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 33830 exit 1 33831 fi 33832 33833 # Unset variables that we do not need and which cause bugs (e.g. in 33834 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 33835 # suppresses any "Segmentation fault" message there. '((' could 33836 # trigger a bug in pdksh 5.2.14. 33837 for as_var in BASH_ENV ENV MAIL MAILPATH 33838 do eval test x\${$as_var+set} = xset \ 33839 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 33840 done 33841 PS1='$ ' 33842 PS2='> ' 33843 PS4='+ ' 33844 33845 # NLS nuisances. 33846 LC_ALL=C 33847 export LC_ALL 33848 LANGUAGE=C 33849 export LANGUAGE 33850 33851 # CDPATH. 33852 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 33853 33854 33855 # as_fn_error STATUS ERROR [LINENO LOG_FD] 33856 # ---------------------------------------- 33857 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 33858 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 33859 # script with STATUS, using 1 if that was 0. 33860 as_fn_error () 33861 { 33862 as_status=$1; test $as_status -eq 0 && as_status=1 33863 if test "$4"; then 33864 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 33865 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 33866 fi 33867 $as_echo "$as_me: error: $2" >&2 33868 as_fn_exit $as_status 33869 } # as_fn_error 33870 33871 33872 # as_fn_set_status STATUS 33873 # ----------------------- 33874 # Set $? to STATUS, without forking. 33875 as_fn_set_status () 33876 { 33877 return $1 33878 } # as_fn_set_status 33879 33880 # as_fn_exit STATUS 33881 # ----------------- 33882 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 33883 as_fn_exit () 33884 { 33885 set +e 33886 as_fn_set_status $1 33887 exit $1 33888 } # as_fn_exit 33889 33890 # as_fn_unset VAR 33891 # --------------- 33892 # Portably unset VAR. 33893 as_fn_unset () 33894 { 33895 { eval $1=; unset $1;} 33896 } 33897 as_unset=as_fn_unset 33898 # as_fn_append VAR VALUE 33899 # ---------------------- 33900 # Append the text in VALUE to the end of the definition contained in VAR. Take 33901 # advantage of any shell optimizations that allow amortized linear growth over 33902 # repeated appends, instead of the typical quadratic growth present in naive 33903 # implementations. 33904 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 33905 eval 'as_fn_append () 33906 { 33907 eval $1+=\$2 33908 }' 33909 else 33910 as_fn_append () 33911 { 33912 eval $1=\$$1\$2 33913 } 33914 fi # as_fn_append 33915 33916 # as_fn_arith ARG... 33917 # ------------------ 33918 # Perform arithmetic evaluation on the ARGs, and store the result in the 33919 # global $as_val. Take advantage of shells that can avoid forks. The arguments 33920 # must be portable across $(()) and expr. 33921 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 33922 eval 'as_fn_arith () 33923 { 33924 as_val=$(( $* )) 33925 }' 33926 else 33927 as_fn_arith () 33928 { 33929 as_val=`expr "$@" || test $? -eq 1` 33930 } 33931 fi # as_fn_arith 33932 33933 33934 if expr a : '\(a\)' >/dev/null 2>&1 && 33935 test "X`expr 00001 : '.*\(...\)'`" = X001; then 33936 as_expr=expr 33937 else 33938 as_expr=false 33939 fi 33940 33941 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 33942 as_basename=basename 33943 else 33944 as_basename=false 33945 fi 33946 33947 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 33948 as_dirname=dirname 33949 else 33950 as_dirname=false 33951 fi 33952 33953 as_me=`$as_basename -- "$0" || 33954 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 33955 X"$0" : 'X\(//\)$' \| \ 33956 X"$0" : 'X\(/\)' \| . 2>/dev/null || 33957 $as_echo X/"$0" | 33958 sed '/^.*\/\([^/][^/]*\)\/*$/{ 33959 s//\1/ 33960 q 33961 } 33962 /^X\/\(\/\/\)$/{ 33963 s//\1/ 33964 q 33965 } 33966 /^X\/\(\/\).*/{ 33967 s//\1/ 33968 q 33969 } 33970 s/.*/./; q'` 33971 33972 # Avoid depending upon Character Ranges. 33973 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 33974 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 33975 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 33976 as_cr_digits='0123456789' 33977 as_cr_alnum=$as_cr_Letters$as_cr_digits 33978 33979 ECHO_C= ECHO_N= ECHO_T= 33980 case `echo -n x` in #((((( 33981 -n*) 33982 case `echo 'xy\c'` in 33983 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 33984 xy) ECHO_C='\c';; 33985 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 33986 ECHO_T=' ';; 33987 esac;; 33988 *) 33989 ECHO_N='-n';; 33990 esac 33991 33992 rm -f conf$$ conf$$.exe conf$$.file 33993 if test -d conf$$.dir; then 33994 rm -f conf$$.dir/conf$$.file 33995 else 33996 rm -f conf$$.dir 33997 mkdir conf$$.dir 2>/dev/null 33998 fi 33999 if (echo >conf$$.file) 2>/dev/null; then 34000 if ln -s conf$$.file conf$$ 2>/dev/null; then 34001 as_ln_s='ln -s' 34002 # ... but there are two gotchas: 34003 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 34004 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 34005 # In both cases, we have to default to `cp -pR'. 34006 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 34007 as_ln_s='cp -pR' 34008 elif ln conf$$.file conf$$ 2>/dev/null; then 34009 as_ln_s=ln 34010 else 34011 as_ln_s='cp -pR' 34012 fi 34013 else 34014 as_ln_s='cp -pR' 34015 fi 34016 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 34017 rmdir conf$$.dir 2>/dev/null 34018 34019 34020 # as_fn_mkdir_p 34021 # ------------- 34022 # Create "$as_dir" as a directory, including parents if necessary. 34023 as_fn_mkdir_p () 34024 { 34025 34026 case $as_dir in #( 34027 -*) as_dir=./$as_dir;; 34028 esac 34029 test -d "$as_dir" || eval $as_mkdir_p || { 34030 as_dirs= 34031 while :; do 34032 case $as_dir in #( 34033 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 34034 *) as_qdir=$as_dir;; 34035 esac 34036 as_dirs="'$as_qdir' $as_dirs" 34037 as_dir=`$as_dirname -- "$as_dir" || 34038 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 34039 X"$as_dir" : 'X\(//\)[^/]' \| \ 34040 X"$as_dir" : 'X\(//\)$' \| \ 34041 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 34042 $as_echo X"$as_dir" | 34043 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 34044 s//\1/ 34045 q 34046 } 34047 /^X\(\/\/\)[^/].*/{ 34048 s//\1/ 34049 q 34050 } 34051 /^X\(\/\/\)$/{ 34052 s//\1/ 34053 q 34054 } 34055 /^X\(\/\).*/{ 34056 s//\1/ 34057 q 34058 } 34059 s/.*/./; q'` 34060 test -d "$as_dir" && break 34061 done 34062 test -z "$as_dirs" || eval "mkdir $as_dirs" 34063 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 34064 34065 34066 } # as_fn_mkdir_p 34067 if mkdir -p . 2>/dev/null; then 34068 as_mkdir_p='mkdir -p "$as_dir"' 34069 else 34070 test -d ./-p && rmdir ./-p 34071 as_mkdir_p=false 34072 fi 34073 34074 34075 # as_fn_executable_p FILE 34076 # ----------------------- 34077 # Test if FILE is an executable regular file. 34078 as_fn_executable_p () 34079 { 34080 test -f "$1" && test -x "$1" 34081 } # as_fn_executable_p 34082 as_test_x='test -x' 34083 as_executable_p=as_fn_executable_p 34084 34085 # Sed expression to map a string onto a valid CPP name. 34086 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 34087 34088 # Sed expression to map a string onto a valid variable name. 34089 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 34090 34091 34092 exec 6>&1 34093 ## ----------------------------------- ## 34094 ## Main body of $CONFIG_STATUS script. ## 34095 ## ----------------------------------- ## 34096 _ASEOF 34097 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 34098 34099 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34100 # Save the log message, to keep $0 and so on meaningful, and to 34101 # report actual input values of CONFIG_FILES etc. instead of their 34102 # values after options handling. 34103 ac_log=" 34104 This file was extended by OpenJDK $as_me jdk8, which was 34105 generated by GNU Autoconf 2.69. Invocation command line was 34106 34107 CONFIG_FILES = $CONFIG_FILES 34108 CONFIG_HEADERS = $CONFIG_HEADERS 34109 CONFIG_LINKS = $CONFIG_LINKS 34110 CONFIG_COMMANDS = $CONFIG_COMMANDS 34111 $ $0 $@ 34112 34113 on `(hostname || uname -n) 2>/dev/null | sed 1q` 34114 " 34115 34116 _ACEOF 34117 34118 case $ac_config_files in *" 34119 "*) set x $ac_config_files; shift; ac_config_files=$*;; 34120 esac 34121 34122 case $ac_config_headers in *" 34123 "*) set x $ac_config_headers; shift; ac_config_headers=$*;; 34124 esac 34125 34126 34127 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34128 # Files that config.status was made for. 34129 config_files="$ac_config_files" 34130 config_headers="$ac_config_headers" 34131 34132 _ACEOF 34133 34134 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34135 ac_cs_usage="\ 34136 \`$as_me' instantiates files and other configuration actions 34137 from templates according to the current configuration. Unless the files 34138 and actions are specified as TAGs, all are instantiated by default. 34139 34140 Usage: $0 [OPTION]... [TAG]... 34141 34142 -h, --help print this help, then exit 34143 -V, --version print version number and configuration settings, then exit 34144 --config print configuration, then exit 34145 -q, --quiet, --silent 34146 do not print progress messages 34147 -d, --debug don't remove temporary files 34148 --recheck update $as_me by reconfiguring in the same conditions 34149 --file=FILE[:TEMPLATE] 34150 instantiate the configuration file FILE 34151 --header=FILE[:TEMPLATE] 34152 instantiate the configuration header FILE 34153 34154 Configuration files: 34155 $config_files 34156 34157 Configuration headers: 34158 $config_headers 34159 34160 Report bugs to <build-dev@openjdk.java.net>. 34161 OpenJDK home page: <http://openjdk.java.net>." 34162 34163 _ACEOF 34164 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34165 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 34166 ac_cs_version="\\ 34167 OpenJDK config.status jdk8 34168 configured by $0, generated by GNU Autoconf 2.69, 34169 with options \\"\$ac_cs_config\\" 34170 34171 Copyright (C) 2012 Free Software Foundation, Inc. 34172 This config.status script is free software; the Free Software Foundation 34173 gives unlimited permission to copy, distribute and modify it." 34174 34175 ac_pwd='$ac_pwd' 34176 srcdir='$srcdir' 34177 AWK='$AWK' 34178 test -n "\$AWK" || AWK=awk 34179 _ACEOF 34180 34181 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34182 # The default lists apply if the user does not specify any file. 34183 ac_need_defaults=: 34184 while test $# != 0 34185 do 34186 case $1 in 34187 --*=?*) 34188 ac_option=`expr "X$1" : 'X\([^=]*\)='` 34189 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 34190 ac_shift=: 34191 ;; 34192 --*=) 34193 ac_option=`expr "X$1" : 'X\([^=]*\)='` 34194 ac_optarg= 34195 ac_shift=: 34196 ;; 34197 *) 34198 ac_option=$1 34199 ac_optarg=$2 34200 ac_shift=shift 34201 ;; 34202 esac 34203 34204 case $ac_option in 34205 # Handling of the options. 34206 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 34207 ac_cs_recheck=: ;; 34208 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 34209 $as_echo "$ac_cs_version"; exit ;; 34210 --config | --confi | --conf | --con | --co | --c ) 34211 $as_echo "$ac_cs_config"; exit ;; 34212 --debug | --debu | --deb | --de | --d | -d ) 34213 debug=: ;; 34214 --file | --fil | --fi | --f ) 34215 $ac_shift 34216 case $ac_optarg in 34217 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 34218 '') as_fn_error $? "missing file argument" ;; 34219 esac 34220 as_fn_append CONFIG_FILES " '$ac_optarg'" 34221 ac_need_defaults=false;; 34222 --header | --heade | --head | --hea ) 34223 $ac_shift 34224 case $ac_optarg in 34225 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 34226 esac 34227 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 34228 ac_need_defaults=false;; 34229 --he | --h) 34230 # Conflict between --help and --header 34231 as_fn_error $? "ambiguous option: \`$1' 34232 Try \`$0 --help' for more information.";; 34233 --help | --hel | -h ) 34234 $as_echo "$ac_cs_usage"; exit ;; 34235 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 34236 | -silent | --silent | --silen | --sile | --sil | --si | --s) 34237 ac_cs_silent=: ;; 34238 34239 # This is an error. 34240 -*) as_fn_error $? "unrecognized option: \`$1' 34241 Try \`$0 --help' for more information." ;; 34242 34243 *) as_fn_append ac_config_targets " $1" 34244 ac_need_defaults=false ;; 34245 34246 esac 34247 shift 34248 done 34249 34250 ac_configure_extra_args= 34251 34252 if $ac_cs_silent; then 34253 exec 6>/dev/null 34254 ac_configure_extra_args="$ac_configure_extra_args --silent" 34255 fi 34256 34257 _ACEOF 34258 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34259 if \$ac_cs_recheck; then 34260 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 34261 shift 34262 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 34263 CONFIG_SHELL='$SHELL' 34264 export CONFIG_SHELL 34265 exec "\$@" 34266 fi 34267 34268 _ACEOF 34269 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34270 exec 5>>config.log 34271 { 34272 echo 34273 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 34274 ## Running $as_me. ## 34275 _ASBOX 34276 $as_echo "$ac_log" 34277 } >&5 34278 34279 _ACEOF 34280 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34281 _ACEOF 34282 34283 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34284 34285 # Handling of arguments. 34286 for ac_config_target in $ac_config_targets 34287 do 34288 case $ac_config_target in 34289 "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;; 34290 "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;; 34291 "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;; 34292 "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;; 34293 "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;; 34294 "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;; 34295 "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;; 34296 34297 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 34298 esac 34299 done 34300 34301 34302 # If the user did not use the arguments to specify the items to instantiate, 34303 # then the envvar interface is used. Set only those that are not. 34304 # We use the long form for the default assignment because of an extremely 34305 # bizarre bug on SunOS 4.1.3. 34306 if $ac_need_defaults; then 34307 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 34308 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 34309 fi 34310 34311 # Have a temporary directory for convenience. Make it in the build tree 34312 # simply because there is no reason against having it here, and in addition, 34313 # creating and moving files from /tmp can sometimes cause problems. 34314 # Hook for its removal unless debugging. 34315 # Note that there is a small window in which the directory will not be cleaned: 34316 # after its creation but before its name has been assigned to `$tmp'. 34317 $debug || 34318 { 34319 tmp= ac_tmp= 34320 trap 'exit_status=$? 34321 : "${ac_tmp:=$tmp}" 34322 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 34323 ' 0 34324 trap 'as_fn_exit 1' 1 2 13 15 34325 } 34326 # Create a (secure) tmp directory for tmp files. 34327 34328 { 34329 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 34330 test -d "$tmp" 34331 } || 34332 { 34333 tmp=./conf$$-$RANDOM 34334 (umask 077 && mkdir "$tmp") 34335 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 34336 ac_tmp=$tmp 34337 34338 # Set up the scripts for CONFIG_FILES section. 34339 # No need to generate them if there are no CONFIG_FILES. 34340 # This happens for instance with `./config.status config.h'. 34341 if test -n "$CONFIG_FILES"; then 34342 34343 34344 ac_cr=`echo X | tr X '\015'` 34345 # On cygwin, bash can eat \r inside `` if the user requested igncr. 34346 # But we know of no other shell where ac_cr would be empty at this 34347 # point, so we can use a bashism as a fallback. 34348 if test "x$ac_cr" = x; then 34349 eval ac_cr=\$\'\\r\' 34350 fi 34351 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 34352 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 34353 ac_cs_awk_cr='\\r' 34354 else 34355 ac_cs_awk_cr=$ac_cr 34356 fi 34357 34358 echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 34359 _ACEOF 34360 34361 34362 { 34363 echo "cat >conf$$subs.awk <<_ACEOF" && 34364 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 34365 echo "_ACEOF" 34366 } >conf$$subs.sh || 34367 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 34368 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 34369 ac_delim='%!_!# ' 34370 for ac_last_try in false false false false false :; do 34371 . ./conf$$subs.sh || 34372 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 34373 34374 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 34375 if test $ac_delim_n = $ac_delim_num; then 34376 break 34377 elif $ac_last_try; then 34378 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 34379 else 34380 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 34381 fi 34382 done 34383 rm -f conf$$subs.sh 34384 34385 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34386 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 34387 _ACEOF 34388 sed -n ' 34389 h 34390 s/^/S["/; s/!.*/"]=/ 34391 p 34392 g 34393 s/^[^!]*!// 34394 :repl 34395 t repl 34396 s/'"$ac_delim"'$// 34397 t delim 34398 :nl 34399 h 34400 s/\(.\{148\}\)..*/\1/ 34401 t more1 34402 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 34403 p 34404 n 34405 b repl 34406 :more1 34407 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 34408 p 34409 g 34410 s/.\{148\}// 34411 t nl 34412 :delim 34413 h 34414 s/\(.\{148\}\)..*/\1/ 34415 t more2 34416 s/["\\]/\\&/g; s/^/"/; s/$/"/ 34417 p 34418 b 34419 :more2 34420 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 34421 p 34422 g 34423 s/.\{148\}// 34424 t delim 34425 ' <conf$$subs.awk | sed ' 34426 /^[^""]/{ 34427 N 34428 s/\n// 34429 } 34430 ' >>$CONFIG_STATUS || ac_write_fail=1 34431 rm -f conf$$subs.awk 34432 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34433 _ACAWK 34434 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 34435 for (key in S) S_is_set[key] = 1 34436 FS = "" 34437 34438 } 34439 { 34440 line = $ 0 34441 nfields = split(line, field, "@") 34442 substed = 0 34443 len = length(field[1]) 34444 for (i = 2; i < nfields; i++) { 34445 key = field[i] 34446 keylen = length(key) 34447 if (S_is_set[key]) { 34448 value = S[key] 34449 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 34450 len += length(value) + length(field[++i]) 34451 substed = 1 34452 } else 34453 len += 1 + keylen 34454 } 34455 34456 print line 34457 } 34458 34459 _ACAWK 34460 _ACEOF 34461 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34462 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 34463 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 34464 else 34465 cat 34466 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 34467 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 34468 _ACEOF 34469 34470 # VPATH may cause trouble with some makes, so we remove sole $(srcdir), 34471 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 34472 # trailing colons and then remove the whole line if VPATH becomes empty 34473 # (actually we leave an empty line to preserve line numbers). 34474 if test "x$srcdir" = x.; then 34475 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 34476 h 34477 s/// 34478 s/^/:/ 34479 s/[ ]*$/:/ 34480 s/:\$(srcdir):/:/g 34481 s/:\${srcdir}:/:/g 34482 s/:@srcdir@:/:/g 34483 s/^:*// 34484 s/:*$// 34485 x 34486 s/\(=[ ]*\).*/\1/ 34487 G 34488 s/\n// 34489 s/^[^=]*=[ ]*$// 34490 }' 34491 fi 34492 34493 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34494 fi # test -n "$CONFIG_FILES" 34495 34496 # Set up the scripts for CONFIG_HEADERS section. 34497 # No need to generate them if there are no CONFIG_HEADERS. 34498 # This happens for instance with `./config.status Makefile'. 34499 if test -n "$CONFIG_HEADERS"; then 34500 cat >"$ac_tmp/defines.awk" <<\_ACAWK || 34501 BEGIN { 34502 _ACEOF 34503 34504 # Transform confdefs.h into an awk script `defines.awk', embedded as 34505 # here-document in config.status, that substitutes the proper values into 34506 # config.h.in to produce config.h. 34507 34508 # Create a delimiter string that does not exist in confdefs.h, to ease 34509 # handling of long lines. 34510 ac_delim='%!_!# ' 34511 for ac_last_try in false false :; do 34512 ac_tt=`sed -n "/$ac_delim/p" confdefs.h` 34513 if test -z "$ac_tt"; then 34514 break 34515 elif $ac_last_try; then 34516 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 34517 else 34518 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 34519 fi 34520 done 34521 34522 # For the awk script, D is an array of macro values keyed by name, 34523 # likewise P contains macro parameters if any. Preserve backslash 34524 # newline sequences. 34525 34526 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 34527 sed -n ' 34528 s/.\{148\}/&'"$ac_delim"'/g 34529 t rset 34530 :rset 34531 s/^[ ]*#[ ]*define[ ][ ]*/ / 34532 t def 34533 d 34534 :def 34535 s/\\$// 34536 t bsnl 34537 s/["\\]/\\&/g 34538 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 34539 D["\1"]=" \3"/p 34540 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 34541 d 34542 :bsnl 34543 s/["\\]/\\&/g 34544 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 34545 D["\1"]=" \3\\\\\\n"\\/p 34546 t cont 34547 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 34548 t cont 34549 d 34550 :cont 34551 n 34552 s/.\{148\}/&'"$ac_delim"'/g 34553 t clear 34554 :clear 34555 s/\\$// 34556 t bsnlc 34557 s/["\\]/\\&/g; s/^/"/; s/$/"/p 34558 d 34559 :bsnlc 34560 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 34561 b cont 34562 ' <confdefs.h | sed ' 34563 s/'"$ac_delim"'/"\\\ 34564 "/g' >>$CONFIG_STATUS || ac_write_fail=1 34565 34566 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34567 for (key in D) D_is_set[key] = 1 34568 FS = "" 34569 } 34570 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 34571 line = \$ 0 34572 split(line, arg, " ") 34573 if (arg[1] == "#") { 34574 defundef = arg[2] 34575 mac1 = arg[3] 34576 } else { 34577 defundef = substr(arg[1], 2) 34578 mac1 = arg[2] 34579 } 34580 split(mac1, mac2, "(") #) 34581 macro = mac2[1] 34582 prefix = substr(line, 1, index(line, defundef) - 1) 34583 if (D_is_set[macro]) { 34584 # Preserve the white space surrounding the "#". 34585 print prefix "define", macro P[macro] D[macro] 34586 next 34587 } else { 34588 # Replace #undef with comments. This is necessary, for example, 34589 # in the case of _POSIX_SOURCE, which is predefined and required 34590 # on some systems where configure will not decide to define it. 34591 if (defundef == "undef") { 34592 print "/*", prefix defundef, macro, "*/" 34593 next 34594 } 34595 } 34596 } 34597 { print } 34598 _ACAWK 34599 _ACEOF 34600 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34601 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 34602 fi # test -n "$CONFIG_HEADERS" 34603 34604 34605 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " 34606 shift 34607 for ac_tag 34608 do 34609 case $ac_tag in 34610 :[FHLC]) ac_mode=$ac_tag; continue;; 34611 esac 34612 case $ac_mode$ac_tag in 34613 :[FHL]*:*);; 34614 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 34615 :[FH]-) ac_tag=-:-;; 34616 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 34617 esac 34618 ac_save_IFS=$IFS 34619 IFS=: 34620 set x $ac_tag 34621 IFS=$ac_save_IFS 34622 shift 34623 ac_file=$1 34624 shift 34625 34626 case $ac_mode in 34627 :L) ac_source=$1;; 34628 :[FH]) 34629 ac_file_inputs= 34630 for ac_f 34631 do 34632 case $ac_f in 34633 -) ac_f="$ac_tmp/stdin";; 34634 *) # Look for the file first in the build tree, then in the source tree 34635 # (if the path is not absolute). The absolute path cannot be DOS-style, 34636 # because $ac_f cannot contain `:'. 34637 test -f "$ac_f" || 34638 case $ac_f in 34639 [\\/$]*) false;; 34640 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 34641 esac || 34642 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 34643 esac 34644 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 34645 as_fn_append ac_file_inputs " '$ac_f'" 34646 done 34647 34648 # Let's still pretend it is `configure' which instantiates (i.e., don't 34649 # use $as_me), people would be surprised to read: 34650 # /* config.h. Generated by config.status. */ 34651 configure_input='Generated from '` 34652 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 34653 `' by configure.' 34654 if test x"$ac_file" != x-; then 34655 configure_input="$ac_file. $configure_input" 34656 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 34657 $as_echo "$as_me: creating $ac_file" >&6;} 34658 fi 34659 # Neutralize special characters interpreted by sed in replacement strings. 34660 case $configure_input in #( 34661 *\&* | *\|* | *\\* ) 34662 ac_sed_conf_input=`$as_echo "$configure_input" | 34663 sed 's/[\\\\&|]/\\\\&/g'`;; #( 34664 *) ac_sed_conf_input=$configure_input;; 34665 esac 34666 34667 case $ac_tag in 34668 *:-:* | *:-) cat >"$ac_tmp/stdin" \ 34669 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 34670 esac 34671 ;; 34672 esac 34673 34674 ac_dir=`$as_dirname -- "$ac_file" || 34675 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 34676 X"$ac_file" : 'X\(//\)[^/]' \| \ 34677 X"$ac_file" : 'X\(//\)$' \| \ 34678 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 34679 $as_echo X"$ac_file" | 34680 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 34681 s//\1/ 34682 q 34683 } 34684 /^X\(\/\/\)[^/].*/{ 34685 s//\1/ 34686 q 34687 } 34688 /^X\(\/\/\)$/{ 34689 s//\1/ 34690 q 34691 } 34692 /^X\(\/\).*/{ 34693 s//\1/ 34694 q 34695 } 34696 s/.*/./; q'` 34697 as_dir="$ac_dir"; as_fn_mkdir_p 34698 ac_builddir=. 34699 34700 case "$ac_dir" in 34701 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 34702 *) 34703 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 34704 # A ".." for each directory in $ac_dir_suffix. 34705 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 34706 case $ac_top_builddir_sub in 34707 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 34708 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 34709 esac ;; 34710 esac 34711 ac_abs_top_builddir=$ac_pwd 34712 ac_abs_builddir=$ac_pwd$ac_dir_suffix 34713 # for backward compatibility: 34714 ac_top_builddir=$ac_top_build_prefix 34715 34716 case $srcdir in 34717 .) # We are building in place. 34718 ac_srcdir=. 34719 ac_top_srcdir=$ac_top_builddir_sub 34720 ac_abs_top_srcdir=$ac_pwd ;; 34721 [\\/]* | ?:[\\/]* ) # Absolute name. 34722 ac_srcdir=$srcdir$ac_dir_suffix; 34723 ac_top_srcdir=$srcdir 34724 ac_abs_top_srcdir=$srcdir ;; 34725 *) # Relative name. 34726 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 34727 ac_top_srcdir=$ac_top_build_prefix$srcdir 34728 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 34729 esac 34730 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 34731 34732 34733 case $ac_mode in 34734 :F) 34735 # 34736 # CONFIG_FILE 34737 # 34738 34739 _ACEOF 34740 34741 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34742 # If the template does not know about datarootdir, expand it. 34743 # FIXME: This hack should be removed a few years after 2.60. 34744 ac_datarootdir_hack=; ac_datarootdir_seen= 34745 ac_sed_dataroot=' 34746 /datarootdir/ { 34747 p 34748 q 34749 } 34750 /@datadir@/p 34751 /@docdir@/p 34752 /@infodir@/p 34753 /@localedir@/p 34754 /@mandir@/p' 34755 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 34756 *datarootdir*) ac_datarootdir_seen=yes;; 34757 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 34758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 34759 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 34760 _ACEOF 34761 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34762 ac_datarootdir_hack=' 34763 s&@datadir@&$datadir&g 34764 s&@docdir@&$docdir&g 34765 s&@infodir@&$infodir&g 34766 s&@localedir@&$localedir&g 34767 s&@mandir@&$mandir&g 34768 s&\\\${datarootdir}&$datarootdir&g' ;; 34769 esac 34770 _ACEOF 34771 34772 # Neutralize VPATH when `$srcdir' = `.'. 34773 # Shell code in configure.ac might set extrasub. 34774 # FIXME: do we really want to maintain this feature? 34775 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34776 ac_sed_extra="$ac_vpsub 34777 $extrasub 34778 _ACEOF 34779 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34780 :t 34781 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 34782 s|@configure_input@|$ac_sed_conf_input|;t t 34783 s&@top_builddir@&$ac_top_builddir_sub&;t t 34784 s&@top_build_prefix@&$ac_top_build_prefix&;t t 34785 s&@srcdir@&$ac_srcdir&;t t 34786 s&@abs_srcdir@&$ac_abs_srcdir&;t t 34787 s&@top_srcdir@&$ac_top_srcdir&;t t 34788 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 34789 s&@builddir@&$ac_builddir&;t t 34790 s&@abs_builddir@&$ac_abs_builddir&;t t 34791 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 34792 $ac_datarootdir_hack 34793 " 34794 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 34795 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34796 34797 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 34798 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 34799 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 34800 "$ac_tmp/out"`; test -z "$ac_out"; } && 34801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 34802 which seems to be undefined. Please make sure it is defined" >&5 34803 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 34804 which seems to be undefined. Please make sure it is defined" >&2;} 34805 34806 rm -f "$ac_tmp/stdin" 34807 case $ac_file in 34808 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 34809 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 34810 esac \ 34811 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34812 ;; 34813 :H) 34814 # 34815 # CONFIG_HEADER 34816 # 34817 if test x"$ac_file" != x-; then 34818 { 34819 $as_echo "/* $configure_input */" \ 34820 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" 34821 } >"$ac_tmp/config.h" \ 34822 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34823 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then 34824 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 34825 $as_echo "$as_me: $ac_file is unchanged" >&6;} 34826 else 34827 rm -f "$ac_file" 34828 mv "$ac_tmp/config.h" "$ac_file" \ 34829 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34830 fi 34831 else 34832 $as_echo "/* $configure_input */" \ 34833 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ 34834 || as_fn_error $? "could not create -" "$LINENO" 5 34835 fi 34836 ;; 34837 34838 34839 esac 34840 34841 done # for ac_tag 34842 34843 34844 as_fn_exit 0 34845 _ACEOF 34846 ac_clean_files=$ac_clean_files_save 34847 34848 test $ac_write_fail = 0 || 34849 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 34850 34851 34852 # configure is writing to config.log, and then calls config.status. 34853 # config.status does its own redirection, appending to config.log. 34854 # Unfortunately, on DOS this fails, as config.log is still kept open 34855 # by configure, so config.status won't be able to write to it; its 34856 # output is simply discarded. So we exec the FD to /dev/null, 34857 # effectively closing config.log, so it can be properly (re)opened and 34858 # appended to by config.status. When coming back to configure, we 34859 # need to make the FD available again. 34860 if test "$no_create" != yes; then 34861 ac_cs_success=: 34862 ac_config_status_args= 34863 test "$silent" = yes && 34864 ac_config_status_args="$ac_config_status_args --quiet" 34865 exec 5>/dev/null 34866 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 34867 exec 5>>config.log 34868 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 34869 # would make configure fail if this is the last instruction. 34870 $ac_cs_success || as_fn_exit 1 34871 fi 34872 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 34873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 34874 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 34875 fi 34876 34877 34878 # Make the compare script executable 34879 $CHMOD +x $OUTPUT_ROOT/compare.sh 34880 34881 # Finally output some useful information to the user 34882 34883 # Finally output some useful information to the user 34884 34885 if test "x$CCACHE_FOUND" != x; then 34886 if test "x$HAS_GOOD_CCACHE" = x; then 34887 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" 34888 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." 34889 else 34890 CCACHE_STATUS="installed and in use" 34891 fi 34892 else 34893 if test "x$GCC" = xyes; then 34894 CCACHE_STATUS="not installed (consider installing)" 34895 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." 34896 else 34897 CCACHE_STATUS="not available for your system" 34898 fi 34899 fi 34900 34901 printf "\n" 34902 printf "====================================================\n" 34903 printf "A new configuration has been successfully created in\n" 34904 printf "$OUTPUT_ROOT\n" 34905 if test "x$CONFIGURE_COMMAND_LINE" != x; then 34906 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" 34907 else 34908 printf "using default settings.\n" 34909 fi 34910 34911 printf "\n" 34912 printf "Configuration summary:\n" 34913 printf "* Debug level: $DEBUG_LEVEL\n" 34914 printf "* JDK variant: $JDK_VARIANT\n" 34915 printf "* JVM variants: $with_jvm_variants\n" 34916 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" 34917 34918 printf "\n" 34919 printf "Tools summary:\n" 34920 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 34921 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" 34922 fi 34923 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" 34924 printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" 34925 printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" 34926 34927 printf "\n" 34928 printf "Build performance summary:\n" 34929 printf "* Cores to use: $JOBS\n" 34930 printf "* Memory limit: $MEMORY_SIZE MB\n" 34931 printf "* ccache status: $CCACHE_STATUS\n" 34932 printf "\n" 34933 34934 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then 34935 printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" 34936 printf "$CCACHE_HELP_MSG\n" 34937 34938 # Print a helpful message on how to acquire the necessary build dependency. 34939 # ccache is the help tag: freetyp2, cups, pulse, alsa etc 34940 MISSING_DEPENDENCY=ccache 34941 PKGHANDLER_COMMAND= 34942 34943 case $PKGHANDLER in 34944 apt-get) 34945 apt_help $MISSING_DEPENDENCY ;; 34946 yum) 34947 yum_help $MISSING_DEPENDENCY ;; 34948 port) 34949 port_help $MISSING_DEPENDENCY ;; 34950 pkgutil) 34951 pkgutil_help $MISSING_DEPENDENCY ;; 34952 pkgadd) 34953 pkgadd_help $MISSING_DEPENDENCY ;; 34954 * ) 34955 break ;; 34956 esac 34957 34958 if test "x$PKGHANDLER_COMMAND" != x; then 34959 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 34960 fi 34961 34962 printf "$HELP_MSG\n" 34963 printf "\n" 34964 fi 34965 34966 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then 34967 printf "NOTE: You have requested to build more than one version of the JVM, which\n" 34968 printf "will result in longer build times.\n" 34969 printf "\n" 34970 fi 34971 34972 if test "x$FOUND_ALT_VARIABLES" != "x"; then 34973 printf "WARNING: You have old-style ALT_ environment variables set.\n" 34974 printf "These are not respected, and will be ignored. It is recommended\n" 34975 printf "that you clean your environment. The following variables are set:\n" 34976 printf "$FOUND_ALT_VARIABLES\n" 34977 printf "\n" 34978 fi 34979 34980 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then 34981 printf "WARNING: Your build output directory is not on a local disk.\n" 34982 printf "This will severely degrade build performance!\n" 34983 printf "It is recommended that you create an output directory on a local disk,\n" 34984 printf "and run the configure script again from that directory.\n" 34985 printf "\n" 34986 fi 34987 34988 if test "x$IS_RECONFIGURE" = "xyes"; then 34989 printf "WARNING: The result of this configuration has overridden an older\n" 34990 printf "configuration. You *should* run 'make clean' to make sure you get a\n" 34991 printf "proper build. Failure to do so might result in strange build problems.\n" 34992 printf "\n" 34993 fi 34994