1 #! /bin/sh 2 # Guess values for system-dependent variables and create Makefiles. 3 # Generated by GNU Autoconf 2.68 for OpenJDK jdk8. 4 # 5 # Report bugs to <build-dev@openjdk.java.net>. 6 # 7 # 8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software 10 # Foundation, Inc. 11 # 12 # 13 # This configure script is free software; the Free Software Foundation 14 # gives unlimited permission to copy, distribute and modify it. 15 ## -------------------- ## 16 ## M4sh Initialization. ## 17 ## -------------------- ## 18 19 # Be more Bourne compatible 20 DUALCASE=1; export DUALCASE # for MKS sh 21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 22 emulate sh 23 NULLCMD=: 24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 25 # is contrary to our usage. Disable this feature. 26 alias -g '${1+"$@"}'='"$@"' 27 setopt NO_GLOB_SUBST 28 else 29 case `(set -o) 2>/dev/null` in #( 30 *posix*) : 31 set -o posix ;; #( 32 *) : 33 ;; 34 esac 35 fi 36 37 38 as_nl=' 39 ' 40 export as_nl 41 # Printing a long string crashes Solaris 7 /usr/bin/printf. 42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 45 # Prefer a ksh shell builtin over an external printf program on Solaris, 46 # but without wasting forks for bash or zsh. 47 if test -z "$BASH_VERSION$ZSH_VERSION" \ 48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 49 as_echo='print -r --' 50 as_echo_n='print -rn --' 51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 52 as_echo='printf %s\n' 53 as_echo_n='printf %s' 54 else 55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 57 as_echo_n='/usr/ucb/echo -n' 58 else 59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 60 as_echo_n_body='eval 61 arg=$1; 62 case $arg in #( 63 *"$as_nl"*) 64 expr "X$arg" : "X\\(.*\\)$as_nl"; 65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 66 esac; 67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 68 ' 69 export as_echo_n_body 70 as_echo_n='sh -c $as_echo_n_body as_echo' 71 fi 72 export as_echo_body 73 as_echo='sh -c $as_echo_body as_echo' 74 fi 75 76 # The user is always right. 77 if test "${PATH_SEPARATOR+set}" != set; then 78 PATH_SEPARATOR=: 79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 81 PATH_SEPARATOR=';' 82 } 83 fi 84 85 86 # IFS 87 # We need space, tab and new line, in precisely that order. Quoting is 88 # there to prevent editors from complaining about space-tab. 89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word 90 # splitting by setting IFS to empty value.) 91 IFS=" "" $as_nl" 92 93 # Find who we are. Look in the path if we contain no directory separator. 94 as_myself= 95 case $0 in #(( 96 *[\\/]* ) as_myself=$0 ;; 97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 98 for as_dir in $PATH 99 do 100 IFS=$as_save_IFS 101 test -z "$as_dir" && as_dir=. 102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 103 done 104 IFS=$as_save_IFS 105 106 ;; 107 esac 108 # We did not find ourselves, most probably we were run as `sh COMMAND' 109 # in which case we are not to be found in the path. 110 if test "x$as_myself" = x; then 111 as_myself=$0 112 fi 113 if test ! -f "$as_myself"; then 114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 115 exit 1 116 fi 117 118 # Unset variables that we do not need and which cause bugs (e.g. in 119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 120 # suppresses any "Segmentation fault" message there. '((' could 121 # trigger a bug in pdksh 5.2.14. 122 for as_var in BASH_ENV ENV MAIL MAILPATH 123 do eval test x\${$as_var+set} = xset \ 124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 125 done 126 PS1='$ ' 127 PS2='> ' 128 PS4='+ ' 129 130 # NLS nuisances. 131 LC_ALL=C 132 export LC_ALL 133 LANGUAGE=C 134 export LANGUAGE 135 136 # CDPATH. 137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 138 139 if test "x$CONFIG_SHELL" = x; then 140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 141 emulate sh 142 NULLCMD=: 143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 144 # is contrary to our usage. Disable this feature. 145 alias -g '\${1+\"\$@\"}'='\"\$@\"' 146 setopt NO_GLOB_SUBST 147 else 148 case \`(set -o) 2>/dev/null\` in #( 149 *posix*) : 150 set -o posix ;; #( 151 *) : 152 ;; 153 esac 154 fi 155 " 156 as_required="as_fn_return () { (exit \$1); } 157 as_fn_success () { as_fn_return 0; } 158 as_fn_failure () { as_fn_return 1; } 159 as_fn_ret_success () { return 0; } 160 as_fn_ret_failure () { return 1; } 161 162 exitcode=0 163 as_fn_success || { exitcode=1; echo as_fn_success failed.; } 164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 168 169 else 170 exitcode=1; echo positional parameters were not saved. 171 fi 172 test x\$exitcode = x0 || exit 1" 173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 177 test \$(( 1 + 1 )) = 2 || exit 1" 178 if (eval "$as_required") 2>/dev/null; then : 179 as_have_required=yes 180 else 181 as_have_required=no 182 fi 183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 184 185 else 186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 187 as_found=false 188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 189 do 190 IFS=$as_save_IFS 191 test -z "$as_dir" && as_dir=. 192 as_found=: 193 case $as_dir in #( 194 /*) 195 for as_base in sh bash ksh sh5; do 196 # Try only shells that exist, to save several forks. 197 as_shell=$as_dir/$as_base 198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 200 CONFIG_SHELL=$as_shell as_have_required=yes 201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 202 break 2 203 fi 204 fi 205 done;; 206 esac 207 as_found=false 208 done 209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 211 CONFIG_SHELL=$SHELL as_have_required=yes 212 fi; } 213 IFS=$as_save_IFS 214 215 216 if test "x$CONFIG_SHELL" != x; then : 217 # We cannot yet assume a decent shell, so we have to provide a 218 # neutralization value for shells without unset; and this also 219 # works around shells that cannot unset nonexistent variables. 220 # Preserve -v and -x to the replacement shell. 221 BASH_ENV=/dev/null 222 ENV=/dev/null 223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 224 export CONFIG_SHELL 225 case $- in # (((( 226 *v*x* | *x*v* ) as_opts=-vx ;; 227 *v* ) as_opts=-v ;; 228 *x* ) as_opts=-x ;; 229 * ) as_opts= ;; 230 esac 231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} 232 fi 233 234 if test x$as_have_required = xno; then : 235 $as_echo "$0: This script requires a shell more modern than all" 236 $as_echo "$0: the shells that I found on your system." 237 if test x${ZSH_VERSION+set} = xset ; then 238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 239 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 240 else 241 $as_echo "$0: Please tell bug-autoconf@gnu.org and 242 $0: build-dev@openjdk.java.net about your system, including 243 $0: any error possibly output before this message. Then 244 $0: install a modern shell, or manually run the script 245 $0: under such a shell if you do have one." 246 fi 247 exit 1 248 fi 249 fi 250 fi 251 SHELL=${CONFIG_SHELL-/bin/sh} 252 export SHELL 253 # Unset more variables known to interfere with behavior of common tools. 254 CLICOLOR_FORCE= GREP_OPTIONS= 255 unset CLICOLOR_FORCE GREP_OPTIONS 256 257 ## --------------------- ## 258 ## M4sh Shell Functions. ## 259 ## --------------------- ## 260 # as_fn_unset VAR 261 # --------------- 262 # Portably unset VAR. 263 as_fn_unset () 264 { 265 { eval $1=; unset $1;} 266 } 267 as_unset=as_fn_unset 268 269 # as_fn_set_status STATUS 270 # ----------------------- 271 # Set $? to STATUS, without forking. 272 as_fn_set_status () 273 { 274 return $1 275 } # as_fn_set_status 276 277 # as_fn_exit STATUS 278 # ----------------- 279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 280 as_fn_exit () 281 { 282 set +e 283 as_fn_set_status $1 284 exit $1 285 } # as_fn_exit 286 287 # as_fn_mkdir_p 288 # ------------- 289 # Create "$as_dir" as a directory, including parents if necessary. 290 as_fn_mkdir_p () 291 { 292 293 case $as_dir in #( 294 -*) as_dir=./$as_dir;; 295 esac 296 test -d "$as_dir" || eval $as_mkdir_p || { 297 as_dirs= 298 while :; do 299 case $as_dir in #( 300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 301 *) as_qdir=$as_dir;; 302 esac 303 as_dirs="'$as_qdir' $as_dirs" 304 as_dir=`$as_dirname -- "$as_dir" || 305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 306 X"$as_dir" : 'X\(//\)[^/]' \| \ 307 X"$as_dir" : 'X\(//\)$' \| \ 308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 309 $as_echo X"$as_dir" | 310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 311 s//\1/ 312 q 313 } 314 /^X\(\/\/\)[^/].*/{ 315 s//\1/ 316 q 317 } 318 /^X\(\/\/\)$/{ 319 s//\1/ 320 q 321 } 322 /^X\(\/\).*/{ 323 s//\1/ 324 q 325 } 326 s/.*/./; q'` 327 test -d "$as_dir" && break 328 done 329 test -z "$as_dirs" || eval "mkdir $as_dirs" 330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 331 332 333 } # as_fn_mkdir_p 334 # as_fn_append VAR VALUE 335 # ---------------------- 336 # Append the text in VALUE to the end of the definition contained in VAR. Take 337 # advantage of any shell optimizations that allow amortized linear growth over 338 # repeated appends, instead of the typical quadratic growth present in naive 339 # implementations. 340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 341 eval 'as_fn_append () 342 { 343 eval $1+=\$2 344 }' 345 else 346 as_fn_append () 347 { 348 eval $1=\$$1\$2 349 } 350 fi # as_fn_append 351 352 # as_fn_arith ARG... 353 # ------------------ 354 # Perform arithmetic evaluation on the ARGs, and store the result in the 355 # global $as_val. Take advantage of shells that can avoid forks. The arguments 356 # must be portable across $(()) and expr. 357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 358 eval 'as_fn_arith () 359 { 360 as_val=$(( $* )) 361 }' 362 else 363 as_fn_arith () 364 { 365 as_val=`expr "$@" || test $? -eq 1` 366 } 367 fi # as_fn_arith 368 369 370 # as_fn_error STATUS ERROR [LINENO LOG_FD] 371 # ---------------------------------------- 372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 374 # script with STATUS, using 1 if that was 0. 375 as_fn_error () 376 { 377 as_status=$1; test $as_status -eq 0 && as_status=1 378 if test "$4"; then 379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 381 fi 382 $as_echo "$as_me: error: $2" >&2 383 as_fn_exit $as_status 384 } # as_fn_error 385 386 if expr a : '\(a\)' >/dev/null 2>&1 && 387 test "X`expr 00001 : '.*\(...\)'`" = X001; then 388 as_expr=expr 389 else 390 as_expr=false 391 fi 392 393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 394 as_basename=basename 395 else 396 as_basename=false 397 fi 398 399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 400 as_dirname=dirname 401 else 402 as_dirname=false 403 fi 404 405 as_me=`$as_basename -- "$0" || 406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 407 X"$0" : 'X\(//\)$' \| \ 408 X"$0" : 'X\(/\)' \| . 2>/dev/null || 409 $as_echo X/"$0" | 410 sed '/^.*\/\([^/][^/]*\)\/*$/{ 411 s//\1/ 412 q 413 } 414 /^X\/\(\/\/\)$/{ 415 s//\1/ 416 q 417 } 418 /^X\/\(\/\).*/{ 419 s//\1/ 420 q 421 } 422 s/.*/./; q'` 423 424 # Avoid depending upon Character Ranges. 425 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 428 as_cr_digits='0123456789' 429 as_cr_alnum=$as_cr_Letters$as_cr_digits 430 431 432 as_lineno_1=$LINENO as_lineno_1a=$LINENO 433 as_lineno_2=$LINENO as_lineno_2a=$LINENO 434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 437 sed -n ' 438 p 439 /[$]LINENO/= 440 ' <$as_myself | 441 sed ' 442 s/[$]LINENO.*/&-/ 443 t lineno 444 b 445 :lineno 446 N 447 :loop 448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 449 t loop 450 s/-\n.*// 451 ' >$as_me.lineno && 452 chmod +x "$as_me.lineno" || 453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 454 455 # Don't try to exec as it changes $[0], causing all sort of problems 456 # (the dirname of $[0] is not the place where we might find the 457 # original and so on. Autoconf is especially sensitive to this). 458 . "./$as_me.lineno" 459 # Exit status is that of the last command. 460 exit 461 } 462 463 ECHO_C= ECHO_N= ECHO_T= 464 case `echo -n x` in #((((( 465 -n*) 466 case `echo 'xy\c'` in 467 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 468 xy) ECHO_C='\c';; 469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 470 ECHO_T=' ';; 471 esac;; 472 *) 473 ECHO_N='-n';; 474 esac 475 476 rm -f conf$$ conf$$.exe conf$$.file 477 if test -d conf$$.dir; then 478 rm -f conf$$.dir/conf$$.file 479 else 480 rm -f conf$$.dir 481 mkdir conf$$.dir 2>/dev/null 482 fi 483 if (echo >conf$$.file) 2>/dev/null; then 484 if ln -s conf$$.file conf$$ 2>/dev/null; then 485 as_ln_s='ln -s' 486 # ... but there are two gotchas: 487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 489 # In both cases, we have to default to `cp -p'. 490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 491 as_ln_s='cp -p' 492 elif ln conf$$.file conf$$ 2>/dev/null; then 493 as_ln_s=ln 494 else 495 as_ln_s='cp -p' 496 fi 497 else 498 as_ln_s='cp -p' 499 fi 500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 501 rmdir conf$$.dir 2>/dev/null 502 503 if mkdir -p . 2>/dev/null; then 504 as_mkdir_p='mkdir -p "$as_dir"' 505 else 506 test -d ./-p && rmdir ./-p 507 as_mkdir_p=false 508 fi 509 510 if test -x / >/dev/null 2>&1; then 511 as_test_x='test -x' 512 else 513 if ls -dL / >/dev/null 2>&1; then 514 as_ls_L_option=L 515 else 516 as_ls_L_option= 517 fi 518 as_test_x=' 519 eval sh -c '\'' 520 if test -d "$1"; then 521 test -d "$1/."; 522 else 523 case $1 in #( 524 -*)set "./$1";; 525 esac; 526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 527 ???[sx]*):;;*)false;;esac;fi 528 '\'' sh 529 ' 530 fi 531 as_executable_p=$as_test_x 532 533 # Sed expression to map a string onto a valid CPP name. 534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 535 536 # Sed expression to map a string onto a valid variable name. 537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 538 539 540 test -n "$DJDIR" || exec 7<&0 </dev/null 541 exec 6>&1 542 543 # Name of the host. 544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 545 # so uname gets run too. 546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 547 548 # 549 # Initializations. 550 # 551 ac_default_prefix=/usr/local 552 ac_clean_files= 553 ac_config_libobj_dir=. 554 LIBOBJS= 555 cross_compiling=no 556 subdirs= 557 MFLAGS= 558 MAKEFLAGS= 559 560 # Identity of this package. 561 PACKAGE_NAME='OpenJDK' 562 PACKAGE_TARNAME='openjdk' 563 PACKAGE_VERSION='jdk8' 564 PACKAGE_STRING='OpenJDK jdk8' 565 PACKAGE_BUGREPORT='build-dev@openjdk.java.net' 566 PACKAGE_URL='http://openjdk.java.net' 567 568 # Factoring default headers for most tests. 569 ac_includes_default="\ 570 #include <stdio.h> 571 #ifdef HAVE_SYS_TYPES_H 572 # include <sys/types.h> 573 #endif 574 #ifdef HAVE_SYS_STAT_H 575 # include <sys/stat.h> 576 #endif 577 #ifdef STDC_HEADERS 578 # include <stdlib.h> 579 # include <stddef.h> 580 #else 581 # ifdef HAVE_STDLIB_H 582 # include <stdlib.h> 583 # endif 584 #endif 585 #ifdef HAVE_STRING_H 586 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H 587 # include <memory.h> 588 # endif 589 # include <string.h> 590 #endif 591 #ifdef HAVE_STRINGS_H 592 # include <strings.h> 593 #endif 594 #ifdef HAVE_INTTYPES_H 595 # include <inttypes.h> 596 #endif 597 #ifdef HAVE_STDINT_H 598 # include <stdint.h> 599 #endif 600 #ifdef HAVE_UNISTD_H 601 # include <unistd.h> 602 #endif" 603 604 ac_subst_vars='LTLIBOBJS 605 LIBOBJS 606 CCACHE 607 USE_PRECOMPILED_HEADER 608 SJAVAC_SERVER_DIR 609 ENABLE_SJAVAC 610 SJAVAC_SERVER_JAVA 611 JOBS 612 MEMORY_SIZE 613 NUM_CORES 614 ENABLE_INTREE_EC 615 SALIB_NAME 616 HOTSPOT_MAKE_ARGS 617 FIXPATH 618 LIBCXX 619 LLVM_LIBS 620 LLVM_LDFLAGS 621 LLVM_CFLAGS 622 LLVM_CONFIG 623 LIBFFI_LIBS 624 LIBFFI_CFLAGS 625 STATIC_CXX_SETTING 626 LIBDL 627 LIBM 628 LIBZIP_CAN_USE_MMAP 629 USE_EXTERNAL_LIBZ 630 USE_EXTERNAL_LIBGIF 631 USE_EXTERNAL_LIBJPEG 632 ALSA_LIBS 633 ALSA_CFLAGS 634 FREETYPE2_LIB_PATH 635 USING_SYSTEM_FT_LIB 636 FREETYPE2_LIBS 637 FREETYPE2_CFLAGS 638 USE_EXTERNAL_ICU_LE 639 ICU_LE_LIBS 640 ICU_LE_CFLAGS 641 CUPS_CFLAGS 642 OPENWIN_HOME 643 X_EXTRA_LIBS 644 X_LIBS 645 X_PRE_LIBS 646 X_CFLAGS 647 XMKMF 648 CXXFLAGS_DEBUG_SYMBOLS 649 CFLAGS_DEBUG_SYMBOLS 650 ZIP_DEBUGINFO_FILES 651 ENABLE_DEBUG_SYMBOLS 652 COMPILER_SUPPORTS_TARGET_BITS_FLAG 653 ZERO_ARCHFLAG 654 LDFLAGS_CXX_JDK 655 LDFLAGS_JDKEXE_SUFFIX 656 LDFLAGS_JDKLIB_SUFFIX 657 LDFLAGS_JDKEXE 658 LDFLAGS_JDKLIB 659 CXXFLAGS_JDKEXE 660 CXXFLAGS_JDKLIB 661 CFLAGS_JDKEXE 662 CFLAGS_JDKLIB 663 MACOSX_VERSION_MIN 664 PACKAGE_PATH 665 LEGACY_EXTRA_LDFLAGS 666 LEGACY_EXTRA_CXXFLAGS 667 LEGACY_EXTRA_CFLAGS 668 CXX_FLAG_DEPS 669 C_FLAG_DEPS 670 CXX_O_FLAG_NONE 671 CXX_O_FLAG_NORM 672 CXX_O_FLAG_HI 673 CXX_O_FLAG_HIGHEST 674 C_O_FLAG_NONE 675 C_O_FLAG_NORM 676 C_O_FLAG_HI 677 C_O_FLAG_HIGHEST 678 POST_MCS_CMD 679 POST_STRIP_CMD 680 SET_EXECUTABLE_ORIGIN 681 SET_SHARED_LIBRARY_ORIGIN 682 CXX_FLAG_REORDER 683 C_FLAG_REORDER 684 SET_SHARED_LIBRARY_MAPFILE 685 SET_SHARED_LIBRARY_NAME 686 SHARED_LIBRARY_FLAGS 687 EXE_SUFFIX 688 STATIC_LIBRARY_SUFFIX 689 SHARED_LIBRARY_SUFFIX 690 LIBRARY_PREFIX 691 STATIC_LIBRARY 692 SHARED_LIBRARY 693 OBJ_SUFFIX 694 COMPILER_NAME 695 JT_HOME 696 JTREGEXE 697 LIPO 698 ac_ct_OBJDUMP 699 OBJDUMP 700 ac_ct_OBJCOPY 701 OBJCOPY 702 MCS 703 STRIP 704 GNM 705 NM 706 AS 707 CXXCPP 708 CPP 709 COMPILER_TYPE 710 RC_FLAGS 711 DUMPBIN 712 WINAR 713 HOTSPOT_RC 714 HOTSPOT_MT 715 RC 716 MT 717 WINLD 718 HOTSPOT_LD 719 HOTSPOT_CXX 720 ARFLAGS 721 AR 722 LDEXECXX 723 LDCXX 724 LDEXE 725 LD 726 ac_ct_OBJC 727 OBJCFLAGS 728 OBJC 729 ac_ct_CXX 730 CXXFLAGS 731 CXX 732 ac_ct_PROPER_COMPILER_CXX 733 PROPER_COMPILER_CXX 734 POTENTIAL_CXX 735 TOOLS_DIR_CXX 736 OBJEXT 737 EXEEXT 738 ac_ct_CC 739 CPPFLAGS 740 LDFLAGS 741 CFLAGS 742 CC 743 ac_ct_PROPER_COMPILER_CC 744 PROPER_COMPILER_CC 745 POTENTIAL_CC 746 TOOLS_DIR_CC 747 BUILD_LD 748 BUILD_CXX 749 BUILD_CC 750 MSVCR_DLL 751 DXSDK_INCLUDE_PATH 752 DXSDK_LIB_PATH 753 VS_PATH 754 VS_LIB 755 VS_INCLUDE 756 CYGWIN_LINK 757 AR_OUT_OPTION 758 LD_OUT_OPTION 759 EXE_OUT_OPTION 760 CC_OUT_OPTION 761 BUILD_HOTSPOT 762 HOTSPOT_DIST 763 BUILD_OUTPUT 764 OVERRIDE_SRC_ROOT 765 ADD_SRC_ROOT 766 JDK_TOPDIR 767 NASHORN_TOPDIR 768 HOTSPOT_TOPDIR 769 JAXWS_TOPDIR 770 JAXP_TOPDIR 771 CORBA_TOPDIR 772 LANGTOOLS_TOPDIR 773 BOOT_JDK_JVMARGS 774 JAVAC_FLAGS 775 BOOT_JDK_SOURCETARGET 776 BOOT_JDK 777 BOOT_TOOLSJAR 778 BOOT_RTJAR 779 JAVA_CHECK 780 JAVAC_CHECK 781 COOKED_BUILD_NUMBER 782 JDK_VERSION 783 COPYRIGHT_YEAR 784 MACOSX_BUNDLE_ID_BASE 785 MACOSX_BUNDLE_NAME_BASE 786 COMPANY_NAME 787 JDK_RC_PLATFORM_NAME 788 PRODUCT_SUFFIX 789 PRODUCT_NAME 790 LAUNCHER_NAME 791 MILESTONE 792 JDK_BUILD_NUMBER 793 JDK_UPDATE_VERSION 794 JDK_MICRO_VERSION 795 JDK_MINOR_VERSION 796 JDK_MAJOR_VERSION 797 USER_RELEASE_SUFFIX 798 COMPRESS_JARS 799 UNLIMITED_CRYPTO 800 CACERTS_FILE 801 TEST_IN_BUILD 802 BUILD_HEADLESS 803 SUPPORT_HEADFUL 804 SUPPORT_HEADLESS 805 BDEPS_FTP 806 BDEPS_UNZIP 807 OS_VERSION_MICRO 808 OS_VERSION_MINOR 809 OS_VERSION_MAJOR 810 PKG_CONFIG 811 CODESIGN 812 XATTR 813 TIME 814 STAT 815 HG 816 READELF 817 OTOOL 818 LDD 819 ZIP 820 UNZIP 821 FIND_DELETE 822 MAKE 823 CHECK_TOOLSDIR_MAKE 824 CHECK_TOOLSDIR_GMAKE 825 CHECK_MAKE 826 CHECK_GMAKE 827 PKGHANDLER 828 OUTPUT_ROOT 829 CONF_NAME 830 SPEC 831 BUILD_VARIANT_RELEASE 832 DEBUG_CLASSFILES 833 FASTDEBUG 834 VARIANT 835 DEBUG_LEVEL 836 MACOSX_UNIVERSAL 837 INCLUDE_SA 838 JVM_VARIANT_ZEROSHARK 839 JVM_VARIANT_ZERO 840 JVM_VARIANT_KERNEL 841 JVM_VARIANT_MINIMAL1 842 JVM_VARIANT_CLIENT 843 JVM_VARIANT_SERVER 844 JVM_VARIANTS 845 JDK_VARIANT 846 SET_OPENJDK 847 BUILD_LOG_WRAPPER 848 BUILD_LOG_PREVIOUS 849 BUILD_LOG 850 SYS_ROOT 851 PATH_SEP 852 SRC_ROOT 853 ZERO_ARCHDEF 854 DEFINE_CROSS_COMPILE_ARCH 855 LP64 856 OPENJDK_TARGET_OS_API_DIR 857 OPENJDK_TARGET_CPU_JLI_CFLAGS 858 OPENJDK_TARGET_CPU_OSARCH 859 OPENJDK_TARGET_CPU_ISADIR 860 OPENJDK_TARGET_CPU_LIBDIR 861 OPENJDK_TARGET_CPU_LEGACY_LIB 862 OPENJDK_TARGET_CPU_LEGACY 863 REQUIRED_OS_VERSION 864 REQUIRED_OS_NAME 865 COMPILE_TYPE 866 OPENJDK_TARGET_CPU_ENDIAN 867 OPENJDK_TARGET_CPU_BITS 868 OPENJDK_TARGET_CPU_ARCH 869 OPENJDK_TARGET_CPU 870 OPENJDK_TARGET_OS_API 871 OPENJDK_TARGET_OS 872 OPENJDK_BUILD_CPU_ENDIAN 873 OPENJDK_BUILD_CPU_BITS 874 OPENJDK_BUILD_CPU_ARCH 875 OPENJDK_BUILD_CPU 876 OPENJDK_BUILD_OS_API 877 OPENJDK_BUILD_OS 878 OPENJDK_BUILD_AUTOCONF_NAME 879 OPENJDK_TARGET_AUTOCONF_NAME 880 target_os 881 target_vendor 882 target_cpu 883 target 884 host_os 885 host_vendor 886 host_cpu 887 host 888 build_os 889 build_vendor 890 build_cpu 891 build 892 SETFILE 893 DF 894 READLINK 895 CYGPATH 896 NAWK 897 SED 898 FGREP 899 EGREP 900 GREP 901 AWK 902 XARGS 903 WHICH 904 WC 905 UNIQ 906 UNAME 907 TR 908 TOUCH 909 TEE 910 TAR 911 TAIL 912 SORT 913 SH 914 RM 915 PRINTF 916 MV 917 MKTEMP 918 MKDIR 919 LS 920 LN 921 HEAD 922 FIND 923 FILE 924 EXPR 925 ECHO 926 DIRNAME 927 DIFF 928 DATE 929 CUT 930 CPIO 931 CP 932 COMM 933 CMP 934 CHMOD 935 CAT 936 BASH 937 BASENAME 938 DATE_WHEN_CONFIGURED 939 CONFIGURE_COMMAND_LINE 940 CUSTOM_MAKE_DIR 941 target_alias 942 host_alias 943 build_alias 944 LIBS 945 ECHO_T 946 ECHO_N 947 ECHO_C 948 DEFS 949 mandir 950 localedir 951 libdir 952 psdir 953 pdfdir 954 dvidir 955 htmldir 956 infodir 957 docdir 958 oldincludedir 959 includedir 960 localstatedir 961 sharedstatedir 962 sysconfdir 963 datadir 964 datarootdir 965 libexecdir 966 sbindir 967 bindir 968 program_transform_name 969 prefix 970 exec_prefix 971 PACKAGE_URL 972 PACKAGE_BUGREPORT 973 PACKAGE_STRING 974 PACKAGE_VERSION 975 PACKAGE_TARNAME 976 PACKAGE_NAME 977 PATH_SEPARATOR 978 SHELL' 979 ac_subst_files='' 980 ac_user_opts=' 981 enable_option_checking 982 with_custom_make_dir 983 with_target_bits 984 with_sys_root 985 with_tools_dir 986 with_devkit 987 enable_openjdk_only 988 with_jdk_variant 989 with_jvm_variants 990 enable_debug 991 with_debug_level 992 with_conf_name 993 with_builddeps_conf 994 with_builddeps_server 995 with_builddeps_dir 996 with_builddeps_group 997 enable_headful 998 enable_hotspot_test_in_build 999 with_cacerts_file 1000 enable_unlimited_crypto 1001 with_milestone 1002 with_update_version 1003 with_build_number 1004 with_user_release_suffix 1005 with_boot_jdk 1006 with_boot_jdk_jvmargs 1007 with_add_source_root 1008 with_override_source_root 1009 with_adds_and_overrides 1010 with_override_langtools 1011 with_override_corba 1012 with_override_jaxp 1013 with_override_jaxws 1014 with_override_hotspot 1015 with_override_jdk 1016 with_import_hotspot 1017 with_msvcr_dll 1018 with_dxsdk 1019 with_dxsdk_lib 1020 with_dxsdk_include 1021 with_jtreg 1022 with_extra_cflags 1023 with_extra_cxxflags 1024 with_extra_ldflags 1025 enable_debug_symbols 1026 enable_zip_debug_info 1027 enable_macosx_runtime_support 1028 with_x 1029 with_cups 1030 with_cups_include 1031 with_icu_le 1032 with_freetype 1033 with_alsa 1034 with_alsa_include 1035 with_alsa_lib 1036 with_giflib 1037 with_zlib 1038 with_stdc__lib 1039 with_num_cores 1040 with_memory_size 1041 with_jobs 1042 with_sjavac_server_java 1043 enable_sjavac 1044 enable_precompiled_headers 1045 enable_ccache 1046 with_ccache_dir 1047 ' 1048 ac_precious_vars='build_alias 1049 host_alias 1050 target_alias 1051 PKG_CONFIG 1052 CC 1053 CFLAGS 1054 LDFLAGS 1055 LIBS 1056 CPPFLAGS 1057 CXX 1058 CXXFLAGS 1059 CCC 1060 OBJC 1061 OBJCFLAGS 1062 CPP 1063 CXXCPP 1064 XMKMF 1065 ICU_LE_CFLAGS 1066 ICU_LE_LIBS 1067 FREETYPE2_CFLAGS 1068 FREETYPE2_LIBS 1069 ALSA_CFLAGS 1070 ALSA_LIBS 1071 LIBFFI_CFLAGS 1072 LIBFFI_LIBS' 1073 1074 1075 # Initialize some variables set by options. 1076 ac_init_help= 1077 ac_init_version=false 1078 ac_unrecognized_opts= 1079 ac_unrecognized_sep= 1080 # The variables have the same names as the options, with 1081 # dashes changed to underlines. 1082 cache_file=/dev/null 1083 exec_prefix=NONE 1084 no_create= 1085 no_recursion= 1086 prefix=NONE 1087 program_prefix=NONE 1088 program_suffix=NONE 1089 program_transform_name=s,x,x, 1090 silent= 1091 site= 1092 srcdir= 1093 verbose= 1094 x_includes=NONE 1095 x_libraries=NONE 1096 1097 # Installation directory options. 1098 # These are left unexpanded so users can "make install exec_prefix=/foo" 1099 # and all the variables that are supposed to be based on exec_prefix 1100 # by default will actually change. 1101 # Use braces instead of parens because sh, perl, etc. also accept them. 1102 # (The list follows the same order as the GNU Coding Standards.) 1103 bindir='${exec_prefix}/bin' 1104 sbindir='${exec_prefix}/sbin' 1105 libexecdir='${exec_prefix}/libexec' 1106 datarootdir='${prefix}/share' 1107 datadir='${datarootdir}' 1108 sysconfdir='${prefix}/etc' 1109 sharedstatedir='${prefix}/com' 1110 localstatedir='${prefix}/var' 1111 includedir='${prefix}/include' 1112 oldincludedir='/usr/include' 1113 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 1114 infodir='${datarootdir}/info' 1115 htmldir='${docdir}' 1116 dvidir='${docdir}' 1117 pdfdir='${docdir}' 1118 psdir='${docdir}' 1119 libdir='${exec_prefix}/lib' 1120 localedir='${datarootdir}/locale' 1121 mandir='${datarootdir}/man' 1122 1123 ac_prev= 1124 ac_dashdash= 1125 for ac_option 1126 do 1127 # If the previous option needs an argument, assign it. 1128 if test -n "$ac_prev"; then 1129 eval $ac_prev=\$ac_option 1130 ac_prev= 1131 continue 1132 fi 1133 1134 case $ac_option in 1135 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 1136 *=) ac_optarg= ;; 1137 *) ac_optarg=yes ;; 1138 esac 1139 1140 # Accept the important Cygnus configure options, so we can diagnose typos. 1141 1142 case $ac_dashdash$ac_option in 1143 --) 1144 ac_dashdash=yes ;; 1145 1146 -bindir | --bindir | --bindi | --bind | --bin | --bi) 1147 ac_prev=bindir ;; 1148 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 1149 bindir=$ac_optarg ;; 1150 1151 -build | --build | --buil | --bui | --bu) 1152 ac_prev=build_alias ;; 1153 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 1154 build_alias=$ac_optarg ;; 1155 1156 -cache-file | --cache-file | --cache-fil | --cache-fi \ 1157 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 1158 ac_prev=cache_file ;; 1159 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 1160 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 1161 cache_file=$ac_optarg ;; 1162 1163 --config-cache | -C) 1164 cache_file=config.cache ;; 1165 1166 -datadir | --datadir | --datadi | --datad) 1167 ac_prev=datadir ;; 1168 -datadir=* | --datadir=* | --datadi=* | --datad=*) 1169 datadir=$ac_optarg ;; 1170 1171 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 1172 | --dataroo | --dataro | --datar) 1173 ac_prev=datarootdir ;; 1174 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 1175 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 1176 datarootdir=$ac_optarg ;; 1177 1178 -disable-* | --disable-*) 1179 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 1180 # Reject names that are not valid shell variable names. 1181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1182 as_fn_error $? "invalid feature name: $ac_useropt" 1183 ac_useropt_orig=$ac_useropt 1184 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1185 case $ac_user_opts in 1186 *" 1187 "enable_$ac_useropt" 1188 "*) ;; 1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 1190 ac_unrecognized_sep=', ';; 1191 esac 1192 eval enable_$ac_useropt=no ;; 1193 1194 -docdir | --docdir | --docdi | --doc | --do) 1195 ac_prev=docdir ;; 1196 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 1197 docdir=$ac_optarg ;; 1198 1199 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 1200 ac_prev=dvidir ;; 1201 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 1202 dvidir=$ac_optarg ;; 1203 1204 -enable-* | --enable-*) 1205 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 1206 # Reject names that are not valid shell variable names. 1207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1208 as_fn_error $? "invalid feature name: $ac_useropt" 1209 ac_useropt_orig=$ac_useropt 1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1211 case $ac_user_opts in 1212 *" 1213 "enable_$ac_useropt" 1214 "*) ;; 1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 1216 ac_unrecognized_sep=', ';; 1217 esac 1218 eval enable_$ac_useropt=\$ac_optarg ;; 1219 1220 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 1221 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 1222 | --exec | --exe | --ex) 1223 ac_prev=exec_prefix ;; 1224 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 1225 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 1226 | --exec=* | --exe=* | --ex=*) 1227 exec_prefix=$ac_optarg ;; 1228 1229 -gas | --gas | --ga | --g) 1230 # Obsolete; use --with-gas. 1231 with_gas=yes ;; 1232 1233 -help | --help | --hel | --he | -h) 1234 ac_init_help=long ;; 1235 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 1236 ac_init_help=recursive ;; 1237 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 1238 ac_init_help=short ;; 1239 1240 -host | --host | --hos | --ho) 1241 ac_prev=host_alias ;; 1242 -host=* | --host=* | --hos=* | --ho=*) 1243 host_alias=$ac_optarg ;; 1244 1245 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 1246 ac_prev=htmldir ;; 1247 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 1248 | --ht=*) 1249 htmldir=$ac_optarg ;; 1250 1251 -includedir | --includedir | --includedi | --included | --include \ 1252 | --includ | --inclu | --incl | --inc) 1253 ac_prev=includedir ;; 1254 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 1255 | --includ=* | --inclu=* | --incl=* | --inc=*) 1256 includedir=$ac_optarg ;; 1257 1258 -infodir | --infodir | --infodi | --infod | --info | --inf) 1259 ac_prev=infodir ;; 1260 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 1261 infodir=$ac_optarg ;; 1262 1263 -libdir | --libdir | --libdi | --libd) 1264 ac_prev=libdir ;; 1265 -libdir=* | --libdir=* | --libdi=* | --libd=*) 1266 libdir=$ac_optarg ;; 1267 1268 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 1269 | --libexe | --libex | --libe) 1270 ac_prev=libexecdir ;; 1271 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 1272 | --libexe=* | --libex=* | --libe=*) 1273 libexecdir=$ac_optarg ;; 1274 1275 -localedir | --localedir | --localedi | --localed | --locale) 1276 ac_prev=localedir ;; 1277 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 1278 localedir=$ac_optarg ;; 1279 1280 -localstatedir | --localstatedir | --localstatedi | --localstated \ 1281 | --localstate | --localstat | --localsta | --localst | --locals) 1282 ac_prev=localstatedir ;; 1283 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 1284 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 1285 localstatedir=$ac_optarg ;; 1286 1287 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 1288 ac_prev=mandir ;; 1289 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 1290 mandir=$ac_optarg ;; 1291 1292 -nfp | --nfp | --nf) 1293 # Obsolete; use --without-fp. 1294 with_fp=no ;; 1295 1296 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 1297 | --no-cr | --no-c | -n) 1298 no_create=yes ;; 1299 1300 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 1301 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 1302 no_recursion=yes ;; 1303 1304 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 1305 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 1306 | --oldin | --oldi | --old | --ol | --o) 1307 ac_prev=oldincludedir ;; 1308 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 1309 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 1310 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 1311 oldincludedir=$ac_optarg ;; 1312 1313 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 1314 ac_prev=prefix ;; 1315 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 1316 prefix=$ac_optarg ;; 1317 1318 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 1319 | --program-pre | --program-pr | --program-p) 1320 ac_prev=program_prefix ;; 1321 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 1322 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 1323 program_prefix=$ac_optarg ;; 1324 1325 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 1326 | --program-suf | --program-su | --program-s) 1327 ac_prev=program_suffix ;; 1328 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 1329 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 1330 program_suffix=$ac_optarg ;; 1331 1332 -program-transform-name | --program-transform-name \ 1333 | --program-transform-nam | --program-transform-na \ 1334 | --program-transform-n | --program-transform- \ 1335 | --program-transform | --program-transfor \ 1336 | --program-transfo | --program-transf \ 1337 | --program-trans | --program-tran \ 1338 | --progr-tra | --program-tr | --program-t) 1339 ac_prev=program_transform_name ;; 1340 -program-transform-name=* | --program-transform-name=* \ 1341 | --program-transform-nam=* | --program-transform-na=* \ 1342 | --program-transform-n=* | --program-transform-=* \ 1343 | --program-transform=* | --program-transfor=* \ 1344 | --program-transfo=* | --program-transf=* \ 1345 | --program-trans=* | --program-tran=* \ 1346 | --progr-tra=* | --program-tr=* | --program-t=*) 1347 program_transform_name=$ac_optarg ;; 1348 1349 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 1350 ac_prev=pdfdir ;; 1351 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 1352 pdfdir=$ac_optarg ;; 1353 1354 -psdir | --psdir | --psdi | --psd | --ps) 1355 ac_prev=psdir ;; 1356 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 1357 psdir=$ac_optarg ;; 1358 1359 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1360 | -silent | --silent | --silen | --sile | --sil) 1361 silent=yes ;; 1362 1363 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1364 ac_prev=sbindir ;; 1365 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 1366 | --sbi=* | --sb=*) 1367 sbindir=$ac_optarg ;; 1368 1369 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 1370 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 1371 | --sharedst | --shareds | --shared | --share | --shar \ 1372 | --sha | --sh) 1373 ac_prev=sharedstatedir ;; 1374 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 1375 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 1376 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 1377 | --sha=* | --sh=*) 1378 sharedstatedir=$ac_optarg ;; 1379 1380 -site | --site | --sit) 1381 ac_prev=site ;; 1382 -site=* | --site=* | --sit=*) 1383 site=$ac_optarg ;; 1384 1385 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 1386 ac_prev=srcdir ;; 1387 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 1388 srcdir=$ac_optarg ;; 1389 1390 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 1391 | --syscon | --sysco | --sysc | --sys | --sy) 1392 ac_prev=sysconfdir ;; 1393 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 1394 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 1395 sysconfdir=$ac_optarg ;; 1396 1397 -target | --target | --targe | --targ | --tar | --ta | --t) 1398 ac_prev=target_alias ;; 1399 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 1400 target_alias=$ac_optarg ;; 1401 1402 -v | -verbose | --verbose | --verbos | --verbo | --verb) 1403 verbose=yes ;; 1404 1405 -version | --version | --versio | --versi | --vers | -V) 1406 ac_init_version=: ;; 1407 1408 -with-* | --with-*) 1409 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1410 # Reject names that are not valid shell variable names. 1411 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1412 as_fn_error $? "invalid package name: $ac_useropt" 1413 ac_useropt_orig=$ac_useropt 1414 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1415 case $ac_user_opts in 1416 *" 1417 "with_$ac_useropt" 1418 "*) ;; 1419 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 1420 ac_unrecognized_sep=', ';; 1421 esac 1422 eval with_$ac_useropt=\$ac_optarg ;; 1423 1424 -without-* | --without-*) 1425 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 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--without-$ac_useropt_orig" 1436 ac_unrecognized_sep=', ';; 1437 esac 1438 eval with_$ac_useropt=no ;; 1439 1440 --x) 1441 # Obsolete; use --with-x. 1442 with_x=yes ;; 1443 1444 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1445 | --x-incl | --x-inc | --x-in | --x-i) 1446 ac_prev=x_includes ;; 1447 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1448 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1449 x_includes=$ac_optarg ;; 1450 1451 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1452 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1453 ac_prev=x_libraries ;; 1454 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1455 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1456 x_libraries=$ac_optarg ;; 1457 1458 -*) as_fn_error $? "unrecognized option: \`$ac_option' 1459 Try \`$0 --help' for more information" 1460 ;; 1461 1462 *=*) 1463 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1464 # Reject names that are not valid shell variable names. 1465 case $ac_envvar in #( 1466 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1467 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1468 esac 1469 eval $ac_envvar=\$ac_optarg 1470 export $ac_envvar ;; 1471 1472 *) 1473 # FIXME: should be removed in autoconf 3.0. 1474 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1475 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1476 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1477 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 1478 ;; 1479 1480 esac 1481 done 1482 1483 if test -n "$ac_prev"; then 1484 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1485 as_fn_error $? "missing argument to $ac_option" 1486 fi 1487 1488 if test -n "$ac_unrecognized_opts"; then 1489 case $enable_option_checking in 1490 no) ;; 1491 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1492 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1493 esac 1494 fi 1495 1496 # Check all directory arguments for consistency. 1497 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1498 datadir sysconfdir sharedstatedir localstatedir includedir \ 1499 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1500 libdir localedir mandir 1501 do 1502 eval ac_val=\$$ac_var 1503 # Remove trailing slashes. 1504 case $ac_val in 1505 */ ) 1506 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1507 eval $ac_var=\$ac_val;; 1508 esac 1509 # Be sure to have absolute directory names. 1510 case $ac_val in 1511 [\\/$]* | ?:[\\/]* ) continue;; 1512 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1513 esac 1514 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1515 done 1516 1517 # There might be people who depend on the old broken behavior: `$host' 1518 # used to hold the argument of --host etc. 1519 # FIXME: To remove some day. 1520 build=$build_alias 1521 host=$host_alias 1522 target=$target_alias 1523 1524 # FIXME: To remove some day. 1525 if test "x$host_alias" != x; then 1526 if test "x$build_alias" = x; then 1527 cross_compiling=maybe 1528 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. 1529 If a cross compiler is detected then cross compile mode will be used" >&2 1530 elif test "x$build_alias" != "x$host_alias"; then 1531 cross_compiling=yes 1532 fi 1533 fi 1534 1535 ac_tool_prefix= 1536 test -n "$host_alias" && ac_tool_prefix=$host_alias- 1537 1538 test "$silent" = yes && exec 6>/dev/null 1539 1540 1541 ac_pwd=`pwd` && test -n "$ac_pwd" && 1542 ac_ls_di=`ls -di .` && 1543 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1544 as_fn_error $? "working directory cannot be determined" 1545 test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1546 as_fn_error $? "pwd does not report name of working directory" 1547 1548 1549 # Find the source files, if location was not specified. 1550 if test -z "$srcdir"; then 1551 ac_srcdir_defaulted=yes 1552 # Try the directory containing this script, then the parent directory. 1553 ac_confdir=`$as_dirname -- "$as_myself" || 1554 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1555 X"$as_myself" : 'X\(//\)[^/]' \| \ 1556 X"$as_myself" : 'X\(//\)$' \| \ 1557 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1558 $as_echo X"$as_myself" | 1559 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1560 s//\1/ 1561 q 1562 } 1563 /^X\(\/\/\)[^/].*/{ 1564 s//\1/ 1565 q 1566 } 1567 /^X\(\/\/\)$/{ 1568 s//\1/ 1569 q 1570 } 1571 /^X\(\/\).*/{ 1572 s//\1/ 1573 q 1574 } 1575 s/.*/./; q'` 1576 srcdir=$ac_confdir 1577 if test ! -r "$srcdir/$ac_unique_file"; then 1578 srcdir=.. 1579 fi 1580 else 1581 ac_srcdir_defaulted=no 1582 fi 1583 if test ! -r "$srcdir/$ac_unique_file"; then 1584 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1585 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1586 fi 1587 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1588 ac_abs_confdir=`( 1589 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1590 pwd)` 1591 # When building in place, set srcdir=. 1592 if test "$ac_abs_confdir" = "$ac_pwd"; then 1593 srcdir=. 1594 fi 1595 # Remove unnecessary trailing slashes from srcdir. 1596 # Double slashes in file names in object file debugging info 1597 # mess up M-x gdb in Emacs. 1598 case $srcdir in 1599 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1600 esac 1601 for ac_var in $ac_precious_vars; do 1602 eval ac_env_${ac_var}_set=\${${ac_var}+set} 1603 eval ac_env_${ac_var}_value=\$${ac_var} 1604 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1605 eval ac_cv_env_${ac_var}_value=\$${ac_var} 1606 done 1607 1608 # 1609 # Report the --help message. 1610 # 1611 if test "$ac_init_help" = "long"; then 1612 # Omit some internal or obsolete options to make the list less imposing. 1613 # This message is too long to be a string in the A/UX 3.1 sh. 1614 cat <<_ACEOF 1615 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems. 1616 1617 Usage: $0 [OPTION]... [VAR=VALUE]... 1618 1619 To assign environment variables (e.g., CC, CFLAGS...), specify them as 1620 VAR=VALUE. See below for descriptions of some of the useful variables. 1621 1622 Defaults for the options are specified in brackets. 1623 1624 Configuration: 1625 -h, --help display this help and exit 1626 --help=short display options specific to this package 1627 --help=recursive display the short help of all the included packages 1628 -V, --version display version information and exit 1629 -q, --quiet, --silent do not print \`checking ...' messages 1630 --cache-file=FILE cache test results in FILE [disabled] 1631 -C, --config-cache alias for \`--cache-file=config.cache' 1632 -n, --no-create do not create output files 1633 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1634 1635 Installation directories: 1636 --prefix=PREFIX install architecture-independent files in PREFIX 1637 [$ac_default_prefix] 1638 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1639 [PREFIX] 1640 1641 By default, \`make install' will install all the files in 1642 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1643 an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1644 for instance \`--prefix=\$HOME'. 1645 1646 For better control, use the options below. 1647 1648 Fine tuning of the installation directories: 1649 --bindir=DIR user executables [EPREFIX/bin] 1650 --sbindir=DIR system admin executables [EPREFIX/sbin] 1651 --libexecdir=DIR program executables [EPREFIX/libexec] 1652 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1653 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1654 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1655 --libdir=DIR object code libraries [EPREFIX/lib] 1656 --includedir=DIR C header files [PREFIX/include] 1657 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1658 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1659 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1660 --infodir=DIR info documentation [DATAROOTDIR/info] 1661 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1662 --mandir=DIR man documentation [DATAROOTDIR/man] 1663 --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk] 1664 --htmldir=DIR html documentation [DOCDIR] 1665 --dvidir=DIR dvi documentation [DOCDIR] 1666 --pdfdir=DIR pdf documentation [DOCDIR] 1667 --psdir=DIR ps documentation [DOCDIR] 1668 _ACEOF 1669 1670 cat <<\_ACEOF 1671 1672 X features: 1673 --x-includes=DIR X include files are in DIR 1674 --x-libraries=DIR X library files are in DIR 1675 1676 System types: 1677 --build=BUILD configure for building on BUILD [guessed] 1678 --host=HOST cross-compile to build programs to run on HOST [BUILD] 1679 --target=TARGET configure for building compilers for TARGET [HOST] 1680 _ACEOF 1681 fi 1682 1683 if test -n "$ac_init_help"; then 1684 case $ac_init_help in 1685 short | recursive ) echo "Configuration of OpenJDK jdk8:";; 1686 esac 1687 cat <<\_ACEOF 1688 1689 Optional Features: 1690 --disable-option-checking ignore unrecognized --enable/--with options 1691 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1692 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1693 --enable-openjdk-only suppress building custom source even if present 1694 [disabled] 1695 --enable-debug set the debug level to fastdebug (shorthand for 1696 --with-debug-level=fastdebug) [disabled] 1697 --disable-headful disable building headful support (graphical UI 1698 support) [enabled] 1699 --enable-hotspot-test-in-build 1700 run the Queens test after Hotspot build [disabled] 1701 --enable-unlimited-crypto 1702 Enable unlimited crypto policy [disabled] 1703 --disable-debug-symbols disable generation of debug symbols [enabled] 1704 --disable-zip-debug-info 1705 disable zipping of debug-info files [enabled] 1706 --disable-macosx-runtime-support 1707 disable the use of MacOSX Java runtime support 1708 framework [enabled] 1709 --enable-sjavac use sjavac to do fast incremental compiles 1710 [disabled] 1711 --disable-precompiled-headers 1712 disable using precompiled headers when compiling C++ 1713 [enabled] 1714 --disable-ccache disable using ccache to speed up recompilations 1715 [enabled] 1716 1717 Optional Packages: 1718 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1719 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1720 --with-custom-make-dir use this directory for custom build/make files 1721 --with-target-bits build 32-bit or 64-bit binaries (for platforms that 1722 support it), e.g. --with-target-bits=32 [guessed] 1723 --with-sys-root pass this sys-root to the compilers and tools (for 1724 cross-compiling) 1725 --with-tools-dir search this directory for compilers and tools (for 1726 cross-compiling) 1727 --with-devkit use this directory as base for tools-dir and 1728 sys-root (for cross-compiling) 1729 --with-jdk-variant JDK variant to build (normal) [normal] 1730 --with-jvm-variants JVM variants (separated by commas) to build (server, 1731 client, minimal1, kernel, zero, zeroshark) [server] 1732 --with-debug-level set the debug level (release, fastdebug, slowdebug) 1733 [release] 1734 --with-conf-name use this as the name of the configuration [generated 1735 from important configuration options] 1736 --with-builddeps-conf use this configuration file for the builddeps 1737 --with-builddeps-server download and use build dependencies from this server 1738 url 1739 --with-builddeps-dir store downloaded build dependencies here 1740 [/localhome/builddeps] 1741 --with-builddeps-group chgrp the downloaded build dependencies to this 1742 group 1743 --with-cacerts-file specify alternative cacerts file 1744 --with-milestone Set milestone value for build [internal] 1745 --with-update-version Set update version value for build [b00] 1746 --with-build-number Set build number value for build [b00] 1747 --with-user-release-suffix 1748 Add a custom string to the version string if build 1749 number isn't set.[username_builddateb00] 1750 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed] 1751 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all 1752 invocations of the Boot JDK, overriding the default 1753 values, e.g --with-boot-jdk-jvmargs="-Xmx8G 1754 -enableassertions" 1755 --with-add-source-root for each and every source directory, look in this 1756 additional source root for the same directory; if it 1757 exists and have files in it, include it in the build 1758 --with-override-source-root 1759 for each and every source directory, look in this 1760 override source root for the same directory; if it 1761 exists, use that directory instead and ignore the 1762 directory in the original source root 1763 --with-adds-and-overrides 1764 use the subdirs 'adds' and 'overrides' in the 1765 specified directory as add-source-root and 1766 override-source-root 1767 --with-override-langtools 1768 use this langtools dir for the build 1769 --with-override-corba use this corba dir for the build 1770 --with-override-jaxp use this jaxp dir for the build 1771 --with-override-jaxws use this jaxws dir for the build 1772 --with-override-hotspot use this hotspot dir for the build 1773 --with-override-jdk use this jdk dir for the build 1774 --with-import-hotspot import hotspot binaries from this jdk image or 1775 hotspot build dist dir instead of building from 1776 source 1777 --with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows 1778 only) [probed] 1779 --with-dxsdk the DirectX SDK (Windows only) [probed] 1780 --with-dxsdk-lib the DirectX SDK lib directory (Windows only) 1781 [probed] 1782 --with-dxsdk-include the DirectX SDK include directory (Windows only) 1783 [probed] 1784 --with-jtreg Regression Test Harness [probed] 1785 --with-extra-cflags extra flags to be used when compiling jdk c-files 1786 --with-extra-cxxflags extra flags to be used when compiling jdk c++-files 1787 --with-extra-ldflags extra flags to be used when linking jdk 1788 --with-x use the X Window System 1789 --with-cups specify prefix directory for the cups package 1790 (expecting the headers under PATH/include) 1791 --with-cups-include specify directory for the cups include files 1792 --with-icu-le use icu-le from build system or OpenJDK source 1793 (system, bundled) [bundled] 1794 --with-freetype specify prefix directory for the freetype2 package 1795 (expecting the libraries under PATH/lib and the 1796 headers under PATH/include) 1797 --with-alsa specify prefix directory for the alsa package 1798 (expecting the libraries under PATH/lib and the 1799 headers under PATH/include) 1800 --with-alsa-include specify directory for the alsa include files 1801 --with-alsa-lib specify directory for the alsa library 1802 --with-giflib use giflib from build system or OpenJDK source 1803 (system, bundled) [bundled] 1804 --with-zlib use zlib from build system or OpenJDK source 1805 (system, bundled) [bundled] 1806 --with-stdc++lib=<static>,<dynamic>,<default> 1807 force linking of the C++ runtime on Linux to either 1808 static or dynamic, default is static with dynamic as 1809 fallback 1810 --with-num-cores number of cores in the build system, e.g. 1811 --with-num-cores=8 [probed] 1812 --with-memory-size memory (in MB) available in the build system, e.g. 1813 --with-memory-size=1024 [probed] 1814 --with-jobs number of parallel jobs to let make run [calculated 1815 based on cores and memory] 1816 --with-sjavac-server-java 1817 use this java binary for running the sjavac 1818 background server [Boot JDK java] 1819 --with-ccache-dir where to store ccache files [~/.ccache] 1820 1821 Some influential environment variables: 1822 PKG_CONFIG path to pkg-config utility 1823 CC C compiler command 1824 CFLAGS C compiler flags 1825 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 1826 nonstandard directory <lib dir> 1827 LIBS libraries to pass to the linker, e.g. -l<library> 1828 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 1829 you have headers in a nonstandard directory <include dir> 1830 CXX C++ compiler command 1831 CXXFLAGS C++ compiler flags 1832 OBJC Objective C compiler command 1833 OBJCFLAGS Objective C compiler flags 1834 CPP C preprocessor 1835 CXXCPP C++ preprocessor 1836 XMKMF Path to xmkmf, Makefile generator for X Window System 1837 ICU_LE_CFLAGS 1838 C compiler flags for ICU_LE, overriding pkg-config 1839 ICU_LE_LIBS linker flags for ICU_LE, overriding pkg-config 1840 FREETYPE2_CFLAGS 1841 C compiler flags for FREETYPE2, overriding pkg-config 1842 FREETYPE2_LIBS 1843 linker flags for FREETYPE2, overriding pkg-config 1844 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config 1845 ALSA_LIBS linker flags for ALSA, overriding pkg-config 1846 LIBFFI_CFLAGS 1847 C compiler flags for LIBFFI, overriding pkg-config 1848 LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config 1849 1850 Use these variables to override the choices made by `configure' or to help 1851 it to find libraries and programs with nonstandard names/locations. 1852 1853 Report bugs to <build-dev@openjdk.java.net>. 1854 OpenJDK home page: <http://openjdk.java.net>. 1855 _ACEOF 1856 ac_status=$? 1857 fi 1858 1859 if test "$ac_init_help" = "recursive"; then 1860 # If there are subdirs, report their specific --help. 1861 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1862 test -d "$ac_dir" || 1863 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1864 continue 1865 ac_builddir=. 1866 1867 case "$ac_dir" in 1868 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1869 *) 1870 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1871 # A ".." for each directory in $ac_dir_suffix. 1872 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1873 case $ac_top_builddir_sub in 1874 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1875 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1876 esac ;; 1877 esac 1878 ac_abs_top_builddir=$ac_pwd 1879 ac_abs_builddir=$ac_pwd$ac_dir_suffix 1880 # for backward compatibility: 1881 ac_top_builddir=$ac_top_build_prefix 1882 1883 case $srcdir in 1884 .) # We are building in place. 1885 ac_srcdir=. 1886 ac_top_srcdir=$ac_top_builddir_sub 1887 ac_abs_top_srcdir=$ac_pwd ;; 1888 [\\/]* | ?:[\\/]* ) # Absolute name. 1889 ac_srcdir=$srcdir$ac_dir_suffix; 1890 ac_top_srcdir=$srcdir 1891 ac_abs_top_srcdir=$srcdir ;; 1892 *) # Relative name. 1893 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1894 ac_top_srcdir=$ac_top_build_prefix$srcdir 1895 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1896 esac 1897 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1898 1899 cd "$ac_dir" || { ac_status=$?; continue; } 1900 # Check for guested configure. 1901 if test -f "$ac_srcdir/configure.gnu"; then 1902 echo && 1903 $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1904 elif test -f "$ac_srcdir/configure"; then 1905 echo && 1906 $SHELL "$ac_srcdir/configure" --help=recursive 1907 else 1908 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1909 fi || ac_status=$? 1910 cd "$ac_pwd" || { ac_status=$?; break; } 1911 done 1912 fi 1913 1914 test -n "$ac_init_help" && exit $ac_status 1915 if $ac_init_version; then 1916 cat <<\_ACEOF 1917 OpenJDK configure jdk8 1918 generated by GNU Autoconf 2.68 1919 1920 Copyright (C) 2010 Free Software Foundation, Inc. 1921 This configure script is free software; the Free Software Foundation 1922 gives unlimited permission to copy, distribute and modify it. 1923 _ACEOF 1924 exit 1925 fi 1926 1927 ## ------------------------ ## 1928 ## Autoconf initialization. ## 1929 ## ------------------------ ## 1930 1931 # ac_fn_c_try_compile LINENO 1932 # -------------------------- 1933 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1934 ac_fn_c_try_compile () 1935 { 1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1937 rm -f conftest.$ac_objext 1938 if { { ac_try="$ac_compile" 1939 case "(($ac_try" in 1940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1941 *) ac_try_echo=$ac_try;; 1942 esac 1943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1944 $as_echo "$ac_try_echo"; } >&5 1945 (eval "$ac_compile") 2>conftest.err 1946 ac_status=$? 1947 if test -s conftest.err; then 1948 grep -v '^ *+' conftest.err >conftest.er1 1949 cat conftest.er1 >&5 1950 mv -f conftest.er1 conftest.err 1951 fi 1952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1953 test $ac_status = 0; } && { 1954 test -z "$ac_c_werror_flag" || 1955 test ! -s conftest.err 1956 } && test -s conftest.$ac_objext; then : 1957 ac_retval=0 1958 else 1959 $as_echo "$as_me: failed program was:" >&5 1960 sed 's/^/| /' conftest.$ac_ext >&5 1961 1962 ac_retval=1 1963 fi 1964 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1965 as_fn_set_status $ac_retval 1966 1967 } # ac_fn_c_try_compile 1968 1969 # ac_fn_cxx_try_compile LINENO 1970 # ---------------------------- 1971 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1972 ac_fn_cxx_try_compile () 1973 { 1974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1975 rm -f conftest.$ac_objext 1976 if { { ac_try="$ac_compile" 1977 case "(($ac_try" in 1978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1979 *) ac_try_echo=$ac_try;; 1980 esac 1981 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1982 $as_echo "$ac_try_echo"; } >&5 1983 (eval "$ac_compile") 2>conftest.err 1984 ac_status=$? 1985 if test -s conftest.err; then 1986 grep -v '^ *+' conftest.err >conftest.er1 1987 cat conftest.er1 >&5 1988 mv -f conftest.er1 conftest.err 1989 fi 1990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1991 test $ac_status = 0; } && { 1992 test -z "$ac_cxx_werror_flag" || 1993 test ! -s conftest.err 1994 } && test -s conftest.$ac_objext; then : 1995 ac_retval=0 1996 else 1997 $as_echo "$as_me: failed program was:" >&5 1998 sed 's/^/| /' conftest.$ac_ext >&5 1999 2000 ac_retval=1 2001 fi 2002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2003 as_fn_set_status $ac_retval 2004 2005 } # ac_fn_cxx_try_compile 2006 2007 # ac_fn_objc_try_compile LINENO 2008 # ----------------------------- 2009 # Try to compile conftest.$ac_ext, and return whether this succeeded. 2010 ac_fn_objc_try_compile () 2011 { 2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2013 rm -f conftest.$ac_objext 2014 if { { ac_try="$ac_compile" 2015 case "(($ac_try" in 2016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2017 *) ac_try_echo=$ac_try;; 2018 esac 2019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2020 $as_echo "$ac_try_echo"; } >&5 2021 (eval "$ac_compile") 2>conftest.err 2022 ac_status=$? 2023 if test -s conftest.err; then 2024 grep -v '^ *+' conftest.err >conftest.er1 2025 cat conftest.er1 >&5 2026 mv -f conftest.er1 conftest.err 2027 fi 2028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2029 test $ac_status = 0; } && { 2030 test -z "$ac_objc_werror_flag" || 2031 test ! -s conftest.err 2032 } && test -s conftest.$ac_objext; then : 2033 ac_retval=0 2034 else 2035 $as_echo "$as_me: failed program was:" >&5 2036 sed 's/^/| /' conftest.$ac_ext >&5 2037 2038 ac_retval=1 2039 fi 2040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2041 as_fn_set_status $ac_retval 2042 2043 } # ac_fn_objc_try_compile 2044 2045 # ac_fn_c_try_cpp LINENO 2046 # ---------------------- 2047 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2048 ac_fn_c_try_cpp () 2049 { 2050 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2051 if { { ac_try="$ac_cpp conftest.$ac_ext" 2052 case "(($ac_try" in 2053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2054 *) ac_try_echo=$ac_try;; 2055 esac 2056 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2057 $as_echo "$ac_try_echo"; } >&5 2058 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2059 ac_status=$? 2060 if test -s conftest.err; then 2061 grep -v '^ *+' conftest.err >conftest.er1 2062 cat conftest.er1 >&5 2063 mv -f conftest.er1 conftest.err 2064 fi 2065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2066 test $ac_status = 0; } > conftest.i && { 2067 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2068 test ! -s conftest.err 2069 }; then : 2070 ac_retval=0 2071 else 2072 $as_echo "$as_me: failed program was:" >&5 2073 sed 's/^/| /' conftest.$ac_ext >&5 2074 2075 ac_retval=1 2076 fi 2077 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2078 as_fn_set_status $ac_retval 2079 2080 } # ac_fn_c_try_cpp 2081 2082 # ac_fn_cxx_try_cpp LINENO 2083 # ------------------------ 2084 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2085 ac_fn_cxx_try_cpp () 2086 { 2087 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2088 if { { ac_try="$ac_cpp conftest.$ac_ext" 2089 case "(($ac_try" in 2090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2091 *) ac_try_echo=$ac_try;; 2092 esac 2093 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2094 $as_echo "$ac_try_echo"; } >&5 2095 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2096 ac_status=$? 2097 if test -s conftest.err; then 2098 grep -v '^ *+' conftest.err >conftest.er1 2099 cat conftest.er1 >&5 2100 mv -f conftest.er1 conftest.err 2101 fi 2102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2103 test $ac_status = 0; } > conftest.i && { 2104 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || 2105 test ! -s conftest.err 2106 }; then : 2107 ac_retval=0 2108 else 2109 $as_echo "$as_me: failed program was:" >&5 2110 sed 's/^/| /' conftest.$ac_ext >&5 2111 2112 ac_retval=1 2113 fi 2114 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2115 as_fn_set_status $ac_retval 2116 2117 } # ac_fn_cxx_try_cpp 2118 2119 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES 2120 # --------------------------------------------------------- 2121 # Tests whether HEADER exists, giving a warning if it cannot be compiled using 2122 # the include files in INCLUDES and setting the cache variable VAR 2123 # accordingly. 2124 ac_fn_cxx_check_header_mongrel () 2125 { 2126 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2127 if eval \${$3+:} false; then : 2128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2129 $as_echo_n "checking for $2... " >&6; } 2130 if eval \${$3+:} false; then : 2131 $as_echo_n "(cached) " >&6 2132 fi 2133 eval ac_res=\$$3 2134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2135 $as_echo "$ac_res" >&6; } 2136 else 2137 # Is the header compilable? 2138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 2139 $as_echo_n "checking $2 usability... " >&6; } 2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2141 /* end confdefs.h. */ 2142 $4 2143 #include <$2> 2144 _ACEOF 2145 if ac_fn_cxx_try_compile "$LINENO"; then : 2146 ac_header_compiler=yes 2147 else 2148 ac_header_compiler=no 2149 fi 2150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 2152 $as_echo "$ac_header_compiler" >&6; } 2153 2154 # Is the header present? 2155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 2156 $as_echo_n "checking $2 presence... " >&6; } 2157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2158 /* end confdefs.h. */ 2159 #include <$2> 2160 _ACEOF 2161 if ac_fn_cxx_try_cpp "$LINENO"; then : 2162 ac_header_preproc=yes 2163 else 2164 ac_header_preproc=no 2165 fi 2166 rm -f conftest.err conftest.i conftest.$ac_ext 2167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2168 $as_echo "$ac_header_preproc" >&6; } 2169 2170 # So? What about this header? 2171 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( 2172 yes:no: ) 2173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 2174 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} 2175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2176 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2177 ;; 2178 no:yes:* ) 2179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 2180 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} 2181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 2182 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} 2183 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 2184 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} 2185 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 2186 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} 2187 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2188 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2189 ( $as_echo "## ----------------------------------------- ## 2190 ## Report this to build-dev@openjdk.java.net ## 2191 ## ----------------------------------------- ##" 2192 ) | sed "s/^/$as_me: WARNING: /" >&2 2193 ;; 2194 esac 2195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2196 $as_echo_n "checking for $2... " >&6; } 2197 if eval \${$3+:} false; then : 2198 $as_echo_n "(cached) " >&6 2199 else 2200 eval "$3=\$ac_header_compiler" 2201 fi 2202 eval ac_res=\$$3 2203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2204 $as_echo "$ac_res" >&6; } 2205 fi 2206 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2207 2208 } # ac_fn_cxx_check_header_mongrel 2209 2210 # ac_fn_cxx_try_run LINENO 2211 # ------------------------ 2212 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes 2213 # that executables *can* be run. 2214 ac_fn_cxx_try_run () 2215 { 2216 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2217 if { { ac_try="$ac_link" 2218 case "(($ac_try" in 2219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2220 *) ac_try_echo=$ac_try;; 2221 esac 2222 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2223 $as_echo "$ac_try_echo"; } >&5 2224 (eval "$ac_link") 2>&5 2225 ac_status=$? 2226 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2227 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 2228 { { case "(($ac_try" in 2229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2230 *) ac_try_echo=$ac_try;; 2231 esac 2232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2233 $as_echo "$ac_try_echo"; } >&5 2234 (eval "$ac_try") 2>&5 2235 ac_status=$? 2236 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2237 test $ac_status = 0; }; }; then : 2238 ac_retval=0 2239 else 2240 $as_echo "$as_me: program exited with status $ac_status" >&5 2241 $as_echo "$as_me: failed program was:" >&5 2242 sed 's/^/| /' conftest.$ac_ext >&5 2243 2244 ac_retval=$ac_status 2245 fi 2246 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2247 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2248 as_fn_set_status $ac_retval 2249 2250 } # ac_fn_cxx_try_run 2251 2252 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES 2253 # --------------------------------------------------------- 2254 # Tests whether HEADER exists and can be compiled using the include files in 2255 # INCLUDES, setting the cache variable VAR accordingly. 2256 ac_fn_cxx_check_header_compile () 2257 { 2258 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2260 $as_echo_n "checking for $2... " >&6; } 2261 if eval \${$3+:} false; then : 2262 $as_echo_n "(cached) " >&6 2263 else 2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2265 /* end confdefs.h. */ 2266 $4 2267 #include <$2> 2268 _ACEOF 2269 if ac_fn_cxx_try_compile "$LINENO"; then : 2270 eval "$3=yes" 2271 else 2272 eval "$3=no" 2273 fi 2274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2275 fi 2276 eval ac_res=\$$3 2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2278 $as_echo "$ac_res" >&6; } 2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2280 2281 } # ac_fn_cxx_check_header_compile 2282 2283 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES 2284 # ---------------------------------------------- 2285 # Tries to find the compile-time value of EXPR in a program that includes 2286 # INCLUDES, setting VAR accordingly. Returns whether the value could be 2287 # computed 2288 ac_fn_cxx_compute_int () 2289 { 2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2291 if test "$cross_compiling" = yes; then 2292 # Depending upon the size, compute the lo and hi bounds. 2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2294 /* end confdefs.h. */ 2295 $4 2296 int 2297 main () 2298 { 2299 static int test_array [1 - 2 * !(($2) >= 0)]; 2300 test_array [0] = 0 2301 2302 ; 2303 return 0; 2304 } 2305 _ACEOF 2306 if ac_fn_cxx_try_compile "$LINENO"; then : 2307 ac_lo=0 ac_mid=0 2308 while :; do 2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2310 /* end confdefs.h. */ 2311 $4 2312 int 2313 main () 2314 { 2315 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2316 test_array [0] = 0 2317 2318 ; 2319 return 0; 2320 } 2321 _ACEOF 2322 if ac_fn_cxx_try_compile "$LINENO"; then : 2323 ac_hi=$ac_mid; break 2324 else 2325 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 2326 if test $ac_lo -le $ac_mid; then 2327 ac_lo= ac_hi= 2328 break 2329 fi 2330 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 2331 fi 2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2333 done 2334 else 2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2336 /* end confdefs.h. */ 2337 $4 2338 int 2339 main () 2340 { 2341 static int test_array [1 - 2 * !(($2) < 0)]; 2342 test_array [0] = 0 2343 2344 ; 2345 return 0; 2346 } 2347 _ACEOF 2348 if ac_fn_cxx_try_compile "$LINENO"; then : 2349 ac_hi=-1 ac_mid=-1 2350 while :; do 2351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2352 /* end confdefs.h. */ 2353 $4 2354 int 2355 main () 2356 { 2357 static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 2358 test_array [0] = 0 2359 2360 ; 2361 return 0; 2362 } 2363 _ACEOF 2364 if ac_fn_cxx_try_compile "$LINENO"; then : 2365 ac_lo=$ac_mid; break 2366 else 2367 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 2368 if test $ac_mid -le $ac_hi; then 2369 ac_lo= ac_hi= 2370 break 2371 fi 2372 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 2373 fi 2374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2375 done 2376 else 2377 ac_lo= ac_hi= 2378 fi 2379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2380 fi 2381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2382 # Binary search between lo and hi bounds. 2383 while test "x$ac_lo" != "x$ac_hi"; do 2384 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2386 /* end confdefs.h. */ 2387 $4 2388 int 2389 main () 2390 { 2391 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2392 test_array [0] = 0 2393 2394 ; 2395 return 0; 2396 } 2397 _ACEOF 2398 if ac_fn_cxx_try_compile "$LINENO"; then : 2399 ac_hi=$ac_mid 2400 else 2401 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 2402 fi 2403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2404 done 2405 case $ac_lo in #(( 2406 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 2407 '') ac_retval=1 ;; 2408 esac 2409 else 2410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2411 /* end confdefs.h. */ 2412 $4 2413 static long int longval () { return $2; } 2414 static unsigned long int ulongval () { return $2; } 2415 #include <stdio.h> 2416 #include <stdlib.h> 2417 int 2418 main () 2419 { 2420 2421 FILE *f = fopen ("conftest.val", "w"); 2422 if (! f) 2423 return 1; 2424 if (($2) < 0) 2425 { 2426 long int i = longval (); 2427 if (i != ($2)) 2428 return 1; 2429 fprintf (f, "%ld", i); 2430 } 2431 else 2432 { 2433 unsigned long int i = ulongval (); 2434 if (i != ($2)) 2435 return 1; 2436 fprintf (f, "%lu", i); 2437 } 2438 /* Do not output a trailing newline, as this causes \r\n confusion 2439 on some platforms. */ 2440 return ferror (f) || fclose (f) != 0; 2441 2442 ; 2443 return 0; 2444 } 2445 _ACEOF 2446 if ac_fn_cxx_try_run "$LINENO"; then : 2447 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 2448 else 2449 ac_retval=1 2450 fi 2451 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 2452 conftest.$ac_objext conftest.beam conftest.$ac_ext 2453 rm -f conftest.val 2454 2455 fi 2456 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2457 as_fn_set_status $ac_retval 2458 2459 } # ac_fn_cxx_compute_int 2460 2461 # ac_fn_cxx_try_link LINENO 2462 # ------------------------- 2463 # Try to link conftest.$ac_ext, and return whether this succeeded. 2464 ac_fn_cxx_try_link () 2465 { 2466 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2467 rm -f conftest.$ac_objext conftest$ac_exeext 2468 if { { ac_try="$ac_link" 2469 case "(($ac_try" in 2470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2471 *) ac_try_echo=$ac_try;; 2472 esac 2473 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2474 $as_echo "$ac_try_echo"; } >&5 2475 (eval "$ac_link") 2>conftest.err 2476 ac_status=$? 2477 if test -s conftest.err; then 2478 grep -v '^ *+' conftest.err >conftest.er1 2479 cat conftest.er1 >&5 2480 mv -f conftest.er1 conftest.err 2481 fi 2482 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2483 test $ac_status = 0; } && { 2484 test -z "$ac_cxx_werror_flag" || 2485 test ! -s conftest.err 2486 } && test -s conftest$ac_exeext && { 2487 test "$cross_compiling" = yes || 2488 $as_test_x conftest$ac_exeext 2489 }; then : 2490 ac_retval=0 2491 else 2492 $as_echo "$as_me: failed program was:" >&5 2493 sed 's/^/| /' conftest.$ac_ext >&5 2494 2495 ac_retval=1 2496 fi 2497 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 2498 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 2499 # interfere with the next link command; also delete a directory that is 2500 # left behind by Apple's compiler. We do this before executing the actions. 2501 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2502 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2503 as_fn_set_status $ac_retval 2504 2505 } # ac_fn_cxx_try_link 2506 2507 # ac_fn_cxx_check_func LINENO FUNC VAR 2508 # ------------------------------------ 2509 # Tests whether FUNC exists, setting the cache variable VAR accordingly 2510 ac_fn_cxx_check_func () 2511 { 2512 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2514 $as_echo_n "checking for $2... " >&6; } 2515 if eval \${$3+:} false; then : 2516 $as_echo_n "(cached) " >&6 2517 else 2518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2519 /* end confdefs.h. */ 2520 /* Define $2 to an innocuous variant, in case <limits.h> declares $2. 2521 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 2522 #define $2 innocuous_$2 2523 2524 /* System header to define __stub macros and hopefully few prototypes, 2525 which can conflict with char $2 (); below. 2526 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 2527 <limits.h> exists even on freestanding compilers. */ 2528 2529 #ifdef __STDC__ 2530 # include <limits.h> 2531 #else 2532 # include <assert.h> 2533 #endif 2534 2535 #undef $2 2536 2537 /* Override any GCC internal prototype to avoid an error. 2538 Use char because int might match the return type of a GCC 2539 builtin and then its argument prototype would still apply. */ 2540 #ifdef __cplusplus 2541 extern "C" 2542 #endif 2543 char $2 (); 2544 /* The GNU C library defines this for functions which it implements 2545 to always fail with ENOSYS. Some functions are actually named 2546 something starting with __ and the normal name is an alias. */ 2547 #if defined __stub_$2 || defined __stub___$2 2548 choke me 2549 #endif 2550 2551 int 2552 main () 2553 { 2554 return $2 (); 2555 ; 2556 return 0; 2557 } 2558 _ACEOF 2559 if ac_fn_cxx_try_link "$LINENO"; then : 2560 eval "$3=yes" 2561 else 2562 eval "$3=no" 2563 fi 2564 rm -f core conftest.err conftest.$ac_objext \ 2565 conftest$ac_exeext conftest.$ac_ext 2566 fi 2567 eval ac_res=\$$3 2568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2569 $as_echo "$ac_res" >&6; } 2570 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2571 2572 } # ac_fn_cxx_check_func 2573 2574 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 2575 # ------------------------------------------------------- 2576 # Tests whether HEADER exists and can be compiled using the include files in 2577 # INCLUDES, setting the cache variable VAR accordingly. 2578 ac_fn_c_check_header_compile () 2579 { 2580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2582 $as_echo_n "checking for $2... " >&6; } 2583 if eval \${$3+:} false; then : 2584 $as_echo_n "(cached) " >&6 2585 else 2586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2587 /* end confdefs.h. */ 2588 $4 2589 #include <$2> 2590 _ACEOF 2591 if ac_fn_c_try_compile "$LINENO"; then : 2592 eval "$3=yes" 2593 else 2594 eval "$3=no" 2595 fi 2596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2597 fi 2598 eval ac_res=\$$3 2599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2600 $as_echo "$ac_res" >&6; } 2601 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2602 2603 } # ac_fn_c_check_header_compile 2604 cat >config.log <<_ACEOF 2605 This file contains any messages produced by compilers while 2606 running configure, to aid debugging if configure makes a mistake. 2607 2608 It was created by OpenJDK $as_me jdk8, which was 2609 generated by GNU Autoconf 2.68. Invocation command line was 2610 2611 $ $0 $@ 2612 2613 _ACEOF 2614 exec 5>>config.log 2615 { 2616 cat <<_ASUNAME 2617 ## --------- ## 2618 ## Platform. ## 2619 ## --------- ## 2620 2621 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 2622 uname -m = `(uname -m) 2>/dev/null || echo unknown` 2623 uname -r = `(uname -r) 2>/dev/null || echo unknown` 2624 uname -s = `(uname -s) 2>/dev/null || echo unknown` 2625 uname -v = `(uname -v) 2>/dev/null || echo unknown` 2626 2627 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 2628 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 2629 2630 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 2631 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 2632 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 2633 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 2634 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 2635 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 2636 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 2637 2638 _ASUNAME 2639 2640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2641 for as_dir in $PATH 2642 do 2643 IFS=$as_save_IFS 2644 test -z "$as_dir" && as_dir=. 2645 $as_echo "PATH: $as_dir" 2646 done 2647 IFS=$as_save_IFS 2648 2649 } >&5 2650 2651 cat >&5 <<_ACEOF 2652 2653 2654 ## ----------- ## 2655 ## Core tests. ## 2656 ## ----------- ## 2657 2658 _ACEOF 2659 2660 2661 # Keep a trace of the command line. 2662 # Strip out --no-create and --no-recursion so they do not pile up. 2663 # Strip out --silent because we don't want to record it for future runs. 2664 # Also quote any args containing shell meta-characters. 2665 # Make two passes to allow for proper duplicate-argument suppression. 2666 ac_configure_args= 2667 ac_configure_args0= 2668 ac_configure_args1= 2669 ac_must_keep_next=false 2670 for ac_pass in 1 2 2671 do 2672 for ac_arg 2673 do 2674 case $ac_arg in 2675 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 2676 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2677 | -silent | --silent | --silen | --sile | --sil) 2678 continue ;; 2679 *\'*) 2680 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2681 esac 2682 case $ac_pass in 2683 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2684 2) 2685 as_fn_append ac_configure_args1 " '$ac_arg'" 2686 if test $ac_must_keep_next = true; then 2687 ac_must_keep_next=false # Got value, back to normal. 2688 else 2689 case $ac_arg in 2690 *=* | --config-cache | -C | -disable-* | --disable-* \ 2691 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 2692 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 2693 | -with-* | --with-* | -without-* | --without-* | --x) 2694 case "$ac_configure_args0 " in 2695 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 2696 esac 2697 ;; 2698 -* ) ac_must_keep_next=true ;; 2699 esac 2700 fi 2701 as_fn_append ac_configure_args " '$ac_arg'" 2702 ;; 2703 esac 2704 done 2705 done 2706 { ac_configure_args0=; unset ac_configure_args0;} 2707 { ac_configure_args1=; unset ac_configure_args1;} 2708 2709 # When interrupted or exit'd, cleanup temporary files, and complete 2710 # config.log. We remove comments because anyway the quotes in there 2711 # would cause problems or look ugly. 2712 # WARNING: Use '\'' to represent an apostrophe within the trap. 2713 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 2714 trap 'exit_status=$? 2715 # Save into config.log some information that might help in debugging. 2716 { 2717 echo 2718 2719 $as_echo "## ---------------- ## 2720 ## Cache variables. ## 2721 ## ---------------- ##" 2722 echo 2723 # The following way of writing the cache mishandles newlines in values, 2724 ( 2725 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 2726 eval ac_val=\$$ac_var 2727 case $ac_val in #( 2728 *${as_nl}*) 2729 case $ac_var in #( 2730 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2731 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2732 esac 2733 case $ac_var in #( 2734 _ | IFS | as_nl) ;; #( 2735 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2736 *) { eval $ac_var=; unset $ac_var;} ;; 2737 esac ;; 2738 esac 2739 done 2740 (set) 2>&1 | 2741 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 2742 *${as_nl}ac_space=\ *) 2743 sed -n \ 2744 "s/'\''/'\''\\\\'\'''\''/g; 2745 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 2746 ;; #( 2747 *) 2748 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2749 ;; 2750 esac | 2751 sort 2752 ) 2753 echo 2754 2755 $as_echo "## ----------------- ## 2756 ## Output variables. ## 2757 ## ----------------- ##" 2758 echo 2759 for ac_var in $ac_subst_vars 2760 do 2761 eval ac_val=\$$ac_var 2762 case $ac_val in 2763 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2764 esac 2765 $as_echo "$ac_var='\''$ac_val'\''" 2766 done | sort 2767 echo 2768 2769 if test -n "$ac_subst_files"; then 2770 $as_echo "## ------------------- ## 2771 ## File substitutions. ## 2772 ## ------------------- ##" 2773 echo 2774 for ac_var in $ac_subst_files 2775 do 2776 eval ac_val=\$$ac_var 2777 case $ac_val in 2778 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2779 esac 2780 $as_echo "$ac_var='\''$ac_val'\''" 2781 done | sort 2782 echo 2783 fi 2784 2785 if test -s confdefs.h; then 2786 $as_echo "## ----------- ## 2787 ## confdefs.h. ## 2788 ## ----------- ##" 2789 echo 2790 cat confdefs.h 2791 echo 2792 fi 2793 test "$ac_signal" != 0 && 2794 $as_echo "$as_me: caught signal $ac_signal" 2795 $as_echo "$as_me: exit $exit_status" 2796 } >&5 2797 rm -f core *.core core.conftest.* && 2798 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 2799 exit $exit_status 2800 ' 0 2801 for ac_signal in 1 2 13 15; do 2802 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 2803 done 2804 ac_signal=0 2805 2806 # confdefs.h avoids OS command line length limits that DEFS can exceed. 2807 rm -f -r conftest* confdefs.h 2808 2809 $as_echo "/* confdefs.h */" > confdefs.h 2810 2811 # Predefined preprocessor variables. 2812 2813 cat >>confdefs.h <<_ACEOF 2814 #define PACKAGE_NAME "$PACKAGE_NAME" 2815 _ACEOF 2816 2817 cat >>confdefs.h <<_ACEOF 2818 #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 2819 _ACEOF 2820 2821 cat >>confdefs.h <<_ACEOF 2822 #define PACKAGE_VERSION "$PACKAGE_VERSION" 2823 _ACEOF 2824 2825 cat >>confdefs.h <<_ACEOF 2826 #define PACKAGE_STRING "$PACKAGE_STRING" 2827 _ACEOF 2828 2829 cat >>confdefs.h <<_ACEOF 2830 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 2831 _ACEOF 2832 2833 cat >>confdefs.h <<_ACEOF 2834 #define PACKAGE_URL "$PACKAGE_URL" 2835 _ACEOF 2836 2837 2838 # Let the site file select an alternate cache file if it wants to. 2839 # Prefer an explicitly selected file to automatically selected ones. 2840 ac_site_file1=NONE 2841 ac_site_file2=NONE 2842 if test -n "$CONFIG_SITE"; then 2843 # We do not want a PATH search for config.site. 2844 case $CONFIG_SITE in #(( 2845 -*) ac_site_file1=./$CONFIG_SITE;; 2846 */*) ac_site_file1=$CONFIG_SITE;; 2847 *) ac_site_file1=./$CONFIG_SITE;; 2848 esac 2849 elif test "x$prefix" != xNONE; then 2850 ac_site_file1=$prefix/share/config.site 2851 ac_site_file2=$prefix/etc/config.site 2852 else 2853 ac_site_file1=$ac_default_prefix/share/config.site 2854 ac_site_file2=$ac_default_prefix/etc/config.site 2855 fi 2856 for ac_site_file in "$ac_site_file1" "$ac_site_file2" 2857 do 2858 test "x$ac_site_file" = xNONE && continue 2859 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 2860 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2861 $as_echo "$as_me: loading site script $ac_site_file" >&6;} 2862 sed 's/^/| /' "$ac_site_file" >&5 2863 . "$ac_site_file" \ 2864 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2865 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2866 as_fn_error $? "failed to load site script $ac_site_file 2867 See \`config.log' for more details" "$LINENO" 5; } 2868 fi 2869 done 2870 2871 if test -r "$cache_file"; then 2872 # Some versions of bash will fail to source /dev/null (special files 2873 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 2874 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 2875 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 2876 $as_echo "$as_me: loading cache $cache_file" >&6;} 2877 case $cache_file in 2878 [\\/]* | ?:[\\/]* ) . "$cache_file";; 2879 *) . "./$cache_file";; 2880 esac 2881 fi 2882 else 2883 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 2884 $as_echo "$as_me: creating cache $cache_file" >&6;} 2885 >$cache_file 2886 fi 2887 2888 # Check that the precious variables saved in the cache have kept the same 2889 # value. 2890 ac_cache_corrupted=false 2891 for ac_var in $ac_precious_vars; do 2892 eval ac_old_set=\$ac_cv_env_${ac_var}_set 2893 eval ac_new_set=\$ac_env_${ac_var}_set 2894 eval ac_old_val=\$ac_cv_env_${ac_var}_value 2895 eval ac_new_val=\$ac_env_${ac_var}_value 2896 case $ac_old_set,$ac_new_set in 2897 set,) 2898 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2899 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2900 ac_cache_corrupted=: ;; 2901 ,set) 2902 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 2903 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2904 ac_cache_corrupted=: ;; 2905 ,);; 2906 *) 2907 if test "x$ac_old_val" != "x$ac_new_val"; then 2908 # differences in whitespace do not lead to failure. 2909 ac_old_val_w=`echo x $ac_old_val` 2910 ac_new_val_w=`echo x $ac_new_val` 2911 if test "$ac_old_val_w" != "$ac_new_val_w"; then 2912 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 2913 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2914 ac_cache_corrupted=: 2915 else 2916 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 2917 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 2918 eval $ac_var=\$ac_old_val 2919 fi 2920 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 2921 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 2922 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 2923 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 2924 fi;; 2925 esac 2926 # Pass precious variables to config.status. 2927 if test "$ac_new_set" = set; then 2928 case $ac_new_val in 2929 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2930 *) ac_arg=$ac_var=$ac_new_val ;; 2931 esac 2932 case " $ac_configure_args " in 2933 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2934 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 2935 esac 2936 fi 2937 done 2938 if $ac_cache_corrupted; then 2939 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2940 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2941 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2942 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 2943 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 2944 fi 2945 ## -------------------- ## 2946 ## Main body of script. ## 2947 ## -------------------- ## 2948 2949 ac_ext=c 2950 ac_cpp='$CPP $CPPFLAGS' 2951 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2952 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2953 ac_compiler_gnu=$ac_cv_c_compiler_gnu 2954 2955 2956 2957 ac_aux_dir= 2958 for ac_dir in build-aux "$srcdir"/build-aux; do 2959 if test -f "$ac_dir/install-sh"; then 2960 ac_aux_dir=$ac_dir 2961 ac_install_sh="$ac_aux_dir/install-sh -c" 2962 break 2963 elif test -f "$ac_dir/install.sh"; then 2964 ac_aux_dir=$ac_dir 2965 ac_install_sh="$ac_aux_dir/install.sh -c" 2966 break 2967 elif test -f "$ac_dir/shtool"; then 2968 ac_aux_dir=$ac_dir 2969 ac_install_sh="$ac_aux_dir/shtool install -c" 2970 break 2971 fi 2972 done 2973 if test -z "$ac_aux_dir"; then 2974 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 2975 fi 2976 2977 # These three variables are undocumented and unsupported, 2978 # and are intended to be withdrawn in a future Autoconf release. 2979 # They can cause serious problems if a builder's source tree is in a directory 2980 # whose full name contains unusual characters. 2981 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 2982 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 2983 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 2984 2985 2986 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2987 2988 # 2989 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 2990 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2991 # 2992 # This code is free software; you can redistribute it and/or modify it 2993 # under the terms of the GNU General Public License version 2 only, as 2994 # published by the Free Software Foundation. Oracle designates this 2995 # particular file as subject to the "Classpath" exception as provided 2996 # by Oracle in the LICENSE file that accompanied this code. 2997 # 2998 # This code is distributed in the hope that it will be useful, but WITHOUT 2999 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3000 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3001 # version 2 for more details (a copy is included in the LICENSE file that 3002 # accompanied this code). 3003 # 3004 # You should have received a copy of the GNU General Public License version 3005 # 2 along with this work; if not, write to the Free Software Foundation, 3006 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3007 # 3008 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3009 # or visit www.oracle.com if you need additional information or have any 3010 # questions. 3011 # 3012 3013 # 3014 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 3015 # 3016 # This program is free software; you can redistribute it and/or modify 3017 # it under the terms of the GNU General Public License as published by 3018 # the Free Software Foundation; either version 2 of the License, or 3019 # (at your option) any later version. 3020 # 3021 # This program is distributed in the hope that it will be useful, but 3022 # WITHOUT ANY WARRANTY; without even the implied warranty of 3023 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3024 # General Public License for more details. 3025 # 3026 # You should have received a copy of the GNU General Public License 3027 # along with this program; if not, write to the Free Software 3028 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 3029 # 3030 # As a special exception to the GNU General Public License, if you 3031 # distribute this file as part of a program that contains a 3032 # configuration script generated by Autoconf, you may include it under 3033 # the same distribution terms that you use for the rest of that program. 3034 3035 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) 3036 # ---------------------------------- 3037 # PKG_PROG_PKG_CONFIG 3038 3039 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 3040 # 3041 # Check to see whether a particular set of modules exists. Similar 3042 # to PKG_CHECK_MODULES(), but does not set variables or print errors. 3043 # 3044 # 3045 # Similar to PKG_CHECK_MODULES, make sure that the first instance of 3046 # this or PKG_CHECK_MODULES is called, or make sure to call 3047 # PKG_CHECK_EXISTS manually 3048 # -------------------------------------------------------------- 3049 3050 3051 3052 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 3053 # --------------------------------------------- 3054 # _PKG_CONFIG 3055 3056 # _PKG_SHORT_ERRORS_SUPPORTED 3057 # ----------------------------- 3058 # _PKG_SHORT_ERRORS_SUPPORTED 3059 3060 3061 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 3062 # [ACTION-IF-NOT-FOUND]) 3063 # 3064 # 3065 # Note that if there is a possibility the first call to 3066 # PKG_CHECK_MODULES might not happen, you should be sure to include an 3067 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 3068 # 3069 # 3070 # -------------------------------------------------------------- 3071 # PKG_CHECK_MODULES 3072 3073 3074 # Include these first... 3075 # 3076 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3077 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3078 # 3079 # This code is free software; you can redistribute it and/or modify it 3080 # under the terms of the GNU General Public License version 2 only, as 3081 # published by the Free Software Foundation. Oracle designates this 3082 # particular file as subject to the "Classpath" exception as provided 3083 # by Oracle in the LICENSE file that accompanied this code. 3084 # 3085 # This code is distributed in the hope that it will be useful, but WITHOUT 3086 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3087 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3088 # version 2 for more details (a copy is included in the LICENSE file that 3089 # accompanied this code). 3090 # 3091 # You should have received a copy of the GNU General Public License version 3092 # 2 along with this work; if not, write to the Free Software Foundation, 3093 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3094 # 3095 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3096 # or visit www.oracle.com if you need additional information or have any 3097 # questions. 3098 # 3099 3100 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) 3101 # If so, then append $1 to $2\ 3102 # Also set JVM_ARG_OK to true/false depending on outcome. 3103 3104 3105 # This will make sure the given variable points to a full and proper 3106 # path. This means: 3107 # 1) There will be no spaces in the path. On posix platforms, 3108 # spaces in the path will result in an error. On Windows, 3109 # the path will be rewritten using short-style to be space-free. 3110 # 2) The path will be absolute, and it will be in unix-style (on 3111 # cygwin). 3112 # $1: The name of the variable to fix 3113 3114 3115 # This will make sure the given variable points to a executable 3116 # with a full and proper path. This means: 3117 # 1) There will be no spaces in the path. On posix platforms, 3118 # spaces in the path will result in an error. On Windows, 3119 # the path will be rewritten using short-style to be space-free. 3120 # 2) The path will be absolute, and it will be in unix-style (on 3121 # cygwin). 3122 # Any arguments given to the executable is preserved. 3123 # If the input variable does not have a directory specification, then 3124 # it need to be in the PATH. 3125 # $1: The name of the variable to fix 3126 3127 3128 3129 3130 3131 3132 # Test that variable $1 denoting a program is not empty. If empty, exit with an error. 3133 # $1: variable to check 3134 # $2: executable name to print in warning (optional) 3135 3136 3137 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY. 3138 # Arguments as AC_PATH_PROG: 3139 # $1: variable to set 3140 # $2: executable name to look for 3141 3142 3143 # Setup the most fundamental tools that relies on not much else to set up, 3144 # but is used by much of the early bootstrap code. 3145 3146 3147 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3148 3149 3150 3151 3152 3153 3154 3155 #%%% Simple tools %%% 3156 3157 # Check if we have found a usable version of make 3158 # $1: the path to a potential make binary (or empty) 3159 # $2: the description on how we found this 3160 3161 3162 # Goes looking for a usable version of GNU make. 3163 3164 3165 3166 3167 3168 3169 # Check if build directory is on local disk. If not possible to determine, 3170 # we prefer to claim it's local. 3171 # Argument 1: directory to test 3172 # Argument 2: what to do if it is on local disk 3173 # Argument 3: what to do otherwise (remote disk or failure) 3174 3175 3176 # Check that source files have basic read permissions set. This might 3177 # not be the case in cygwin in certain conditions. 3178 3179 3180 3181 3182 # 3183 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3184 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3185 # 3186 # This code is free software; you can redistribute it and/or modify it 3187 # under the terms of the GNU General Public License version 2 only, as 3188 # published by the Free Software Foundation. Oracle designates this 3189 # particular file as subject to the "Classpath" exception as provided 3190 # by Oracle in the LICENSE file that accompanied this code. 3191 # 3192 # This code is distributed in the hope that it will be useful, but WITHOUT 3193 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3194 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3195 # version 2 for more details (a copy is included in the LICENSE file that 3196 # accompanied this code). 3197 # 3198 # You should have received a copy of the GNU General Public License version 3199 # 2 along with this work; if not, write to the Free Software Foundation, 3200 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3201 # 3202 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3203 # or visit www.oracle.com if you need additional information or have any 3204 # questions. 3205 # 3206 3207 3208 3209 3210 3211 # Helper function which possibly converts a path using DOS-style short mode. 3212 # If so, the updated path is stored in $new_path. 3213 # $1: The path to check 3214 3215 3216 # Helper function which possibly converts a path using DOS-style short mode. 3217 # If so, the updated path is stored in $new_path. 3218 # $1: The path to check 3219 3220 3221 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted 3222 # and could probably be heavily simplified. However, all changes in this 3223 # area tend to need lot of testing in different scenarios, and in lack of 3224 # proper unit testing, cleaning this up has not been deemed worth the effort 3225 # at the moment. 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3236 3237 3238 3239 3240 # 3241 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3242 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3243 # 3244 # This code is free software; you can redistribute it and/or modify it 3245 # under the terms of the GNU General Public License version 2 only, as 3246 # published by the Free Software Foundation. Oracle designates this 3247 # particular file as subject to the "Classpath" exception as provided 3248 # by Oracle in the LICENSE file that accompanied this code. 3249 # 3250 # This code is distributed in the hope that it will be useful, but WITHOUT 3251 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3252 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3253 # version 2 for more details (a copy is included in the LICENSE file that 3254 # accompanied this code). 3255 # 3256 # You should have received a copy of the GNU General Public License version 3257 # 2 along with this work; if not, write to the Free Software Foundation, 3258 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3259 # 3260 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3261 # or visit www.oracle.com if you need additional information or have any 3262 # questions. 3263 # 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 # ... then the rest 3276 # 3277 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3278 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3279 # 3280 # This code is free software; you can redistribute it and/or modify it 3281 # under the terms of the GNU General Public License version 2 only, as 3282 # published by the Free Software Foundation. Oracle designates this 3283 # particular file as subject to the "Classpath" exception as provided 3284 # by Oracle in the LICENSE file that accompanied this code. 3285 # 3286 # This code is distributed in the hope that it will be useful, but WITHOUT 3287 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3288 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3289 # version 2 for more details (a copy is included in the LICENSE file that 3290 # accompanied this code). 3291 # 3292 # You should have received a copy of the GNU General Public License version 3293 # 2 along with this work; if not, write to the Free Software Foundation, 3294 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3295 # 3296 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3297 # or visit www.oracle.com if you need additional information or have any 3298 # questions. 3299 # 3300 3301 # Execute the check given as argument, and verify the result 3302 # If the Boot JDK was previously found, do nothing 3303 # $1 A command line (typically autoconf macro) to execute 3304 3305 3306 # Test: Is bootjdk explicitely set by command line arguments? 3307 3308 3309 # Test: Is bootjdk available from builddeps? 3310 3311 3312 # Test: Is $JAVA_HOME set? 3313 3314 3315 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK? 3316 3317 3318 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) 3319 3320 3321 # Look for a jdk in the given path. If there are multiple, try to select the newest. 3322 # If found, set BOOT_JDK and BOOT_JDK_FOUND. 3323 # $1 = Path to directory containing jdk installations. 3324 # $2 = String to append to the found JDK directory to get the proper JDK home 3325 3326 3327 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given 3328 # environmental variable as base for where to look. 3329 # $1 Name of an environmal variable, assumed to point to the Program Files directory. 3330 3331 3332 # Test: Is there a JDK installed in default, well-known locations? 3333 3334 3335 # Check that a command-line tool in the Boot JDK is correct 3336 # $1 = name of variable to assign 3337 # $2 = name of binary 3338 3339 3340 ############################################################################### 3341 # 3342 # We need a Boot JDK to bootstrap the build. 3343 # 3344 3345 3346 3347 3348 3349 # 3350 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3351 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3352 # 3353 # This code is free software; you can redistribute it and/or modify it 3354 # under the terms of the GNU General Public License version 2 only, as 3355 # published by the Free Software Foundation. Oracle designates this 3356 # particular file as subject to the "Classpath" exception as provided 3357 # by Oracle in the LICENSE file that accompanied this code. 3358 # 3359 # This code is distributed in the hope that it will be useful, but WITHOUT 3360 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3361 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3362 # version 2 for more details (a copy is included in the LICENSE file that 3363 # accompanied this code). 3364 # 3365 # You should have received a copy of the GNU General Public License version 3366 # 2 along with this work; if not, write to the Free Software Foundation, 3367 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3368 # 3369 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3370 # or visit www.oracle.com if you need additional information or have any 3371 # questions. 3372 # 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 # 3394 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3395 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3396 # 3397 # This code is free software; you can redistribute it and/or modify it 3398 # under the terms of the GNU General Public License version 2 only, as 3399 # published by the Free Software Foundation. Oracle designates this 3400 # particular file as subject to the "Classpath" exception as provided 3401 # by Oracle in the LICENSE file that accompanied this code. 3402 # 3403 # This code is distributed in the hope that it will be useful, but WITHOUT 3404 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3405 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3406 # version 2 for more details (a copy is included in the LICENSE file that 3407 # accompanied this code). 3408 # 3409 # You should have received a copy of the GNU General Public License version 3410 # 2 along with this work; if not, write to the Free Software Foundation, 3411 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3412 # 3413 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3414 # or visit www.oracle.com if you need additional information or have any 3415 # questions. 3416 # 3417 3418 3419 3420 3421 3422 cygwin_help() { 3423 case $1 in 3424 unzip) 3425 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;; 3426 zip) 3427 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;; 3428 make) 3429 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;; 3430 * ) 3431 break ;; 3432 esac 3433 } 3434 3435 apt_help() { 3436 case $1 in 3437 devkit) 3438 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; 3439 openjdk) 3440 PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; 3441 alsa) 3442 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; 3443 cups) 3444 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; 3445 freetype2) 3446 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; 3447 pulse) 3448 PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; 3449 x11) 3450 PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;; 3451 ccache) 3452 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; 3453 * ) 3454 break ;; 3455 esac 3456 } 3457 3458 yum_help() { 3459 case $1 in 3460 devkit) 3461 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; 3462 openjdk) 3463 PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; 3464 alsa) 3465 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; 3466 cups) 3467 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; 3468 freetype2) 3469 PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;; 3470 pulse) 3471 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; 3472 x11) 3473 PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;; 3474 ccache) 3475 PKGHANDLER_COMMAND="sudo yum install ccache" ;; 3476 * ) 3477 break ;; 3478 esac 3479 } 3480 3481 port_help() { 3482 PKGHANDLER_COMMAND="" 3483 } 3484 3485 pkgutil_help() { 3486 PKGHANDLER_COMMAND="" 3487 } 3488 3489 pkgadd_help() { 3490 PKGHANDLER_COMMAND="" 3491 } 3492 3493 3494 3495 # 3496 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3497 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3498 # 3499 # This code is free software; you can redistribute it and/or modify it 3500 # under the terms of the GNU General Public License version 2 only, as 3501 # published by the Free Software Foundation. Oracle designates this 3502 # particular file as subject to the "Classpath" exception as provided 3503 # by Oracle in the LICENSE file that accompanied this code. 3504 # 3505 # This code is distributed in the hope that it will be useful, but WITHOUT 3506 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3507 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3508 # version 2 for more details (a copy is included in the LICENSE file that 3509 # accompanied this code). 3510 # 3511 # You should have received a copy of the GNU General Public License version 3512 # 2 along with this work; if not, write to the Free Software Foundation, 3513 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3514 # 3515 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3516 # or visit www.oracle.com if you need additional information or have any 3517 # questions. 3518 # 3519 3520 3521 3522 3523 3524 3525 3526 3527 ############################################################################### 3528 # 3529 # Should we build only OpenJDK even if closed sources are present? 3530 # 3531 3532 3533 3534 3535 ############################################################################### 3536 # 3537 # Setup version numbers 3538 # 3539 3540 3541 3542 3543 3544 3545 # Support for customization of the build process. Some build files 3546 # will include counterparts from this location, if they exist. This allows 3547 # for a degree of customization of the build targets and the rules/recipes 3548 # to create them 3549 3550 # Check whether --with-custom-make-dir was given. 3551 if test "${with_custom_make_dir+set}" = set; then : 3552 withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir 3553 fi 3554 3555 3556 3557 # 3558 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3559 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3560 # 3561 # This code is free software; you can redistribute it and/or modify it 3562 # under the terms of the GNU General Public License version 2 only, as 3563 # published by the Free Software Foundation. Oracle designates this 3564 # particular file as subject to the "Classpath" exception as provided 3565 # by Oracle in the LICENSE file that accompanied this code. 3566 # 3567 # This code is distributed in the hope that it will be useful, but WITHOUT 3568 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3569 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3570 # version 2 for more details (a copy is included in the LICENSE file that 3571 # accompanied this code). 3572 # 3573 # You should have received a copy of the GNU General Public License version 3574 # 2 along with this work; if not, write to the Free Software Foundation, 3575 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3576 # 3577 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3578 # or visit www.oracle.com if you need additional information or have any 3579 # questions. 3580 # 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 # 3599 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3600 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3601 # 3602 # This code is free software; you can redistribute it and/or modify it 3603 # under the terms of the GNU General Public License version 2 only, as 3604 # published by the Free Software Foundation. Oracle designates this 3605 # particular file as subject to the "Classpath" exception as provided 3606 # by Oracle in the LICENSE file that accompanied this code. 3607 # 3608 # This code is distributed in the hope that it will be useful, but WITHOUT 3609 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3610 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3611 # version 2 for more details (a copy is included in the LICENSE file that 3612 # accompanied this code). 3613 # 3614 # You should have received a copy of the GNU General Public License version 3615 # 2 along with this work; if not, write to the Free Software Foundation, 3616 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3617 # 3618 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3619 # or visit www.oracle.com if you need additional information or have any 3620 # questions. 3621 # 3622 3623 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3624 # Converts autoconf style CPU name to OpenJDK style, into 3625 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. 3626 3627 3628 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3629 # Converts autoconf style OS name to OpenJDK style, into 3630 # VAR_OS and VAR_OS_API. 3631 3632 3633 # Expects $host_os $host_cpu $build_os and $build_cpu 3634 # and $with_target_bits to have been setup! 3635 # 3636 # Translate the standard triplet(quadruplet) definition 3637 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU, 3638 # OPENJDK_BUILD_OS, etc. 3639 3640 3641 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour 3642 # accordingly. Must be done after setting up build and target system, but before 3643 # doing anything else with these values. 3644 3645 3646 # Setup the legacy variables, for controlling the old makefiles. 3647 # 3648 3649 3650 3651 3652 #%%% Build and target systems %%% 3653 3654 3655 3656 3657 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS. 3658 # Add -mX to various FLAGS variables. 3659 3660 3661 3662 3663 3664 3665 # 3666 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3667 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3668 # 3669 # This code is free software; you can redistribute it and/or modify it 3670 # under the terms of the GNU General Public License version 2 only, as 3671 # published by the Free Software Foundation. Oracle designates this 3672 # particular file as subject to the "Classpath" exception as provided 3673 # by Oracle in the LICENSE file that accompanied this code. 3674 # 3675 # This code is distributed in the hope that it will be useful, but WITHOUT 3676 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3677 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3678 # version 2 for more details (a copy is included in the LICENSE file that 3679 # accompanied this code). 3680 # 3681 # You should have received a copy of the GNU General Public License version 3682 # 2 along with this work; if not, write to the Free Software Foundation, 3683 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3684 # 3685 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3686 # or visit www.oracle.com if you need additional information or have any 3687 # questions. 3688 # 3689 3690 3691 3692 3693 3694 3695 3696 3697 # 3698 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3699 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3700 # 3701 # This code is free software; you can redistribute it and/or modify it 3702 # under the terms of the GNU General Public License version 2 only, as 3703 # published by the Free Software Foundation. Oracle designates this 3704 # particular file as subject to the "Classpath" exception as provided 3705 # by Oracle in the LICENSE file that accompanied this code. 3706 # 3707 # This code is distributed in the hope that it will be useful, but WITHOUT 3708 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3709 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3710 # version 2 for more details (a copy is included in the LICENSE file that 3711 # accompanied this code). 3712 # 3713 # You should have received a copy of the GNU General Public License version 3714 # 2 along with this work; if not, write to the Free Software Foundation, 3715 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3716 # 3717 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3718 # or visit www.oracle.com if you need additional information or have any 3719 # questions. 3720 # 3721 3722 # $1 = compiler to test (CC or CXX) 3723 # $2 = human readable name of compiler (C or C++) 3724 3725 3726 3727 3728 3729 # $1 = compiler to test (CC or CXX) 3730 # $2 = human readable name of compiler (C or C++) 3731 # $3 = list of compiler names to search for 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE], 3746 # [RUN-IF-FALSE]) 3747 # ------------------------------------------------------------ 3748 # Check that the c and c++ compilers support an argument 3749 3750 3751 3752 3753 # Setup the JTREG paths 3754 3755 3756 # 3757 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3758 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3759 # 3760 # This code is free software; you can redistribute it and/or modify it 3761 # under the terms of the GNU General Public License version 2 only, as 3762 # published by the Free Software Foundation. Oracle designates this 3763 # particular file as subject to the "Classpath" exception as provided 3764 # by Oracle in the LICENSE file that accompanied this code. 3765 # 3766 # This code is distributed in the hope that it will be useful, but WITHOUT 3767 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3768 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3769 # version 2 for more details (a copy is included in the LICENSE file that 3770 # accompanied this code). 3771 # 3772 # You should have received a copy of the GNU General Public License version 3773 # 2 along with this work; if not, write to the Free Software Foundation, 3774 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3775 # 3776 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3777 # or visit www.oracle.com if you need additional information or have any 3778 # questions. 3779 # 3780 3781 3782 3783 3784 3785 3786 3787 # Check if the VS env variables were setup prior to running configure. 3788 # If not, then find vcvarsall.bat and run it automatically, and integrate 3789 # the set env variables into the spec file. 3790 3791 3792 3793 # Setup the DXSDK paths 3794 3795 3796 3797 3798 3799 3800 # This line needs to be here, verbatim, after all includes and the dummy hook 3801 # definitions. It is replaced with custom functionality when building 3802 # custom sources. 3803 #CUSTOM_AUTOCONF_INCLUDE 3804 3805 # Do not change or remove the following line, it is needed for consistency checks: 3806 DATE_WHEN_GENERATED=1371547824 3807 3808 ############################################################################### 3809 # 3810 # Initialization / Boot-strapping 3811 # 3812 # The bootstrapping process needs to solve the "chicken or the egg" problem, 3813 # thus it jumps back and forth, each time gaining something needed later on. 3814 # 3815 ############################################################################### 3816 3817 # Basic initialization that must happen first of all 3818 3819 # Save the original command line. This is passed to us by the wrapper configure script. 3820 3821 DATE_WHEN_CONFIGURED=`LANG=C date` 3822 3823 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5 3824 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;} 3825 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5 3826 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;} 3827 3828 3829 3830 # Start with tools that do not need have cross compilation support 3831 # and can be expected to be found in the default PATH. These tools are 3832 # used by configure. Nor are these tools expected to be found in the 3833 # devkit from the builddeps server either, since they are 3834 # needed to download the devkit. 3835 3836 # First are all the simple required tools. 3837 3838 for ac_prog in basename 3839 do 3840 # Extract the first word of "$ac_prog", so it can be a program name with args. 3841 set dummy $ac_prog; ac_word=$2 3842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3843 $as_echo_n "checking for $ac_word... " >&6; } 3844 if ${ac_cv_path_BASENAME+:} false; then : 3845 $as_echo_n "(cached) " >&6 3846 else 3847 case $BASENAME in 3848 [\\/]* | ?:[\\/]*) 3849 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path. 3850 ;; 3851 *) 3852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3853 for as_dir in $PATH 3854 do 3855 IFS=$as_save_IFS 3856 test -z "$as_dir" && as_dir=. 3857 for ac_exec_ext in '' $ac_executable_extensions; do 3858 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3859 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext" 3860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3861 break 2 3862 fi 3863 done 3864 done 3865 IFS=$as_save_IFS 3866 3867 ;; 3868 esac 3869 fi 3870 BASENAME=$ac_cv_path_BASENAME 3871 if test -n "$BASENAME"; then 3872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 3873 $as_echo "$BASENAME" >&6; } 3874 else 3875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3876 $as_echo "no" >&6; } 3877 fi 3878 3879 3880 test -n "$BASENAME" && break 3881 done 3882 3883 3884 if test "x$BASENAME" = x; then 3885 if test "xbasename" = x; then 3886 PROG_NAME=basename 3887 else 3888 PROG_NAME=basename 3889 fi 3890 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3891 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3892 as_fn_error $? "Cannot continue" "$LINENO" 5 3893 fi 3894 3895 3896 3897 for ac_prog in bash 3898 do 3899 # Extract the first word of "$ac_prog", so it can be a program name with args. 3900 set dummy $ac_prog; ac_word=$2 3901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3902 $as_echo_n "checking for $ac_word... " >&6; } 3903 if ${ac_cv_path_BASH+:} false; then : 3904 $as_echo_n "(cached) " >&6 3905 else 3906 case $BASH in 3907 [\\/]* | ?:[\\/]*) 3908 ac_cv_path_BASH="$BASH" # Let the user override the test with a path. 3909 ;; 3910 *) 3911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3912 for as_dir in $PATH 3913 do 3914 IFS=$as_save_IFS 3915 test -z "$as_dir" && as_dir=. 3916 for ac_exec_ext in '' $ac_executable_extensions; do 3917 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3918 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" 3919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3920 break 2 3921 fi 3922 done 3923 done 3924 IFS=$as_save_IFS 3925 3926 ;; 3927 esac 3928 fi 3929 BASH=$ac_cv_path_BASH 3930 if test -n "$BASH"; then 3931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 3932 $as_echo "$BASH" >&6; } 3933 else 3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3935 $as_echo "no" >&6; } 3936 fi 3937 3938 3939 test -n "$BASH" && break 3940 done 3941 3942 3943 if test "x$BASH" = x; then 3944 if test "xbash" = x; then 3945 PROG_NAME=bash 3946 else 3947 PROG_NAME=bash 3948 fi 3949 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3950 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3951 as_fn_error $? "Cannot continue" "$LINENO" 5 3952 fi 3953 3954 3955 3956 for ac_prog in cat 3957 do 3958 # Extract the first word of "$ac_prog", so it can be a program name with args. 3959 set dummy $ac_prog; ac_word=$2 3960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3961 $as_echo_n "checking for $ac_word... " >&6; } 3962 if ${ac_cv_path_CAT+:} false; then : 3963 $as_echo_n "(cached) " >&6 3964 else 3965 case $CAT in 3966 [\\/]* | ?:[\\/]*) 3967 ac_cv_path_CAT="$CAT" # Let the user override the test with a path. 3968 ;; 3969 *) 3970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3971 for as_dir in $PATH 3972 do 3973 IFS=$as_save_IFS 3974 test -z "$as_dir" && as_dir=. 3975 for ac_exec_ext in '' $ac_executable_extensions; do 3976 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3977 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" 3978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3979 break 2 3980 fi 3981 done 3982 done 3983 IFS=$as_save_IFS 3984 3985 ;; 3986 esac 3987 fi 3988 CAT=$ac_cv_path_CAT 3989 if test -n "$CAT"; then 3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5 3991 $as_echo "$CAT" >&6; } 3992 else 3993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3994 $as_echo "no" >&6; } 3995 fi 3996 3997 3998 test -n "$CAT" && break 3999 done 4000 4001 4002 if test "x$CAT" = x; then 4003 if test "xcat" = x; then 4004 PROG_NAME=cat 4005 else 4006 PROG_NAME=cat 4007 fi 4008 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4009 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4010 as_fn_error $? "Cannot continue" "$LINENO" 5 4011 fi 4012 4013 4014 4015 for ac_prog in chmod 4016 do 4017 # Extract the first word of "$ac_prog", so it can be a program name with args. 4018 set dummy $ac_prog; ac_word=$2 4019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4020 $as_echo_n "checking for $ac_word... " >&6; } 4021 if ${ac_cv_path_CHMOD+:} false; then : 4022 $as_echo_n "(cached) " >&6 4023 else 4024 case $CHMOD in 4025 [\\/]* | ?:[\\/]*) 4026 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. 4027 ;; 4028 *) 4029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4030 for as_dir in $PATH 4031 do 4032 IFS=$as_save_IFS 4033 test -z "$as_dir" && as_dir=. 4034 for ac_exec_ext in '' $ac_executable_extensions; do 4035 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4036 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext" 4037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4038 break 2 4039 fi 4040 done 4041 done 4042 IFS=$as_save_IFS 4043 4044 ;; 4045 esac 4046 fi 4047 CHMOD=$ac_cv_path_CHMOD 4048 if test -n "$CHMOD"; then 4049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5 4050 $as_echo "$CHMOD" >&6; } 4051 else 4052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4053 $as_echo "no" >&6; } 4054 fi 4055 4056 4057 test -n "$CHMOD" && break 4058 done 4059 4060 4061 if test "x$CHMOD" = x; then 4062 if test "xchmod" = x; then 4063 PROG_NAME=chmod 4064 else 4065 PROG_NAME=chmod 4066 fi 4067 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4068 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4069 as_fn_error $? "Cannot continue" "$LINENO" 5 4070 fi 4071 4072 4073 4074 for ac_prog in cmp 4075 do 4076 # Extract the first word of "$ac_prog", so it can be a program name with args. 4077 set dummy $ac_prog; ac_word=$2 4078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4079 $as_echo_n "checking for $ac_word... " >&6; } 4080 if ${ac_cv_path_CMP+:} false; then : 4081 $as_echo_n "(cached) " >&6 4082 else 4083 case $CMP in 4084 [\\/]* | ?:[\\/]*) 4085 ac_cv_path_CMP="$CMP" # Let the user override the test with a path. 4086 ;; 4087 *) 4088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4089 for as_dir in $PATH 4090 do 4091 IFS=$as_save_IFS 4092 test -z "$as_dir" && as_dir=. 4093 for ac_exec_ext in '' $ac_executable_extensions; do 4094 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4095 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" 4096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4097 break 2 4098 fi 4099 done 4100 done 4101 IFS=$as_save_IFS 4102 4103 ;; 4104 esac 4105 fi 4106 CMP=$ac_cv_path_CMP 4107 if test -n "$CMP"; then 4108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5 4109 $as_echo "$CMP" >&6; } 4110 else 4111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4112 $as_echo "no" >&6; } 4113 fi 4114 4115 4116 test -n "$CMP" && break 4117 done 4118 4119 4120 if test "x$CMP" = x; then 4121 if test "xcmp" = x; then 4122 PROG_NAME=cmp 4123 else 4124 PROG_NAME=cmp 4125 fi 4126 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4127 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4128 as_fn_error $? "Cannot continue" "$LINENO" 5 4129 fi 4130 4131 4132 4133 for ac_prog in comm 4134 do 4135 # Extract the first word of "$ac_prog", so it can be a program name with args. 4136 set dummy $ac_prog; ac_word=$2 4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4138 $as_echo_n "checking for $ac_word... " >&6; } 4139 if ${ac_cv_path_COMM+:} false; then : 4140 $as_echo_n "(cached) " >&6 4141 else 4142 case $COMM in 4143 [\\/]* | ?:[\\/]*) 4144 ac_cv_path_COMM="$COMM" # Let the user override the test with a path. 4145 ;; 4146 *) 4147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4148 for as_dir in $PATH 4149 do 4150 IFS=$as_save_IFS 4151 test -z "$as_dir" && as_dir=. 4152 for ac_exec_ext in '' $ac_executable_extensions; do 4153 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4154 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext" 4155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4156 break 2 4157 fi 4158 done 4159 done 4160 IFS=$as_save_IFS 4161 4162 ;; 4163 esac 4164 fi 4165 COMM=$ac_cv_path_COMM 4166 if test -n "$COMM"; then 4167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5 4168 $as_echo "$COMM" >&6; } 4169 else 4170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4171 $as_echo "no" >&6; } 4172 fi 4173 4174 4175 test -n "$COMM" && break 4176 done 4177 4178 4179 if test "x$COMM" = x; then 4180 if test "xcomm" = x; then 4181 PROG_NAME=comm 4182 else 4183 PROG_NAME=comm 4184 fi 4185 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4186 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4187 as_fn_error $? "Cannot continue" "$LINENO" 5 4188 fi 4189 4190 4191 4192 for ac_prog in cp 4193 do 4194 # Extract the first word of "$ac_prog", so it can be a program name with args. 4195 set dummy $ac_prog; ac_word=$2 4196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4197 $as_echo_n "checking for $ac_word... " >&6; } 4198 if ${ac_cv_path_CP+:} false; then : 4199 $as_echo_n "(cached) " >&6 4200 else 4201 case $CP in 4202 [\\/]* | ?:[\\/]*) 4203 ac_cv_path_CP="$CP" # Let the user override the test with a path. 4204 ;; 4205 *) 4206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4207 for as_dir in $PATH 4208 do 4209 IFS=$as_save_IFS 4210 test -z "$as_dir" && as_dir=. 4211 for ac_exec_ext in '' $ac_executable_extensions; do 4212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4213 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" 4214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4215 break 2 4216 fi 4217 done 4218 done 4219 IFS=$as_save_IFS 4220 4221 ;; 4222 esac 4223 fi 4224 CP=$ac_cv_path_CP 4225 if test -n "$CP"; then 4226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 4227 $as_echo "$CP" >&6; } 4228 else 4229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4230 $as_echo "no" >&6; } 4231 fi 4232 4233 4234 test -n "$CP" && break 4235 done 4236 4237 4238 if test "x$CP" = x; then 4239 if test "xcp" = x; then 4240 PROG_NAME=cp 4241 else 4242 PROG_NAME=cp 4243 fi 4244 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4245 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4246 as_fn_error $? "Cannot continue" "$LINENO" 5 4247 fi 4248 4249 4250 4251 for ac_prog in cpio 4252 do 4253 # Extract the first word of "$ac_prog", so it can be a program name with args. 4254 set dummy $ac_prog; ac_word=$2 4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4256 $as_echo_n "checking for $ac_word... " >&6; } 4257 if ${ac_cv_path_CPIO+:} false; then : 4258 $as_echo_n "(cached) " >&6 4259 else 4260 case $CPIO in 4261 [\\/]* | ?:[\\/]*) 4262 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path. 4263 ;; 4264 *) 4265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4266 for as_dir in $PATH 4267 do 4268 IFS=$as_save_IFS 4269 test -z "$as_dir" && as_dir=. 4270 for ac_exec_ext in '' $ac_executable_extensions; do 4271 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4272 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext" 4273 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4274 break 2 4275 fi 4276 done 4277 done 4278 IFS=$as_save_IFS 4279 4280 ;; 4281 esac 4282 fi 4283 CPIO=$ac_cv_path_CPIO 4284 if test -n "$CPIO"; then 4285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5 4286 $as_echo "$CPIO" >&6; } 4287 else 4288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4289 $as_echo "no" >&6; } 4290 fi 4291 4292 4293 test -n "$CPIO" && break 4294 done 4295 4296 4297 if test "x$CPIO" = x; then 4298 if test "xcpio" = x; then 4299 PROG_NAME=cpio 4300 else 4301 PROG_NAME=cpio 4302 fi 4303 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4304 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4305 as_fn_error $? "Cannot continue" "$LINENO" 5 4306 fi 4307 4308 4309 4310 for ac_prog in cut 4311 do 4312 # Extract the first word of "$ac_prog", so it can be a program name with args. 4313 set dummy $ac_prog; ac_word=$2 4314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4315 $as_echo_n "checking for $ac_word... " >&6; } 4316 if ${ac_cv_path_CUT+:} false; then : 4317 $as_echo_n "(cached) " >&6 4318 else 4319 case $CUT in 4320 [\\/]* | ?:[\\/]*) 4321 ac_cv_path_CUT="$CUT" # Let the user override the test with a path. 4322 ;; 4323 *) 4324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4325 for as_dir in $PATH 4326 do 4327 IFS=$as_save_IFS 4328 test -z "$as_dir" && as_dir=. 4329 for ac_exec_ext in '' $ac_executable_extensions; do 4330 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4331 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext" 4332 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4333 break 2 4334 fi 4335 done 4336 done 4337 IFS=$as_save_IFS 4338 4339 ;; 4340 esac 4341 fi 4342 CUT=$ac_cv_path_CUT 4343 if test -n "$CUT"; then 4344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5 4345 $as_echo "$CUT" >&6; } 4346 else 4347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4348 $as_echo "no" >&6; } 4349 fi 4350 4351 4352 test -n "$CUT" && break 4353 done 4354 4355 4356 if test "x$CUT" = x; then 4357 if test "xcut" = x; then 4358 PROG_NAME=cut 4359 else 4360 PROG_NAME=cut 4361 fi 4362 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4363 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4364 as_fn_error $? "Cannot continue" "$LINENO" 5 4365 fi 4366 4367 4368 4369 for ac_prog in date 4370 do 4371 # Extract the first word of "$ac_prog", so it can be a program name with args. 4372 set dummy $ac_prog; ac_word=$2 4373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4374 $as_echo_n "checking for $ac_word... " >&6; } 4375 if ${ac_cv_path_DATE+:} false; then : 4376 $as_echo_n "(cached) " >&6 4377 else 4378 case $DATE in 4379 [\\/]* | ?:[\\/]*) 4380 ac_cv_path_DATE="$DATE" # Let the user override the test with a path. 4381 ;; 4382 *) 4383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4384 for as_dir in $PATH 4385 do 4386 IFS=$as_save_IFS 4387 test -z "$as_dir" && as_dir=. 4388 for ac_exec_ext in '' $ac_executable_extensions; do 4389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4390 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext" 4391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4392 break 2 4393 fi 4394 done 4395 done 4396 IFS=$as_save_IFS 4397 4398 ;; 4399 esac 4400 fi 4401 DATE=$ac_cv_path_DATE 4402 if test -n "$DATE"; then 4403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5 4404 $as_echo "$DATE" >&6; } 4405 else 4406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4407 $as_echo "no" >&6; } 4408 fi 4409 4410 4411 test -n "$DATE" && break 4412 done 4413 4414 4415 if test "x$DATE" = x; then 4416 if test "xdate" = x; then 4417 PROG_NAME=date 4418 else 4419 PROG_NAME=date 4420 fi 4421 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4422 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4423 as_fn_error $? "Cannot continue" "$LINENO" 5 4424 fi 4425 4426 4427 4428 for ac_prog in gdiff diff 4429 do 4430 # Extract the first word of "$ac_prog", so it can be a program name with args. 4431 set dummy $ac_prog; ac_word=$2 4432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4433 $as_echo_n "checking for $ac_word... " >&6; } 4434 if ${ac_cv_path_DIFF+:} false; then : 4435 $as_echo_n "(cached) " >&6 4436 else 4437 case $DIFF in 4438 [\\/]* | ?:[\\/]*) 4439 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. 4440 ;; 4441 *) 4442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4443 for as_dir in $PATH 4444 do 4445 IFS=$as_save_IFS 4446 test -z "$as_dir" && as_dir=. 4447 for ac_exec_ext in '' $ac_executable_extensions; do 4448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4449 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" 4450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4451 break 2 4452 fi 4453 done 4454 done 4455 IFS=$as_save_IFS 4456 4457 ;; 4458 esac 4459 fi 4460 DIFF=$ac_cv_path_DIFF 4461 if test -n "$DIFF"; then 4462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 4463 $as_echo "$DIFF" >&6; } 4464 else 4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4466 $as_echo "no" >&6; } 4467 fi 4468 4469 4470 test -n "$DIFF" && break 4471 done 4472 4473 4474 if test "x$DIFF" = x; then 4475 if test "xgdiff diff" = x; then 4476 PROG_NAME=diff 4477 else 4478 PROG_NAME=gdiff diff 4479 fi 4480 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4481 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4482 as_fn_error $? "Cannot continue" "$LINENO" 5 4483 fi 4484 4485 4486 4487 for ac_prog in dirname 4488 do 4489 # Extract the first word of "$ac_prog", so it can be a program name with args. 4490 set dummy $ac_prog; ac_word=$2 4491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4492 $as_echo_n "checking for $ac_word... " >&6; } 4493 if ${ac_cv_path_DIRNAME+:} false; then : 4494 $as_echo_n "(cached) " >&6 4495 else 4496 case $DIRNAME in 4497 [\\/]* | ?:[\\/]*) 4498 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path. 4499 ;; 4500 *) 4501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4502 for as_dir in $PATH 4503 do 4504 IFS=$as_save_IFS 4505 test -z "$as_dir" && as_dir=. 4506 for ac_exec_ext in '' $ac_executable_extensions; do 4507 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4508 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext" 4509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4510 break 2 4511 fi 4512 done 4513 done 4514 IFS=$as_save_IFS 4515 4516 ;; 4517 esac 4518 fi 4519 DIRNAME=$ac_cv_path_DIRNAME 4520 if test -n "$DIRNAME"; then 4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5 4522 $as_echo "$DIRNAME" >&6; } 4523 else 4524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4525 $as_echo "no" >&6; } 4526 fi 4527 4528 4529 test -n "$DIRNAME" && break 4530 done 4531 4532 4533 if test "x$DIRNAME" = x; then 4534 if test "xdirname" = x; then 4535 PROG_NAME=dirname 4536 else 4537 PROG_NAME=dirname 4538 fi 4539 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4540 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4541 as_fn_error $? "Cannot continue" "$LINENO" 5 4542 fi 4543 4544 4545 4546 for ac_prog in echo 4547 do 4548 # Extract the first word of "$ac_prog", so it can be a program name with args. 4549 set dummy $ac_prog; ac_word=$2 4550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4551 $as_echo_n "checking for $ac_word... " >&6; } 4552 if ${ac_cv_path_ECHO+:} false; then : 4553 $as_echo_n "(cached) " >&6 4554 else 4555 case $ECHO in 4556 [\\/]* | ?:[\\/]*) 4557 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path. 4558 ;; 4559 *) 4560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4561 for as_dir in $PATH 4562 do 4563 IFS=$as_save_IFS 4564 test -z "$as_dir" && as_dir=. 4565 for ac_exec_ext in '' $ac_executable_extensions; do 4566 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4567 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" 4568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4569 break 2 4570 fi 4571 done 4572 done 4573 IFS=$as_save_IFS 4574 4575 ;; 4576 esac 4577 fi 4578 ECHO=$ac_cv_path_ECHO 4579 if test -n "$ECHO"; then 4580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5 4581 $as_echo "$ECHO" >&6; } 4582 else 4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4584 $as_echo "no" >&6; } 4585 fi 4586 4587 4588 test -n "$ECHO" && break 4589 done 4590 4591 4592 if test "x$ECHO" = x; then 4593 if test "xecho" = x; then 4594 PROG_NAME=echo 4595 else 4596 PROG_NAME=echo 4597 fi 4598 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4599 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4600 as_fn_error $? "Cannot continue" "$LINENO" 5 4601 fi 4602 4603 4604 4605 for ac_prog in expr 4606 do 4607 # Extract the first word of "$ac_prog", so it can be a program name with args. 4608 set dummy $ac_prog; ac_word=$2 4609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4610 $as_echo_n "checking for $ac_word... " >&6; } 4611 if ${ac_cv_path_EXPR+:} false; then : 4612 $as_echo_n "(cached) " >&6 4613 else 4614 case $EXPR in 4615 [\\/]* | ?:[\\/]*) 4616 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path. 4617 ;; 4618 *) 4619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4620 for as_dir in $PATH 4621 do 4622 IFS=$as_save_IFS 4623 test -z "$as_dir" && as_dir=. 4624 for ac_exec_ext in '' $ac_executable_extensions; do 4625 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4626 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext" 4627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4628 break 2 4629 fi 4630 done 4631 done 4632 IFS=$as_save_IFS 4633 4634 ;; 4635 esac 4636 fi 4637 EXPR=$ac_cv_path_EXPR 4638 if test -n "$EXPR"; then 4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5 4640 $as_echo "$EXPR" >&6; } 4641 else 4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4643 $as_echo "no" >&6; } 4644 fi 4645 4646 4647 test -n "$EXPR" && break 4648 done 4649 4650 4651 if test "x$EXPR" = x; then 4652 if test "xexpr" = x; then 4653 PROG_NAME=expr 4654 else 4655 PROG_NAME=expr 4656 fi 4657 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4658 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4659 as_fn_error $? "Cannot continue" "$LINENO" 5 4660 fi 4661 4662 4663 4664 for ac_prog in file 4665 do 4666 # Extract the first word of "$ac_prog", so it can be a program name with args. 4667 set dummy $ac_prog; ac_word=$2 4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4669 $as_echo_n "checking for $ac_word... " >&6; } 4670 if ${ac_cv_path_FILE+:} false; then : 4671 $as_echo_n "(cached) " >&6 4672 else 4673 case $FILE in 4674 [\\/]* | ?:[\\/]*) 4675 ac_cv_path_FILE="$FILE" # Let the user override the test with a path. 4676 ;; 4677 *) 4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4679 for as_dir in $PATH 4680 do 4681 IFS=$as_save_IFS 4682 test -z "$as_dir" && as_dir=. 4683 for ac_exec_ext in '' $ac_executable_extensions; do 4684 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4685 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext" 4686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4687 break 2 4688 fi 4689 done 4690 done 4691 IFS=$as_save_IFS 4692 4693 ;; 4694 esac 4695 fi 4696 FILE=$ac_cv_path_FILE 4697 if test -n "$FILE"; then 4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5 4699 $as_echo "$FILE" >&6; } 4700 else 4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4702 $as_echo "no" >&6; } 4703 fi 4704 4705 4706 test -n "$FILE" && break 4707 done 4708 4709 4710 if test "x$FILE" = x; then 4711 if test "xfile" = x; then 4712 PROG_NAME=file 4713 else 4714 PROG_NAME=file 4715 fi 4716 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4717 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4718 as_fn_error $? "Cannot continue" "$LINENO" 5 4719 fi 4720 4721 4722 4723 for ac_prog in find 4724 do 4725 # Extract the first word of "$ac_prog", so it can be a program name with args. 4726 set dummy $ac_prog; ac_word=$2 4727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4728 $as_echo_n "checking for $ac_word... " >&6; } 4729 if ${ac_cv_path_FIND+:} false; then : 4730 $as_echo_n "(cached) " >&6 4731 else 4732 case $FIND in 4733 [\\/]* | ?:[\\/]*) 4734 ac_cv_path_FIND="$FIND" # Let the user override the test with a path. 4735 ;; 4736 *) 4737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4738 for as_dir in $PATH 4739 do 4740 IFS=$as_save_IFS 4741 test -z "$as_dir" && as_dir=. 4742 for ac_exec_ext in '' $ac_executable_extensions; do 4743 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4744 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" 4745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4746 break 2 4747 fi 4748 done 4749 done 4750 IFS=$as_save_IFS 4751 4752 ;; 4753 esac 4754 fi 4755 FIND=$ac_cv_path_FIND 4756 if test -n "$FIND"; then 4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 4758 $as_echo "$FIND" >&6; } 4759 else 4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4761 $as_echo "no" >&6; } 4762 fi 4763 4764 4765 test -n "$FIND" && break 4766 done 4767 4768 4769 if test "x$FIND" = x; then 4770 if test "xfind" = x; then 4771 PROG_NAME=find 4772 else 4773 PROG_NAME=find 4774 fi 4775 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4776 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4777 as_fn_error $? "Cannot continue" "$LINENO" 5 4778 fi 4779 4780 4781 4782 for ac_prog in head 4783 do 4784 # Extract the first word of "$ac_prog", so it can be a program name with args. 4785 set dummy $ac_prog; ac_word=$2 4786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4787 $as_echo_n "checking for $ac_word... " >&6; } 4788 if ${ac_cv_path_HEAD+:} false; then : 4789 $as_echo_n "(cached) " >&6 4790 else 4791 case $HEAD in 4792 [\\/]* | ?:[\\/]*) 4793 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path. 4794 ;; 4795 *) 4796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4797 for as_dir in $PATH 4798 do 4799 IFS=$as_save_IFS 4800 test -z "$as_dir" && as_dir=. 4801 for ac_exec_ext in '' $ac_executable_extensions; do 4802 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4803 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext" 4804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4805 break 2 4806 fi 4807 done 4808 done 4809 IFS=$as_save_IFS 4810 4811 ;; 4812 esac 4813 fi 4814 HEAD=$ac_cv_path_HEAD 4815 if test -n "$HEAD"; then 4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5 4817 $as_echo "$HEAD" >&6; } 4818 else 4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4820 $as_echo "no" >&6; } 4821 fi 4822 4823 4824 test -n "$HEAD" && break 4825 done 4826 4827 4828 if test "x$HEAD" = x; then 4829 if test "xhead" = x; then 4830 PROG_NAME=head 4831 else 4832 PROG_NAME=head 4833 fi 4834 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4835 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4836 as_fn_error $? "Cannot continue" "$LINENO" 5 4837 fi 4838 4839 4840 4841 for ac_prog in ln 4842 do 4843 # Extract the first word of "$ac_prog", so it can be a program name with args. 4844 set dummy $ac_prog; ac_word=$2 4845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4846 $as_echo_n "checking for $ac_word... " >&6; } 4847 if ${ac_cv_path_LN+:} false; then : 4848 $as_echo_n "(cached) " >&6 4849 else 4850 case $LN in 4851 [\\/]* | ?:[\\/]*) 4852 ac_cv_path_LN="$LN" # Let the user override the test with a path. 4853 ;; 4854 *) 4855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4856 for as_dir in $PATH 4857 do 4858 IFS=$as_save_IFS 4859 test -z "$as_dir" && as_dir=. 4860 for ac_exec_ext in '' $ac_executable_extensions; do 4861 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4862 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext" 4863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4864 break 2 4865 fi 4866 done 4867 done 4868 IFS=$as_save_IFS 4869 4870 ;; 4871 esac 4872 fi 4873 LN=$ac_cv_path_LN 4874 if test -n "$LN"; then 4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5 4876 $as_echo "$LN" >&6; } 4877 else 4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4879 $as_echo "no" >&6; } 4880 fi 4881 4882 4883 test -n "$LN" && break 4884 done 4885 4886 4887 if test "x$LN" = x; then 4888 if test "xln" = x; then 4889 PROG_NAME=ln 4890 else 4891 PROG_NAME=ln 4892 fi 4893 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4894 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4895 as_fn_error $? "Cannot continue" "$LINENO" 5 4896 fi 4897 4898 4899 4900 for ac_prog in ls 4901 do 4902 # Extract the first word of "$ac_prog", so it can be a program name with args. 4903 set dummy $ac_prog; ac_word=$2 4904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4905 $as_echo_n "checking for $ac_word... " >&6; } 4906 if ${ac_cv_path_LS+:} false; then : 4907 $as_echo_n "(cached) " >&6 4908 else 4909 case $LS in 4910 [\\/]* | ?:[\\/]*) 4911 ac_cv_path_LS="$LS" # Let the user override the test with a path. 4912 ;; 4913 *) 4914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4915 for as_dir in $PATH 4916 do 4917 IFS=$as_save_IFS 4918 test -z "$as_dir" && as_dir=. 4919 for ac_exec_ext in '' $ac_executable_extensions; do 4920 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4921 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext" 4922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4923 break 2 4924 fi 4925 done 4926 done 4927 IFS=$as_save_IFS 4928 4929 ;; 4930 esac 4931 fi 4932 LS=$ac_cv_path_LS 4933 if test -n "$LS"; then 4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5 4935 $as_echo "$LS" >&6; } 4936 else 4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4938 $as_echo "no" >&6; } 4939 fi 4940 4941 4942 test -n "$LS" && break 4943 done 4944 4945 4946 if test "x$LS" = x; then 4947 if test "xls" = x; then 4948 PROG_NAME=ls 4949 else 4950 PROG_NAME=ls 4951 fi 4952 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4953 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4954 as_fn_error $? "Cannot continue" "$LINENO" 5 4955 fi 4956 4957 4958 4959 for ac_prog in mkdir 4960 do 4961 # Extract the first word of "$ac_prog", so it can be a program name with args. 4962 set dummy $ac_prog; ac_word=$2 4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4964 $as_echo_n "checking for $ac_word... " >&6; } 4965 if ${ac_cv_path_MKDIR+:} false; then : 4966 $as_echo_n "(cached) " >&6 4967 else 4968 case $MKDIR in 4969 [\\/]* | ?:[\\/]*) 4970 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. 4971 ;; 4972 *) 4973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4974 for as_dir in $PATH 4975 do 4976 IFS=$as_save_IFS 4977 test -z "$as_dir" && as_dir=. 4978 for ac_exec_ext in '' $ac_executable_extensions; do 4979 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4980 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" 4981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4982 break 2 4983 fi 4984 done 4985 done 4986 IFS=$as_save_IFS 4987 4988 ;; 4989 esac 4990 fi 4991 MKDIR=$ac_cv_path_MKDIR 4992 if test -n "$MKDIR"; then 4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 4994 $as_echo "$MKDIR" >&6; } 4995 else 4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4997 $as_echo "no" >&6; } 4998 fi 4999 5000 5001 test -n "$MKDIR" && break 5002 done 5003 5004 5005 if test "x$MKDIR" = x; then 5006 if test "xmkdir" = x; then 5007 PROG_NAME=mkdir 5008 else 5009 PROG_NAME=mkdir 5010 fi 5011 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5012 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5013 as_fn_error $? "Cannot continue" "$LINENO" 5 5014 fi 5015 5016 5017 5018 for ac_prog in mktemp 5019 do 5020 # Extract the first word of "$ac_prog", so it can be a program name with args. 5021 set dummy $ac_prog; ac_word=$2 5022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5023 $as_echo_n "checking for $ac_word... " >&6; } 5024 if ${ac_cv_path_MKTEMP+:} false; then : 5025 $as_echo_n "(cached) " >&6 5026 else 5027 case $MKTEMP in 5028 [\\/]* | ?:[\\/]*) 5029 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path. 5030 ;; 5031 *) 5032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5033 for as_dir in $PATH 5034 do 5035 IFS=$as_save_IFS 5036 test -z "$as_dir" && as_dir=. 5037 for ac_exec_ext in '' $ac_executable_extensions; do 5038 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5039 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext" 5040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5041 break 2 5042 fi 5043 done 5044 done 5045 IFS=$as_save_IFS 5046 5047 ;; 5048 esac 5049 fi 5050 MKTEMP=$ac_cv_path_MKTEMP 5051 if test -n "$MKTEMP"; then 5052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5 5053 $as_echo "$MKTEMP" >&6; } 5054 else 5055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5056 $as_echo "no" >&6; } 5057 fi 5058 5059 5060 test -n "$MKTEMP" && break 5061 done 5062 5063 5064 if test "x$MKTEMP" = x; then 5065 if test "xmktemp" = x; then 5066 PROG_NAME=mktemp 5067 else 5068 PROG_NAME=mktemp 5069 fi 5070 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5071 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5072 as_fn_error $? "Cannot continue" "$LINENO" 5 5073 fi 5074 5075 5076 5077 for ac_prog in mv 5078 do 5079 # Extract the first word of "$ac_prog", so it can be a program name with args. 5080 set dummy $ac_prog; ac_word=$2 5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5082 $as_echo_n "checking for $ac_word... " >&6; } 5083 if ${ac_cv_path_MV+:} false; then : 5084 $as_echo_n "(cached) " >&6 5085 else 5086 case $MV in 5087 [\\/]* | ?:[\\/]*) 5088 ac_cv_path_MV="$MV" # Let the user override the test with a path. 5089 ;; 5090 *) 5091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5092 for as_dir in $PATH 5093 do 5094 IFS=$as_save_IFS 5095 test -z "$as_dir" && as_dir=. 5096 for ac_exec_ext in '' $ac_executable_extensions; do 5097 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5098 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" 5099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5100 break 2 5101 fi 5102 done 5103 done 5104 IFS=$as_save_IFS 5105 5106 ;; 5107 esac 5108 fi 5109 MV=$ac_cv_path_MV 5110 if test -n "$MV"; then 5111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5 5112 $as_echo "$MV" >&6; } 5113 else 5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5115 $as_echo "no" >&6; } 5116 fi 5117 5118 5119 test -n "$MV" && break 5120 done 5121 5122 5123 if test "x$MV" = x; then 5124 if test "xmv" = x; then 5125 PROG_NAME=mv 5126 else 5127 PROG_NAME=mv 5128 fi 5129 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5130 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5131 as_fn_error $? "Cannot continue" "$LINENO" 5 5132 fi 5133 5134 5135 5136 for ac_prog in printf 5137 do 5138 # Extract the first word of "$ac_prog", so it can be a program name with args. 5139 set dummy $ac_prog; ac_word=$2 5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5141 $as_echo_n "checking for $ac_word... " >&6; } 5142 if ${ac_cv_path_PRINTF+:} false; then : 5143 $as_echo_n "(cached) " >&6 5144 else 5145 case $PRINTF in 5146 [\\/]* | ?:[\\/]*) 5147 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path. 5148 ;; 5149 *) 5150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5151 for as_dir in $PATH 5152 do 5153 IFS=$as_save_IFS 5154 test -z "$as_dir" && as_dir=. 5155 for ac_exec_ext in '' $ac_executable_extensions; do 5156 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5157 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext" 5158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5159 break 2 5160 fi 5161 done 5162 done 5163 IFS=$as_save_IFS 5164 5165 ;; 5166 esac 5167 fi 5168 PRINTF=$ac_cv_path_PRINTF 5169 if test -n "$PRINTF"; then 5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5 5171 $as_echo "$PRINTF" >&6; } 5172 else 5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5174 $as_echo "no" >&6; } 5175 fi 5176 5177 5178 test -n "$PRINTF" && break 5179 done 5180 5181 5182 if test "x$PRINTF" = x; then 5183 if test "xprintf" = x; then 5184 PROG_NAME=printf 5185 else 5186 PROG_NAME=printf 5187 fi 5188 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5189 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5190 as_fn_error $? "Cannot continue" "$LINENO" 5 5191 fi 5192 5193 5194 5195 for ac_prog in rm 5196 do 5197 # Extract the first word of "$ac_prog", so it can be a program name with args. 5198 set dummy $ac_prog; ac_word=$2 5199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5200 $as_echo_n "checking for $ac_word... " >&6; } 5201 if ${ac_cv_path_RM+:} false; then : 5202 $as_echo_n "(cached) " >&6 5203 else 5204 case $RM in 5205 [\\/]* | ?:[\\/]*) 5206 ac_cv_path_RM="$RM" # Let the user override the test with a path. 5207 ;; 5208 *) 5209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5210 for as_dir in $PATH 5211 do 5212 IFS=$as_save_IFS 5213 test -z "$as_dir" && as_dir=. 5214 for ac_exec_ext in '' $ac_executable_extensions; do 5215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5216 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" 5217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5218 break 2 5219 fi 5220 done 5221 done 5222 IFS=$as_save_IFS 5223 5224 ;; 5225 esac 5226 fi 5227 RM=$ac_cv_path_RM 5228 if test -n "$RM"; then 5229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 5230 $as_echo "$RM" >&6; } 5231 else 5232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5233 $as_echo "no" >&6; } 5234 fi 5235 5236 5237 test -n "$RM" && break 5238 done 5239 5240 5241 if test "x$RM" = x; then 5242 if test "xrm" = x; then 5243 PROG_NAME=rm 5244 else 5245 PROG_NAME=rm 5246 fi 5247 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5248 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5249 as_fn_error $? "Cannot continue" "$LINENO" 5 5250 fi 5251 5252 5253 5254 for ac_prog in sh 5255 do 5256 # Extract the first word of "$ac_prog", so it can be a program name with args. 5257 set dummy $ac_prog; ac_word=$2 5258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5259 $as_echo_n "checking for $ac_word... " >&6; } 5260 if ${ac_cv_path_SH+:} false; then : 5261 $as_echo_n "(cached) " >&6 5262 else 5263 case $SH in 5264 [\\/]* | ?:[\\/]*) 5265 ac_cv_path_SH="$SH" # Let the user override the test with a path. 5266 ;; 5267 *) 5268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5269 for as_dir in $PATH 5270 do 5271 IFS=$as_save_IFS 5272 test -z "$as_dir" && as_dir=. 5273 for ac_exec_ext in '' $ac_executable_extensions; do 5274 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5275 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" 5276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5277 break 2 5278 fi 5279 done 5280 done 5281 IFS=$as_save_IFS 5282 5283 ;; 5284 esac 5285 fi 5286 SH=$ac_cv_path_SH 5287 if test -n "$SH"; then 5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5 5289 $as_echo "$SH" >&6; } 5290 else 5291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5292 $as_echo "no" >&6; } 5293 fi 5294 5295 5296 test -n "$SH" && break 5297 done 5298 5299 5300 if test "x$SH" = x; then 5301 if test "xsh" = x; then 5302 PROG_NAME=sh 5303 else 5304 PROG_NAME=sh 5305 fi 5306 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5307 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5308 as_fn_error $? "Cannot continue" "$LINENO" 5 5309 fi 5310 5311 5312 5313 for ac_prog in sort 5314 do 5315 # Extract the first word of "$ac_prog", so it can be a program name with args. 5316 set dummy $ac_prog; ac_word=$2 5317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5318 $as_echo_n "checking for $ac_word... " >&6; } 5319 if ${ac_cv_path_SORT+:} false; then : 5320 $as_echo_n "(cached) " >&6 5321 else 5322 case $SORT in 5323 [\\/]* | ?:[\\/]*) 5324 ac_cv_path_SORT="$SORT" # Let the user override the test with a path. 5325 ;; 5326 *) 5327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5328 for as_dir in $PATH 5329 do 5330 IFS=$as_save_IFS 5331 test -z "$as_dir" && as_dir=. 5332 for ac_exec_ext in '' $ac_executable_extensions; do 5333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5334 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext" 5335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5336 break 2 5337 fi 5338 done 5339 done 5340 IFS=$as_save_IFS 5341 5342 ;; 5343 esac 5344 fi 5345 SORT=$ac_cv_path_SORT 5346 if test -n "$SORT"; then 5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5 5348 $as_echo "$SORT" >&6; } 5349 else 5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5351 $as_echo "no" >&6; } 5352 fi 5353 5354 5355 test -n "$SORT" && break 5356 done 5357 5358 5359 if test "x$SORT" = x; then 5360 if test "xsort" = x; then 5361 PROG_NAME=sort 5362 else 5363 PROG_NAME=sort 5364 fi 5365 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5366 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5367 as_fn_error $? "Cannot continue" "$LINENO" 5 5368 fi 5369 5370 5371 5372 for ac_prog in tail 5373 do 5374 # Extract the first word of "$ac_prog", so it can be a program name with args. 5375 set dummy $ac_prog; ac_word=$2 5376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5377 $as_echo_n "checking for $ac_word... " >&6; } 5378 if ${ac_cv_path_TAIL+:} false; then : 5379 $as_echo_n "(cached) " >&6 5380 else 5381 case $TAIL in 5382 [\\/]* | ?:[\\/]*) 5383 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path. 5384 ;; 5385 *) 5386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5387 for as_dir in $PATH 5388 do 5389 IFS=$as_save_IFS 5390 test -z "$as_dir" && as_dir=. 5391 for ac_exec_ext in '' $ac_executable_extensions; do 5392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5393 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext" 5394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5395 break 2 5396 fi 5397 done 5398 done 5399 IFS=$as_save_IFS 5400 5401 ;; 5402 esac 5403 fi 5404 TAIL=$ac_cv_path_TAIL 5405 if test -n "$TAIL"; then 5406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5 5407 $as_echo "$TAIL" >&6; } 5408 else 5409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5410 $as_echo "no" >&6; } 5411 fi 5412 5413 5414 test -n "$TAIL" && break 5415 done 5416 5417 5418 if test "x$TAIL" = x; then 5419 if test "xtail" = x; then 5420 PROG_NAME=tail 5421 else 5422 PROG_NAME=tail 5423 fi 5424 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5425 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5426 as_fn_error $? "Cannot continue" "$LINENO" 5 5427 fi 5428 5429 5430 5431 for ac_prog in tar 5432 do 5433 # Extract the first word of "$ac_prog", so it can be a program name with args. 5434 set dummy $ac_prog; ac_word=$2 5435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5436 $as_echo_n "checking for $ac_word... " >&6; } 5437 if ${ac_cv_path_TAR+:} false; then : 5438 $as_echo_n "(cached) " >&6 5439 else 5440 case $TAR in 5441 [\\/]* | ?:[\\/]*) 5442 ac_cv_path_TAR="$TAR" # Let the user override the test with a path. 5443 ;; 5444 *) 5445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5446 for as_dir in $PATH 5447 do 5448 IFS=$as_save_IFS 5449 test -z "$as_dir" && as_dir=. 5450 for ac_exec_ext in '' $ac_executable_extensions; do 5451 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5452 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" 5453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5454 break 2 5455 fi 5456 done 5457 done 5458 IFS=$as_save_IFS 5459 5460 ;; 5461 esac 5462 fi 5463 TAR=$ac_cv_path_TAR 5464 if test -n "$TAR"; then 5465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 5466 $as_echo "$TAR" >&6; } 5467 else 5468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5469 $as_echo "no" >&6; } 5470 fi 5471 5472 5473 test -n "$TAR" && break 5474 done 5475 5476 5477 if test "x$TAR" = x; then 5478 if test "xtar" = x; then 5479 PROG_NAME=tar 5480 else 5481 PROG_NAME=tar 5482 fi 5483 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5484 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5485 as_fn_error $? "Cannot continue" "$LINENO" 5 5486 fi 5487 5488 5489 5490 for ac_prog in tee 5491 do 5492 # Extract the first word of "$ac_prog", so it can be a program name with args. 5493 set dummy $ac_prog; ac_word=$2 5494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5495 $as_echo_n "checking for $ac_word... " >&6; } 5496 if ${ac_cv_path_TEE+:} false; then : 5497 $as_echo_n "(cached) " >&6 5498 else 5499 case $TEE in 5500 [\\/]* | ?:[\\/]*) 5501 ac_cv_path_TEE="$TEE" # Let the user override the test with a path. 5502 ;; 5503 *) 5504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5505 for as_dir in $PATH 5506 do 5507 IFS=$as_save_IFS 5508 test -z "$as_dir" && as_dir=. 5509 for ac_exec_ext in '' $ac_executable_extensions; do 5510 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5511 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext" 5512 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5513 break 2 5514 fi 5515 done 5516 done 5517 IFS=$as_save_IFS 5518 5519 ;; 5520 esac 5521 fi 5522 TEE=$ac_cv_path_TEE 5523 if test -n "$TEE"; then 5524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5 5525 $as_echo "$TEE" >&6; } 5526 else 5527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5528 $as_echo "no" >&6; } 5529 fi 5530 5531 5532 test -n "$TEE" && break 5533 done 5534 5535 5536 if test "x$TEE" = x; then 5537 if test "xtee" = x; then 5538 PROG_NAME=tee 5539 else 5540 PROG_NAME=tee 5541 fi 5542 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5543 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5544 as_fn_error $? "Cannot continue" "$LINENO" 5 5545 fi 5546 5547 5548 5549 for ac_prog in touch 5550 do 5551 # Extract the first word of "$ac_prog", so it can be a program name with args. 5552 set dummy $ac_prog; ac_word=$2 5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5554 $as_echo_n "checking for $ac_word... " >&6; } 5555 if ${ac_cv_path_TOUCH+:} false; then : 5556 $as_echo_n "(cached) " >&6 5557 else 5558 case $TOUCH in 5559 [\\/]* | ?:[\\/]*) 5560 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path. 5561 ;; 5562 *) 5563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5564 for as_dir in $PATH 5565 do 5566 IFS=$as_save_IFS 5567 test -z "$as_dir" && as_dir=. 5568 for ac_exec_ext in '' $ac_executable_extensions; do 5569 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5570 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext" 5571 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5572 break 2 5573 fi 5574 done 5575 done 5576 IFS=$as_save_IFS 5577 5578 ;; 5579 esac 5580 fi 5581 TOUCH=$ac_cv_path_TOUCH 5582 if test -n "$TOUCH"; then 5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5 5584 $as_echo "$TOUCH" >&6; } 5585 else 5586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5587 $as_echo "no" >&6; } 5588 fi 5589 5590 5591 test -n "$TOUCH" && break 5592 done 5593 5594 5595 if test "x$TOUCH" = x; then 5596 if test "xtouch" = x; then 5597 PROG_NAME=touch 5598 else 5599 PROG_NAME=touch 5600 fi 5601 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5602 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5603 as_fn_error $? "Cannot continue" "$LINENO" 5 5604 fi 5605 5606 5607 5608 for ac_prog in tr 5609 do 5610 # Extract the first word of "$ac_prog", so it can be a program name with args. 5611 set dummy $ac_prog; ac_word=$2 5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5613 $as_echo_n "checking for $ac_word... " >&6; } 5614 if ${ac_cv_path_TR+:} false; then : 5615 $as_echo_n "(cached) " >&6 5616 else 5617 case $TR in 5618 [\\/]* | ?:[\\/]*) 5619 ac_cv_path_TR="$TR" # Let the user override the test with a path. 5620 ;; 5621 *) 5622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5623 for as_dir in $PATH 5624 do 5625 IFS=$as_save_IFS 5626 test -z "$as_dir" && as_dir=. 5627 for ac_exec_ext in '' $ac_executable_extensions; do 5628 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5629 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" 5630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5631 break 2 5632 fi 5633 done 5634 done 5635 IFS=$as_save_IFS 5636 5637 ;; 5638 esac 5639 fi 5640 TR=$ac_cv_path_TR 5641 if test -n "$TR"; then 5642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 5643 $as_echo "$TR" >&6; } 5644 else 5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5646 $as_echo "no" >&6; } 5647 fi 5648 5649 5650 test -n "$TR" && break 5651 done 5652 5653 5654 if test "x$TR" = x; then 5655 if test "xtr" = x; then 5656 PROG_NAME=tr 5657 else 5658 PROG_NAME=tr 5659 fi 5660 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5661 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5662 as_fn_error $? "Cannot continue" "$LINENO" 5 5663 fi 5664 5665 5666 5667 for ac_prog in uname 5668 do 5669 # Extract the first word of "$ac_prog", so it can be a program name with args. 5670 set dummy $ac_prog; ac_word=$2 5671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5672 $as_echo_n "checking for $ac_word... " >&6; } 5673 if ${ac_cv_path_UNAME+:} false; then : 5674 $as_echo_n "(cached) " >&6 5675 else 5676 case $UNAME in 5677 [\\/]* | ?:[\\/]*) 5678 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path. 5679 ;; 5680 *) 5681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5682 for as_dir in $PATH 5683 do 5684 IFS=$as_save_IFS 5685 test -z "$as_dir" && as_dir=. 5686 for ac_exec_ext in '' $ac_executable_extensions; do 5687 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5688 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext" 5689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5690 break 2 5691 fi 5692 done 5693 done 5694 IFS=$as_save_IFS 5695 5696 ;; 5697 esac 5698 fi 5699 UNAME=$ac_cv_path_UNAME 5700 if test -n "$UNAME"; then 5701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5 5702 $as_echo "$UNAME" >&6; } 5703 else 5704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5705 $as_echo "no" >&6; } 5706 fi 5707 5708 5709 test -n "$UNAME" && break 5710 done 5711 5712 5713 if test "x$UNAME" = x; then 5714 if test "xuname" = x; then 5715 PROG_NAME=uname 5716 else 5717 PROG_NAME=uname 5718 fi 5719 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5720 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5721 as_fn_error $? "Cannot continue" "$LINENO" 5 5722 fi 5723 5724 5725 5726 for ac_prog in uniq 5727 do 5728 # Extract the first word of "$ac_prog", so it can be a program name with args. 5729 set dummy $ac_prog; ac_word=$2 5730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5731 $as_echo_n "checking for $ac_word... " >&6; } 5732 if ${ac_cv_path_UNIQ+:} false; then : 5733 $as_echo_n "(cached) " >&6 5734 else 5735 case $UNIQ in 5736 [\\/]* | ?:[\\/]*) 5737 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path. 5738 ;; 5739 *) 5740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5741 for as_dir in $PATH 5742 do 5743 IFS=$as_save_IFS 5744 test -z "$as_dir" && as_dir=. 5745 for ac_exec_ext in '' $ac_executable_extensions; do 5746 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5747 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext" 5748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5749 break 2 5750 fi 5751 done 5752 done 5753 IFS=$as_save_IFS 5754 5755 ;; 5756 esac 5757 fi 5758 UNIQ=$ac_cv_path_UNIQ 5759 if test -n "$UNIQ"; then 5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5 5761 $as_echo "$UNIQ" >&6; } 5762 else 5763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5764 $as_echo "no" >&6; } 5765 fi 5766 5767 5768 test -n "$UNIQ" && break 5769 done 5770 5771 5772 if test "x$UNIQ" = x; then 5773 if test "xuniq" = x; then 5774 PROG_NAME=uniq 5775 else 5776 PROG_NAME=uniq 5777 fi 5778 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5779 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5780 as_fn_error $? "Cannot continue" "$LINENO" 5 5781 fi 5782 5783 5784 5785 for ac_prog in wc 5786 do 5787 # Extract the first word of "$ac_prog", so it can be a program name with args. 5788 set dummy $ac_prog; ac_word=$2 5789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5790 $as_echo_n "checking for $ac_word... " >&6; } 5791 if ${ac_cv_path_WC+:} false; then : 5792 $as_echo_n "(cached) " >&6 5793 else 5794 case $WC in 5795 [\\/]* | ?:[\\/]*) 5796 ac_cv_path_WC="$WC" # Let the user override the test with a path. 5797 ;; 5798 *) 5799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5800 for as_dir in $PATH 5801 do 5802 IFS=$as_save_IFS 5803 test -z "$as_dir" && as_dir=. 5804 for ac_exec_ext in '' $ac_executable_extensions; do 5805 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5806 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext" 5807 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5808 break 2 5809 fi 5810 done 5811 done 5812 IFS=$as_save_IFS 5813 5814 ;; 5815 esac 5816 fi 5817 WC=$ac_cv_path_WC 5818 if test -n "$WC"; then 5819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5 5820 $as_echo "$WC" >&6; } 5821 else 5822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5823 $as_echo "no" >&6; } 5824 fi 5825 5826 5827 test -n "$WC" && break 5828 done 5829 5830 5831 if test "x$WC" = x; then 5832 if test "xwc" = x; then 5833 PROG_NAME=wc 5834 else 5835 PROG_NAME=wc 5836 fi 5837 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5838 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5839 as_fn_error $? "Cannot continue" "$LINENO" 5 5840 fi 5841 5842 5843 5844 for ac_prog in which 5845 do 5846 # Extract the first word of "$ac_prog", so it can be a program name with args. 5847 set dummy $ac_prog; ac_word=$2 5848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5849 $as_echo_n "checking for $ac_word... " >&6; } 5850 if ${ac_cv_path_WHICH+:} false; then : 5851 $as_echo_n "(cached) " >&6 5852 else 5853 case $WHICH in 5854 [\\/]* | ?:[\\/]*) 5855 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path. 5856 ;; 5857 *) 5858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5859 for as_dir in $PATH 5860 do 5861 IFS=$as_save_IFS 5862 test -z "$as_dir" && as_dir=. 5863 for ac_exec_ext in '' $ac_executable_extensions; do 5864 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5865 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext" 5866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5867 break 2 5868 fi 5869 done 5870 done 5871 IFS=$as_save_IFS 5872 5873 ;; 5874 esac 5875 fi 5876 WHICH=$ac_cv_path_WHICH 5877 if test -n "$WHICH"; then 5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5 5879 $as_echo "$WHICH" >&6; } 5880 else 5881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5882 $as_echo "no" >&6; } 5883 fi 5884 5885 5886 test -n "$WHICH" && break 5887 done 5888 5889 5890 if test "x$WHICH" = x; then 5891 if test "xwhich" = x; then 5892 PROG_NAME=which 5893 else 5894 PROG_NAME=which 5895 fi 5896 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5897 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5898 as_fn_error $? "Cannot continue" "$LINENO" 5 5899 fi 5900 5901 5902 5903 for ac_prog in xargs 5904 do 5905 # Extract the first word of "$ac_prog", so it can be a program name with args. 5906 set dummy $ac_prog; ac_word=$2 5907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5908 $as_echo_n "checking for $ac_word... " >&6; } 5909 if ${ac_cv_path_XARGS+:} false; then : 5910 $as_echo_n "(cached) " >&6 5911 else 5912 case $XARGS in 5913 [\\/]* | ?:[\\/]*) 5914 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path. 5915 ;; 5916 *) 5917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5918 for as_dir in $PATH 5919 do 5920 IFS=$as_save_IFS 5921 test -z "$as_dir" && as_dir=. 5922 for ac_exec_ext in '' $ac_executable_extensions; do 5923 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5924 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext" 5925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5926 break 2 5927 fi 5928 done 5929 done 5930 IFS=$as_save_IFS 5931 5932 ;; 5933 esac 5934 fi 5935 XARGS=$ac_cv_path_XARGS 5936 if test -n "$XARGS"; then 5937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5 5938 $as_echo "$XARGS" >&6; } 5939 else 5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5941 $as_echo "no" >&6; } 5942 fi 5943 5944 5945 test -n "$XARGS" && break 5946 done 5947 5948 5949 if test "x$XARGS" = x; then 5950 if test "xxargs" = x; then 5951 PROG_NAME=xargs 5952 else 5953 PROG_NAME=xargs 5954 fi 5955 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5956 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5957 as_fn_error $? "Cannot continue" "$LINENO" 5 5958 fi 5959 5960 5961 5962 # Then required tools that require some special treatment. 5963 for ac_prog in gawk mawk nawk awk 5964 do 5965 # Extract the first word of "$ac_prog", so it can be a program name with args. 5966 set dummy $ac_prog; ac_word=$2 5967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5968 $as_echo_n "checking for $ac_word... " >&6; } 5969 if ${ac_cv_prog_AWK+:} false; then : 5970 $as_echo_n "(cached) " >&6 5971 else 5972 if test -n "$AWK"; then 5973 ac_cv_prog_AWK="$AWK" # Let the user override the test. 5974 else 5975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5976 for as_dir in $PATH 5977 do 5978 IFS=$as_save_IFS 5979 test -z "$as_dir" && as_dir=. 5980 for ac_exec_ext in '' $ac_executable_extensions; do 5981 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5982 ac_cv_prog_AWK="$ac_prog" 5983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5984 break 2 5985 fi 5986 done 5987 done 5988 IFS=$as_save_IFS 5989 5990 fi 5991 fi 5992 AWK=$ac_cv_prog_AWK 5993 if test -n "$AWK"; then 5994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 5995 $as_echo "$AWK" >&6; } 5996 else 5997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5998 $as_echo "no" >&6; } 5999 fi 6000 6001 6002 test -n "$AWK" && break 6003 done 6004 6005 6006 if test "x$AWK" = x; then 6007 if test "x" = x; then 6008 PROG_NAME=awk 6009 else 6010 PROG_NAME= 6011 fi 6012 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6013 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6014 as_fn_error $? "Cannot continue" "$LINENO" 5 6015 fi 6016 6017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 6018 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } 6019 if ${ac_cv_path_GREP+:} false; then : 6020 $as_echo_n "(cached) " >&6 6021 else 6022 if test -z "$GREP"; then 6023 ac_path_GREP_found=false 6024 # Loop through the user's path and test for each of PROGNAME-LIST 6025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6026 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6027 do 6028 IFS=$as_save_IFS 6029 test -z "$as_dir" && as_dir=. 6030 for ac_prog in grep ggrep; do 6031 for ac_exec_ext in '' $ac_executable_extensions; do 6032 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 6033 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue 6034 # Check for GNU ac_path_GREP and select it if it is found. 6035 # Check for GNU $ac_path_GREP 6036 case `"$ac_path_GREP" --version 2>&1` in 6037 *GNU*) 6038 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 6039 *) 6040 ac_count=0 6041 $as_echo_n 0123456789 >"conftest.in" 6042 while : 6043 do 6044 cat "conftest.in" "conftest.in" >"conftest.tmp" 6045 mv "conftest.tmp" "conftest.in" 6046 cp "conftest.in" "conftest.nl" 6047 $as_echo 'GREP' >> "conftest.nl" 6048 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6049 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6050 as_fn_arith $ac_count + 1 && ac_count=$as_val 6051 if test $ac_count -gt ${ac_path_GREP_max-0}; then 6052 # Best one so far, save it but keep looking for a better one 6053 ac_cv_path_GREP="$ac_path_GREP" 6054 ac_path_GREP_max=$ac_count 6055 fi 6056 # 10*(2^10) chars as input seems more than enough 6057 test $ac_count -gt 10 && break 6058 done 6059 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6060 esac 6061 6062 $ac_path_GREP_found && break 3 6063 done 6064 done 6065 done 6066 IFS=$as_save_IFS 6067 if test -z "$ac_cv_path_GREP"; then 6068 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6069 fi 6070 else 6071 ac_cv_path_GREP=$GREP 6072 fi 6073 6074 fi 6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 6076 $as_echo "$ac_cv_path_GREP" >&6; } 6077 GREP="$ac_cv_path_GREP" 6078 6079 6080 6081 if test "x$GREP" = x; then 6082 if test "x" = x; then 6083 PROG_NAME=grep 6084 else 6085 PROG_NAME= 6086 fi 6087 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6088 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6089 as_fn_error $? "Cannot continue" "$LINENO" 5 6090 fi 6091 6092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 6093 $as_echo_n "checking for egrep... " >&6; } 6094 if ${ac_cv_path_EGREP+:} false; then : 6095 $as_echo_n "(cached) " >&6 6096 else 6097 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 6098 then ac_cv_path_EGREP="$GREP -E" 6099 else 6100 if test -z "$EGREP"; then 6101 ac_path_EGREP_found=false 6102 # Loop through the user's path and test for each of PROGNAME-LIST 6103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6104 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6105 do 6106 IFS=$as_save_IFS 6107 test -z "$as_dir" && as_dir=. 6108 for ac_prog in egrep; do 6109 for ac_exec_ext in '' $ac_executable_extensions; do 6110 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 6111 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue 6112 # Check for GNU ac_path_EGREP and select it if it is found. 6113 # Check for GNU $ac_path_EGREP 6114 case `"$ac_path_EGREP" --version 2>&1` in 6115 *GNU*) 6116 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 6117 *) 6118 ac_count=0 6119 $as_echo_n 0123456789 >"conftest.in" 6120 while : 6121 do 6122 cat "conftest.in" "conftest.in" >"conftest.tmp" 6123 mv "conftest.tmp" "conftest.in" 6124 cp "conftest.in" "conftest.nl" 6125 $as_echo 'EGREP' >> "conftest.nl" 6126 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6127 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6128 as_fn_arith $ac_count + 1 && ac_count=$as_val 6129 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 6130 # Best one so far, save it but keep looking for a better one 6131 ac_cv_path_EGREP="$ac_path_EGREP" 6132 ac_path_EGREP_max=$ac_count 6133 fi 6134 # 10*(2^10) chars as input seems more than enough 6135 test $ac_count -gt 10 && break 6136 done 6137 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6138 esac 6139 6140 $ac_path_EGREP_found && break 3 6141 done 6142 done 6143 done 6144 IFS=$as_save_IFS 6145 if test -z "$ac_cv_path_EGREP"; then 6146 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6147 fi 6148 else 6149 ac_cv_path_EGREP=$EGREP 6150 fi 6151 6152 fi 6153 fi 6154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 6155 $as_echo "$ac_cv_path_EGREP" >&6; } 6156 EGREP="$ac_cv_path_EGREP" 6157 6158 6159 6160 if test "x$EGREP" = x; then 6161 if test "x" = x; then 6162 PROG_NAME=egrep 6163 else 6164 PROG_NAME= 6165 fi 6166 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6167 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6168 as_fn_error $? "Cannot continue" "$LINENO" 5 6169 fi 6170 6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 6172 $as_echo_n "checking for fgrep... " >&6; } 6173 if ${ac_cv_path_FGREP+:} false; then : 6174 $as_echo_n "(cached) " >&6 6175 else 6176 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 6177 then ac_cv_path_FGREP="$GREP -F" 6178 else 6179 if test -z "$FGREP"; then 6180 ac_path_FGREP_found=false 6181 # Loop through the user's path and test for each of PROGNAME-LIST 6182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6183 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6184 do 6185 IFS=$as_save_IFS 6186 test -z "$as_dir" && as_dir=. 6187 for ac_prog in fgrep; do 6188 for ac_exec_ext in '' $ac_executable_extensions; do 6189 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" 6190 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue 6191 # Check for GNU ac_path_FGREP and select it if it is found. 6192 # Check for GNU $ac_path_FGREP 6193 case `"$ac_path_FGREP" --version 2>&1` in 6194 *GNU*) 6195 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; 6196 *) 6197 ac_count=0 6198 $as_echo_n 0123456789 >"conftest.in" 6199 while : 6200 do 6201 cat "conftest.in" "conftest.in" >"conftest.tmp" 6202 mv "conftest.tmp" "conftest.in" 6203 cp "conftest.in" "conftest.nl" 6204 $as_echo 'FGREP' >> "conftest.nl" 6205 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break 6206 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6207 as_fn_arith $ac_count + 1 && ac_count=$as_val 6208 if test $ac_count -gt ${ac_path_FGREP_max-0}; then 6209 # Best one so far, save it but keep looking for a better one 6210 ac_cv_path_FGREP="$ac_path_FGREP" 6211 ac_path_FGREP_max=$ac_count 6212 fi 6213 # 10*(2^10) chars as input seems more than enough 6214 test $ac_count -gt 10 && break 6215 done 6216 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6217 esac 6218 6219 $ac_path_FGREP_found && break 3 6220 done 6221 done 6222 done 6223 IFS=$as_save_IFS 6224 if test -z "$ac_cv_path_FGREP"; then 6225 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6226 fi 6227 else 6228 ac_cv_path_FGREP=$FGREP 6229 fi 6230 6231 fi 6232 fi 6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 6234 $as_echo "$ac_cv_path_FGREP" >&6; } 6235 FGREP="$ac_cv_path_FGREP" 6236 6237 6238 6239 if test "x$FGREP" = x; then 6240 if test "x" = x; then 6241 PROG_NAME=fgrep 6242 else 6243 PROG_NAME= 6244 fi 6245 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6246 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6247 as_fn_error $? "Cannot continue" "$LINENO" 5 6248 fi 6249 6250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 6251 $as_echo_n "checking for a sed that does not truncate output... " >&6; } 6252 if ${ac_cv_path_SED+:} false; then : 6253 $as_echo_n "(cached) " >&6 6254 else 6255 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ 6256 for ac_i in 1 2 3 4 5 6 7; do 6257 ac_script="$ac_script$as_nl$ac_script" 6258 done 6259 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed 6260 { ac_script=; unset ac_script;} 6261 if test -z "$SED"; then 6262 ac_path_SED_found=false 6263 # Loop through the user's path and test for each of PROGNAME-LIST 6264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6265 for as_dir in $PATH 6266 do 6267 IFS=$as_save_IFS 6268 test -z "$as_dir" && as_dir=. 6269 for ac_prog in sed gsed; do 6270 for ac_exec_ext in '' $ac_executable_extensions; do 6271 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" 6272 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue 6273 # Check for GNU ac_path_SED and select it if it is found. 6274 # Check for GNU $ac_path_SED 6275 case `"$ac_path_SED" --version 2>&1` in 6276 *GNU*) 6277 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; 6278 *) 6279 ac_count=0 6280 $as_echo_n 0123456789 >"conftest.in" 6281 while : 6282 do 6283 cat "conftest.in" "conftest.in" >"conftest.tmp" 6284 mv "conftest.tmp" "conftest.in" 6285 cp "conftest.in" "conftest.nl" 6286 $as_echo '' >> "conftest.nl" 6287 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break 6288 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6289 as_fn_arith $ac_count + 1 && ac_count=$as_val 6290 if test $ac_count -gt ${ac_path_SED_max-0}; then 6291 # Best one so far, save it but keep looking for a better one 6292 ac_cv_path_SED="$ac_path_SED" 6293 ac_path_SED_max=$ac_count 6294 fi 6295 # 10*(2^10) chars as input seems more than enough 6296 test $ac_count -gt 10 && break 6297 done 6298 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6299 esac 6300 6301 $ac_path_SED_found && break 3 6302 done 6303 done 6304 done 6305 IFS=$as_save_IFS 6306 if test -z "$ac_cv_path_SED"; then 6307 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 6308 fi 6309 else 6310 ac_cv_path_SED=$SED 6311 fi 6312 6313 fi 6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 6315 $as_echo "$ac_cv_path_SED" >&6; } 6316 SED="$ac_cv_path_SED" 6317 rm -f conftest.sed 6318 6319 6320 if test "x$SED" = x; then 6321 if test "x" = x; then 6322 PROG_NAME=sed 6323 else 6324 PROG_NAME= 6325 fi 6326 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6327 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6328 as_fn_error $? "Cannot continue" "$LINENO" 5 6329 fi 6330 6331 6332 for ac_prog in nawk gawk awk 6333 do 6334 # Extract the first word of "$ac_prog", so it can be a program name with args. 6335 set dummy $ac_prog; ac_word=$2 6336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6337 $as_echo_n "checking for $ac_word... " >&6; } 6338 if ${ac_cv_path_NAWK+:} false; then : 6339 $as_echo_n "(cached) " >&6 6340 else 6341 case $NAWK in 6342 [\\/]* | ?:[\\/]*) 6343 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path. 6344 ;; 6345 *) 6346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6347 for as_dir in $PATH 6348 do 6349 IFS=$as_save_IFS 6350 test -z "$as_dir" && as_dir=. 6351 for ac_exec_ext in '' $ac_executable_extensions; do 6352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6353 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext" 6354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6355 break 2 6356 fi 6357 done 6358 done 6359 IFS=$as_save_IFS 6360 6361 ;; 6362 esac 6363 fi 6364 NAWK=$ac_cv_path_NAWK 6365 if test -n "$NAWK"; then 6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5 6367 $as_echo "$NAWK" >&6; } 6368 else 6369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6370 $as_echo "no" >&6; } 6371 fi 6372 6373 6374 test -n "$NAWK" && break 6375 done 6376 6377 6378 if test "x$NAWK" = x; then 6379 if test "x" = x; then 6380 PROG_NAME=nawk 6381 else 6382 PROG_NAME= 6383 fi 6384 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6385 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6386 as_fn_error $? "Cannot continue" "$LINENO" 5 6387 fi 6388 6389 6390 # Always force rm. 6391 RM="$RM -f" 6392 6393 # pwd behaves differently on various platforms and some don't support the -L flag. 6394 # Always use the bash builtin pwd to get uniform behavior. 6395 THEPWDCMD=pwd 6396 6397 # These are not required on all platforms 6398 # Extract the first word of "cygpath", so it can be a program name with args. 6399 set dummy cygpath; ac_word=$2 6400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6401 $as_echo_n "checking for $ac_word... " >&6; } 6402 if ${ac_cv_path_CYGPATH+:} false; then : 6403 $as_echo_n "(cached) " >&6 6404 else 6405 case $CYGPATH in 6406 [\\/]* | ?:[\\/]*) 6407 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path. 6408 ;; 6409 *) 6410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6411 for as_dir in $PATH 6412 do 6413 IFS=$as_save_IFS 6414 test -z "$as_dir" && as_dir=. 6415 for ac_exec_ext in '' $ac_executable_extensions; do 6416 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6417 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext" 6418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6419 break 2 6420 fi 6421 done 6422 done 6423 IFS=$as_save_IFS 6424 6425 ;; 6426 esac 6427 fi 6428 CYGPATH=$ac_cv_path_CYGPATH 6429 if test -n "$CYGPATH"; then 6430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 6431 $as_echo "$CYGPATH" >&6; } 6432 else 6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6434 $as_echo "no" >&6; } 6435 fi 6436 6437 6438 # Extract the first word of "readlink", so it can be a program name with args. 6439 set dummy readlink; ac_word=$2 6440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6441 $as_echo_n "checking for $ac_word... " >&6; } 6442 if ${ac_cv_path_READLINK+:} false; then : 6443 $as_echo_n "(cached) " >&6 6444 else 6445 case $READLINK in 6446 [\\/]* | ?:[\\/]*) 6447 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path. 6448 ;; 6449 *) 6450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6451 for as_dir in $PATH 6452 do 6453 IFS=$as_save_IFS 6454 test -z "$as_dir" && as_dir=. 6455 for ac_exec_ext in '' $ac_executable_extensions; do 6456 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6457 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext" 6458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6459 break 2 6460 fi 6461 done 6462 done 6463 IFS=$as_save_IFS 6464 6465 ;; 6466 esac 6467 fi 6468 READLINK=$ac_cv_path_READLINK 6469 if test -n "$READLINK"; then 6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5 6471 $as_echo "$READLINK" >&6; } 6472 else 6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6474 $as_echo "no" >&6; } 6475 fi 6476 6477 6478 # Extract the first word of "df", so it can be a program name with args. 6479 set dummy df; ac_word=$2 6480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6481 $as_echo_n "checking for $ac_word... " >&6; } 6482 if ${ac_cv_path_DF+:} false; then : 6483 $as_echo_n "(cached) " >&6 6484 else 6485 case $DF in 6486 [\\/]* | ?:[\\/]*) 6487 ac_cv_path_DF="$DF" # Let the user override the test with a path. 6488 ;; 6489 *) 6490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6491 for as_dir in $PATH 6492 do 6493 IFS=$as_save_IFS 6494 test -z "$as_dir" && as_dir=. 6495 for ac_exec_ext in '' $ac_executable_extensions; do 6496 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6497 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext" 6498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6499 break 2 6500 fi 6501 done 6502 done 6503 IFS=$as_save_IFS 6504 6505 ;; 6506 esac 6507 fi 6508 DF=$ac_cv_path_DF 6509 if test -n "$DF"; then 6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5 6511 $as_echo "$DF" >&6; } 6512 else 6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6514 $as_echo "no" >&6; } 6515 fi 6516 6517 6518 # Extract the first word of "SetFile", so it can be a program name with args. 6519 set dummy SetFile; ac_word=$2 6520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6521 $as_echo_n "checking for $ac_word... " >&6; } 6522 if ${ac_cv_path_SETFILE+:} false; then : 6523 $as_echo_n "(cached) " >&6 6524 else 6525 case $SETFILE in 6526 [\\/]* | ?:[\\/]*) 6527 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path. 6528 ;; 6529 *) 6530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6531 for as_dir in $PATH 6532 do 6533 IFS=$as_save_IFS 6534 test -z "$as_dir" && as_dir=. 6535 for ac_exec_ext in '' $ac_executable_extensions; do 6536 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6537 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext" 6538 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6539 break 2 6540 fi 6541 done 6542 done 6543 IFS=$as_save_IFS 6544 6545 ;; 6546 esac 6547 fi 6548 SETFILE=$ac_cv_path_SETFILE 6549 if test -n "$SETFILE"; then 6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5 6551 $as_echo "$SETFILE" >&6; } 6552 else 6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6554 $as_echo "no" >&6; } 6555 fi 6556 6557 6558 6559 6560 # Now we can determine OpenJDK build and target platforms. This is required to 6561 # have early on. 6562 # Make sure we can run config.sub. 6563 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 6564 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 6565 6566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 6567 $as_echo_n "checking build system type... " >&6; } 6568 if ${ac_cv_build+:} false; then : 6569 $as_echo_n "(cached) " >&6 6570 else 6571 ac_build_alias=$build_alias 6572 test "x$ac_build_alias" = x && 6573 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 6574 test "x$ac_build_alias" = x && 6575 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 6576 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 6577 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 6578 6579 fi 6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 6581 $as_echo "$ac_cv_build" >&6; } 6582 case $ac_cv_build in 6583 *-*-*) ;; 6584 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 6585 esac 6586 build=$ac_cv_build 6587 ac_save_IFS=$IFS; IFS='-' 6588 set x $ac_cv_build 6589 shift 6590 build_cpu=$1 6591 build_vendor=$2 6592 shift; shift 6593 # Remember, the first character of IFS is used to create $*, 6594 # except with old shells: 6595 build_os=$* 6596 IFS=$ac_save_IFS 6597 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 6598 6599 6600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 6601 $as_echo_n "checking host system type... " >&6; } 6602 if ${ac_cv_host+:} false; then : 6603 $as_echo_n "(cached) " >&6 6604 else 6605 if test "x$host_alias" = x; then 6606 ac_cv_host=$ac_cv_build 6607 else 6608 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 6609 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 6610 fi 6611 6612 fi 6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 6614 $as_echo "$ac_cv_host" >&6; } 6615 case $ac_cv_host in 6616 *-*-*) ;; 6617 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 6618 esac 6619 host=$ac_cv_host 6620 ac_save_IFS=$IFS; IFS='-' 6621 set x $ac_cv_host 6622 shift 6623 host_cpu=$1 6624 host_vendor=$2 6625 shift; shift 6626 # Remember, the first character of IFS is used to create $*, 6627 # except with old shells: 6628 host_os=$* 6629 IFS=$ac_save_IFS 6630 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 6631 6632 6633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 6634 $as_echo_n "checking target system type... " >&6; } 6635 if ${ac_cv_target+:} false; then : 6636 $as_echo_n "(cached) " >&6 6637 else 6638 if test "x$target_alias" = x; then 6639 ac_cv_target=$ac_cv_host 6640 else 6641 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || 6642 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 6643 fi 6644 6645 fi 6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 6647 $as_echo "$ac_cv_target" >&6; } 6648 case $ac_cv_target in 6649 *-*-*) ;; 6650 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; 6651 esac 6652 target=$ac_cv_target 6653 ac_save_IFS=$IFS; IFS='-' 6654 set x $ac_cv_target 6655 shift 6656 target_cpu=$1 6657 target_vendor=$2 6658 shift; shift 6659 # Remember, the first character of IFS is used to create $*, 6660 # except with old shells: 6661 target_os=$* 6662 IFS=$ac_save_IFS 6663 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac 6664 6665 6666 # The aliases save the names the user supplied, while $host etc. 6667 # will get canonicalized. 6668 test -n "$target_alias" && 6669 test "$program_prefix$program_suffix$program_transform_name" = \ 6670 NONENONEs,x,x, && 6671 program_prefix=${target_alias}- 6672 6673 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" 6674 # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the 6675 # product you're building. The target of this build is called "host". Since this is confusing to most people, we 6676 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need 6677 # to use the configure naming style. 6678 6679 6680 6681 6682 6683 # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME 6684 # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME 6685 # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build, 6686 # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME. 6687 OPENJDK_TARGET_AUTOCONF_NAME="$host" 6688 OPENJDK_BUILD_AUTOCONF_NAME="$build" 6689 6690 6691 6692 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. 6693 6694 case "$build_os" in 6695 *linux*) 6696 VAR_OS=linux 6697 VAR_OS_API=posix 6698 VAR_OS_ENV=linux 6699 ;; 6700 *solaris*) 6701 VAR_OS=solaris 6702 VAR_OS_API=posix 6703 VAR_OS_ENV=solaris 6704 ;; 6705 *darwin*) 6706 VAR_OS=macosx 6707 VAR_OS_API=posix 6708 VAR_OS_ENV=macosx 6709 ;; 6710 *bsd*) 6711 VAR_OS=bsd 6712 VAR_OS_API=posix 6713 VAR_OS_ENV=bsd 6714 ;; 6715 *cygwin*) 6716 VAR_OS=windows 6717 VAR_OS_API=winapi 6718 VAR_OS_ENV=windows.cygwin 6719 ;; 6720 *mingw*) 6721 VAR_OS=windows 6722 VAR_OS_API=winapi 6723 VAR_OS_ENV=windows.msys 6724 ;; 6725 *) 6726 as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5 6727 ;; 6728 esac 6729 6730 6731 # First argument is the cpu name from the trip/quad 6732 case "$build_cpu" in 6733 x86_64) 6734 VAR_CPU=x86_64 6735 VAR_CPU_ARCH=x86 6736 VAR_CPU_BITS=64 6737 VAR_CPU_ENDIAN=little 6738 ;; 6739 i?86) 6740 VAR_CPU=x86 6741 VAR_CPU_ARCH=x86 6742 VAR_CPU_BITS=32 6743 VAR_CPU_ENDIAN=little 6744 ;; 6745 arm*) 6746 VAR_CPU=arm 6747 VAR_CPU_ARCH=arm 6748 VAR_CPU_BITS=32 6749 VAR_CPU_ENDIAN=little 6750 ;; 6751 powerpc) 6752 VAR_CPU=ppc 6753 VAR_CPU_ARCH=ppc 6754 VAR_CPU_BITS=32 6755 VAR_CPU_ENDIAN=big 6756 ;; 6757 powerpc64) 6758 VAR_CPU=ppc64 6759 VAR_CPU_ARCH=ppc 6760 VAR_CPU_BITS=64 6761 VAR_CPU_ENDIAN=big 6762 ;; 6763 sparc) 6764 VAR_CPU=sparc 6765 VAR_CPU_ARCH=sparc 6766 VAR_CPU_BITS=32 6767 VAR_CPU_ENDIAN=big 6768 ;; 6769 sparcv9) 6770 VAR_CPU=sparcv9 6771 VAR_CPU_ARCH=sparc 6772 VAR_CPU_BITS=64 6773 VAR_CPU_ENDIAN=big 6774 ;; 6775 *) 6776 as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5 6777 ;; 6778 esac 6779 6780 # ..and setup our own variables. (Do this explicitely to facilitate searching) 6781 OPENJDK_BUILD_OS="$VAR_OS" 6782 OPENJDK_BUILD_OS_API="$VAR_OS_API" 6783 OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV" 6784 OPENJDK_BUILD_CPU="$VAR_CPU" 6785 OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH" 6786 OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS" 6787 OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN" 6788 6789 6790 6791 6792 6793 6794 6795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5 6796 $as_echo_n "checking openjdk-build os-cpu... " >&6; } 6797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5 6798 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; } 6799 6800 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. 6801 6802 case "$host_os" in 6803 *linux*) 6804 VAR_OS=linux 6805 VAR_OS_API=posix 6806 VAR_OS_ENV=linux 6807 ;; 6808 *solaris*) 6809 VAR_OS=solaris 6810 VAR_OS_API=posix 6811 VAR_OS_ENV=solaris 6812 ;; 6813 *darwin*) 6814 VAR_OS=macosx 6815 VAR_OS_API=posix 6816 VAR_OS_ENV=macosx 6817 ;; 6818 *bsd*) 6819 VAR_OS=bsd 6820 VAR_OS_API=posix 6821 VAR_OS_ENV=bsd 6822 ;; 6823 *cygwin*) 6824 VAR_OS=windows 6825 VAR_OS_API=winapi 6826 VAR_OS_ENV=windows.cygwin 6827 ;; 6828 *mingw*) 6829 VAR_OS=windows 6830 VAR_OS_API=winapi 6831 VAR_OS_ENV=windows.msys 6832 ;; 6833 *) 6834 as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5 6835 ;; 6836 esac 6837 6838 6839 # First argument is the cpu name from the trip/quad 6840 case "$host_cpu" in 6841 x86_64) 6842 VAR_CPU=x86_64 6843 VAR_CPU_ARCH=x86 6844 VAR_CPU_BITS=64 6845 VAR_CPU_ENDIAN=little 6846 ;; 6847 i?86) 6848 VAR_CPU=x86 6849 VAR_CPU_ARCH=x86 6850 VAR_CPU_BITS=32 6851 VAR_CPU_ENDIAN=little 6852 ;; 6853 arm*) 6854 VAR_CPU=arm 6855 VAR_CPU_ARCH=arm 6856 VAR_CPU_BITS=32 6857 VAR_CPU_ENDIAN=little 6858 ;; 6859 powerpc) 6860 VAR_CPU=ppc 6861 VAR_CPU_ARCH=ppc 6862 VAR_CPU_BITS=32 6863 VAR_CPU_ENDIAN=big 6864 ;; 6865 powerpc64) 6866 VAR_CPU=ppc64 6867 VAR_CPU_ARCH=ppc 6868 VAR_CPU_BITS=64 6869 VAR_CPU_ENDIAN=big 6870 ;; 6871 sparc) 6872 VAR_CPU=sparc 6873 VAR_CPU_ARCH=sparc 6874 VAR_CPU_BITS=32 6875 VAR_CPU_ENDIAN=big 6876 ;; 6877 sparcv9) 6878 VAR_CPU=sparcv9 6879 VAR_CPU_ARCH=sparc 6880 VAR_CPU_BITS=64 6881 VAR_CPU_ENDIAN=big 6882 ;; 6883 *) 6884 as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5 6885 ;; 6886 esac 6887 6888 # ... and setup our own variables. (Do this explicitely to facilitate searching) 6889 OPENJDK_TARGET_OS="$VAR_OS" 6890 OPENJDK_TARGET_OS_API="$VAR_OS_API" 6891 OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV" 6892 OPENJDK_TARGET_CPU="$VAR_CPU" 6893 OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH" 6894 OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS" 6895 OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN" 6896 6897 6898 6899 6900 6901 6902 6903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5 6904 $as_echo_n "checking openjdk-target os-cpu... " >&6; } 6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5 6906 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; } 6907 6908 6909 6910 # Check whether --with-target-bits was given. 6911 if test "${with_target_bits+set}" = set; then : 6912 withval=$with_target_bits; 6913 fi 6914 6915 6916 # We have three types of compiles: 6917 # native == normal compilation, target system == build system 6918 # cross == traditional cross compilation, target system != build system; special toolchain needed 6919 # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines 6920 # 6921 if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then 6922 # We're doing a proper cross-compilation 6923 COMPILE_TYPE="cross" 6924 else 6925 COMPILE_TYPE="native" 6926 fi 6927 6928 if test "x$with_target_bits" != x; then 6929 if test "x$COMPILE_TYPE" = "xcross"; then 6930 as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5 6931 fi 6932 6933 if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 6934 # A reduced build is requested 6935 COMPILE_TYPE="reduced" 6936 OPENJDK_TARGET_CPU_BITS=32 6937 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then 6938 OPENJDK_TARGET_CPU=x86 6939 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then 6940 OPENJDK_TARGET_CPU=sparc 6941 else 6942 as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5 6943 fi 6944 elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 6945 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 6946 elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then 6947 { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5 6948 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;} 6949 else 6950 as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5 6951 fi 6952 fi 6953 6954 6955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5 6956 $as_echo_n "checking compilation type... " >&6; } 6957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5 6958 $as_echo "$COMPILE_TYPE" >&6; } 6959 6960 6961 if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 6962 REQUIRED_OS_NAME=SunOS 6963 REQUIRED_OS_VERSION=5.10 6964 fi 6965 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then 6966 REQUIRED_OS_NAME=Linux 6967 REQUIRED_OS_VERSION=2.6 6968 fi 6969 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 6970 REQUIRED_OS_NAME=Windows 6971 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 6972 REQUIRED_OS_VERSION=5.2 6973 else 6974 REQUIRED_OS_VERSION=5.1 6975 fi 6976 fi 6977 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 6978 REQUIRED_OS_NAME=Darwin 6979 REQUIRED_OS_VERSION=11.2 6980 fi 6981 6982 6983 6984 6985 6986 # Also store the legacy naming of the cpu. 6987 # Ie i586 and amd64 instead of x86 and x86_64 6988 OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU" 6989 if test "x$OPENJDK_TARGET_CPU" = xx86; then 6990 OPENJDK_TARGET_CPU_LEGACY="i586" 6991 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 6992 # On all platforms except MacOSX replace x86_64 with amd64. 6993 OPENJDK_TARGET_CPU_LEGACY="amd64" 6994 fi 6995 6996 6997 # And the second legacy naming of the cpu. 6998 # Ie i386 and amd64 instead of x86 and x86_64. 6999 OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU" 7000 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7001 OPENJDK_TARGET_CPU_LEGACY_LIB="i386" 7002 elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7003 OPENJDK_TARGET_CPU_LEGACY_LIB="amd64" 7004 fi 7005 7006 7007 # This is the name of the cpu (but using i386 and amd64 instead of 7008 # x86 and x86_64, respectively), preceeded by a /, to be used when 7009 # locating libraries. On macosx, it's empty, though. 7010 OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB" 7011 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 7012 OPENJDK_TARGET_CPU_LIBDIR="" 7013 fi 7014 7015 7016 # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to 7017 # /amd64 or /sparcv9. This string is appended to some library paths, like this: 7018 # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so 7019 OPENJDK_TARGET_CPU_ISADIR="" 7020 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 7021 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7022 OPENJDK_TARGET_CPU_ISADIR="/amd64" 7023 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then 7024 OPENJDK_TARGET_CPU_ISADIR="/sparcv9" 7025 fi 7026 fi 7027 7028 7029 # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property 7030 OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU" 7031 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then 7032 # On linux only, we replace x86 with i386. 7033 OPENJDK_TARGET_CPU_OSARCH="i386" 7034 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7035 # On all platforms except macosx, we replace x86_64 with amd64. 7036 OPENJDK_TARGET_CPU_OSARCH="amd64" 7037 fi 7038 7039 7040 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU" 7041 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7042 OPENJDK_TARGET_CPU_JLI="i386" 7043 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7044 # On all platforms except macosx, we replace x86_64 with amd64. 7045 OPENJDK_TARGET_CPU_JLI="amd64" 7046 fi 7047 # Now setup the -D flags for building libjli. 7048 OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'" 7049 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 7050 if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then 7051 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'" 7052 elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then 7053 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'" 7054 fi 7055 fi 7056 7057 7058 # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths. 7059 if test "x$OPENJDK_TARGET_OS_API" = xposix; then 7060 OPENJDK_TARGET_OS_API_DIR="solaris" 7061 fi 7062 if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then 7063 OPENJDK_TARGET_OS_API_DIR="windows" 7064 fi 7065 7066 7067 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7068 A_LP64="LP64:=" 7069 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in 7070 # unpack200.exe 7071 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then 7072 ADD_LP64="-D_LP64=1" 7073 fi 7074 fi 7075 LP64=$A_LP64 7076 7077 7078 if test "x$COMPILE_TYPE" = "xcross"; then 7079 # FIXME: ... or should this include reduced builds..? 7080 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY" 7081 else 7082 DEFINE_CROSS_COMPILE_ARCH="" 7083 fi 7084 7085 7086 # ZERO_ARCHDEF is used to enable architecture-specific code 7087 case "${OPENJDK_TARGET_CPU}" in 7088 ppc*) ZERO_ARCHDEF=PPC ;; 7089 s390*) ZERO_ARCHDEF=S390 ;; 7090 sparc*) ZERO_ARCHDEF=SPARC ;; 7091 x86_64*) ZERO_ARCHDEF=AMD64 ;; 7092 x86) ZERO_ARCHDEF=IA32 ;; 7093 *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z) 7094 esac 7095 7096 7097 7098 7099 7100 # Continue setting up basic stuff. Most remaining code require fundamental tools. 7101 7102 # Locate the directory of this script. 7103 SCRIPT="$0" 7104 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L` 7105 7106 # Where is the source? It is located two levels above the configure script. 7107 CURDIR="$PWD" 7108 cd "$AUTOCONF_DIR/../.." 7109 SRC_ROOT="`$THEPWDCMD -L`" 7110 7111 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 7112 PATH_SEP=";" 7113 7114 SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m` 7115 if test $SRC_ROOT_LENGTH -gt 100; then 7116 as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5 7117 fi 7118 7119 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5 7121 $as_echo_n "checking cygwin release... " >&6; } 7122 CYGWIN_VERSION=`$UNAME -r` 7123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5 7124 $as_echo "$CYGWIN_VERSION" >&6; } 7125 WINDOWS_ENV_VENDOR='cygwin' 7126 WINDOWS_ENV_VERSION="$CYGWIN_VERSION" 7127 7128 CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.` 7129 if test "x$CYGWIN_VERSION_OK" = x; then 7130 { $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 7131 $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;} 7132 as_fn_error $? "Cannot continue" "$LINENO" 5 7133 fi 7134 if test "x$CYGPATH" = x; then 7135 as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5 7136 fi 7137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5 7138 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; } 7139 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away 7140 cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"` 7141 # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. 7142 CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` 7143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5 7144 $as_echo "$CYGWIN_ROOT_PATH" >&6; } 7145 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" 7146 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` 7147 if test "x$test_cygdrive_prefix" = x; then 7148 as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5 7149 fi 7150 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5 7152 $as_echo_n "checking msys release... " >&6; } 7153 MSYS_VERSION=`$UNAME -r` 7154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5 7155 $as_echo "$MSYS_VERSION" >&6; } 7156 7157 WINDOWS_ENV_VENDOR='msys' 7158 WINDOWS_ENV_VERSION="$MSYS_VERSION" 7159 7160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5 7161 $as_echo_n "checking msys root directory as unix-style path... " >&6; } 7162 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away 7163 MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"` 7164 7165 windows_path="$MSYS_ROOT_PATH" 7166 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7167 unix_path=`$CYGPATH -u "$windows_path"` 7168 MSYS_ROOT_PATH="$unix_path" 7169 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7170 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7171 MSYS_ROOT_PATH="$unix_path" 7172 fi 7173 7174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5 7175 $as_echo "$MSYS_ROOT_PATH" >&6; } 7176 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH" 7177 else 7178 as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5 7179 fi 7180 7181 # Test if windows or unix (cygwin/msys) find is first in path. 7182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5 7183 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; } 7184 FIND_BINARY_OUTPUT=`find --version 2>&1` 7185 if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then 7186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5 7187 $as_echo "unix style" >&6; } 7188 elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then 7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5 7190 $as_echo "Windows" >&6; } 7191 { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5 7192 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;} 7193 { $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 7194 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;} 7195 as_fn_error $? "Cannot continue" "$LINENO" 5 7196 else 7197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 7198 $as_echo "unknown" >&6; } 7199 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5 7200 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;} 7201 fi 7202 7203 else 7204 PATH_SEP=":" 7205 fi 7206 7207 7208 7209 cd "$CURDIR" 7210 7211 7212 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7213 7214 # Input might be given as Windows format, start by converting to 7215 # unix format. 7216 path="$SRC_ROOT" 7217 new_path=`$CYGPATH -u "$path"` 7218 7219 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7220 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7221 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7222 # "foo.exe" is OK but "foo" is an error. 7223 # 7224 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7225 # It is also a way to make sure we got the proper file name for the real test later on. 7226 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7227 if test "x$test_shortpath" = x; then 7228 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7229 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7230 as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5 7231 fi 7232 7233 # Call helper function which possibly converts this using DOS-style short mode. 7234 # If so, the updated path is stored in $new_path. 7235 7236 input_path="$new_path" 7237 # Check if we need to convert this using DOS-style short mode. If the path 7238 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7239 # take no chances and rewrite it. 7240 # Note: m4 eats our [], so we need to use [ and ] instead. 7241 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7242 if test "x$has_forbidden_chars" != x; then 7243 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7244 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7245 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7246 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7247 # Going to short mode and back again did indeed matter. Since short mode is 7248 # case insensitive, let's make it lowercase to improve readability. 7249 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7250 # Now convert it back to Unix-stile (cygpath) 7251 input_path=`$CYGPATH -u "$shortmode_path"` 7252 new_path="$input_path" 7253 fi 7254 fi 7255 7256 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7257 if test "x$test_cygdrive_prefix" = x; then 7258 # As a simple fix, exclude /usr/bin since it's not a real path. 7259 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7260 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7261 # a path prefixed by /cygdrive for fixpath to work. 7262 new_path="$CYGWIN_ROOT_PATH$input_path" 7263 fi 7264 fi 7265 7266 7267 if test "x$path" != "x$new_path"; then 7268 SRC_ROOT="$new_path" 7269 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7270 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7271 fi 7272 7273 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7274 7275 path="$SRC_ROOT" 7276 has_colon=`$ECHO $path | $GREP ^.:` 7277 new_path="$path" 7278 if test "x$has_colon" = x; then 7279 # Not in mixed or Windows style, start by that. 7280 new_path=`cmd //c echo $path` 7281 fi 7282 7283 7284 input_path="$new_path" 7285 # Check if we need to convert this using DOS-style short mode. If the path 7286 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7287 # take no chances and rewrite it. 7288 # Note: m4 eats our [], so we need to use [ and ] instead. 7289 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7290 if test "x$has_forbidden_chars" != x; then 7291 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7292 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7293 fi 7294 7295 7296 windows_path="$new_path" 7297 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7298 unix_path=`$CYGPATH -u "$windows_path"` 7299 new_path="$unix_path" 7300 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7301 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7302 new_path="$unix_path" 7303 fi 7304 7305 if test "x$path" != "x$new_path"; then 7306 SRC_ROOT="$new_path" 7307 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7308 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7309 fi 7310 7311 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7312 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7313 7314 else 7315 # We're on a posix platform. Hooray! :) 7316 path="$SRC_ROOT" 7317 has_space=`$ECHO "$path" | $GREP " "` 7318 if test "x$has_space" != x; then 7319 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7320 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7321 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7322 fi 7323 7324 # Use eval to expand a potential ~ 7325 eval path="$path" 7326 if test ! -f "$path" && test ! -d "$path"; then 7327 as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 7328 fi 7329 7330 SRC_ROOT="`cd "$path"; $THEPWDCMD -L`" 7331 fi 7332 7333 7334 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7335 7336 # Input might be given as Windows format, start by converting to 7337 # unix format. 7338 path="$CURDIR" 7339 new_path=`$CYGPATH -u "$path"` 7340 7341 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7342 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7343 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7344 # "foo.exe" is OK but "foo" is an error. 7345 # 7346 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7347 # It is also a way to make sure we got the proper file name for the real test later on. 7348 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7349 if test "x$test_shortpath" = x; then 7350 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7351 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7352 as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5 7353 fi 7354 7355 # Call helper function which possibly converts this using DOS-style short mode. 7356 # If so, the updated path is stored in $new_path. 7357 7358 input_path="$new_path" 7359 # Check if we need to convert this using DOS-style short mode. If the path 7360 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7361 # take no chances and rewrite it. 7362 # Note: m4 eats our [], so we need to use [ and ] instead. 7363 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7364 if test "x$has_forbidden_chars" != x; then 7365 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7366 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7367 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7368 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7369 # Going to short mode and back again did indeed matter. Since short mode is 7370 # case insensitive, let's make it lowercase to improve readability. 7371 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7372 # Now convert it back to Unix-stile (cygpath) 7373 input_path=`$CYGPATH -u "$shortmode_path"` 7374 new_path="$input_path" 7375 fi 7376 fi 7377 7378 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7379 if test "x$test_cygdrive_prefix" = x; then 7380 # As a simple fix, exclude /usr/bin since it's not a real path. 7381 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7382 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7383 # a path prefixed by /cygdrive for fixpath to work. 7384 new_path="$CYGWIN_ROOT_PATH$input_path" 7385 fi 7386 fi 7387 7388 7389 if test "x$path" != "x$new_path"; then 7390 CURDIR="$new_path" 7391 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7392 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7393 fi 7394 7395 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7396 7397 path="$CURDIR" 7398 has_colon=`$ECHO $path | $GREP ^.:` 7399 new_path="$path" 7400 if test "x$has_colon" = x; then 7401 # Not in mixed or Windows style, start by that. 7402 new_path=`cmd //c echo $path` 7403 fi 7404 7405 7406 input_path="$new_path" 7407 # Check if we need to convert this using DOS-style short mode. If the path 7408 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7409 # take no chances and rewrite it. 7410 # Note: m4 eats our [], so we need to use [ and ] instead. 7411 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7412 if test "x$has_forbidden_chars" != x; then 7413 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7414 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7415 fi 7416 7417 7418 windows_path="$new_path" 7419 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7420 unix_path=`$CYGPATH -u "$windows_path"` 7421 new_path="$unix_path" 7422 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7423 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7424 new_path="$unix_path" 7425 fi 7426 7427 if test "x$path" != "x$new_path"; then 7428 CURDIR="$new_path" 7429 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7430 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7431 fi 7432 7433 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7434 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7435 7436 else 7437 # We're on a posix platform. Hooray! :) 7438 path="$CURDIR" 7439 has_space=`$ECHO "$path" | $GREP " "` 7440 if test "x$has_space" != x; then 7441 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7442 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7443 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7444 fi 7445 7446 # Use eval to expand a potential ~ 7447 eval path="$path" 7448 if test ! -f "$path" && test ! -d "$path"; then 7449 as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5 7450 fi 7451 7452 CURDIR="`cd "$path"; $THEPWDCMD -L`" 7453 fi 7454 7455 7456 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then 7457 # Add extra search paths on solaris for utilities like ar and as etc... 7458 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" 7459 fi 7460 7461 # You can force the sys-root if the sys-root encoded into the cross compiler tools 7462 # is not correct. 7463 7464 # Check whether --with-sys-root was given. 7465 if test "${with_sys_root+set}" = set; then : 7466 withval=$with_sys_root; 7467 fi 7468 7469 7470 if test "x$with_sys_root" != x; then 7471 SYS_ROOT=$with_sys_root 7472 else 7473 SYS_ROOT=/ 7474 fi 7475 7476 7477 7478 # Check whether --with-tools-dir was given. 7479 if test "${with_tools_dir+set}" = set; then : 7480 withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir 7481 fi 7482 7483 7484 7485 # Check whether --with-devkit was given. 7486 if test "${with_devkit+set}" = set; then : 7487 withval=$with_devkit; 7488 if test "x$with_sys_root" != x; then 7489 as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5 7490 fi 7491 if test "x$with_tools_dir" != x; then 7492 as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5 7493 fi 7494 TOOLS_DIR=$with_devkit/bin 7495 if test -d "$with_devkit/$host_alias/libc"; then 7496 SYS_ROOT=$with_devkit/$host_alias/libc 7497 elif test -d "$with_devkit/$host/sys-root"; then 7498 SYS_ROOT=$with_devkit/$host/sys-root 7499 fi 7500 7501 fi 7502 7503 7504 7505 7506 # Setup default logging of stdout and stderr to build.log in the output root. 7507 BUILD_LOG='$(OUTPUT_ROOT)/build.log' 7508 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old' 7509 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)' 7510 7511 7512 7513 7514 7515 # Check if it's a pure open build or if custom sources are to be used. 7516 7517 # Check whether --enable-openjdk-only was given. 7518 if test "${enable_openjdk_only+set}" = set; then : 7519 enableval=$enable_openjdk_only; 7520 else 7521 enable_openjdk_only="no" 7522 fi 7523 7524 7525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5 7526 $as_echo_n "checking for presence of closed sources... " >&6; } 7527 if test -d "$SRC_ROOT/jdk/src/closed"; then 7528 CLOSED_SOURCE_PRESENT=yes 7529 else 7530 CLOSED_SOURCE_PRESENT=no 7531 fi 7532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5 7533 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; } 7534 7535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5 7536 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; } 7537 SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only" 7538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5 7539 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; } 7540 7541 if test "x$CLOSED_SOURCE_PRESENT" = xno; then 7542 OPENJDK=true 7543 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 7544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5 7545 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;} 7546 fi 7547 else 7548 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 7549 OPENJDK=true 7550 else 7551 OPENJDK=false 7552 fi 7553 fi 7554 7555 if test "x$OPENJDK" = "xtrue"; then 7556 SET_OPENJDK="OPENJDK=true" 7557 fi 7558 7559 7560 7561 7562 # These are needed to be able to create a configuration name (and thus the output directory) 7563 7564 ############################################################################### 7565 # 7566 # Check which variant of the JDK that we want to build. 7567 # Currently we have: 7568 # normal: standard edition 7569 # but the custom make system may add other variants 7570 # 7571 # Effectively the JDK variant gives a name to a specific set of 7572 # modules to compile into the JDK. In the future, these modules 7573 # might even be Jigsaw modules. 7574 # 7575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5 7576 $as_echo_n "checking which variant of the JDK to build... " >&6; } 7577 7578 # Check whether --with-jdk-variant was given. 7579 if test "${with_jdk_variant+set}" = set; then : 7580 withval=$with_jdk_variant; 7581 fi 7582 7583 7584 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then 7585 JDK_VARIANT="normal" 7586 else 7587 as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5 7588 fi 7589 7590 7591 7592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5 7593 $as_echo "$JDK_VARIANT" >&6; } 7594 7595 7596 7597 ############################################################################### 7598 # 7599 # Check which variants of the JVM that we want to build. 7600 # Currently we have: 7601 # server: normal interpreter and a tiered C1/C2 compiler 7602 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) 7603 # minimal1: reduced form of client with optional VM services and features stripped out 7604 # kernel: kernel footprint JVM that passes the TCK without major performance problems, 7605 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc 7606 # zero: no machine code interpreter, no compiler 7607 # zeroshark: zero interpreter and shark/llvm compiler backend 7608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5 7609 $as_echo_n "checking which variants of the JVM to build... " >&6; } 7610 7611 # Check whether --with-jvm-variants was given. 7612 if test "${with_jvm_variants+set}" = set; then : 7613 withval=$with_jvm_variants; 7614 fi 7615 7616 7617 if test "x$with_jvm_variants" = x; then 7618 with_jvm_variants="server" 7619 fi 7620 7621 JVM_VARIANTS=",$with_jvm_variants," 7622 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` 7623 7624 if test "x$TEST_VARIANTS" != "x,"; then 7625 as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5 7626 fi 7627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5 7628 $as_echo "$with_jvm_variants" >&6; } 7629 7630 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` 7631 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 7632 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'` 7633 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` 7634 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` 7635 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` 7636 7637 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 7638 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7639 as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5 7640 fi 7641 fi 7642 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 7643 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7644 as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5 7645 fi 7646 fi 7647 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 7648 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7649 as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5 7650 fi 7651 fi 7652 7653 # Replace the commas with AND for use in the build directory name. 7654 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` 7655 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/'` 7656 if test "x$COUNT_VARIANTS" != "x,1"; then 7657 BUILDING_MULTIPLE_JVM_VARIANTS=yes 7658 else 7659 BUILDING_MULTIPLE_JVM_VARIANTS=no 7660 fi 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 INCLUDE_SA=true 7671 if test "x$JVM_VARIANT_ZERO" = xtrue ; then 7672 INCLUDE_SA=false 7673 fi 7674 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then 7675 INCLUDE_SA=false 7676 fi 7677 7678 7679 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 7680 MACOSX_UNIVERSAL="true" 7681 fi 7682 7683 7684 7685 7686 7687 ############################################################################### 7688 # 7689 # Set the debug level 7690 # release: no debug information, all optimizations, no asserts. 7691 # fastdebug: debug information (-g), all optimizations, all asserts 7692 # slowdebug: debug information (-g), no optimizations, all asserts 7693 # 7694 DEBUG_LEVEL="release" 7695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5 7696 $as_echo_n "checking which debug level to use... " >&6; } 7697 # Check whether --enable-debug was given. 7698 if test "${enable_debug+set}" = set; then : 7699 enableval=$enable_debug; 7700 ENABLE_DEBUG="${enableval}" 7701 DEBUG_LEVEL="fastdebug" 7702 7703 else 7704 ENABLE_DEBUG="no" 7705 fi 7706 7707 7708 7709 # Check whether --with-debug-level was given. 7710 if test "${with_debug_level+set}" = set; then : 7711 withval=$with_debug_level; 7712 DEBUG_LEVEL="${withval}" 7713 if test "x$ENABLE_DEBUG" = xyes; then 7714 as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5 7715 fi 7716 7717 fi 7718 7719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5 7720 $as_echo "$DEBUG_LEVEL" >&6; } 7721 7722 if test "x$DEBUG_LEVEL" != xrelease && \ 7723 test "x$DEBUG_LEVEL" != xfastdebug && \ 7724 test "x$DEBUG_LEVEL" != xslowdebug; then 7725 as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5 7726 fi 7727 7728 7729 ############################################################################### 7730 # 7731 # Setup legacy vars/targets and new vars to deal with different debug levels. 7732 # 7733 7734 case $DEBUG_LEVEL in 7735 release ) 7736 VARIANT="OPT" 7737 FASTDEBUG="false" 7738 DEBUG_CLASSFILES="false" 7739 BUILD_VARIANT_RELEASE="" 7740 HOTSPOT_DEBUG_LEVEL="product" 7741 HOTSPOT_EXPORT="product" 7742 ;; 7743 fastdebug ) 7744 VARIANT="DBG" 7745 FASTDEBUG="true" 7746 DEBUG_CLASSFILES="true" 7747 BUILD_VARIANT_RELEASE="-fastdebug" 7748 HOTSPOT_DEBUG_LEVEL="fastdebug" 7749 HOTSPOT_EXPORT="fastdebug" 7750 ;; 7751 slowdebug ) 7752 VARIANT="DBG" 7753 FASTDEBUG="false" 7754 DEBUG_CLASSFILES="true" 7755 BUILD_VARIANT_RELEASE="-debug" 7756 HOTSPOT_DEBUG_LEVEL="jvmg" 7757 HOTSPOT_EXPORT="debug" 7758 ;; 7759 esac 7760 7761 ##### 7762 # Generate the legacy makefile targets for hotspot. 7763 # The hotspot api for selecting the build artifacts, really, needs to be improved. 7764 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to 7765 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc 7766 # But until then ... 7767 HOTSPOT_TARGET="" 7768 7769 if test "x$JVM_VARIANT_SERVER" = xtrue; then 7770 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " 7771 fi 7772 7773 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 7774 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " 7775 fi 7776 7777 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 7778 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " 7779 fi 7780 7781 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 7782 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " 7783 fi 7784 7785 if test "x$JVM_VARIANT_ZERO" = xtrue; then 7786 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " 7787 fi 7788 7789 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 7790 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " 7791 fi 7792 7793 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" 7794 7795 # On Macosx universal binaries are produced, but they only contain 7796 # 64 bit intel. This invalidates control of which jvms are built 7797 # from configure, but only server is valid anyway. Fix this 7798 # when hotspot makefiles are rewritten. 7799 if test "x$MACOSX_UNIVERSAL" = xtrue; then 7800 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} 7801 fi 7802 7803 ##### 7804 7805 7806 7807 7808 7809 7810 7811 7812 # With basic setup done, call the custom early hook. 7813 7814 7815 # To properly create a configuration name, we need to have the OpenJDK target 7816 # and options (variants and debug level) parsed. 7817 7818 7819 7820 # Check whether --with-conf-name was given. 7821 if test "${with_conf_name+set}" = set; then : 7822 withval=$with_conf_name; CONF_NAME=${with_conf_name} 7823 fi 7824 7825 7826 # Test from where we are running configure, in or outside of src root. 7827 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \ 7828 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \ 7829 || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then 7830 # We are running configure from the src root. 7831 # Create a default ./build/target-variant-debuglevel output root. 7832 if test "x${CONF_NAME}" = x; then 7833 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 7834 fi 7835 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 7836 $MKDIR -p "$OUTPUT_ROOT" 7837 if test ! -d "$OUTPUT_ROOT"; then 7838 as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5 7839 fi 7840 else 7841 # We are running configure from outside of the src dir. 7842 # Then use the current directory as output dir! 7843 # If configuration is situated in normal build directory, just use the build 7844 # directory name as configuration name, otherwise use the complete path. 7845 if test "x${CONF_NAME}" = x; then 7846 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 7847 fi 7848 OUTPUT_ROOT="$CURDIR" 7849 7850 # WARNING: This might be a bad thing to do. You need to be sure you want to 7851 # have a configuration in this directory. Do some sanity checks! 7852 7853 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then 7854 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for 7855 # other files 7856 files_present=`$LS $OUTPUT_ROOT` 7857 # Configure has already touched config.log and confdefs.h in the current dir when this check 7858 # is performed. 7859 filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \ 7860 | $TR -d '\n'` 7861 if test "x$filtered_files" != x; then 7862 { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5 7863 $as_echo "$as_me: Current directory is $CURDIR." >&6;} 7864 { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5 7865 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;} 7866 { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5 7867 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;} 7868 { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5 7869 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;} 7870 { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5 7871 $as_echo "$as_me: seriously mess up just about everything." >&6;} 7872 { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5 7873 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;} 7874 { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5 7875 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;} 7876 as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5 7877 fi 7878 fi 7879 fi 7880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5 7881 $as_echo_n "checking what configuration name to use... " >&6; } 7882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5 7883 $as_echo "$CONF_NAME" >&6; } 7884 7885 7886 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7887 7888 # Input might be given as Windows format, start by converting to 7889 # unix format. 7890 path="$OUTPUT_ROOT" 7891 new_path=`$CYGPATH -u "$path"` 7892 7893 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7894 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7895 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7896 # "foo.exe" is OK but "foo" is an error. 7897 # 7898 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7899 # It is also a way to make sure we got the proper file name for the real test later on. 7900 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7901 if test "x$test_shortpath" = x; then 7902 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5 7903 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;} 7904 as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5 7905 fi 7906 7907 # Call helper function which possibly converts this using DOS-style short mode. 7908 # If so, the updated path is stored in $new_path. 7909 7910 input_path="$new_path" 7911 # Check if we need to convert this using DOS-style short mode. If the path 7912 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7913 # take no chances and rewrite it. 7914 # Note: m4 eats our [], so we need to use [ and ] instead. 7915 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7916 if test "x$has_forbidden_chars" != x; then 7917 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7918 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7919 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7920 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7921 # Going to short mode and back again did indeed matter. Since short mode is 7922 # case insensitive, let's make it lowercase to improve readability. 7923 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7924 # Now convert it back to Unix-stile (cygpath) 7925 input_path=`$CYGPATH -u "$shortmode_path"` 7926 new_path="$input_path" 7927 fi 7928 fi 7929 7930 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7931 if test "x$test_cygdrive_prefix" = x; then 7932 # As a simple fix, exclude /usr/bin since it's not a real path. 7933 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7934 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7935 # a path prefixed by /cygdrive for fixpath to work. 7936 new_path="$CYGWIN_ROOT_PATH$input_path" 7937 fi 7938 fi 7939 7940 7941 if test "x$path" != "x$new_path"; then 7942 OUTPUT_ROOT="$new_path" 7943 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5 7944 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;} 7945 fi 7946 7947 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7948 7949 path="$OUTPUT_ROOT" 7950 has_colon=`$ECHO $path | $GREP ^.:` 7951 new_path="$path" 7952 if test "x$has_colon" = x; then 7953 # Not in mixed or Windows style, start by that. 7954 new_path=`cmd //c echo $path` 7955 fi 7956 7957 7958 input_path="$new_path" 7959 # Check if we need to convert this using DOS-style short mode. If the path 7960 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7961 # take no chances and rewrite it. 7962 # Note: m4 eats our [], so we need to use [ and ] instead. 7963 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7964 if test "x$has_forbidden_chars" != x; then 7965 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7966 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7967 fi 7968 7969 7970 windows_path="$new_path" 7971 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7972 unix_path=`$CYGPATH -u "$windows_path"` 7973 new_path="$unix_path" 7974 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7975 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7976 new_path="$unix_path" 7977 fi 7978 7979 if test "x$path" != "x$new_path"; then 7980 OUTPUT_ROOT="$new_path" 7981 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5 7982 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;} 7983 fi 7984 7985 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7986 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7987 7988 else 7989 # We're on a posix platform. Hooray! :) 7990 path="$OUTPUT_ROOT" 7991 has_space=`$ECHO "$path" | $GREP " "` 7992 if test "x$has_space" != x; then 7993 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5 7994 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;} 7995 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7996 fi 7997 7998 # Use eval to expand a potential ~ 7999 eval path="$path" 8000 if test ! -f "$path" && test ! -d "$path"; then 8001 as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 8002 fi 8003 8004 OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`" 8005 fi 8006 8007 8008 SPEC=$OUTPUT_ROOT/spec.gmk 8009 8010 CONF_NAME=$CONF_NAME 8011 8012 OUTPUT_ROOT=$OUTPUT_ROOT 8013 8014 8015 # Most of the probed defines are put into config.h 8016 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" 8017 8018 # The spec.gmk file contains all variables for the make system. 8019 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" 8020 8021 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system. 8022 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" 8023 8024 # The bootcycle-spec.gmk file contains support for boot cycle builds. 8025 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" 8026 8027 # The compare.sh is used to compare the build output to other builds. 8028 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" 8029 8030 # Spec.sh is currently used by compare-objects.sh 8031 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" 8032 8033 # The generated Makefile knows where the spec.gmk is and where the source is. 8034 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile 8035 # which will look for generated configurations 8036 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" 8037 8038 8039 # Save the arguments given to us 8040 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments 8041 8042 8043 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY. 8044 8045 for ac_prog in apt-get yum port pkgutil pkgadd 8046 do 8047 # Extract the first word of "$ac_prog", so it can be a program name with args. 8048 set dummy $ac_prog; ac_word=$2 8049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8050 $as_echo_n "checking for $ac_word... " >&6; } 8051 if ${ac_cv_prog_PKGHANDLER+:} false; then : 8052 $as_echo_n "(cached) " >&6 8053 else 8054 if test -n "$PKGHANDLER"; then 8055 ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test. 8056 else 8057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8058 for as_dir in $PATH 8059 do 8060 IFS=$as_save_IFS 8061 test -z "$as_dir" && as_dir=. 8062 for ac_exec_ext in '' $ac_executable_extensions; do 8063 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8064 ac_cv_prog_PKGHANDLER="$ac_prog" 8065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8066 break 2 8067 fi 8068 done 8069 done 8070 IFS=$as_save_IFS 8071 8072 fi 8073 fi 8074 PKGHANDLER=$ac_cv_prog_PKGHANDLER 8075 if test -n "$PKGHANDLER"; then 8076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5 8077 $as_echo "$PKGHANDLER" >&6; } 8078 else 8079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8080 $as_echo "no" >&6; } 8081 fi 8082 8083 8084 test -n "$PKGHANDLER" && break 8085 done 8086 8087 8088 8089 # Setup tools that requires more complex handling, or that is not needed by the configure script. 8090 8091 8092 # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky. 8093 if test "x$MAKE" != x; then 8094 # User has supplied a make, test it. 8095 if test ! -f "$MAKE"; then 8096 as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5 8097 fi 8098 8099 MAKE_CANDIDATE=""$MAKE"" 8100 DESCRIPTION="user supplied MAKE=$MAKE" 8101 if test "x$MAKE_CANDIDATE" != x; then 8102 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8103 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8104 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8105 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8106 if test "x$IS_GNU_MAKE" = x; then 8107 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8108 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8109 else 8110 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8111 if test "x$IS_MODERN_MAKE" = x; then 8112 { $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 8113 $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;} 8114 else 8115 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8116 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8117 MAKE_EXPECTED_ENV='cygwin' 8118 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8119 MAKE_EXPECTED_ENV='msys' 8120 else 8121 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8122 fi 8123 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8124 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8125 else 8126 # Not relevant for non-Windows 8127 IS_MAKE_CORRECT_ENV=true 8128 fi 8129 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8130 { $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 8131 $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;} 8132 else 8133 FOUND_MAKE=$MAKE_CANDIDATE 8134 8135 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8136 8137 # First separate the path from the arguments. This will split at the first 8138 # space. 8139 complete="$FOUND_MAKE" 8140 path="${complete%% *}" 8141 tmp="$complete EOL" 8142 arguments="${tmp#* }" 8143 8144 # Input might be given as Windows format, start by converting to 8145 # unix format. 8146 new_path=`$CYGPATH -u "$path"` 8147 8148 # Now try to locate executable using which 8149 new_path=`$WHICH "$new_path" 2> /dev/null` 8150 # bat and cmd files are not always considered executable in cygwin causing which 8151 # to not find them 8152 if test "x$new_path" = x \ 8153 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8154 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8155 new_path=`$CYGPATH -u "$path"` 8156 fi 8157 if test "x$new_path" = x; then 8158 # Oops. Which didn't find the executable. 8159 # The splitting of arguments from the executable at a space might have been incorrect, 8160 # since paths with space are more likely in Windows. Give it another try with the whole 8161 # argument. 8162 path="$complete" 8163 arguments="EOL" 8164 new_path=`$CYGPATH -u "$path"` 8165 new_path=`$WHICH "$new_path" 2> /dev/null` 8166 # bat and cmd files are not always considered executable in cygwin causing which 8167 # to not find them 8168 if test "x$new_path" = x \ 8169 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8170 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8171 new_path=`$CYGPATH -u "$path"` 8172 fi 8173 if test "x$new_path" = x; then 8174 # It's still not found. Now this is an unrecoverable error. 8175 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8176 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8177 has_space=`$ECHO "$complete" | $GREP " "` 8178 if test "x$has_space" != x; then 8179 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8180 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8181 fi 8182 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8183 fi 8184 fi 8185 8186 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8187 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8188 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8189 # "foo.exe" is OK but "foo" is an error. 8190 # 8191 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8192 # It is also a way to make sure we got the proper file name for the real test later on. 8193 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8194 if test "x$test_shortpath" = x; then 8195 # Short path failed, file does not exist as specified. 8196 # Try adding .exe or .cmd 8197 if test -f "${new_path}.exe"; then 8198 input_to_shortpath="${new_path}.exe" 8199 elif test -f "${new_path}.cmd"; then 8200 input_to_shortpath="${new_path}.cmd" 8201 else 8202 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8203 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8204 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8205 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8206 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8207 fi 8208 else 8209 input_to_shortpath="$new_path" 8210 fi 8211 8212 # Call helper function which possibly converts this using DOS-style short mode. 8213 # If so, the updated path is stored in $new_path. 8214 new_path="$input_to_shortpath" 8215 8216 input_path="$input_to_shortpath" 8217 # Check if we need to convert this using DOS-style short mode. If the path 8218 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8219 # take no chances and rewrite it. 8220 # Note: m4 eats our [], so we need to use [ and ] instead. 8221 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8222 if test "x$has_forbidden_chars" != x; then 8223 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8224 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8225 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8226 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8227 # Going to short mode and back again did indeed matter. Since short mode is 8228 # case insensitive, let's make it lowercase to improve readability. 8229 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8230 # Now convert it back to Unix-stile (cygpath) 8231 input_path=`$CYGPATH -u "$shortmode_path"` 8232 new_path="$input_path" 8233 fi 8234 fi 8235 8236 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8237 if test "x$test_cygdrive_prefix" = x; then 8238 # As a simple fix, exclude /usr/bin since it's not a real path. 8239 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8240 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8241 # a path prefixed by /cygdrive for fixpath to work. 8242 new_path="$CYGWIN_ROOT_PATH$input_path" 8243 fi 8244 fi 8245 8246 # remove trailing .exe if any 8247 new_path="${new_path/%.exe/}" 8248 8249 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8250 8251 # First separate the path from the arguments. This will split at the first 8252 # space. 8253 complete="$FOUND_MAKE" 8254 path="${complete%% *}" 8255 tmp="$complete EOL" 8256 arguments="${tmp#* }" 8257 8258 # Input might be given as Windows format, start by converting to 8259 # unix format. 8260 new_path="$path" 8261 8262 windows_path="$new_path" 8263 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8264 unix_path=`$CYGPATH -u "$windows_path"` 8265 new_path="$unix_path" 8266 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8267 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8268 new_path="$unix_path" 8269 fi 8270 8271 8272 # Now try to locate executable using which 8273 new_path=`$WHICH "$new_path" 2> /dev/null` 8274 8275 if test "x$new_path" = x; then 8276 # Oops. Which didn't find the executable. 8277 # The splitting of arguments from the executable at a space might have been incorrect, 8278 # since paths with space are more likely in Windows. Give it another try with the whole 8279 # argument. 8280 path="$complete" 8281 arguments="EOL" 8282 new_path="$path" 8283 8284 windows_path="$new_path" 8285 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8286 unix_path=`$CYGPATH -u "$windows_path"` 8287 new_path="$unix_path" 8288 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8289 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8290 new_path="$unix_path" 8291 fi 8292 8293 8294 new_path=`$WHICH "$new_path" 2> /dev/null` 8295 8296 if test "x$new_path" = x; then 8297 # It's still not found. Now this is an unrecoverable error. 8298 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8299 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8300 has_space=`$ECHO "$complete" | $GREP " "` 8301 if test "x$has_space" != x; then 8302 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8303 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8304 fi 8305 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8306 fi 8307 fi 8308 8309 # Now new_path has a complete unix path to the binary 8310 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 8311 # Keep paths in /bin as-is, but remove trailing .exe if any 8312 new_path="${new_path/%.exe/}" 8313 # Do not save /bin paths to all_fixpath_prefixes! 8314 else 8315 # Not in mixed or Windows style, start by that. 8316 new_path=`cmd //c echo $new_path` 8317 8318 input_path="$new_path" 8319 # Check if we need to convert this using DOS-style short mode. If the path 8320 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8321 # take no chances and rewrite it. 8322 # Note: m4 eats our [], so we need to use [ and ] instead. 8323 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8324 if test "x$has_forbidden_chars" != x; then 8325 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8326 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8327 fi 8328 8329 # Output is in $new_path 8330 8331 windows_path="$new_path" 8332 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8333 unix_path=`$CYGPATH -u "$windows_path"` 8334 new_path="$unix_path" 8335 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8336 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8337 new_path="$unix_path" 8338 fi 8339 8340 # remove trailing .exe if any 8341 new_path="${new_path/%.exe/}" 8342 8343 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8344 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8345 fi 8346 8347 else 8348 # We're on a posix platform. Hooray! :) 8349 # First separate the path from the arguments. This will split at the first 8350 # space. 8351 complete="$FOUND_MAKE" 8352 path="${complete%% *}" 8353 tmp="$complete EOL" 8354 arguments="${tmp#* }" 8355 8356 # Cannot rely on the command "which" here since it doesn't always work. 8357 is_absolute_path=`$ECHO "$path" | $GREP ^/` 8358 if test -z "$is_absolute_path"; then 8359 # Path to executable is not absolute. Find it. 8360 IFS_save="$IFS" 8361 IFS=: 8362 for p in $PATH; do 8363 if test -f "$p/$path" && test -x "$p/$path"; then 8364 new_path="$p/$path" 8365 break 8366 fi 8367 done 8368 IFS="$IFS_save" 8369 else 8370 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 8371 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 8372 new_path="$path" 8373 fi 8374 8375 if test "x$new_path" = x; then 8376 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8377 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8378 has_space=`$ECHO "$complete" | $GREP " "` 8379 if test "x$has_space" != x; then 8380 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 8381 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 8382 fi 8383 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8384 fi 8385 fi 8386 8387 # Now join together the path and the arguments once again 8388 if test "x$arguments" != xEOL; then 8389 new_complete="$new_path ${arguments% *}" 8390 else 8391 new_complete="$new_path" 8392 fi 8393 8394 if test "x$complete" != "x$new_complete"; then 8395 FOUND_MAKE="$new_complete" 8396 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 8397 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 8398 fi 8399 8400 fi 8401 fi 8402 fi 8403 fi 8404 8405 if test "x$FOUND_MAKE" = x; then 8406 as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5 8407 fi 8408 else 8409 # Try our hardest to locate a correct version of GNU make 8410 for ac_prog in gmake 8411 do 8412 # Extract the first word of "$ac_prog", so it can be a program name with args. 8413 set dummy $ac_prog; ac_word=$2 8414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8415 $as_echo_n "checking for $ac_word... " >&6; } 8416 if ${ac_cv_path_CHECK_GMAKE+:} false; then : 8417 $as_echo_n "(cached) " >&6 8418 else 8419 case $CHECK_GMAKE in 8420 [\\/]* | ?:[\\/]*) 8421 ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path. 8422 ;; 8423 *) 8424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8425 for as_dir in $PATH 8426 do 8427 IFS=$as_save_IFS 8428 test -z "$as_dir" && as_dir=. 8429 for ac_exec_ext in '' $ac_executable_extensions; do 8430 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8431 ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext" 8432 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8433 break 2 8434 fi 8435 done 8436 done 8437 IFS=$as_save_IFS 8438 8439 ;; 8440 esac 8441 fi 8442 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE 8443 if test -n "$CHECK_GMAKE"; then 8444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5 8445 $as_echo "$CHECK_GMAKE" >&6; } 8446 else 8447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8448 $as_echo "no" >&6; } 8449 fi 8450 8451 8452 test -n "$CHECK_GMAKE" && break 8453 done 8454 8455 8456 MAKE_CANDIDATE=""$CHECK_GMAKE"" 8457 DESCRIPTION="gmake in PATH" 8458 if test "x$MAKE_CANDIDATE" != x; then 8459 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8460 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8461 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8462 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8463 if test "x$IS_GNU_MAKE" = x; then 8464 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8465 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8466 else 8467 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8468 if test "x$IS_MODERN_MAKE" = x; then 8469 { $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 8470 $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;} 8471 else 8472 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8473 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8474 MAKE_EXPECTED_ENV='cygwin' 8475 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8476 MAKE_EXPECTED_ENV='msys' 8477 else 8478 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8479 fi 8480 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8481 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8482 else 8483 # Not relevant for non-Windows 8484 IS_MAKE_CORRECT_ENV=true 8485 fi 8486 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8487 { $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 8488 $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;} 8489 else 8490 FOUND_MAKE=$MAKE_CANDIDATE 8491 8492 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8493 8494 # First separate the path from the arguments. This will split at the first 8495 # space. 8496 complete="$FOUND_MAKE" 8497 path="${complete%% *}" 8498 tmp="$complete EOL" 8499 arguments="${tmp#* }" 8500 8501 # Input might be given as Windows format, start by converting to 8502 # unix format. 8503 new_path=`$CYGPATH -u "$path"` 8504 8505 # Now try to locate executable using which 8506 new_path=`$WHICH "$new_path" 2> /dev/null` 8507 # bat and cmd files are not always considered executable in cygwin causing which 8508 # to not find them 8509 if test "x$new_path" = x \ 8510 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8511 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8512 new_path=`$CYGPATH -u "$path"` 8513 fi 8514 if test "x$new_path" = x; then 8515 # Oops. Which didn't find the executable. 8516 # The splitting of arguments from the executable at a space might have been incorrect, 8517 # since paths with space are more likely in Windows. Give it another try with the whole 8518 # argument. 8519 path="$complete" 8520 arguments="EOL" 8521 new_path=`$CYGPATH -u "$path"` 8522 new_path=`$WHICH "$new_path" 2> /dev/null` 8523 # bat and cmd files are not always considered executable in cygwin causing which 8524 # to not find them 8525 if test "x$new_path" = x \ 8526 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8527 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8528 new_path=`$CYGPATH -u "$path"` 8529 fi 8530 if test "x$new_path" = x; then 8531 # It's still not found. Now this is an unrecoverable error. 8532 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8533 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8534 has_space=`$ECHO "$complete" | $GREP " "` 8535 if test "x$has_space" != x; then 8536 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8537 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8538 fi 8539 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8540 fi 8541 fi 8542 8543 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8544 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8545 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8546 # "foo.exe" is OK but "foo" is an error. 8547 # 8548 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8549 # It is also a way to make sure we got the proper file name for the real test later on. 8550 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8551 if test "x$test_shortpath" = x; then 8552 # Short path failed, file does not exist as specified. 8553 # Try adding .exe or .cmd 8554 if test -f "${new_path}.exe"; then 8555 input_to_shortpath="${new_path}.exe" 8556 elif test -f "${new_path}.cmd"; then 8557 input_to_shortpath="${new_path}.cmd" 8558 else 8559 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8560 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8561 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8562 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8563 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8564 fi 8565 else 8566 input_to_shortpath="$new_path" 8567 fi 8568 8569 # Call helper function which possibly converts this using DOS-style short mode. 8570 # If so, the updated path is stored in $new_path. 8571 new_path="$input_to_shortpath" 8572 8573 input_path="$input_to_shortpath" 8574 # Check if we need to convert this using DOS-style short mode. If the path 8575 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8576 # take no chances and rewrite it. 8577 # Note: m4 eats our [], so we need to use [ and ] instead. 8578 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8579 if test "x$has_forbidden_chars" != x; then 8580 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8581 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8582 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8583 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8584 # Going to short mode and back again did indeed matter. Since short mode is 8585 # case insensitive, let's make it lowercase to improve readability. 8586 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8587 # Now convert it back to Unix-stile (cygpath) 8588 input_path=`$CYGPATH -u "$shortmode_path"` 8589 new_path="$input_path" 8590 fi 8591 fi 8592 8593 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8594 if test "x$test_cygdrive_prefix" = x; then 8595 # As a simple fix, exclude /usr/bin since it's not a real path. 8596 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8597 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8598 # a path prefixed by /cygdrive for fixpath to work. 8599 new_path="$CYGWIN_ROOT_PATH$input_path" 8600 fi 8601 fi 8602 8603 # remove trailing .exe if any 8604 new_path="${new_path/%.exe/}" 8605 8606 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8607 8608 # First separate the path from the arguments. This will split at the first 8609 # space. 8610 complete="$FOUND_MAKE" 8611 path="${complete%% *}" 8612 tmp="$complete EOL" 8613 arguments="${tmp#* }" 8614 8615 # Input might be given as Windows format, start by converting to 8616 # unix format. 8617 new_path="$path" 8618 8619 windows_path="$new_path" 8620 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8621 unix_path=`$CYGPATH -u "$windows_path"` 8622 new_path="$unix_path" 8623 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8624 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8625 new_path="$unix_path" 8626 fi 8627 8628 8629 # Now try to locate executable using which 8630 new_path=`$WHICH "$new_path" 2> /dev/null` 8631 8632 if test "x$new_path" = x; then 8633 # Oops. Which didn't find the executable. 8634 # The splitting of arguments from the executable at a space might have been incorrect, 8635 # since paths with space are more likely in Windows. Give it another try with the whole 8636 # argument. 8637 path="$complete" 8638 arguments="EOL" 8639 new_path="$path" 8640 8641 windows_path="$new_path" 8642 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8643 unix_path=`$CYGPATH -u "$windows_path"` 8644 new_path="$unix_path" 8645 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8646 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8647 new_path="$unix_path" 8648 fi 8649 8650 8651 new_path=`$WHICH "$new_path" 2> /dev/null` 8652 8653 if test "x$new_path" = x; then 8654 # It's still not found. Now this is an unrecoverable error. 8655 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8656 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8657 has_space=`$ECHO "$complete" | $GREP " "` 8658 if test "x$has_space" != x; then 8659 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8660 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8661 fi 8662 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8663 fi 8664 fi 8665 8666 # Now new_path has a complete unix path to the binary 8667 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 8668 # Keep paths in /bin as-is, but remove trailing .exe if any 8669 new_path="${new_path/%.exe/}" 8670 # Do not save /bin paths to all_fixpath_prefixes! 8671 else 8672 # Not in mixed or Windows style, start by that. 8673 new_path=`cmd //c echo $new_path` 8674 8675 input_path="$new_path" 8676 # Check if we need to convert this using DOS-style short mode. If the path 8677 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8678 # take no chances and rewrite it. 8679 # Note: m4 eats our [], so we need to use [ and ] instead. 8680 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8681 if test "x$has_forbidden_chars" != x; then 8682 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8683 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8684 fi 8685 8686 # Output is in $new_path 8687 8688 windows_path="$new_path" 8689 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8690 unix_path=`$CYGPATH -u "$windows_path"` 8691 new_path="$unix_path" 8692 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8693 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8694 new_path="$unix_path" 8695 fi 8696 8697 # remove trailing .exe if any 8698 new_path="${new_path/%.exe/}" 8699 8700 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8701 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8702 fi 8703 8704 else 8705 # We're on a posix platform. Hooray! :) 8706 # First separate the path from the arguments. This will split at the first 8707 # space. 8708 complete="$FOUND_MAKE" 8709 path="${complete%% *}" 8710 tmp="$complete EOL" 8711 arguments="${tmp#* }" 8712 8713 # Cannot rely on the command "which" here since it doesn't always work. 8714 is_absolute_path=`$ECHO "$path" | $GREP ^/` 8715 if test -z "$is_absolute_path"; then 8716 # Path to executable is not absolute. Find it. 8717 IFS_save="$IFS" 8718 IFS=: 8719 for p in $PATH; do 8720 if test -f "$p/$path" && test -x "$p/$path"; then 8721 new_path="$p/$path" 8722 break 8723 fi 8724 done 8725 IFS="$IFS_save" 8726 else 8727 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 8728 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 8729 new_path="$path" 8730 fi 8731 8732 if test "x$new_path" = x; then 8733 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8734 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8735 has_space=`$ECHO "$complete" | $GREP " "` 8736 if test "x$has_space" != x; then 8737 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 8738 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 8739 fi 8740 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8741 fi 8742 fi 8743 8744 # Now join together the path and the arguments once again 8745 if test "x$arguments" != xEOL; then 8746 new_complete="$new_path ${arguments% *}" 8747 else 8748 new_complete="$new_path" 8749 fi 8750 8751 if test "x$complete" != "x$new_complete"; then 8752 FOUND_MAKE="$new_complete" 8753 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 8754 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 8755 fi 8756 8757 fi 8758 fi 8759 fi 8760 fi 8761 8762 8763 if test "x$FOUND_MAKE" = x; then 8764 for ac_prog in make 8765 do 8766 # Extract the first word of "$ac_prog", so it can be a program name with args. 8767 set dummy $ac_prog; ac_word=$2 8768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8769 $as_echo_n "checking for $ac_word... " >&6; } 8770 if ${ac_cv_path_CHECK_MAKE+:} false; then : 8771 $as_echo_n "(cached) " >&6 8772 else 8773 case $CHECK_MAKE in 8774 [\\/]* | ?:[\\/]*) 8775 ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path. 8776 ;; 8777 *) 8778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8779 for as_dir in $PATH 8780 do 8781 IFS=$as_save_IFS 8782 test -z "$as_dir" && as_dir=. 8783 for ac_exec_ext in '' $ac_executable_extensions; do 8784 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8785 ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext" 8786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8787 break 2 8788 fi 8789 done 8790 done 8791 IFS=$as_save_IFS 8792 8793 ;; 8794 esac 8795 fi 8796 CHECK_MAKE=$ac_cv_path_CHECK_MAKE 8797 if test -n "$CHECK_MAKE"; then 8798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5 8799 $as_echo "$CHECK_MAKE" >&6; } 8800 else 8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8802 $as_echo "no" >&6; } 8803 fi 8804 8805 8806 test -n "$CHECK_MAKE" && break 8807 done 8808 8809 8810 MAKE_CANDIDATE=""$CHECK_MAKE"" 8811 DESCRIPTION="make in PATH" 8812 if test "x$MAKE_CANDIDATE" != x; then 8813 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8814 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8815 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8816 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8817 if test "x$IS_GNU_MAKE" = x; then 8818 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8819 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8820 else 8821 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8822 if test "x$IS_MODERN_MAKE" = x; then 8823 { $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 8824 $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;} 8825 else 8826 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8827 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8828 MAKE_EXPECTED_ENV='cygwin' 8829 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8830 MAKE_EXPECTED_ENV='msys' 8831 else 8832 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8833 fi 8834 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8835 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8836 else 8837 # Not relevant for non-Windows 8838 IS_MAKE_CORRECT_ENV=true 8839 fi 8840 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8841 { $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 8842 $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;} 8843 else 8844 FOUND_MAKE=$MAKE_CANDIDATE 8845 8846 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8847 8848 # First separate the path from the arguments. This will split at the first 8849 # space. 8850 complete="$FOUND_MAKE" 8851 path="${complete%% *}" 8852 tmp="$complete EOL" 8853 arguments="${tmp#* }" 8854 8855 # Input might be given as Windows format, start by converting to 8856 # unix format. 8857 new_path=`$CYGPATH -u "$path"` 8858 8859 # Now try to locate executable using which 8860 new_path=`$WHICH "$new_path" 2> /dev/null` 8861 # bat and cmd files are not always considered executable in cygwin causing which 8862 # to not find them 8863 if test "x$new_path" = x \ 8864 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8865 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8866 new_path=`$CYGPATH -u "$path"` 8867 fi 8868 if test "x$new_path" = x; then 8869 # Oops. Which didn't find the executable. 8870 # The splitting of arguments from the executable at a space might have been incorrect, 8871 # since paths with space are more likely in Windows. Give it another try with the whole 8872 # argument. 8873 path="$complete" 8874 arguments="EOL" 8875 new_path=`$CYGPATH -u "$path"` 8876 new_path=`$WHICH "$new_path" 2> /dev/null` 8877 # bat and cmd files are not always considered executable in cygwin causing which 8878 # to not find them 8879 if test "x$new_path" = x \ 8880 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8881 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8882 new_path=`$CYGPATH -u "$path"` 8883 fi 8884 if test "x$new_path" = x; then 8885 # It's still not found. Now this is an unrecoverable error. 8886 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8887 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8888 has_space=`$ECHO "$complete" | $GREP " "` 8889 if test "x$has_space" != x; then 8890 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8891 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8892 fi 8893 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8894 fi 8895 fi 8896 8897 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8898 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8899 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8900 # "foo.exe" is OK but "foo" is an error. 8901 # 8902 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8903 # It is also a way to make sure we got the proper file name for the real test later on. 8904 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8905 if test "x$test_shortpath" = x; then 8906 # Short path failed, file does not exist as specified. 8907 # Try adding .exe or .cmd 8908 if test -f "${new_path}.exe"; then 8909 input_to_shortpath="${new_path}.exe" 8910 elif test -f "${new_path}.cmd"; then 8911 input_to_shortpath="${new_path}.cmd" 8912 else 8913 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8914 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8915 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8916 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8917 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8918 fi 8919 else 8920 input_to_shortpath="$new_path" 8921 fi 8922 8923 # Call helper function which possibly converts this using DOS-style short mode. 8924 # If so, the updated path is stored in $new_path. 8925 new_path="$input_to_shortpath" 8926 8927 input_path="$input_to_shortpath" 8928 # Check if we need to convert this using DOS-style short mode. If the path 8929 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8930 # take no chances and rewrite it. 8931 # Note: m4 eats our [], so we need to use [ and ] instead. 8932 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8933 if test "x$has_forbidden_chars" != x; then 8934 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8935 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8936 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8937 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8938 # Going to short mode and back again did indeed matter. Since short mode is 8939 # case insensitive, let's make it lowercase to improve readability. 8940 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8941 # Now convert it back to Unix-stile (cygpath) 8942 input_path=`$CYGPATH -u "$shortmode_path"` 8943 new_path="$input_path" 8944 fi 8945 fi 8946 8947 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8948 if test "x$test_cygdrive_prefix" = x; then 8949 # As a simple fix, exclude /usr/bin since it's not a real path. 8950 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8951 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8952 # a path prefixed by /cygdrive for fixpath to work. 8953 new_path="$CYGWIN_ROOT_PATH$input_path" 8954 fi 8955 fi 8956 8957 # remove trailing .exe if any 8958 new_path="${new_path/%.exe/}" 8959 8960 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8961 8962 # First separate the path from the arguments. This will split at the first 8963 # space. 8964 complete="$FOUND_MAKE" 8965 path="${complete%% *}" 8966 tmp="$complete EOL" 8967 arguments="${tmp#* }" 8968 8969 # Input might be given as Windows format, start by converting to 8970 # unix format. 8971 new_path="$path" 8972 8973 windows_path="$new_path" 8974 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8975 unix_path=`$CYGPATH -u "$windows_path"` 8976 new_path="$unix_path" 8977 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8978 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8979 new_path="$unix_path" 8980 fi 8981 8982 8983 # Now try to locate executable using which 8984 new_path=`$WHICH "$new_path" 2> /dev/null` 8985 8986 if test "x$new_path" = x; then 8987 # Oops. Which didn't find the executable. 8988 # The splitting of arguments from the executable at a space might have been incorrect, 8989 # since paths with space are more likely in Windows. Give it another try with the whole 8990 # argument. 8991 path="$complete" 8992 arguments="EOL" 8993 new_path="$path" 8994 8995 windows_path="$new_path" 8996 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8997 unix_path=`$CYGPATH -u "$windows_path"` 8998 new_path="$unix_path" 8999 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9000 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9001 new_path="$unix_path" 9002 fi 9003 9004 9005 new_path=`$WHICH "$new_path" 2> /dev/null` 9006 9007 if test "x$new_path" = x; then 9008 # It's still not found. Now this is an unrecoverable error. 9009 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9010 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9011 has_space=`$ECHO "$complete" | $GREP " "` 9012 if test "x$has_space" != x; then 9013 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9014 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9015 fi 9016 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9017 fi 9018 fi 9019 9020 # Now new_path has a complete unix path to the binary 9021 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9022 # Keep paths in /bin as-is, but remove trailing .exe if any 9023 new_path="${new_path/%.exe/}" 9024 # Do not save /bin paths to all_fixpath_prefixes! 9025 else 9026 # Not in mixed or Windows style, start by that. 9027 new_path=`cmd //c echo $new_path` 9028 9029 input_path="$new_path" 9030 # Check if we need to convert this using DOS-style short mode. If the path 9031 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9032 # take no chances and rewrite it. 9033 # Note: m4 eats our [], so we need to use [ and ] instead. 9034 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9035 if test "x$has_forbidden_chars" != x; then 9036 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9037 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9038 fi 9039 9040 # Output is in $new_path 9041 9042 windows_path="$new_path" 9043 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9044 unix_path=`$CYGPATH -u "$windows_path"` 9045 new_path="$unix_path" 9046 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9047 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9048 new_path="$unix_path" 9049 fi 9050 9051 # remove trailing .exe if any 9052 new_path="${new_path/%.exe/}" 9053 9054 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9055 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9056 fi 9057 9058 else 9059 # We're on a posix platform. Hooray! :) 9060 # First separate the path from the arguments. This will split at the first 9061 # space. 9062 complete="$FOUND_MAKE" 9063 path="${complete%% *}" 9064 tmp="$complete EOL" 9065 arguments="${tmp#* }" 9066 9067 # Cannot rely on the command "which" here since it doesn't always work. 9068 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9069 if test -z "$is_absolute_path"; then 9070 # Path to executable is not absolute. Find it. 9071 IFS_save="$IFS" 9072 IFS=: 9073 for p in $PATH; do 9074 if test -f "$p/$path" && test -x "$p/$path"; then 9075 new_path="$p/$path" 9076 break 9077 fi 9078 done 9079 IFS="$IFS_save" 9080 else 9081 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9082 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9083 new_path="$path" 9084 fi 9085 9086 if test "x$new_path" = x; then 9087 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9088 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9089 has_space=`$ECHO "$complete" | $GREP " "` 9090 if test "x$has_space" != x; then 9091 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9092 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9093 fi 9094 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9095 fi 9096 fi 9097 9098 # Now join together the path and the arguments once again 9099 if test "x$arguments" != xEOL; then 9100 new_complete="$new_path ${arguments% *}" 9101 else 9102 new_complete="$new_path" 9103 fi 9104 9105 if test "x$complete" != "x$new_complete"; then 9106 FOUND_MAKE="$new_complete" 9107 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9108 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9109 fi 9110 9111 fi 9112 fi 9113 fi 9114 fi 9115 9116 fi 9117 9118 if test "x$FOUND_MAKE" = x; then 9119 if test "x$TOOLS_DIR" != x; then 9120 # We have a tools-dir, check that as well before giving up. 9121 OLD_PATH=$PATH 9122 PATH=$TOOLS_DIR:$PATH 9123 for ac_prog in gmake 9124 do 9125 # Extract the first word of "$ac_prog", so it can be a program name with args. 9126 set dummy $ac_prog; ac_word=$2 9127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9128 $as_echo_n "checking for $ac_word... " >&6; } 9129 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then : 9130 $as_echo_n "(cached) " >&6 9131 else 9132 case $CHECK_TOOLSDIR_GMAKE in 9133 [\\/]* | ?:[\\/]*) 9134 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path. 9135 ;; 9136 *) 9137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9138 for as_dir in $PATH 9139 do 9140 IFS=$as_save_IFS 9141 test -z "$as_dir" && as_dir=. 9142 for ac_exec_ext in '' $ac_executable_extensions; do 9143 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 9144 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext" 9145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9146 break 2 9147 fi 9148 done 9149 done 9150 IFS=$as_save_IFS 9151 9152 ;; 9153 esac 9154 fi 9155 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE 9156 if test -n "$CHECK_TOOLSDIR_GMAKE"; then 9157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5 9158 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; } 9159 else 9160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9161 $as_echo "no" >&6; } 9162 fi 9163 9164 9165 test -n "$CHECK_TOOLSDIR_GMAKE" && break 9166 done 9167 9168 9169 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE"" 9170 DESCRIPTION="gmake in tools-dir" 9171 if test "x$MAKE_CANDIDATE" != x; then 9172 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 9173 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 9174 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 9175 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 9176 if test "x$IS_GNU_MAKE" = x; then 9177 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 9178 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 9179 else 9180 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 9181 if test "x$IS_MODERN_MAKE" = x; then 9182 { $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 9183 $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;} 9184 else 9185 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 9186 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9187 MAKE_EXPECTED_ENV='cygwin' 9188 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9189 MAKE_EXPECTED_ENV='msys' 9190 else 9191 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 9192 fi 9193 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 9194 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 9195 else 9196 # Not relevant for non-Windows 9197 IS_MAKE_CORRECT_ENV=true 9198 fi 9199 if test "x$IS_MAKE_CORRECT_ENV" = x; then 9200 { $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 9201 $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;} 9202 else 9203 FOUND_MAKE=$MAKE_CANDIDATE 9204 9205 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9206 9207 # First separate the path from the arguments. This will split at the first 9208 # space. 9209 complete="$FOUND_MAKE" 9210 path="${complete%% *}" 9211 tmp="$complete EOL" 9212 arguments="${tmp#* }" 9213 9214 # Input might be given as Windows format, start by converting to 9215 # unix format. 9216 new_path=`$CYGPATH -u "$path"` 9217 9218 # Now try to locate executable using which 9219 new_path=`$WHICH "$new_path" 2> /dev/null` 9220 # bat and cmd files are not always considered executable in cygwin causing which 9221 # to not find them 9222 if test "x$new_path" = x \ 9223 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9224 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9225 new_path=`$CYGPATH -u "$path"` 9226 fi 9227 if test "x$new_path" = x; then 9228 # Oops. Which didn't find the executable. 9229 # The splitting of arguments from the executable at a space might have been incorrect, 9230 # since paths with space are more likely in Windows. Give it another try with the whole 9231 # argument. 9232 path="$complete" 9233 arguments="EOL" 9234 new_path=`$CYGPATH -u "$path"` 9235 new_path=`$WHICH "$new_path" 2> /dev/null` 9236 # bat and cmd files are not always considered executable in cygwin causing which 9237 # to not find them 9238 if test "x$new_path" = x \ 9239 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9240 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9241 new_path=`$CYGPATH -u "$path"` 9242 fi 9243 if test "x$new_path" = x; then 9244 # It's still not found. Now this is an unrecoverable error. 9245 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9246 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9247 has_space=`$ECHO "$complete" | $GREP " "` 9248 if test "x$has_space" != x; then 9249 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9250 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9251 fi 9252 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9253 fi 9254 fi 9255 9256 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9257 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9258 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9259 # "foo.exe" is OK but "foo" is an error. 9260 # 9261 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9262 # It is also a way to make sure we got the proper file name for the real test later on. 9263 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9264 if test "x$test_shortpath" = x; then 9265 # Short path failed, file does not exist as specified. 9266 # Try adding .exe or .cmd 9267 if test -f "${new_path}.exe"; then 9268 input_to_shortpath="${new_path}.exe" 9269 elif test -f "${new_path}.cmd"; then 9270 input_to_shortpath="${new_path}.cmd" 9271 else 9272 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9273 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9274 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9275 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9276 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9277 fi 9278 else 9279 input_to_shortpath="$new_path" 9280 fi 9281 9282 # Call helper function which possibly converts this using DOS-style short mode. 9283 # If so, the updated path is stored in $new_path. 9284 new_path="$input_to_shortpath" 9285 9286 input_path="$input_to_shortpath" 9287 # Check if we need to convert this using DOS-style short mode. If the path 9288 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9289 # take no chances and rewrite it. 9290 # Note: m4 eats our [], so we need to use [ and ] instead. 9291 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9292 if test "x$has_forbidden_chars" != x; then 9293 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9294 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9295 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9296 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9297 # Going to short mode and back again did indeed matter. Since short mode is 9298 # case insensitive, let's make it lowercase to improve readability. 9299 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9300 # Now convert it back to Unix-stile (cygpath) 9301 input_path=`$CYGPATH -u "$shortmode_path"` 9302 new_path="$input_path" 9303 fi 9304 fi 9305 9306 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9307 if test "x$test_cygdrive_prefix" = x; then 9308 # As a simple fix, exclude /usr/bin since it's not a real path. 9309 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9310 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9311 # a path prefixed by /cygdrive for fixpath to work. 9312 new_path="$CYGWIN_ROOT_PATH$input_path" 9313 fi 9314 fi 9315 9316 # remove trailing .exe if any 9317 new_path="${new_path/%.exe/}" 9318 9319 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9320 9321 # First separate the path from the arguments. This will split at the first 9322 # space. 9323 complete="$FOUND_MAKE" 9324 path="${complete%% *}" 9325 tmp="$complete EOL" 9326 arguments="${tmp#* }" 9327 9328 # Input might be given as Windows format, start by converting to 9329 # unix format. 9330 new_path="$path" 9331 9332 windows_path="$new_path" 9333 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9334 unix_path=`$CYGPATH -u "$windows_path"` 9335 new_path="$unix_path" 9336 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9337 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9338 new_path="$unix_path" 9339 fi 9340 9341 9342 # Now try to locate executable using which 9343 new_path=`$WHICH "$new_path" 2> /dev/null` 9344 9345 if test "x$new_path" = x; then 9346 # Oops. Which didn't find the executable. 9347 # The splitting of arguments from the executable at a space might have been incorrect, 9348 # since paths with space are more likely in Windows. Give it another try with the whole 9349 # argument. 9350 path="$complete" 9351 arguments="EOL" 9352 new_path="$path" 9353 9354 windows_path="$new_path" 9355 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9356 unix_path=`$CYGPATH -u "$windows_path"` 9357 new_path="$unix_path" 9358 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9359 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9360 new_path="$unix_path" 9361 fi 9362 9363 9364 new_path=`$WHICH "$new_path" 2> /dev/null` 9365 9366 if test "x$new_path" = x; then 9367 # It's still not found. Now this is an unrecoverable error. 9368 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9369 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9370 has_space=`$ECHO "$complete" | $GREP " "` 9371 if test "x$has_space" != x; then 9372 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9373 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9374 fi 9375 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9376 fi 9377 fi 9378 9379 # Now new_path has a complete unix path to the binary 9380 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9381 # Keep paths in /bin as-is, but remove trailing .exe if any 9382 new_path="${new_path/%.exe/}" 9383 # Do not save /bin paths to all_fixpath_prefixes! 9384 else 9385 # Not in mixed or Windows style, start by that. 9386 new_path=`cmd //c echo $new_path` 9387 9388 input_path="$new_path" 9389 # Check if we need to convert this using DOS-style short mode. If the path 9390 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9391 # take no chances and rewrite it. 9392 # Note: m4 eats our [], so we need to use [ and ] instead. 9393 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9394 if test "x$has_forbidden_chars" != x; then 9395 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9396 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9397 fi 9398 9399 # Output is in $new_path 9400 9401 windows_path="$new_path" 9402 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9403 unix_path=`$CYGPATH -u "$windows_path"` 9404 new_path="$unix_path" 9405 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9406 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9407 new_path="$unix_path" 9408 fi 9409 9410 # remove trailing .exe if any 9411 new_path="${new_path/%.exe/}" 9412 9413 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9414 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9415 fi 9416 9417 else 9418 # We're on a posix platform. Hooray! :) 9419 # First separate the path from the arguments. This will split at the first 9420 # space. 9421 complete="$FOUND_MAKE" 9422 path="${complete%% *}" 9423 tmp="$complete EOL" 9424 arguments="${tmp#* }" 9425 9426 # Cannot rely on the command "which" here since it doesn't always work. 9427 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9428 if test -z "$is_absolute_path"; then 9429 # Path to executable is not absolute. Find it. 9430 IFS_save="$IFS" 9431 IFS=: 9432 for p in $PATH; do 9433 if test -f "$p/$path" && test -x "$p/$path"; then 9434 new_path="$p/$path" 9435 break 9436 fi 9437 done 9438 IFS="$IFS_save" 9439 else 9440 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9441 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9442 new_path="$path" 9443 fi 9444 9445 if test "x$new_path" = x; then 9446 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9447 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9448 has_space=`$ECHO "$complete" | $GREP " "` 9449 if test "x$has_space" != x; then 9450 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9451 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9452 fi 9453 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9454 fi 9455 fi 9456 9457 # Now join together the path and the arguments once again 9458 if test "x$arguments" != xEOL; then 9459 new_complete="$new_path ${arguments% *}" 9460 else 9461 new_complete="$new_path" 9462 fi 9463 9464 if test "x$complete" != "x$new_complete"; then 9465 FOUND_MAKE="$new_complete" 9466 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9467 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9468 fi 9469 9470 fi 9471 fi 9472 fi 9473 fi 9474 9475 if test "x$FOUND_MAKE" = x; then 9476 for ac_prog in make 9477 do 9478 # Extract the first word of "$ac_prog", so it can be a program name with args. 9479 set dummy $ac_prog; ac_word=$2 9480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9481 $as_echo_n "checking for $ac_word... " >&6; } 9482 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then : 9483 $as_echo_n "(cached) " >&6 9484 else 9485 case $CHECK_TOOLSDIR_MAKE in 9486 [\\/]* | ?:[\\/]*) 9487 ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path. 9488 ;; 9489 *) 9490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9491 for as_dir in $PATH 9492 do 9493 IFS=$as_save_IFS 9494 test -z "$as_dir" && as_dir=. 9495 for ac_exec_ext in '' $ac_executable_extensions; do 9496 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 9497 ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext" 9498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9499 break 2 9500 fi 9501 done 9502 done 9503 IFS=$as_save_IFS 9504 9505 ;; 9506 esac 9507 fi 9508 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE 9509 if test -n "$CHECK_TOOLSDIR_MAKE"; then 9510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5 9511 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; } 9512 else 9513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9514 $as_echo "no" >&6; } 9515 fi 9516 9517 9518 test -n "$CHECK_TOOLSDIR_MAKE" && break 9519 done 9520 9521 9522 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE"" 9523 DESCRIPTION="make in tools-dir" 9524 if test "x$MAKE_CANDIDATE" != x; then 9525 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 9526 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 9527 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 9528 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 9529 if test "x$IS_GNU_MAKE" = x; then 9530 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 9531 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 9532 else 9533 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 9534 if test "x$IS_MODERN_MAKE" = x; then 9535 { $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 9536 $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;} 9537 else 9538 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 9539 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9540 MAKE_EXPECTED_ENV='cygwin' 9541 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9542 MAKE_EXPECTED_ENV='msys' 9543 else 9544 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 9545 fi 9546 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 9547 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 9548 else 9549 # Not relevant for non-Windows 9550 IS_MAKE_CORRECT_ENV=true 9551 fi 9552 if test "x$IS_MAKE_CORRECT_ENV" = x; then 9553 { $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 9554 $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;} 9555 else 9556 FOUND_MAKE=$MAKE_CANDIDATE 9557 9558 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9559 9560 # First separate the path from the arguments. This will split at the first 9561 # space. 9562 complete="$FOUND_MAKE" 9563 path="${complete%% *}" 9564 tmp="$complete EOL" 9565 arguments="${tmp#* }" 9566 9567 # Input might be given as Windows format, start by converting to 9568 # unix format. 9569 new_path=`$CYGPATH -u "$path"` 9570 9571 # Now try to locate executable using which 9572 new_path=`$WHICH "$new_path" 2> /dev/null` 9573 # bat and cmd files are not always considered executable in cygwin causing which 9574 # to not find them 9575 if test "x$new_path" = x \ 9576 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9577 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9578 new_path=`$CYGPATH -u "$path"` 9579 fi 9580 if test "x$new_path" = x; then 9581 # Oops. Which didn't find the executable. 9582 # The splitting of arguments from the executable at a space might have been incorrect, 9583 # since paths with space are more likely in Windows. Give it another try with the whole 9584 # argument. 9585 path="$complete" 9586 arguments="EOL" 9587 new_path=`$CYGPATH -u "$path"` 9588 new_path=`$WHICH "$new_path" 2> /dev/null` 9589 # bat and cmd files are not always considered executable in cygwin causing which 9590 # to not find them 9591 if test "x$new_path" = x \ 9592 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9593 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9594 new_path=`$CYGPATH -u "$path"` 9595 fi 9596 if test "x$new_path" = x; then 9597 # It's still not found. Now this is an unrecoverable error. 9598 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9599 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9600 has_space=`$ECHO "$complete" | $GREP " "` 9601 if test "x$has_space" != x; then 9602 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9603 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9604 fi 9605 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9606 fi 9607 fi 9608 9609 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9610 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9611 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9612 # "foo.exe" is OK but "foo" is an error. 9613 # 9614 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9615 # It is also a way to make sure we got the proper file name for the real test later on. 9616 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9617 if test "x$test_shortpath" = x; then 9618 # Short path failed, file does not exist as specified. 9619 # Try adding .exe or .cmd 9620 if test -f "${new_path}.exe"; then 9621 input_to_shortpath="${new_path}.exe" 9622 elif test -f "${new_path}.cmd"; then 9623 input_to_shortpath="${new_path}.cmd" 9624 else 9625 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9626 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9627 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9628 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9629 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9630 fi 9631 else 9632 input_to_shortpath="$new_path" 9633 fi 9634 9635 # Call helper function which possibly converts this using DOS-style short mode. 9636 # If so, the updated path is stored in $new_path. 9637 new_path="$input_to_shortpath" 9638 9639 input_path="$input_to_shortpath" 9640 # Check if we need to convert this using DOS-style short mode. If the path 9641 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9642 # take no chances and rewrite it. 9643 # Note: m4 eats our [], so we need to use [ and ] instead. 9644 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9645 if test "x$has_forbidden_chars" != x; then 9646 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9647 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9648 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9649 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9650 # Going to short mode and back again did indeed matter. Since short mode is 9651 # case insensitive, let's make it lowercase to improve readability. 9652 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9653 # Now convert it back to Unix-stile (cygpath) 9654 input_path=`$CYGPATH -u "$shortmode_path"` 9655 new_path="$input_path" 9656 fi 9657 fi 9658 9659 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9660 if test "x$test_cygdrive_prefix" = x; then 9661 # As a simple fix, exclude /usr/bin since it's not a real path. 9662 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9663 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9664 # a path prefixed by /cygdrive for fixpath to work. 9665 new_path="$CYGWIN_ROOT_PATH$input_path" 9666 fi 9667 fi 9668 9669 # remove trailing .exe if any 9670 new_path="${new_path/%.exe/}" 9671 9672 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9673 9674 # First separate the path from the arguments. This will split at the first 9675 # space. 9676 complete="$FOUND_MAKE" 9677 path="${complete%% *}" 9678 tmp="$complete EOL" 9679 arguments="${tmp#* }" 9680 9681 # Input might be given as Windows format, start by converting to 9682 # unix format. 9683 new_path="$path" 9684 9685 windows_path="$new_path" 9686 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9687 unix_path=`$CYGPATH -u "$windows_path"` 9688 new_path="$unix_path" 9689 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9690 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9691 new_path="$unix_path" 9692 fi 9693 9694 9695 # Now try to locate executable using which 9696 new_path=`$WHICH "$new_path" 2> /dev/null` 9697 9698 if test "x$new_path" = x; then 9699 # Oops. Which didn't find the executable. 9700 # The splitting of arguments from the executable at a space might have been incorrect, 9701 # since paths with space are more likely in Windows. Give it another try with the whole 9702 # argument. 9703 path="$complete" 9704 arguments="EOL" 9705 new_path="$path" 9706 9707 windows_path="$new_path" 9708 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9709 unix_path=`$CYGPATH -u "$windows_path"` 9710 new_path="$unix_path" 9711 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9712 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9713 new_path="$unix_path" 9714 fi 9715 9716 9717 new_path=`$WHICH "$new_path" 2> /dev/null` 9718 9719 if test "x$new_path" = x; then 9720 # It's still not found. Now this is an unrecoverable error. 9721 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9722 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9723 has_space=`$ECHO "$complete" | $GREP " "` 9724 if test "x$has_space" != x; then 9725 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9726 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9727 fi 9728 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9729 fi 9730 fi 9731 9732 # Now new_path has a complete unix path to the binary 9733 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9734 # Keep paths in /bin as-is, but remove trailing .exe if any 9735 new_path="${new_path/%.exe/}" 9736 # Do not save /bin paths to all_fixpath_prefixes! 9737 else 9738 # Not in mixed or Windows style, start by that. 9739 new_path=`cmd //c echo $new_path` 9740 9741 input_path="$new_path" 9742 # Check if we need to convert this using DOS-style short mode. If the path 9743 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9744 # take no chances and rewrite it. 9745 # Note: m4 eats our [], so we need to use [ and ] instead. 9746 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9747 if test "x$has_forbidden_chars" != x; then 9748 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9749 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9750 fi 9751 9752 # Output is in $new_path 9753 9754 windows_path="$new_path" 9755 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9756 unix_path=`$CYGPATH -u "$windows_path"` 9757 new_path="$unix_path" 9758 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9759 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9760 new_path="$unix_path" 9761 fi 9762 9763 # remove trailing .exe if any 9764 new_path="${new_path/%.exe/}" 9765 9766 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9767 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9768 fi 9769 9770 else 9771 # We're on a posix platform. Hooray! :) 9772 # First separate the path from the arguments. This will split at the first 9773 # space. 9774 complete="$FOUND_MAKE" 9775 path="${complete%% *}" 9776 tmp="$complete EOL" 9777 arguments="${tmp#* }" 9778 9779 # Cannot rely on the command "which" here since it doesn't always work. 9780 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9781 if test -z "$is_absolute_path"; then 9782 # Path to executable is not absolute. Find it. 9783 IFS_save="$IFS" 9784 IFS=: 9785 for p in $PATH; do 9786 if test -f "$p/$path" && test -x "$p/$path"; then 9787 new_path="$p/$path" 9788 break 9789 fi 9790 done 9791 IFS="$IFS_save" 9792 else 9793 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9794 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9795 new_path="$path" 9796 fi 9797 9798 if test "x$new_path" = x; then 9799 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9800 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9801 has_space=`$ECHO "$complete" | $GREP " "` 9802 if test "x$has_space" != x; then 9803 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9804 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9805 fi 9806 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9807 fi 9808 fi 9809 9810 # Now join together the path and the arguments once again 9811 if test "x$arguments" != xEOL; then 9812 new_complete="$new_path ${arguments% *}" 9813 else 9814 new_complete="$new_path" 9815 fi 9816 9817 if test "x$complete" != "x$new_complete"; then 9818 FOUND_MAKE="$new_complete" 9819 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9820 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9821 fi 9822 9823 fi 9824 fi 9825 fi 9826 fi 9827 9828 fi 9829 PATH=$OLD_PATH 9830 fi 9831 fi 9832 9833 if test "x$FOUND_MAKE" = x; then 9834 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 9835 fi 9836 fi 9837 9838 MAKE=$FOUND_MAKE 9839 9840 { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5 9841 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;} 9842 9843 9844 9845 # Test if find supports -delete 9846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5 9847 $as_echo_n "checking if find supports -delete... " >&6; } 9848 FIND_DELETE="-delete" 9849 9850 DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?) 9851 9852 echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete 9853 9854 TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1` 9855 if test -f $DELETEDIR/TestIfFindSupportsDelete; then 9856 # No, it does not. 9857 rm $DELETEDIR/TestIfFindSupportsDelete 9858 FIND_DELETE="-exec rm \{\} \+" 9859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9860 $as_echo "no" >&6; } 9861 else 9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9863 $as_echo "yes" >&6; } 9864 fi 9865 rmdir $DELETEDIR 9866 9867 9868 9869 # These tools might not be installed by default, 9870 # need hint on how to install them. 9871 9872 for ac_prog in unzip 9873 do 9874 # Extract the first word of "$ac_prog", so it can be a program name with args. 9875 set dummy $ac_prog; ac_word=$2 9876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9877 $as_echo_n "checking for $ac_word... " >&6; } 9878 if ${ac_cv_path_UNZIP+:} false; then : 9879 $as_echo_n "(cached) " >&6 9880 else 9881 case $UNZIP in 9882 [\\/]* | ?:[\\/]*) 9883 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path. 9884 ;; 9885 *) 9886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9887 for as_dir in $PATH 9888 do 9889 IFS=$as_save_IFS 9890 test -z "$as_dir" && as_dir=. 9891 for ac_exec_ext in '' $ac_executable_extensions; do 9892 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 9893 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext" 9894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9895 break 2 9896 fi 9897 done 9898 done 9899 IFS=$as_save_IFS 9900 9901 ;; 9902 esac 9903 fi 9904 UNZIP=$ac_cv_path_UNZIP 9905 if test -n "$UNZIP"; then 9906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5 9907 $as_echo "$UNZIP" >&6; } 9908 else 9909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9910 $as_echo "no" >&6; } 9911 fi 9912 9913 9914 test -n "$UNZIP" && break 9915 done 9916 9917 9918 if test "x$UNZIP" = x; then 9919 if test "xunzip" = x; then 9920 PROG_NAME=unzip 9921 else 9922 PROG_NAME=unzip 9923 fi 9924 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 9925 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 9926 as_fn_error $? "Cannot continue" "$LINENO" 5 9927 fi 9928 9929 9930 9931 for ac_prog in zip 9932 do 9933 # Extract the first word of "$ac_prog", so it can be a program name with args. 9934 set dummy $ac_prog; ac_word=$2 9935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9936 $as_echo_n "checking for $ac_word... " >&6; } 9937 if ${ac_cv_path_ZIP+:} false; then : 9938 $as_echo_n "(cached) " >&6 9939 else 9940 case $ZIP in 9941 [\\/]* | ?:[\\/]*) 9942 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path. 9943 ;; 9944 *) 9945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9946 for as_dir in $PATH 9947 do 9948 IFS=$as_save_IFS 9949 test -z "$as_dir" && as_dir=. 9950 for ac_exec_ext in '' $ac_executable_extensions; do 9951 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 9952 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" 9953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9954 break 2 9955 fi 9956 done 9957 done 9958 IFS=$as_save_IFS 9959 9960 ;; 9961 esac 9962 fi 9963 ZIP=$ac_cv_path_ZIP 9964 if test -n "$ZIP"; then 9965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5 9966 $as_echo "$ZIP" >&6; } 9967 else 9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9969 $as_echo "no" >&6; } 9970 fi 9971 9972 9973 test -n "$ZIP" && break 9974 done 9975 9976 9977 if test "x$ZIP" = x; then 9978 if test "xzip" = x; then 9979 PROG_NAME=zip 9980 else 9981 PROG_NAME=zip 9982 fi 9983 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 9984 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 9985 as_fn_error $? "Cannot continue" "$LINENO" 5 9986 fi 9987 9988 9989 9990 # Non-required basic tools 9991 9992 # Extract the first word of "ldd", so it can be a program name with args. 9993 set dummy ldd; ac_word=$2 9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9995 $as_echo_n "checking for $ac_word... " >&6; } 9996 if ${ac_cv_path_LDD+:} false; then : 9997 $as_echo_n "(cached) " >&6 9998 else 9999 case $LDD in 10000 [\\/]* | ?:[\\/]*) 10001 ac_cv_path_LDD="$LDD" # Let the user override the test with a path. 10002 ;; 10003 *) 10004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10005 for as_dir in $PATH 10006 do 10007 IFS=$as_save_IFS 10008 test -z "$as_dir" && as_dir=. 10009 for ac_exec_ext in '' $ac_executable_extensions; do 10010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10011 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext" 10012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10013 break 2 10014 fi 10015 done 10016 done 10017 IFS=$as_save_IFS 10018 10019 ;; 10020 esac 10021 fi 10022 LDD=$ac_cv_path_LDD 10023 if test -n "$LDD"; then 10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5 10025 $as_echo "$LDD" >&6; } 10026 else 10027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10028 $as_echo "no" >&6; } 10029 fi 10030 10031 10032 if test "x$LDD" = "x"; then 10033 # List shared lib dependencies is used for 10034 # debug output and checking for forbidden dependencies. 10035 # We can build without it. 10036 LDD="true" 10037 fi 10038 # Extract the first word of "otool", so it can be a program name with args. 10039 set dummy otool; ac_word=$2 10040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10041 $as_echo_n "checking for $ac_word... " >&6; } 10042 if ${ac_cv_path_OTOOL+:} false; then : 10043 $as_echo_n "(cached) " >&6 10044 else 10045 case $OTOOL in 10046 [\\/]* | ?:[\\/]*) 10047 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path. 10048 ;; 10049 *) 10050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10051 for as_dir in $PATH 10052 do 10053 IFS=$as_save_IFS 10054 test -z "$as_dir" && as_dir=. 10055 for ac_exec_ext in '' $ac_executable_extensions; do 10056 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10057 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext" 10058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10059 break 2 10060 fi 10061 done 10062 done 10063 IFS=$as_save_IFS 10064 10065 ;; 10066 esac 10067 fi 10068 OTOOL=$ac_cv_path_OTOOL 10069 if test -n "$OTOOL"; then 10070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 10071 $as_echo "$OTOOL" >&6; } 10072 else 10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10074 $as_echo "no" >&6; } 10075 fi 10076 10077 10078 if test "x$OTOOL" = "x"; then 10079 OTOOL="true" 10080 fi 10081 for ac_prog in readelf greadelf 10082 do 10083 # Extract the first word of "$ac_prog", so it can be a program name with args. 10084 set dummy $ac_prog; ac_word=$2 10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10086 $as_echo_n "checking for $ac_word... " >&6; } 10087 if ${ac_cv_path_READELF+:} false; then : 10088 $as_echo_n "(cached) " >&6 10089 else 10090 case $READELF in 10091 [\\/]* | ?:[\\/]*) 10092 ac_cv_path_READELF="$READELF" # Let the user override the test with a path. 10093 ;; 10094 *) 10095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10096 for as_dir in $PATH 10097 do 10098 IFS=$as_save_IFS 10099 test -z "$as_dir" && as_dir=. 10100 for ac_exec_ext in '' $ac_executable_extensions; do 10101 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10102 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext" 10103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10104 break 2 10105 fi 10106 done 10107 done 10108 IFS=$as_save_IFS 10109 10110 ;; 10111 esac 10112 fi 10113 READELF=$ac_cv_path_READELF 10114 if test -n "$READELF"; then 10115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 10116 $as_echo "$READELF" >&6; } 10117 else 10118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10119 $as_echo "no" >&6; } 10120 fi 10121 10122 10123 test -n "$READELF" && break 10124 done 10125 10126 # Extract the first word of "hg", so it can be a program name with args. 10127 set dummy hg; ac_word=$2 10128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10129 $as_echo_n "checking for $ac_word... " >&6; } 10130 if ${ac_cv_path_HG+:} false; then : 10131 $as_echo_n "(cached) " >&6 10132 else 10133 case $HG in 10134 [\\/]* | ?:[\\/]*) 10135 ac_cv_path_HG="$HG" # Let the user override the test with a path. 10136 ;; 10137 *) 10138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10139 for as_dir in $PATH 10140 do 10141 IFS=$as_save_IFS 10142 test -z "$as_dir" && as_dir=. 10143 for ac_exec_ext in '' $ac_executable_extensions; do 10144 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10145 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext" 10146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10147 break 2 10148 fi 10149 done 10150 done 10151 IFS=$as_save_IFS 10152 10153 ;; 10154 esac 10155 fi 10156 HG=$ac_cv_path_HG 10157 if test -n "$HG"; then 10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5 10159 $as_echo "$HG" >&6; } 10160 else 10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10162 $as_echo "no" >&6; } 10163 fi 10164 10165 10166 # Extract the first word of "stat", so it can be a program name with args. 10167 set dummy stat; ac_word=$2 10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10169 $as_echo_n "checking for $ac_word... " >&6; } 10170 if ${ac_cv_path_STAT+:} false; then : 10171 $as_echo_n "(cached) " >&6 10172 else 10173 case $STAT in 10174 [\\/]* | ?:[\\/]*) 10175 ac_cv_path_STAT="$STAT" # Let the user override the test with a path. 10176 ;; 10177 *) 10178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10179 for as_dir in $PATH 10180 do 10181 IFS=$as_save_IFS 10182 test -z "$as_dir" && as_dir=. 10183 for ac_exec_ext in '' $ac_executable_extensions; do 10184 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10185 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext" 10186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10187 break 2 10188 fi 10189 done 10190 done 10191 IFS=$as_save_IFS 10192 10193 ;; 10194 esac 10195 fi 10196 STAT=$ac_cv_path_STAT 10197 if test -n "$STAT"; then 10198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5 10199 $as_echo "$STAT" >&6; } 10200 else 10201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10202 $as_echo "no" >&6; } 10203 fi 10204 10205 10206 # Extract the first word of "time", so it can be a program name with args. 10207 set dummy time; ac_word=$2 10208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10209 $as_echo_n "checking for $ac_word... " >&6; } 10210 if ${ac_cv_path_TIME+:} false; then : 10211 $as_echo_n "(cached) " >&6 10212 else 10213 case $TIME in 10214 [\\/]* | ?:[\\/]*) 10215 ac_cv_path_TIME="$TIME" # Let the user override the test with a path. 10216 ;; 10217 *) 10218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10219 for as_dir in $PATH 10220 do 10221 IFS=$as_save_IFS 10222 test -z "$as_dir" && as_dir=. 10223 for ac_exec_ext in '' $ac_executable_extensions; do 10224 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10225 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext" 10226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10227 break 2 10228 fi 10229 done 10230 done 10231 IFS=$as_save_IFS 10232 10233 ;; 10234 esac 10235 fi 10236 TIME=$ac_cv_path_TIME 10237 if test -n "$TIME"; then 10238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5 10239 $as_echo "$TIME" >&6; } 10240 else 10241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10242 $as_echo "no" >&6; } 10243 fi 10244 10245 10246 10247 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 10248 10249 for ac_prog in comm 10250 do 10251 # Extract the first word of "$ac_prog", so it can be a program name with args. 10252 set dummy $ac_prog; ac_word=$2 10253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10254 $as_echo_n "checking for $ac_word... " >&6; } 10255 if ${ac_cv_path_COMM+:} false; then : 10256 $as_echo_n "(cached) " >&6 10257 else 10258 case $COMM in 10259 [\\/]* | ?:[\\/]*) 10260 ac_cv_path_COMM="$COMM" # Let the user override the test with a path. 10261 ;; 10262 *) 10263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10264 for as_dir in $PATH 10265 do 10266 IFS=$as_save_IFS 10267 test -z "$as_dir" && as_dir=. 10268 for ac_exec_ext in '' $ac_executable_extensions; do 10269 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10270 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext" 10271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10272 break 2 10273 fi 10274 done 10275 done 10276 IFS=$as_save_IFS 10277 10278 ;; 10279 esac 10280 fi 10281 COMM=$ac_cv_path_COMM 10282 if test -n "$COMM"; then 10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5 10284 $as_echo "$COMM" >&6; } 10285 else 10286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10287 $as_echo "no" >&6; } 10288 fi 10289 10290 10291 test -n "$COMM" && break 10292 done 10293 10294 10295 if test "x$COMM" = x; then 10296 if test "xcomm" = x; then 10297 PROG_NAME=comm 10298 else 10299 PROG_NAME=comm 10300 fi 10301 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10302 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10303 as_fn_error $? "Cannot continue" "$LINENO" 5 10304 fi 10305 10306 10307 fi 10308 10309 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 10310 10311 for ac_prog in xattr 10312 do 10313 # Extract the first word of "$ac_prog", so it can be a program name with args. 10314 set dummy $ac_prog; ac_word=$2 10315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10316 $as_echo_n "checking for $ac_word... " >&6; } 10317 if ${ac_cv_path_XATTR+:} false; then : 10318 $as_echo_n "(cached) " >&6 10319 else 10320 case $XATTR in 10321 [\\/]* | ?:[\\/]*) 10322 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path. 10323 ;; 10324 *) 10325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10326 for as_dir in $PATH 10327 do 10328 IFS=$as_save_IFS 10329 test -z "$as_dir" && as_dir=. 10330 for ac_exec_ext in '' $ac_executable_extensions; do 10331 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10332 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext" 10333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10334 break 2 10335 fi 10336 done 10337 done 10338 IFS=$as_save_IFS 10339 10340 ;; 10341 esac 10342 fi 10343 XATTR=$ac_cv_path_XATTR 10344 if test -n "$XATTR"; then 10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5 10346 $as_echo "$XATTR" >&6; } 10347 else 10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10349 $as_echo "no" >&6; } 10350 fi 10351 10352 10353 test -n "$XATTR" && break 10354 done 10355 10356 10357 if test "x$XATTR" = x; then 10358 if test "xxattr" = x; then 10359 PROG_NAME=xattr 10360 else 10361 PROG_NAME=xattr 10362 fi 10363 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10364 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10365 as_fn_error $? "Cannot continue" "$LINENO" 5 10366 fi 10367 10368 10369 # Extract the first word of "codesign", so it can be a program name with args. 10370 set dummy codesign; ac_word=$2 10371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10372 $as_echo_n "checking for $ac_word... " >&6; } 10373 if ${ac_cv_path_CODESIGN+:} false; then : 10374 $as_echo_n "(cached) " >&6 10375 else 10376 case $CODESIGN in 10377 [\\/]* | ?:[\\/]*) 10378 ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path. 10379 ;; 10380 *) 10381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10382 for as_dir in $PATH 10383 do 10384 IFS=$as_save_IFS 10385 test -z "$as_dir" && as_dir=. 10386 for ac_exec_ext in '' $ac_executable_extensions; do 10387 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10388 ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext" 10389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10390 break 2 10391 fi 10392 done 10393 done 10394 IFS=$as_save_IFS 10395 10396 ;; 10397 esac 10398 fi 10399 CODESIGN=$ac_cv_path_CODESIGN 10400 if test -n "$CODESIGN"; then 10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5 10402 $as_echo "$CODESIGN" >&6; } 10403 else 10404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10405 $as_echo "no" >&6; } 10406 fi 10407 10408 10409 if test "x$CODESIGN" != "x"; then 10410 # Verify that the openjdk_codesign certificate is present 10411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5 10412 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; } 10413 rm -f codesign-testfile 10414 touch codesign-testfile 10415 codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN= 10416 rm -f codesign-testfile 10417 if test "x$CODESIGN" = x; then 10418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10419 $as_echo "no" >&6; } 10420 else 10421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10422 $as_echo "yes" >&6; } 10423 fi 10424 fi 10425 fi 10426 10427 10428 # Check if pkg-config is available. 10429 10430 10431 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 10432 if test -n "$ac_tool_prefix"; then 10433 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. 10434 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 10435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10436 $as_echo_n "checking for $ac_word... " >&6; } 10437 if ${ac_cv_path_PKG_CONFIG+:} false; then : 10438 $as_echo_n "(cached) " >&6 10439 else 10440 case $PKG_CONFIG in 10441 [\\/]* | ?:[\\/]*) 10442 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. 10443 ;; 10444 *) 10445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10446 for as_dir in $PATH 10447 do 10448 IFS=$as_save_IFS 10449 test -z "$as_dir" && as_dir=. 10450 for ac_exec_ext in '' $ac_executable_extensions; do 10451 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10452 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 10453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10454 break 2 10455 fi 10456 done 10457 done 10458 IFS=$as_save_IFS 10459 10460 ;; 10461 esac 10462 fi 10463 PKG_CONFIG=$ac_cv_path_PKG_CONFIG 10464 if test -n "$PKG_CONFIG"; then 10465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 10466 $as_echo "$PKG_CONFIG" >&6; } 10467 else 10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10469 $as_echo "no" >&6; } 10470 fi 10471 10472 10473 fi 10474 if test -z "$ac_cv_path_PKG_CONFIG"; then 10475 ac_pt_PKG_CONFIG=$PKG_CONFIG 10476 # Extract the first word of "pkg-config", so it can be a program name with args. 10477 set dummy pkg-config; ac_word=$2 10478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10479 $as_echo_n "checking for $ac_word... " >&6; } 10480 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : 10481 $as_echo_n "(cached) " >&6 10482 else 10483 case $ac_pt_PKG_CONFIG in 10484 [\\/]* | ?:[\\/]*) 10485 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. 10486 ;; 10487 *) 10488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10489 for as_dir in $PATH 10490 do 10491 IFS=$as_save_IFS 10492 test -z "$as_dir" && as_dir=. 10493 for ac_exec_ext in '' $ac_executable_extensions; do 10494 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10495 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 10496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10497 break 2 10498 fi 10499 done 10500 done 10501 IFS=$as_save_IFS 10502 10503 ;; 10504 esac 10505 fi 10506 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG 10507 if test -n "$ac_pt_PKG_CONFIG"; then 10508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 10509 $as_echo "$ac_pt_PKG_CONFIG" >&6; } 10510 else 10511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10512 $as_echo "no" >&6; } 10513 fi 10514 10515 if test "x$ac_pt_PKG_CONFIG" = x; then 10516 PKG_CONFIG="" 10517 else 10518 case $cross_compiling:$ac_tool_warned in 10519 yes:) 10520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 10521 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 10522 ac_tool_warned=yes ;; 10523 esac 10524 PKG_CONFIG=$ac_pt_PKG_CONFIG 10525 fi 10526 else 10527 PKG_CONFIG="$ac_cv_path_PKG_CONFIG" 10528 fi 10529 10530 fi 10531 if test -n "$PKG_CONFIG"; then 10532 _pkg_min_version=0.9.0 10533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 10534 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } 10535 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 10536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10537 $as_echo "yes" >&6; } 10538 else 10539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10540 $as_echo "no" >&6; } 10541 PKG_CONFIG="" 10542 fi 10543 10544 fi 10545 10546 # After basic tools have been setup, we can check build os specific details. 10547 10548 ############################################################################### 10549 10550 # Note that this is the build platform OS version! 10551 10552 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`" 10553 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`" 10554 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`" 10555 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`" 10556 10557 10558 10559 10560 10561 # Setup builddeps, for automatic downloading of tools we need. 10562 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in 10563 # boot-jdk setup, but we need to have basic tools setup first. 10564 10565 10566 # Check whether --with-builddeps-conf was given. 10567 if test "${with_builddeps_conf+set}" = set; then : 10568 withval=$with_builddeps_conf; 10569 fi 10570 10571 10572 10573 # Check whether --with-builddeps-server was given. 10574 if test "${with_builddeps_server+set}" = set; then : 10575 withval=$with_builddeps_server; 10576 fi 10577 10578 10579 10580 # Check whether --with-builddeps-dir was given. 10581 if test "${with_builddeps_dir+set}" = set; then : 10582 withval=$with_builddeps_dir; 10583 else 10584 with_builddeps_dir=/localhome/builddeps 10585 fi 10586 10587 10588 10589 # Check whether --with-builddeps-group was given. 10590 if test "${with_builddeps_group+set}" = set; then : 10591 withval=$with_builddeps_group; 10592 fi 10593 10594 10595 10596 10597 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 10598 if test "x$with_builddeps_conf" != x; then 10599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5 10600 $as_echo_n "checking for supplied builddeps configuration file... " >&6; } 10601 builddepsfile=$with_builddeps_conf 10602 if test -s $builddepsfile; then 10603 . $builddepsfile 10604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5 10605 $as_echo "loaded!" >&6; } 10606 else 10607 as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5 10608 fi 10609 else 10610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5 10611 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; } 10612 builddepsfile=`mktemp` 10613 touch $builddepsfile 10614 # Put all found confs into a single file. 10615 find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile 10616 # Source the file to acquire the variables 10617 if test -s $builddepsfile; then 10618 . $builddepsfile 10619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5 10620 $as_echo "found at least one!" >&6; } 10621 else 10622 as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5 10623 fi 10624 fi 10625 # Create build and target names that use _ instead of "-" and ".". 10626 # This is necessary to use them in variable names. 10627 build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` 10628 target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` 10629 # Extract rewrite information for build and target 10630 eval rewritten_build=\${REWRITE_${build_var}} 10631 if test "x$rewritten_build" = x; then 10632 rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME} 10633 echo Build stays the same $rewritten_build 10634 else 10635 echo Rewriting build for builddeps into $rewritten_build 10636 fi 10637 eval rewritten_target=\${REWRITE_${target_var}} 10638 if test "x$rewritten_target" = x; then 10639 rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME} 10640 echo Target stays the same $rewritten_target 10641 else 10642 echo Rewriting target for builddeps into $rewritten_target 10643 fi 10644 rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'` 10645 rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'` 10646 fi 10647 for ac_prog in 7z unzip 10648 do 10649 # Extract the first word of "$ac_prog", so it can be a program name with args. 10650 set dummy $ac_prog; ac_word=$2 10651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10652 $as_echo_n "checking for $ac_word... " >&6; } 10653 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then : 10654 $as_echo_n "(cached) " >&6 10655 else 10656 if test -n "$BDEPS_UNZIP"; then 10657 ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test. 10658 else 10659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10660 for as_dir in $PATH 10661 do 10662 IFS=$as_save_IFS 10663 test -z "$as_dir" && as_dir=. 10664 for ac_exec_ext in '' $ac_executable_extensions; do 10665 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10666 ac_cv_prog_BDEPS_UNZIP="$ac_prog" 10667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10668 break 2 10669 fi 10670 done 10671 done 10672 IFS=$as_save_IFS 10673 10674 fi 10675 fi 10676 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP 10677 if test -n "$BDEPS_UNZIP"; then 10678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5 10679 $as_echo "$BDEPS_UNZIP" >&6; } 10680 else 10681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10682 $as_echo "no" >&6; } 10683 fi 10684 10685 10686 test -n "$BDEPS_UNZIP" && break 10687 done 10688 10689 if test "x$BDEPS_UNZIP" = x7z; then 10690 BDEPS_UNZIP="7z x" 10691 fi 10692 10693 for ac_prog in wget lftp ftp 10694 do 10695 # Extract the first word of "$ac_prog", so it can be a program name with args. 10696 set dummy $ac_prog; ac_word=$2 10697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10698 $as_echo_n "checking for $ac_word... " >&6; } 10699 if ${ac_cv_prog_BDEPS_FTP+:} false; then : 10700 $as_echo_n "(cached) " >&6 10701 else 10702 if test -n "$BDEPS_FTP"; then 10703 ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test. 10704 else 10705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10706 for as_dir in $PATH 10707 do 10708 IFS=$as_save_IFS 10709 test -z "$as_dir" && as_dir=. 10710 for ac_exec_ext in '' $ac_executable_extensions; do 10711 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10712 ac_cv_prog_BDEPS_FTP="$ac_prog" 10713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10714 break 2 10715 fi 10716 done 10717 done 10718 IFS=$as_save_IFS 10719 10720 fi 10721 fi 10722 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP 10723 if test -n "$BDEPS_FTP"; then 10724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5 10725 $as_echo "$BDEPS_FTP" >&6; } 10726 else 10727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10728 $as_echo "no" >&6; } 10729 fi 10730 10731 10732 test -n "$BDEPS_FTP" && break 10733 done 10734 10735 10736 10737 ############################################################################### 10738 # 10739 # Determine OpenJDK variants, options and version numbers. 10740 # 10741 ############################################################################### 10742 10743 # We need build & target for this. 10744 10745 10746 ############################################################################### 10747 # 10748 # Should we build a JDK/JVM with headful support (ie a graphical ui)? 10749 # We always build headless support. 10750 # 10751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5 10752 $as_echo_n "checking headful support... " >&6; } 10753 # Check whether --enable-headful was given. 10754 if test "${enable_headful+set}" = set; then : 10755 enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful} 10756 else 10757 SUPPORT_HEADFUL=yes 10758 fi 10759 10760 10761 SUPPORT_HEADLESS=yes 10762 BUILD_HEADLESS="BUILD_HEADLESS:=true" 10763 10764 if test "x$SUPPORT_HEADFUL" = xyes; then 10765 # We are building both headful and headless. 10766 headful_msg="inlude support for both headful and headless" 10767 fi 10768 10769 if test "x$SUPPORT_HEADFUL" = xno; then 10770 # Thus we are building headless only. 10771 BUILD_HEADLESS="BUILD_HEADLESS:=true" 10772 headful_msg="headless only" 10773 fi 10774 10775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5 10776 $as_echo "$headful_msg" >&6; } 10777 10778 10779 10780 10781 10782 # Control wether Hotspot runs Queens test after build. 10783 # Check whether --enable-hotspot-test-in-build was given. 10784 if test "${enable_hotspot_test_in_build+set}" = set; then : 10785 enableval=$enable_hotspot_test_in_build; 10786 else 10787 enable_hotspot_test_in_build=no 10788 fi 10789 10790 if test "x$enable_hotspot_test_in_build" = "xyes"; then 10791 TEST_IN_BUILD=true 10792 else 10793 TEST_IN_BUILD=false 10794 fi 10795 10796 10797 ############################################################################### 10798 # 10799 # Choose cacerts source file 10800 # 10801 10802 # Check whether --with-cacerts-file was given. 10803 if test "${with_cacerts_file+set}" = set; then : 10804 withval=$with_cacerts_file; 10805 fi 10806 10807 if test "x$with_cacerts_file" != x; then 10808 CACERTS_FILE=$with_cacerts_file 10809 else 10810 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts 10811 fi 10812 10813 10814 ############################################################################### 10815 # 10816 # Enable or disable unlimited crypto 10817 # 10818 # Check whether --enable-unlimited-crypto was given. 10819 if test "${enable_unlimited_crypto+set}" = set; then : 10820 enableval=$enable_unlimited_crypto; 10821 else 10822 enable_unlimited_crypto=no 10823 fi 10824 10825 if test "x$enable_unlimited_crypto" = "xyes"; then 10826 UNLIMITED_CRYPTO=true 10827 else 10828 UNLIMITED_CRYPTO=false 10829 fi 10830 10831 10832 ############################################################################### 10833 # 10834 # Enable or disable the elliptic curve crypto implementation 10835 # 10836 10837 10838 ############################################################################### 10839 # 10840 # Compress jars 10841 # 10842 COMPRESS_JARS=false 10843 10844 10845 10846 10847 # Source the version numbers 10848 . $AUTOCONF_DIR/version-numbers 10849 10850 # Get the settings from parameters 10851 10852 # Check whether --with-milestone was given. 10853 if test "${with_milestone+set}" = set; then : 10854 withval=$with_milestone; 10855 fi 10856 10857 if test "x$with_milestone" = xyes; then 10858 as_fn_error $? "Milestone must have a value" "$LINENO" 5 10859 elif test "x$with_milestone" != x; then 10860 MILESTONE="$with_milestone" 10861 fi 10862 if test "x$MILESTONE" = x; then 10863 MILESTONE=internal 10864 fi 10865 10866 10867 # Check whether --with-update-version was given. 10868 if test "${with_update_version+set}" = set; then : 10869 withval=$with_update_version; 10870 fi 10871 10872 if test "x$with_update_version" = xyes; then 10873 as_fn_error $? "Update version must have a value" "$LINENO" 5 10874 elif test "x$with_update_version" != x; then 10875 JDK_UPDATE_VERSION="$with_update_version" 10876 fi 10877 10878 10879 # Check whether --with-build-number was given. 10880 if test "${with_build_number+set}" = set; then : 10881 withval=$with_build_number; 10882 fi 10883 10884 if test "x$with_build_number" = xyes; then 10885 as_fn_error $? "Build number must have a value" "$LINENO" 5 10886 elif test "x$with_build_number" != x; then 10887 JDK_BUILD_NUMBER="$with_build_number" 10888 fi 10889 if test "x$JDK_BUILD_NUMBER" = x; then 10890 JDK_BUILD_NUMBER=b00 10891 fi 10892 10893 10894 # Check whether --with-user-release-suffix was given. 10895 if test "${with_user_release_suffix+set}" = set; then : 10896 withval=$with_user_release_suffix; 10897 fi 10898 10899 if test "x$with_user_release_suffix" = xyes; then 10900 as_fn_error $? "Release suffix must have a value" "$LINENO" 5 10901 elif test "x$with_user_release_suffix" != x; then 10902 USER_RELEASE_SUFFIX="$with_user_release_suffix" 10903 else 10904 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` 10905 # Avoid [:alnum:] since it depends on the locale. 10906 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` 10907 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 10908 fi 10909 10910 10911 # Now set the JDK version, milestone, build number etc. 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 COPYRIGHT_YEAR=`date +'%Y'` 10927 10928 10929 if test "x$JDK_UPDATE_VERSION" != x; then 10930 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" 10931 else 10932 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" 10933 fi 10934 10935 10936 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` 10937 10938 10939 10940 ############################################################################### 10941 # 10942 # Setup BootJDK, used to bootstrap the build. 10943 # 10944 ############################################################################### 10945 10946 10947 BOOT_JDK_FOUND=no 10948 10949 # Check whether --with-boot-jdk was given. 10950 if test "${with_boot_jdk+set}" = set; then : 10951 withval=$with_boot_jdk; 10952 fi 10953 10954 10955 # We look for the Boot JDK through various means, going from more certain to 10956 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if 10957 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we 10958 # must check if this is indeed valid; otherwise we'll continue looking. 10959 10960 # Test: Is bootjdk explicitely set by command line arguments? 10961 10962 if test "x$BOOT_JDK_FOUND" = xno; then 10963 # Now execute the test 10964 10965 if test "x$with_boot_jdk" != x; then 10966 BOOT_JDK=$with_boot_jdk 10967 BOOT_JDK_FOUND=maybe 10968 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5 10969 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;} 10970 fi 10971 10972 10973 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 10974 if test "x$BOOT_JDK_FOUND" = xmaybe; then 10975 # Do we have a bin/java? 10976 if test ! -x "$BOOT_JDK/bin/java"; then 10977 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 10978 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 10979 BOOT_JDK_FOUND=no 10980 else 10981 # Do we have a bin/javac? 10982 if test ! -x "$BOOT_JDK/bin/javac"; then 10983 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 10984 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 10985 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 10986 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 10987 BOOT_JDK_FOUND=no 10988 else 10989 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 10990 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 10991 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 10992 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 10993 BOOT_JDK_FOUND=no 10994 else 10995 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 10996 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 10997 10998 # Extra M4 quote needed to protect [] in grep expression. 10999 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11000 if test "x$FOUND_VERSION_78" = x; then 11001 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11002 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11003 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11004 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11005 BOOT_JDK_FOUND=no 11006 else 11007 # We're done! :-) 11008 BOOT_JDK_FOUND=yes 11009 11010 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11011 11012 # Input might be given as Windows format, start by converting to 11013 # unix format. 11014 path="$BOOT_JDK" 11015 new_path=`$CYGPATH -u "$path"` 11016 11017 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11018 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11019 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11020 # "foo.exe" is OK but "foo" is an error. 11021 # 11022 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11023 # It is also a way to make sure we got the proper file name for the real test later on. 11024 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11025 if test "x$test_shortpath" = x; then 11026 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11027 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11028 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11029 fi 11030 11031 # Call helper function which possibly converts this using DOS-style short mode. 11032 # If so, the updated path is stored in $new_path. 11033 11034 input_path="$new_path" 11035 # Check if we need to convert this using DOS-style short mode. If the path 11036 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11037 # take no chances and rewrite it. 11038 # Note: m4 eats our [], so we need to use [ and ] instead. 11039 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11040 if test "x$has_forbidden_chars" != x; then 11041 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11042 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11043 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11044 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11045 # Going to short mode and back again did indeed matter. Since short mode is 11046 # case insensitive, let's make it lowercase to improve readability. 11047 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11048 # Now convert it back to Unix-stile (cygpath) 11049 input_path=`$CYGPATH -u "$shortmode_path"` 11050 new_path="$input_path" 11051 fi 11052 fi 11053 11054 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11055 if test "x$test_cygdrive_prefix" = x; then 11056 # As a simple fix, exclude /usr/bin since it's not a real path. 11057 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11058 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11059 # a path prefixed by /cygdrive for fixpath to work. 11060 new_path="$CYGWIN_ROOT_PATH$input_path" 11061 fi 11062 fi 11063 11064 11065 if test "x$path" != "x$new_path"; then 11066 BOOT_JDK="$new_path" 11067 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11068 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11069 fi 11070 11071 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11072 11073 path="$BOOT_JDK" 11074 has_colon=`$ECHO $path | $GREP ^.:` 11075 new_path="$path" 11076 if test "x$has_colon" = x; then 11077 # Not in mixed or Windows style, start by that. 11078 new_path=`cmd //c echo $path` 11079 fi 11080 11081 11082 input_path="$new_path" 11083 # Check if we need to convert this using DOS-style short mode. If the path 11084 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11085 # take no chances and rewrite it. 11086 # Note: m4 eats our [], so we need to use [ and ] instead. 11087 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11088 if test "x$has_forbidden_chars" != x; then 11089 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11090 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11091 fi 11092 11093 11094 windows_path="$new_path" 11095 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11096 unix_path=`$CYGPATH -u "$windows_path"` 11097 new_path="$unix_path" 11098 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11099 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11100 new_path="$unix_path" 11101 fi 11102 11103 if test "x$path" != "x$new_path"; then 11104 BOOT_JDK="$new_path" 11105 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11106 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11107 fi 11108 11109 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11110 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11111 11112 else 11113 # We're on a posix platform. Hooray! :) 11114 path="$BOOT_JDK" 11115 has_space=`$ECHO "$path" | $GREP " "` 11116 if test "x$has_space" != x; then 11117 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11118 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11119 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11120 fi 11121 11122 # Use eval to expand a potential ~ 11123 eval path="$path" 11124 if test ! -f "$path" && test ! -d "$path"; then 11125 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11126 fi 11127 11128 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 11129 fi 11130 11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11132 $as_echo_n "checking for Boot JDK... " >&6; } 11133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11134 $as_echo "$BOOT_JDK" >&6; } 11135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11136 $as_echo_n "checking Boot JDK version... " >&6; } 11137 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11139 $as_echo "$BOOT_JDK_VERSION" >&6; } 11140 fi # end check jdk version 11141 fi # end check rt.jar 11142 fi # end check javac 11143 fi # end check java 11144 fi # end check boot jdk found 11145 fi 11146 11147 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then 11148 # Having specified an argument which is incorrect will produce an instant failure; 11149 # we should not go on looking 11150 as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5 11151 fi 11152 11153 # Test: Is bootjdk available from builddeps? 11154 11155 if test "x$BOOT_JDK_FOUND" = xno; then 11156 # Now execute the test 11157 11158 11159 11160 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 11161 # Source the builddeps file again, to make sure it uses the latest variables! 11162 . $builddepsfile 11163 # Look for a target and build machine specific resource! 11164 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 11165 if test "x$resource" = x; then 11166 # Ok, lets instead look for a target specific resource 11167 eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}} 11168 fi 11169 if test "x$resource" = x; then 11170 # Ok, lets instead look for a build specific resource 11171 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}} 11172 fi 11173 if test "x$resource" = x; then 11174 # Ok, lets instead look for a generic resource 11175 # (The bootjdk comes from M4 and not the shell, thus no need for eval here.) 11176 resource=${builddep_bootjdk} 11177 fi 11178 if test "x$resource" != x; then 11179 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5 11180 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;} 11181 # If the resource in the builddeps.conf file is an existing directory, 11182 # for example /java/linux/cups 11183 if test -d ${resource}; then 11184 depdir=${resource} 11185 else 11186 11187 # bootjdk is for example mymodule 11188 # $resource is for example libs/general/libmymod_1_2_3.zip 11189 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 11190 # $with_builddeps_dir is for example /localhome/builddeps 11191 # depdir is the name of the variable into which we store the depdir, eg MYMOD 11192 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 11193 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 11194 filename=`basename $resource` 11195 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 11196 filebase=${filename%%.*} 11197 extension=${filename#*.} 11198 installdir=$with_builddeps_dir/$filebase 11199 if test ! -f $installdir/$filename.unpacked; then 11200 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5 11201 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;} 11202 if test ! -d $installdir; then 11203 mkdir -p $installdir 11204 fi 11205 if test ! -d $installdir; then 11206 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 11207 fi 11208 tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX` 11209 touch $tmpfile 11210 if test ! -f $tmpfile; then 11211 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 11212 fi 11213 11214 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 11215 # $tmpfile is the local file name for the downloaded file. 11216 VALID_TOOL=no 11217 if test "x$BDEPS_FTP" = xwget; then 11218 VALID_TOOL=yes 11219 wget -O $tmpfile $with_builddeps_server/$resource 11220 fi 11221 if test "x$BDEPS_FTP" = xlftp; then 11222 VALID_TOOL=yes 11223 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 11224 fi 11225 if test "x$BDEPS_FTP" = xftp; then 11226 VALID_TOOL=yes 11227 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 11228 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 11229 FTPUSERPWD=${FTPSERVER%%@*} 11230 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 11231 FTPUSER=${userpwd%%:*} 11232 FTPPWD=${userpwd#*@} 11233 FTPSERVER=${FTPSERVER#*@} 11234 else 11235 FTPUSER=ftp 11236 FTPPWD=ftp 11237 fi 11238 # the "pass" command does not work on some 11239 # ftp clients (read ftp.exe) but if it works, 11240 # passive mode is better! 11241 (\ 11242 echo "user $FTPUSER $FTPPWD" ;\ 11243 echo "pass" ;\ 11244 echo "bin" ;\ 11245 echo "get $FTPPATH $tmpfile" ;\ 11246 ) | ftp -in $FTPSERVER 11247 fi 11248 if test "x$VALID_TOOL" != xyes; then 11249 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 11250 fi 11251 11252 mv $tmpfile $installdir/$filename 11253 if test ! -s $installdir/$filename; then 11254 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 11255 fi 11256 case "$extension" in 11257 zip) echo "Unzipping $installdir/$filename..." 11258 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 11259 ;; 11260 tar.gz) echo "Untaring $installdir/$filename..." 11261 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 11262 ;; 11263 tgz) echo "Untaring $installdir/$filename..." 11264 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 11265 ;; 11266 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 11267 ;; 11268 esac 11269 fi 11270 if test -f $installdir/$filename.unpacked; then 11271 depdir=$installdir 11272 fi 11273 11274 fi 11275 # Source the builddeps file again, because in the previous command, the depdir 11276 # was updated to point at the current build dependency install directory. 11277 . $builddepsfile 11278 # Now extract variables from the builddeps.conf files. 11279 theroot=${builddep_bootjdk_ROOT} 11280 thecflags=${builddep_bootjdk_CFLAGS} 11281 thelibs=${builddep_bootjdk_LIBS} 11282 if test "x$depdir" = x; then 11283 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5 11284 fi 11285 BOOT_JDK=$depdir 11286 if test "x$theroot" != x; then 11287 BOOT_JDK="$theroot" 11288 fi 11289 if test "x$thecflags" != x; then 11290 BOOT_JDK_CFLAGS="$thecflags" 11291 fi 11292 if test "x$thelibs" != x; then 11293 BOOT_JDK_LIBS="$thelibs" 11294 fi 11295 BOOT_JDK_FOUND=maybe 11296 else BOOT_JDK_FOUND=no 11297 11298 fi 11299 else BOOT_JDK_FOUND=no 11300 11301 fi 11302 11303 11304 11305 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11306 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11307 # Do we have a bin/java? 11308 if test ! -x "$BOOT_JDK/bin/java"; then 11309 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11310 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11311 BOOT_JDK_FOUND=no 11312 else 11313 # Do we have a bin/javac? 11314 if test ! -x "$BOOT_JDK/bin/javac"; then 11315 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11316 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11317 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11318 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11319 BOOT_JDK_FOUND=no 11320 else 11321 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11322 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11323 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11324 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11325 BOOT_JDK_FOUND=no 11326 else 11327 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11328 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11329 11330 # Extra M4 quote needed to protect [] in grep expression. 11331 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11332 if test "x$FOUND_VERSION_78" = x; then 11333 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11334 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11335 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11336 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11337 BOOT_JDK_FOUND=no 11338 else 11339 # We're done! :-) 11340 BOOT_JDK_FOUND=yes 11341 11342 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11343 11344 # Input might be given as Windows format, start by converting to 11345 # unix format. 11346 path="$BOOT_JDK" 11347 new_path=`$CYGPATH -u "$path"` 11348 11349 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11350 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11351 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11352 # "foo.exe" is OK but "foo" is an error. 11353 # 11354 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11355 # It is also a way to make sure we got the proper file name for the real test later on. 11356 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11357 if test "x$test_shortpath" = x; then 11358 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11359 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11360 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11361 fi 11362 11363 # Call helper function which possibly converts this using DOS-style short mode. 11364 # If so, the updated path is stored in $new_path. 11365 11366 input_path="$new_path" 11367 # Check if we need to convert this using DOS-style short mode. If the path 11368 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11369 # take no chances and rewrite it. 11370 # Note: m4 eats our [], so we need to use [ and ] instead. 11371 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11372 if test "x$has_forbidden_chars" != x; then 11373 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11374 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11375 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11376 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11377 # Going to short mode and back again did indeed matter. Since short mode is 11378 # case insensitive, let's make it lowercase to improve readability. 11379 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11380 # Now convert it back to Unix-stile (cygpath) 11381 input_path=`$CYGPATH -u "$shortmode_path"` 11382 new_path="$input_path" 11383 fi 11384 fi 11385 11386 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11387 if test "x$test_cygdrive_prefix" = x; then 11388 # As a simple fix, exclude /usr/bin since it's not a real path. 11389 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11390 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11391 # a path prefixed by /cygdrive for fixpath to work. 11392 new_path="$CYGWIN_ROOT_PATH$input_path" 11393 fi 11394 fi 11395 11396 11397 if test "x$path" != "x$new_path"; then 11398 BOOT_JDK="$new_path" 11399 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11400 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11401 fi 11402 11403 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11404 11405 path="$BOOT_JDK" 11406 has_colon=`$ECHO $path | $GREP ^.:` 11407 new_path="$path" 11408 if test "x$has_colon" = x; then 11409 # Not in mixed or Windows style, start by that. 11410 new_path=`cmd //c echo $path` 11411 fi 11412 11413 11414 input_path="$new_path" 11415 # Check if we need to convert this using DOS-style short mode. If the path 11416 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11417 # take no chances and rewrite it. 11418 # Note: m4 eats our [], so we need to use [ and ] instead. 11419 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11420 if test "x$has_forbidden_chars" != x; then 11421 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11422 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11423 fi 11424 11425 11426 windows_path="$new_path" 11427 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11428 unix_path=`$CYGPATH -u "$windows_path"` 11429 new_path="$unix_path" 11430 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11431 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11432 new_path="$unix_path" 11433 fi 11434 11435 if test "x$path" != "x$new_path"; then 11436 BOOT_JDK="$new_path" 11437 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11438 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11439 fi 11440 11441 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11442 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11443 11444 else 11445 # We're on a posix platform. Hooray! :) 11446 path="$BOOT_JDK" 11447 has_space=`$ECHO "$path" | $GREP " "` 11448 if test "x$has_space" != x; then 11449 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11450 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11451 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11452 fi 11453 11454 # Use eval to expand a potential ~ 11455 eval path="$path" 11456 if test ! -f "$path" && test ! -d "$path"; then 11457 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11458 fi 11459 11460 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 11461 fi 11462 11463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11464 $as_echo_n "checking for Boot JDK... " >&6; } 11465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11466 $as_echo "$BOOT_JDK" >&6; } 11467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11468 $as_echo_n "checking Boot JDK version... " >&6; } 11469 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11471 $as_echo "$BOOT_JDK_VERSION" >&6; } 11472 fi # end check jdk version 11473 fi # end check rt.jar 11474 fi # end check javac 11475 fi # end check java 11476 fi # end check boot jdk found 11477 fi 11478 11479 11480 # Test: Is $JAVA_HOME set? 11481 11482 if test "x$BOOT_JDK_FOUND" = xno; then 11483 # Now execute the test 11484 11485 if test "x$JAVA_HOME" != x; then 11486 JAVA_HOME_PROCESSED="$JAVA_HOME" 11487 11488 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11489 11490 # Input might be given as Windows format, start by converting to 11491 # unix format. 11492 path="$JAVA_HOME_PROCESSED" 11493 new_path=`$CYGPATH -u "$path"` 11494 11495 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11496 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11497 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11498 # "foo.exe" is OK but "foo" is an error. 11499 # 11500 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11501 # It is also a way to make sure we got the proper file name for the real test later on. 11502 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11503 if test "x$test_shortpath" = x; then 11504 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5 11505 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;} 11506 as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5 11507 fi 11508 11509 # Call helper function which possibly converts this using DOS-style short mode. 11510 # If so, the updated path is stored in $new_path. 11511 11512 input_path="$new_path" 11513 # Check if we need to convert this using DOS-style short mode. If the path 11514 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11515 # take no chances and rewrite it. 11516 # Note: m4 eats our [], so we need to use [ and ] instead. 11517 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11518 if test "x$has_forbidden_chars" != x; then 11519 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11520 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11521 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11522 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11523 # Going to short mode and back again did indeed matter. Since short mode is 11524 # case insensitive, let's make it lowercase to improve readability. 11525 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11526 # Now convert it back to Unix-stile (cygpath) 11527 input_path=`$CYGPATH -u "$shortmode_path"` 11528 new_path="$input_path" 11529 fi 11530 fi 11531 11532 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11533 if test "x$test_cygdrive_prefix" = x; then 11534 # As a simple fix, exclude /usr/bin since it's not a real path. 11535 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11536 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11537 # a path prefixed by /cygdrive for fixpath to work. 11538 new_path="$CYGWIN_ROOT_PATH$input_path" 11539 fi 11540 fi 11541 11542 11543 if test "x$path" != "x$new_path"; then 11544 JAVA_HOME_PROCESSED="$new_path" 11545 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5 11546 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;} 11547 fi 11548 11549 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11550 11551 path="$JAVA_HOME_PROCESSED" 11552 has_colon=`$ECHO $path | $GREP ^.:` 11553 new_path="$path" 11554 if test "x$has_colon" = x; then 11555 # Not in mixed or Windows style, start by that. 11556 new_path=`cmd //c echo $path` 11557 fi 11558 11559 11560 input_path="$new_path" 11561 # Check if we need to convert this using DOS-style short mode. If the path 11562 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11563 # take no chances and rewrite it. 11564 # Note: m4 eats our [], so we need to use [ and ] instead. 11565 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11566 if test "x$has_forbidden_chars" != x; then 11567 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11568 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11569 fi 11570 11571 11572 windows_path="$new_path" 11573 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11574 unix_path=`$CYGPATH -u "$windows_path"` 11575 new_path="$unix_path" 11576 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11577 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11578 new_path="$unix_path" 11579 fi 11580 11581 if test "x$path" != "x$new_path"; then 11582 JAVA_HOME_PROCESSED="$new_path" 11583 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5 11584 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;} 11585 fi 11586 11587 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11588 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11589 11590 else 11591 # We're on a posix platform. Hooray! :) 11592 path="$JAVA_HOME_PROCESSED" 11593 has_space=`$ECHO "$path" | $GREP " "` 11594 if test "x$has_space" != x; then 11595 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5 11596 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;} 11597 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11598 fi 11599 11600 # Use eval to expand a potential ~ 11601 eval path="$path" 11602 if test ! -f "$path" && test ! -d "$path"; then 11603 as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5 11604 fi 11605 11606 JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`" 11607 fi 11608 11609 if test ! -d "$JAVA_HOME_PROCESSED"; then 11610 { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5 11611 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;} 11612 else 11613 # Aha, the user has set a JAVA_HOME 11614 # let us use that as the Boot JDK. 11615 BOOT_JDK="$JAVA_HOME_PROCESSED" 11616 BOOT_JDK_FOUND=maybe 11617 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5 11618 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;} 11619 fi 11620 fi 11621 11622 11623 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11624 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11625 # Do we have a bin/java? 11626 if test ! -x "$BOOT_JDK/bin/java"; then 11627 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11628 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11629 BOOT_JDK_FOUND=no 11630 else 11631 # Do we have a bin/javac? 11632 if test ! -x "$BOOT_JDK/bin/javac"; then 11633 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11634 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11635 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11636 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11637 BOOT_JDK_FOUND=no 11638 else 11639 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11640 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11641 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11642 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11643 BOOT_JDK_FOUND=no 11644 else 11645 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11646 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11647 11648 # Extra M4 quote needed to protect [] in grep expression. 11649 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11650 if test "x$FOUND_VERSION_78" = x; then 11651 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11652 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11653 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11654 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11655 BOOT_JDK_FOUND=no 11656 else 11657 # We're done! :-) 11658 BOOT_JDK_FOUND=yes 11659 11660 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11661 11662 # Input might be given as Windows format, start by converting to 11663 # unix format. 11664 path="$BOOT_JDK" 11665 new_path=`$CYGPATH -u "$path"` 11666 11667 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11668 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11669 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11670 # "foo.exe" is OK but "foo" is an error. 11671 # 11672 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11673 # It is also a way to make sure we got the proper file name for the real test later on. 11674 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11675 if test "x$test_shortpath" = x; then 11676 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11677 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11678 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11679 fi 11680 11681 # Call helper function which possibly converts this using DOS-style short mode. 11682 # If so, the updated path is stored in $new_path. 11683 11684 input_path="$new_path" 11685 # Check if we need to convert this using DOS-style short mode. If the path 11686 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11687 # take no chances and rewrite it. 11688 # Note: m4 eats our [], so we need to use [ and ] instead. 11689 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11690 if test "x$has_forbidden_chars" != x; then 11691 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11692 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11693 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11694 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11695 # Going to short mode and back again did indeed matter. Since short mode is 11696 # case insensitive, let's make it lowercase to improve readability. 11697 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11698 # Now convert it back to Unix-stile (cygpath) 11699 input_path=`$CYGPATH -u "$shortmode_path"` 11700 new_path="$input_path" 11701 fi 11702 fi 11703 11704 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11705 if test "x$test_cygdrive_prefix" = x; then 11706 # As a simple fix, exclude /usr/bin since it's not a real path. 11707 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11708 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11709 # a path prefixed by /cygdrive for fixpath to work. 11710 new_path="$CYGWIN_ROOT_PATH$input_path" 11711 fi 11712 fi 11713 11714 11715 if test "x$path" != "x$new_path"; then 11716 BOOT_JDK="$new_path" 11717 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11718 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11719 fi 11720 11721 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11722 11723 path="$BOOT_JDK" 11724 has_colon=`$ECHO $path | $GREP ^.:` 11725 new_path="$path" 11726 if test "x$has_colon" = x; then 11727 # Not in mixed or Windows style, start by that. 11728 new_path=`cmd //c echo $path` 11729 fi 11730 11731 11732 input_path="$new_path" 11733 # Check if we need to convert this using DOS-style short mode. If the path 11734 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11735 # take no chances and rewrite it. 11736 # Note: m4 eats our [], so we need to use [ and ] instead. 11737 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11738 if test "x$has_forbidden_chars" != x; then 11739 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11740 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11741 fi 11742 11743 11744 windows_path="$new_path" 11745 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11746 unix_path=`$CYGPATH -u "$windows_path"` 11747 new_path="$unix_path" 11748 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11749 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11750 new_path="$unix_path" 11751 fi 11752 11753 if test "x$path" != "x$new_path"; then 11754 BOOT_JDK="$new_path" 11755 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11756 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11757 fi 11758 11759 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11760 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11761 11762 else 11763 # We're on a posix platform. Hooray! :) 11764 path="$BOOT_JDK" 11765 has_space=`$ECHO "$path" | $GREP " "` 11766 if test "x$has_space" != x; then 11767 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11768 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11769 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11770 fi 11771 11772 # Use eval to expand a potential ~ 11773 eval path="$path" 11774 if test ! -f "$path" && test ! -d "$path"; then 11775 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11776 fi 11777 11778 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 11779 fi 11780 11781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11782 $as_echo_n "checking for Boot JDK... " >&6; } 11783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11784 $as_echo "$BOOT_JDK" >&6; } 11785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11786 $as_echo_n "checking Boot JDK version... " >&6; } 11787 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11789 $as_echo "$BOOT_JDK_VERSION" >&6; } 11790 fi # end check jdk version 11791 fi # end check rt.jar 11792 fi # end check javac 11793 fi # end check java 11794 fi # end check boot jdk found 11795 fi 11796 11797 11798 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) 11799 11800 if test "x$BOOT_JDK_FOUND" = xno; then 11801 # Now execute the test 11802 11803 if test -x /usr/libexec/java_home; then 11804 BOOT_JDK=`/usr/libexec/java_home` 11805 BOOT_JDK_FOUND=maybe 11806 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5 11807 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;} 11808 fi 11809 11810 11811 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11812 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11813 # Do we have a bin/java? 11814 if test ! -x "$BOOT_JDK/bin/java"; then 11815 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11817 BOOT_JDK_FOUND=no 11818 else 11819 # Do we have a bin/javac? 11820 if test ! -x "$BOOT_JDK/bin/javac"; then 11821 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11822 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11823 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11824 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11825 BOOT_JDK_FOUND=no 11826 else 11827 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11828 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11829 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11830 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11831 BOOT_JDK_FOUND=no 11832 else 11833 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11834 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11835 11836 # Extra M4 quote needed to protect [] in grep expression. 11837 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11838 if test "x$FOUND_VERSION_78" = x; then 11839 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11840 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11841 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11842 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11843 BOOT_JDK_FOUND=no 11844 else 11845 # We're done! :-) 11846 BOOT_JDK_FOUND=yes 11847 11848 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11849 11850 # Input might be given as Windows format, start by converting to 11851 # unix format. 11852 path="$BOOT_JDK" 11853 new_path=`$CYGPATH -u "$path"` 11854 11855 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11856 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11857 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11858 # "foo.exe" is OK but "foo" is an error. 11859 # 11860 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11861 # It is also a way to make sure we got the proper file name for the real test later on. 11862 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11863 if test "x$test_shortpath" = x; then 11864 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11865 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11866 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11867 fi 11868 11869 # Call helper function which possibly converts this using DOS-style short mode. 11870 # If so, the updated path is stored in $new_path. 11871 11872 input_path="$new_path" 11873 # Check if we need to convert this using DOS-style short mode. If the path 11874 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11875 # take no chances and rewrite it. 11876 # Note: m4 eats our [], so we need to use [ and ] instead. 11877 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11878 if test "x$has_forbidden_chars" != x; then 11879 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11880 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11881 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11882 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11883 # Going to short mode and back again did indeed matter. Since short mode is 11884 # case insensitive, let's make it lowercase to improve readability. 11885 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11886 # Now convert it back to Unix-stile (cygpath) 11887 input_path=`$CYGPATH -u "$shortmode_path"` 11888 new_path="$input_path" 11889 fi 11890 fi 11891 11892 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11893 if test "x$test_cygdrive_prefix" = x; then 11894 # As a simple fix, exclude /usr/bin since it's not a real path. 11895 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11896 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11897 # a path prefixed by /cygdrive for fixpath to work. 11898 new_path="$CYGWIN_ROOT_PATH$input_path" 11899 fi 11900 fi 11901 11902 11903 if test "x$path" != "x$new_path"; then 11904 BOOT_JDK="$new_path" 11905 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11906 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11907 fi 11908 11909 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11910 11911 path="$BOOT_JDK" 11912 has_colon=`$ECHO $path | $GREP ^.:` 11913 new_path="$path" 11914 if test "x$has_colon" = x; then 11915 # Not in mixed or Windows style, start by that. 11916 new_path=`cmd //c echo $path` 11917 fi 11918 11919 11920 input_path="$new_path" 11921 # Check if we need to convert this using DOS-style short mode. If the path 11922 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11923 # take no chances and rewrite it. 11924 # Note: m4 eats our [], so we need to use [ and ] instead. 11925 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11926 if test "x$has_forbidden_chars" != x; then 11927 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11928 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11929 fi 11930 11931 11932 windows_path="$new_path" 11933 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11934 unix_path=`$CYGPATH -u "$windows_path"` 11935 new_path="$unix_path" 11936 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11937 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11938 new_path="$unix_path" 11939 fi 11940 11941 if test "x$path" != "x$new_path"; then 11942 BOOT_JDK="$new_path" 11943 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11944 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11945 fi 11946 11947 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11948 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11949 11950 else 11951 # We're on a posix platform. Hooray! :) 11952 path="$BOOT_JDK" 11953 has_space=`$ECHO "$path" | $GREP " "` 11954 if test "x$has_space" != x; then 11955 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11956 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11957 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11958 fi 11959 11960 # Use eval to expand a potential ~ 11961 eval path="$path" 11962 if test ! -f "$path" && test ! -d "$path"; then 11963 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11964 fi 11965 11966 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 11967 fi 11968 11969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11970 $as_echo_n "checking for Boot JDK... " >&6; } 11971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11972 $as_echo "$BOOT_JDK" >&6; } 11973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11974 $as_echo_n "checking Boot JDK version... " >&6; } 11975 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11977 $as_echo "$BOOT_JDK_VERSION" >&6; } 11978 fi # end check jdk version 11979 fi # end check rt.jar 11980 fi # end check javac 11981 fi # end check java 11982 fi # end check boot jdk found 11983 fi 11984 11985 11986 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK? 11987 11988 if test "x$BOOT_JDK_FOUND" = xno; then 11989 # Now execute the test 11990 11991 # Extract the first word of "javac", so it can be a program name with args. 11992 set dummy javac; ac_word=$2 11993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 11994 $as_echo_n "checking for $ac_word... " >&6; } 11995 if ${ac_cv_path_JAVAC_CHECK+:} false; then : 11996 $as_echo_n "(cached) " >&6 11997 else 11998 case $JAVAC_CHECK in 11999 [\\/]* | ?:[\\/]*) 12000 ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path. 12001 ;; 12002 *) 12003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12004 for as_dir in $PATH 12005 do 12006 IFS=$as_save_IFS 12007 test -z "$as_dir" && as_dir=. 12008 for ac_exec_ext in '' $ac_executable_extensions; do 12009 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 12010 ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext" 12011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 12012 break 2 12013 fi 12014 done 12015 done 12016 IFS=$as_save_IFS 12017 12018 ;; 12019 esac 12020 fi 12021 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK 12022 if test -n "$JAVAC_CHECK"; then 12023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5 12024 $as_echo "$JAVAC_CHECK" >&6; } 12025 else 12026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12027 $as_echo "no" >&6; } 12028 fi 12029 12030 12031 # Extract the first word of "java", so it can be a program name with args. 12032 set dummy java; ac_word=$2 12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 12034 $as_echo_n "checking for $ac_word... " >&6; } 12035 if ${ac_cv_path_JAVA_CHECK+:} false; then : 12036 $as_echo_n "(cached) " >&6 12037 else 12038 case $JAVA_CHECK in 12039 [\\/]* | ?:[\\/]*) 12040 ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path. 12041 ;; 12042 *) 12043 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12044 for as_dir in $PATH 12045 do 12046 IFS=$as_save_IFS 12047 test -z "$as_dir" && as_dir=. 12048 for ac_exec_ext in '' $ac_executable_extensions; do 12049 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 12050 ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext" 12051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 12052 break 2 12053 fi 12054 done 12055 done 12056 IFS=$as_save_IFS 12057 12058 ;; 12059 esac 12060 fi 12061 JAVA_CHECK=$ac_cv_path_JAVA_CHECK 12062 if test -n "$JAVA_CHECK"; then 12063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5 12064 $as_echo "$JAVA_CHECK" >&6; } 12065 else 12066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12067 $as_echo "no" >&6; } 12068 fi 12069 12070 12071 BINARY="$JAVAC_CHECK" 12072 if test "x$JAVAC_CHECK" = x; then 12073 BINARY="$JAVA_CHECK" 12074 fi 12075 if test "x$BINARY" != x; then 12076 # So there is a java(c) binary, it might be part of a JDK. 12077 # Lets find the JDK/JRE directory by following symbolic links. 12078 # Linux/GNU systems often have links from /usr/bin/java to 12079 # /etc/alternatives/java to the real JDK binary. 12080 12081 if test "x$OPENJDK_BUILD_OS" != xwindows; then 12082 # Follow a chain of symbolic links. Use readlink 12083 # where it exists, else fall back to horribly 12084 # complicated shell code. 12085 if test "x$READLINK_TESTED" != yes; then 12086 # On MacOSX there is a readlink tool with a different 12087 # purpose than the GNU readlink tool. Check the found readlink. 12088 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 12089 if test "x$ISGNU" = x; then 12090 # A readlink that we do not know how to use. 12091 # Are there other non-GNU readlinks out there? 12092 READLINK_TESTED=yes 12093 READLINK= 12094 fi 12095 fi 12096 12097 if test "x$READLINK" != x; then 12098 BINARY=`$READLINK -f $BINARY` 12099 else 12100 # Save the current directory for restoring afterwards 12101 STARTDIR=$PWD 12102 COUNTER=0 12103 sym_link_dir=`$DIRNAME $BINARY` 12104 sym_link_file=`$BASENAME $BINARY` 12105 cd $sym_link_dir 12106 # Use -P flag to resolve symlinks in directories. 12107 cd `$THEPWDCMD -P` 12108 sym_link_dir=`$THEPWDCMD -P` 12109 # Resolve file symlinks 12110 while test $COUNTER -lt 20; do 12111 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 12112 if test "x$ISLINK" == x; then 12113 # This is not a symbolic link! We are done! 12114 break 12115 fi 12116 # Again resolve directory symlinks since the target of the just found 12117 # link could be in a different directory 12118 cd `$DIRNAME $ISLINK` 12119 sym_link_dir=`$THEPWDCMD -P` 12120 sym_link_file=`$BASENAME $ISLINK` 12121 let COUNTER=COUNTER+1 12122 done 12123 cd $STARTDIR 12124 BINARY=$sym_link_dir/$sym_link_file 12125 fi 12126 fi 12127 12128 BOOT_JDK=`dirname "$BINARY"` 12129 BOOT_JDK=`cd "$BOOT_JDK/.."; pwd` 12130 if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then 12131 # Looks like we found ourselves an JDK 12132 BOOT_JDK_FOUND=maybe 12133 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5 12134 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;} 12135 fi 12136 fi 12137 12138 12139 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12140 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12141 # Do we have a bin/java? 12142 if test ! -x "$BOOT_JDK/bin/java"; then 12143 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12144 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12145 BOOT_JDK_FOUND=no 12146 else 12147 # Do we have a bin/javac? 12148 if test ! -x "$BOOT_JDK/bin/javac"; then 12149 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12150 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12151 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12152 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12153 BOOT_JDK_FOUND=no 12154 else 12155 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12156 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12157 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12159 BOOT_JDK_FOUND=no 12160 else 12161 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12162 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12163 12164 # Extra M4 quote needed to protect [] in grep expression. 12165 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12166 if test "x$FOUND_VERSION_78" = x; then 12167 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12169 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12170 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12171 BOOT_JDK_FOUND=no 12172 else 12173 # We're done! :-) 12174 BOOT_JDK_FOUND=yes 12175 12176 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12177 12178 # Input might be given as Windows format, start by converting to 12179 # unix format. 12180 path="$BOOT_JDK" 12181 new_path=`$CYGPATH -u "$path"` 12182 12183 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12184 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12185 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12186 # "foo.exe" is OK but "foo" is an error. 12187 # 12188 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12189 # It is also a way to make sure we got the proper file name for the real test later on. 12190 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12191 if test "x$test_shortpath" = x; then 12192 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12193 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12194 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12195 fi 12196 12197 # Call helper function which possibly converts this using DOS-style short mode. 12198 # If so, the updated path is stored in $new_path. 12199 12200 input_path="$new_path" 12201 # Check if we need to convert this using DOS-style short mode. If the path 12202 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12203 # take no chances and rewrite it. 12204 # Note: m4 eats our [], so we need to use [ and ] instead. 12205 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12206 if test "x$has_forbidden_chars" != x; then 12207 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12208 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12209 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12210 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12211 # Going to short mode and back again did indeed matter. Since short mode is 12212 # case insensitive, let's make it lowercase to improve readability. 12213 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12214 # Now convert it back to Unix-stile (cygpath) 12215 input_path=`$CYGPATH -u "$shortmode_path"` 12216 new_path="$input_path" 12217 fi 12218 fi 12219 12220 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12221 if test "x$test_cygdrive_prefix" = x; then 12222 # As a simple fix, exclude /usr/bin since it's not a real path. 12223 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12224 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12225 # a path prefixed by /cygdrive for fixpath to work. 12226 new_path="$CYGWIN_ROOT_PATH$input_path" 12227 fi 12228 fi 12229 12230 12231 if test "x$path" != "x$new_path"; then 12232 BOOT_JDK="$new_path" 12233 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12234 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12235 fi 12236 12237 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12238 12239 path="$BOOT_JDK" 12240 has_colon=`$ECHO $path | $GREP ^.:` 12241 new_path="$path" 12242 if test "x$has_colon" = x; then 12243 # Not in mixed or Windows style, start by that. 12244 new_path=`cmd //c echo $path` 12245 fi 12246 12247 12248 input_path="$new_path" 12249 # Check if we need to convert this using DOS-style short mode. If the path 12250 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12251 # take no chances and rewrite it. 12252 # Note: m4 eats our [], so we need to use [ and ] instead. 12253 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12254 if test "x$has_forbidden_chars" != x; then 12255 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12256 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12257 fi 12258 12259 12260 windows_path="$new_path" 12261 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12262 unix_path=`$CYGPATH -u "$windows_path"` 12263 new_path="$unix_path" 12264 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12265 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12266 new_path="$unix_path" 12267 fi 12268 12269 if test "x$path" != "x$new_path"; then 12270 BOOT_JDK="$new_path" 12271 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12272 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12273 fi 12274 12275 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12276 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12277 12278 else 12279 # We're on a posix platform. Hooray! :) 12280 path="$BOOT_JDK" 12281 has_space=`$ECHO "$path" | $GREP " "` 12282 if test "x$has_space" != x; then 12283 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12284 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12285 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12286 fi 12287 12288 # Use eval to expand a potential ~ 12289 eval path="$path" 12290 if test ! -f "$path" && test ! -d "$path"; then 12291 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12292 fi 12293 12294 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 12295 fi 12296 12297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12298 $as_echo_n "checking for Boot JDK... " >&6; } 12299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12300 $as_echo "$BOOT_JDK" >&6; } 12301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12302 $as_echo_n "checking Boot JDK version... " >&6; } 12303 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12305 $as_echo "$BOOT_JDK_VERSION" >&6; } 12306 fi # end check jdk version 12307 fi # end check rt.jar 12308 fi # end check javac 12309 fi # end check java 12310 fi # end check boot jdk found 12311 fi 12312 12313 12314 # Test: Is there a JDK installed in default, well-known locations? 12315 12316 if test "x$BOOT_JDK_FOUND" = xno; then 12317 # Now execute the test 12318 12319 if test "x$OPENJDK_TARGET_OS" = xwindows; then 12320 12321 if test "x$BOOT_JDK_FOUND" = xno; then 12322 # Now execute the test 12323 12324 if test "x$ProgramW6432" != x; then 12325 VIRTUAL_DIR="$ProgramW6432/Java" 12326 12327 windows_path="$VIRTUAL_DIR" 12328 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12329 unix_path=`$CYGPATH -u "$windows_path"` 12330 VIRTUAL_DIR="$unix_path" 12331 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12332 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12333 VIRTUAL_DIR="$unix_path" 12334 fi 12335 12336 12337 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 12338 BOOT_JDK_SUFFIX="" 12339 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 12340 if test "x$ALL_JDKS_FOUND" != x; then 12341 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 12342 12343 if test "x$BOOT_JDK_FOUND" = xno; then 12344 # Now execute the test 12345 12346 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 12347 if test -d "$BOOT_JDK"; then 12348 BOOT_JDK_FOUND=maybe 12349 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 12350 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 12351 fi 12352 12353 12354 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12355 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12356 # Do we have a bin/java? 12357 if test ! -x "$BOOT_JDK/bin/java"; then 12358 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12360 BOOT_JDK_FOUND=no 12361 else 12362 # Do we have a bin/javac? 12363 if test ! -x "$BOOT_JDK/bin/javac"; then 12364 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12365 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12366 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12367 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12368 BOOT_JDK_FOUND=no 12369 else 12370 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12371 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12372 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12373 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12374 BOOT_JDK_FOUND=no 12375 else 12376 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12377 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12378 12379 # Extra M4 quote needed to protect [] in grep expression. 12380 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12381 if test "x$FOUND_VERSION_78" = x; then 12382 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12383 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12384 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12385 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12386 BOOT_JDK_FOUND=no 12387 else 12388 # We're done! :-) 12389 BOOT_JDK_FOUND=yes 12390 12391 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12392 12393 # Input might be given as Windows format, start by converting to 12394 # unix format. 12395 path="$BOOT_JDK" 12396 new_path=`$CYGPATH -u "$path"` 12397 12398 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12399 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12400 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12401 # "foo.exe" is OK but "foo" is an error. 12402 # 12403 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12404 # It is also a way to make sure we got the proper file name for the real test later on. 12405 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12406 if test "x$test_shortpath" = x; then 12407 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12408 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12409 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12410 fi 12411 12412 # Call helper function which possibly converts this using DOS-style short mode. 12413 # If so, the updated path is stored in $new_path. 12414 12415 input_path="$new_path" 12416 # Check if we need to convert this using DOS-style short mode. If the path 12417 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12418 # take no chances and rewrite it. 12419 # Note: m4 eats our [], so we need to use [ and ] instead. 12420 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12421 if test "x$has_forbidden_chars" != x; then 12422 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12423 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12424 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12425 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12426 # Going to short mode and back again did indeed matter. Since short mode is 12427 # case insensitive, let's make it lowercase to improve readability. 12428 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12429 # Now convert it back to Unix-stile (cygpath) 12430 input_path=`$CYGPATH -u "$shortmode_path"` 12431 new_path="$input_path" 12432 fi 12433 fi 12434 12435 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12436 if test "x$test_cygdrive_prefix" = x; then 12437 # As a simple fix, exclude /usr/bin since it's not a real path. 12438 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12439 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12440 # a path prefixed by /cygdrive for fixpath to work. 12441 new_path="$CYGWIN_ROOT_PATH$input_path" 12442 fi 12443 fi 12444 12445 12446 if test "x$path" != "x$new_path"; then 12447 BOOT_JDK="$new_path" 12448 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12449 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12450 fi 12451 12452 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12453 12454 path="$BOOT_JDK" 12455 has_colon=`$ECHO $path | $GREP ^.:` 12456 new_path="$path" 12457 if test "x$has_colon" = x; then 12458 # Not in mixed or Windows style, start by that. 12459 new_path=`cmd //c echo $path` 12460 fi 12461 12462 12463 input_path="$new_path" 12464 # Check if we need to convert this using DOS-style short mode. If the path 12465 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12466 # take no chances and rewrite it. 12467 # Note: m4 eats our [], so we need to use [ and ] instead. 12468 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12469 if test "x$has_forbidden_chars" != x; then 12470 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12471 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12472 fi 12473 12474 12475 windows_path="$new_path" 12476 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12477 unix_path=`$CYGPATH -u "$windows_path"` 12478 new_path="$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 new_path="$unix_path" 12482 fi 12483 12484 if test "x$path" != "x$new_path"; then 12485 BOOT_JDK="$new_path" 12486 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12488 fi 12489 12490 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12491 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12492 12493 else 12494 # We're on a posix platform. Hooray! :) 12495 path="$BOOT_JDK" 12496 has_space=`$ECHO "$path" | $GREP " "` 12497 if test "x$has_space" != x; then 12498 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12500 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12501 fi 12502 12503 # Use eval to expand a potential ~ 12504 eval path="$path" 12505 if test ! -f "$path" && test ! -d "$path"; then 12506 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12507 fi 12508 12509 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 12510 fi 12511 12512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12513 $as_echo_n "checking for Boot JDK... " >&6; } 12514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12515 $as_echo "$BOOT_JDK" >&6; } 12516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12517 $as_echo_n "checking Boot JDK version... " >&6; } 12518 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12520 $as_echo "$BOOT_JDK_VERSION" >&6; } 12521 fi # end check jdk version 12522 fi # end check rt.jar 12523 fi # end check javac 12524 fi # end check java 12525 fi # end check boot jdk found 12526 fi 12527 12528 done 12529 fi 12530 12531 fi 12532 12533 12534 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12535 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12536 # Do we have a bin/java? 12537 if test ! -x "$BOOT_JDK/bin/java"; then 12538 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12539 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12540 BOOT_JDK_FOUND=no 12541 else 12542 # Do we have a bin/javac? 12543 if test ! -x "$BOOT_JDK/bin/javac"; then 12544 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12545 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12546 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12547 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12548 BOOT_JDK_FOUND=no 12549 else 12550 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12551 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12552 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12553 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12554 BOOT_JDK_FOUND=no 12555 else 12556 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12557 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12558 12559 # Extra M4 quote needed to protect [] in grep expression. 12560 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12561 if test "x$FOUND_VERSION_78" = x; then 12562 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12563 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12564 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12565 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12566 BOOT_JDK_FOUND=no 12567 else 12568 # We're done! :-) 12569 BOOT_JDK_FOUND=yes 12570 12571 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12572 12573 # Input might be given as Windows format, start by converting to 12574 # unix format. 12575 path="$BOOT_JDK" 12576 new_path=`$CYGPATH -u "$path"` 12577 12578 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12579 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12580 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12581 # "foo.exe" is OK but "foo" is an error. 12582 # 12583 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12584 # It is also a way to make sure we got the proper file name for the real test later on. 12585 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12586 if test "x$test_shortpath" = x; then 12587 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12588 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12589 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12590 fi 12591 12592 # Call helper function which possibly converts this using DOS-style short mode. 12593 # If so, the updated path is stored in $new_path. 12594 12595 input_path="$new_path" 12596 # Check if we need to convert this using DOS-style short mode. If the path 12597 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12598 # take no chances and rewrite it. 12599 # Note: m4 eats our [], so we need to use [ and ] instead. 12600 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12601 if test "x$has_forbidden_chars" != x; then 12602 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12603 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12604 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12605 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12606 # Going to short mode and back again did indeed matter. Since short mode is 12607 # case insensitive, let's make it lowercase to improve readability. 12608 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12609 # Now convert it back to Unix-stile (cygpath) 12610 input_path=`$CYGPATH -u "$shortmode_path"` 12611 new_path="$input_path" 12612 fi 12613 fi 12614 12615 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12616 if test "x$test_cygdrive_prefix" = x; then 12617 # As a simple fix, exclude /usr/bin since it's not a real path. 12618 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12619 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12620 # a path prefixed by /cygdrive for fixpath to work. 12621 new_path="$CYGWIN_ROOT_PATH$input_path" 12622 fi 12623 fi 12624 12625 12626 if test "x$path" != "x$new_path"; then 12627 BOOT_JDK="$new_path" 12628 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12629 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12630 fi 12631 12632 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12633 12634 path="$BOOT_JDK" 12635 has_colon=`$ECHO $path | $GREP ^.:` 12636 new_path="$path" 12637 if test "x$has_colon" = x; then 12638 # Not in mixed or Windows style, start by that. 12639 new_path=`cmd //c echo $path` 12640 fi 12641 12642 12643 input_path="$new_path" 12644 # Check if we need to convert this using DOS-style short mode. If the path 12645 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12646 # take no chances and rewrite it. 12647 # Note: m4 eats our [], so we need to use [ and ] instead. 12648 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12649 if test "x$has_forbidden_chars" != x; then 12650 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12651 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12652 fi 12653 12654 12655 windows_path="$new_path" 12656 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12657 unix_path=`$CYGPATH -u "$windows_path"` 12658 new_path="$unix_path" 12659 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12660 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12661 new_path="$unix_path" 12662 fi 12663 12664 if test "x$path" != "x$new_path"; then 12665 BOOT_JDK="$new_path" 12666 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12667 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12668 fi 12669 12670 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12671 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12672 12673 else 12674 # We're on a posix platform. Hooray! :) 12675 path="$BOOT_JDK" 12676 has_space=`$ECHO "$path" | $GREP " "` 12677 if test "x$has_space" != x; then 12678 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12679 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12680 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12681 fi 12682 12683 # Use eval to expand a potential ~ 12684 eval path="$path" 12685 if test ! -f "$path" && test ! -d "$path"; then 12686 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12687 fi 12688 12689 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 12690 fi 12691 12692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12693 $as_echo_n "checking for Boot JDK... " >&6; } 12694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12695 $as_echo "$BOOT_JDK" >&6; } 12696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12697 $as_echo_n "checking Boot JDK version... " >&6; } 12698 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12700 $as_echo "$BOOT_JDK_VERSION" >&6; } 12701 fi # end check jdk version 12702 fi # end check rt.jar 12703 fi # end check javac 12704 fi # end check java 12705 fi # end check boot jdk found 12706 fi 12707 12708 12709 if test "x$BOOT_JDK_FOUND" = xno; then 12710 # Now execute the test 12711 12712 if test "x$PROGRAMW6432" != x; then 12713 VIRTUAL_DIR="$PROGRAMW6432/Java" 12714 12715 windows_path="$VIRTUAL_DIR" 12716 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12717 unix_path=`$CYGPATH -u "$windows_path"` 12718 VIRTUAL_DIR="$unix_path" 12719 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12720 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12721 VIRTUAL_DIR="$unix_path" 12722 fi 12723 12724 12725 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 12726 BOOT_JDK_SUFFIX="" 12727 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 12728 if test "x$ALL_JDKS_FOUND" != x; then 12729 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 12730 12731 if test "x$BOOT_JDK_FOUND" = xno; then 12732 # Now execute the test 12733 12734 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 12735 if test -d "$BOOT_JDK"; then 12736 BOOT_JDK_FOUND=maybe 12737 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 12738 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 12739 fi 12740 12741 12742 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12743 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12744 # Do we have a bin/java? 12745 if test ! -x "$BOOT_JDK/bin/java"; then 12746 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12747 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12748 BOOT_JDK_FOUND=no 12749 else 12750 # Do we have a bin/javac? 12751 if test ! -x "$BOOT_JDK/bin/javac"; then 12752 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12753 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12754 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12755 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12756 BOOT_JDK_FOUND=no 12757 else 12758 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12759 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12760 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12761 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12762 BOOT_JDK_FOUND=no 12763 else 12764 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12765 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12766 12767 # Extra M4 quote needed to protect [] in grep expression. 12768 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12769 if test "x$FOUND_VERSION_78" = x; then 12770 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12771 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12772 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12773 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12774 BOOT_JDK_FOUND=no 12775 else 12776 # We're done! :-) 12777 BOOT_JDK_FOUND=yes 12778 12779 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12780 12781 # Input might be given as Windows format, start by converting to 12782 # unix format. 12783 path="$BOOT_JDK" 12784 new_path=`$CYGPATH -u "$path"` 12785 12786 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12787 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12788 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12789 # "foo.exe" is OK but "foo" is an error. 12790 # 12791 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12792 # It is also a way to make sure we got the proper file name for the real test later on. 12793 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12794 if test "x$test_shortpath" = x; then 12795 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12796 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12797 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12798 fi 12799 12800 # Call helper function which possibly converts this using DOS-style short mode. 12801 # If so, the updated path is stored in $new_path. 12802 12803 input_path="$new_path" 12804 # Check if we need to convert this using DOS-style short mode. If the path 12805 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12806 # take no chances and rewrite it. 12807 # Note: m4 eats our [], so we need to use [ and ] instead. 12808 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12809 if test "x$has_forbidden_chars" != x; then 12810 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12811 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12812 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12813 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12814 # Going to short mode and back again did indeed matter. Since short mode is 12815 # case insensitive, let's make it lowercase to improve readability. 12816 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12817 # Now convert it back to Unix-stile (cygpath) 12818 input_path=`$CYGPATH -u "$shortmode_path"` 12819 new_path="$input_path" 12820 fi 12821 fi 12822 12823 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12824 if test "x$test_cygdrive_prefix" = x; then 12825 # As a simple fix, exclude /usr/bin since it's not a real path. 12826 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12827 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12828 # a path prefixed by /cygdrive for fixpath to work. 12829 new_path="$CYGWIN_ROOT_PATH$input_path" 12830 fi 12831 fi 12832 12833 12834 if test "x$path" != "x$new_path"; then 12835 BOOT_JDK="$new_path" 12836 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12837 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12838 fi 12839 12840 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12841 12842 path="$BOOT_JDK" 12843 has_colon=`$ECHO $path | $GREP ^.:` 12844 new_path="$path" 12845 if test "x$has_colon" = x; then 12846 # Not in mixed or Windows style, start by that. 12847 new_path=`cmd //c echo $path` 12848 fi 12849 12850 12851 input_path="$new_path" 12852 # Check if we need to convert this using DOS-style short mode. If the path 12853 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12854 # take no chances and rewrite it. 12855 # Note: m4 eats our [], so we need to use [ and ] instead. 12856 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12857 if test "x$has_forbidden_chars" != x; then 12858 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12859 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12860 fi 12861 12862 12863 windows_path="$new_path" 12864 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12865 unix_path=`$CYGPATH -u "$windows_path"` 12866 new_path="$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 new_path="$unix_path" 12870 fi 12871 12872 if test "x$path" != "x$new_path"; then 12873 BOOT_JDK="$new_path" 12874 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12875 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12876 fi 12877 12878 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12879 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12880 12881 else 12882 # We're on a posix platform. Hooray! :) 12883 path="$BOOT_JDK" 12884 has_space=`$ECHO "$path" | $GREP " "` 12885 if test "x$has_space" != x; then 12886 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12887 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12888 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12889 fi 12890 12891 # Use eval to expand a potential ~ 12892 eval path="$path" 12893 if test ! -f "$path" && test ! -d "$path"; then 12894 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12895 fi 12896 12897 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 12898 fi 12899 12900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12901 $as_echo_n "checking for Boot JDK... " >&6; } 12902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12903 $as_echo "$BOOT_JDK" >&6; } 12904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12905 $as_echo_n "checking Boot JDK version... " >&6; } 12906 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12908 $as_echo "$BOOT_JDK_VERSION" >&6; } 12909 fi # end check jdk version 12910 fi # end check rt.jar 12911 fi # end check javac 12912 fi # end check java 12913 fi # end check boot jdk found 12914 fi 12915 12916 done 12917 fi 12918 12919 fi 12920 12921 12922 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12923 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12924 # Do we have a bin/java? 12925 if test ! -x "$BOOT_JDK/bin/java"; then 12926 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12928 BOOT_JDK_FOUND=no 12929 else 12930 # Do we have a bin/javac? 12931 if test ! -x "$BOOT_JDK/bin/javac"; then 12932 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12933 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12934 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12935 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12936 BOOT_JDK_FOUND=no 12937 else 12938 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12939 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12940 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12941 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12942 BOOT_JDK_FOUND=no 12943 else 12944 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12945 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12946 12947 # Extra M4 quote needed to protect [] in grep expression. 12948 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12949 if test "x$FOUND_VERSION_78" = x; then 12950 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12951 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12952 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12953 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12954 BOOT_JDK_FOUND=no 12955 else 12956 # We're done! :-) 12957 BOOT_JDK_FOUND=yes 12958 12959 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12960 12961 # Input might be given as Windows format, start by converting to 12962 # unix format. 12963 path="$BOOT_JDK" 12964 new_path=`$CYGPATH -u "$path"` 12965 12966 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12967 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12968 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12969 # "foo.exe" is OK but "foo" is an error. 12970 # 12971 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12972 # It is also a way to make sure we got the proper file name for the real test later on. 12973 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12974 if test "x$test_shortpath" = x; then 12975 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12976 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12977 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12978 fi 12979 12980 # Call helper function which possibly converts this using DOS-style short mode. 12981 # If so, the updated path is stored in $new_path. 12982 12983 input_path="$new_path" 12984 # Check if we need to convert this using DOS-style short mode. If the path 12985 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12986 # take no chances and rewrite it. 12987 # Note: m4 eats our [], so we need to use [ and ] instead. 12988 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12989 if test "x$has_forbidden_chars" != x; then 12990 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12991 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12992 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12993 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12994 # Going to short mode and back again did indeed matter. Since short mode is 12995 # case insensitive, let's make it lowercase to improve readability. 12996 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12997 # Now convert it back to Unix-stile (cygpath) 12998 input_path=`$CYGPATH -u "$shortmode_path"` 12999 new_path="$input_path" 13000 fi 13001 fi 13002 13003 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13004 if test "x$test_cygdrive_prefix" = x; then 13005 # As a simple fix, exclude /usr/bin since it's not a real path. 13006 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13007 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13008 # a path prefixed by /cygdrive for fixpath to work. 13009 new_path="$CYGWIN_ROOT_PATH$input_path" 13010 fi 13011 fi 13012 13013 13014 if test "x$path" != "x$new_path"; then 13015 BOOT_JDK="$new_path" 13016 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13017 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13018 fi 13019 13020 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13021 13022 path="$BOOT_JDK" 13023 has_colon=`$ECHO $path | $GREP ^.:` 13024 new_path="$path" 13025 if test "x$has_colon" = x; then 13026 # Not in mixed or Windows style, start by that. 13027 new_path=`cmd //c echo $path` 13028 fi 13029 13030 13031 input_path="$new_path" 13032 # Check if we need to convert this using DOS-style short mode. If the path 13033 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13034 # take no chances and rewrite it. 13035 # Note: m4 eats our [], so we need to use [ and ] instead. 13036 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13037 if test "x$has_forbidden_chars" != x; then 13038 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13039 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13040 fi 13041 13042 13043 windows_path="$new_path" 13044 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13045 unix_path=`$CYGPATH -u "$windows_path"` 13046 new_path="$unix_path" 13047 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13048 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13049 new_path="$unix_path" 13050 fi 13051 13052 if test "x$path" != "x$new_path"; then 13053 BOOT_JDK="$new_path" 13054 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13055 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13056 fi 13057 13058 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13059 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13060 13061 else 13062 # We're on a posix platform. Hooray! :) 13063 path="$BOOT_JDK" 13064 has_space=`$ECHO "$path" | $GREP " "` 13065 if test "x$has_space" != x; then 13066 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13067 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13068 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13069 fi 13070 13071 # Use eval to expand a potential ~ 13072 eval path="$path" 13073 if test ! -f "$path" && test ! -d "$path"; then 13074 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13075 fi 13076 13077 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13078 fi 13079 13080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13081 $as_echo_n "checking for Boot JDK... " >&6; } 13082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13083 $as_echo "$BOOT_JDK" >&6; } 13084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13085 $as_echo_n "checking Boot JDK version... " >&6; } 13086 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13088 $as_echo "$BOOT_JDK_VERSION" >&6; } 13089 fi # end check jdk version 13090 fi # end check rt.jar 13091 fi # end check javac 13092 fi # end check java 13093 fi # end check boot jdk found 13094 fi 13095 13096 13097 if test "x$BOOT_JDK_FOUND" = xno; then 13098 # Now execute the test 13099 13100 if test "x$PROGRAMFILES" != x; then 13101 VIRTUAL_DIR="$PROGRAMFILES/Java" 13102 13103 windows_path="$VIRTUAL_DIR" 13104 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13105 unix_path=`$CYGPATH -u "$windows_path"` 13106 VIRTUAL_DIR="$unix_path" 13107 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13108 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13109 VIRTUAL_DIR="$unix_path" 13110 fi 13111 13112 13113 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 13114 BOOT_JDK_SUFFIX="" 13115 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13116 if test "x$ALL_JDKS_FOUND" != x; then 13117 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13118 13119 if test "x$BOOT_JDK_FOUND" = xno; then 13120 # Now execute the test 13121 13122 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13123 if test -d "$BOOT_JDK"; then 13124 BOOT_JDK_FOUND=maybe 13125 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13126 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13127 fi 13128 13129 13130 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13131 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13132 # Do we have a bin/java? 13133 if test ! -x "$BOOT_JDK/bin/java"; then 13134 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13135 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13136 BOOT_JDK_FOUND=no 13137 else 13138 # Do we have a bin/javac? 13139 if test ! -x "$BOOT_JDK/bin/javac"; then 13140 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13141 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13142 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13143 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13144 BOOT_JDK_FOUND=no 13145 else 13146 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13147 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13148 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13149 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13150 BOOT_JDK_FOUND=no 13151 else 13152 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13153 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13154 13155 # Extra M4 quote needed to protect [] in grep expression. 13156 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13157 if test "x$FOUND_VERSION_78" = x; then 13158 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13159 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13160 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13161 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13162 BOOT_JDK_FOUND=no 13163 else 13164 # We're done! :-) 13165 BOOT_JDK_FOUND=yes 13166 13167 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13168 13169 # Input might be given as Windows format, start by converting to 13170 # unix format. 13171 path="$BOOT_JDK" 13172 new_path=`$CYGPATH -u "$path"` 13173 13174 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13175 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13176 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13177 # "foo.exe" is OK but "foo" is an error. 13178 # 13179 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13180 # It is also a way to make sure we got the proper file name for the real test later on. 13181 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13182 if test "x$test_shortpath" = x; then 13183 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13184 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13185 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13186 fi 13187 13188 # Call helper function which possibly converts this using DOS-style short mode. 13189 # If so, the updated path is stored in $new_path. 13190 13191 input_path="$new_path" 13192 # Check if we need to convert this using DOS-style short mode. If the path 13193 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13194 # take no chances and rewrite it. 13195 # Note: m4 eats our [], so we need to use [ and ] instead. 13196 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13197 if test "x$has_forbidden_chars" != x; then 13198 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13199 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13200 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13201 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13202 # Going to short mode and back again did indeed matter. Since short mode is 13203 # case insensitive, let's make it lowercase to improve readability. 13204 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13205 # Now convert it back to Unix-stile (cygpath) 13206 input_path=`$CYGPATH -u "$shortmode_path"` 13207 new_path="$input_path" 13208 fi 13209 fi 13210 13211 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13212 if test "x$test_cygdrive_prefix" = x; then 13213 # As a simple fix, exclude /usr/bin since it's not a real path. 13214 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13215 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13216 # a path prefixed by /cygdrive for fixpath to work. 13217 new_path="$CYGWIN_ROOT_PATH$input_path" 13218 fi 13219 fi 13220 13221 13222 if test "x$path" != "x$new_path"; then 13223 BOOT_JDK="$new_path" 13224 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13225 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13226 fi 13227 13228 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13229 13230 path="$BOOT_JDK" 13231 has_colon=`$ECHO $path | $GREP ^.:` 13232 new_path="$path" 13233 if test "x$has_colon" = x; then 13234 # Not in mixed or Windows style, start by that. 13235 new_path=`cmd //c echo $path` 13236 fi 13237 13238 13239 input_path="$new_path" 13240 # Check if we need to convert this using DOS-style short mode. If the path 13241 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13242 # take no chances and rewrite it. 13243 # Note: m4 eats our [], so we need to use [ and ] instead. 13244 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13245 if test "x$has_forbidden_chars" != x; then 13246 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13247 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13248 fi 13249 13250 13251 windows_path="$new_path" 13252 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13253 unix_path=`$CYGPATH -u "$windows_path"` 13254 new_path="$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 new_path="$unix_path" 13258 fi 13259 13260 if test "x$path" != "x$new_path"; then 13261 BOOT_JDK="$new_path" 13262 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13263 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13264 fi 13265 13266 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13267 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13268 13269 else 13270 # We're on a posix platform. Hooray! :) 13271 path="$BOOT_JDK" 13272 has_space=`$ECHO "$path" | $GREP " "` 13273 if test "x$has_space" != x; then 13274 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13275 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13276 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13277 fi 13278 13279 # Use eval to expand a potential ~ 13280 eval path="$path" 13281 if test ! -f "$path" && test ! -d "$path"; then 13282 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13283 fi 13284 13285 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13286 fi 13287 13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13289 $as_echo_n "checking for Boot JDK... " >&6; } 13290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13291 $as_echo "$BOOT_JDK" >&6; } 13292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13293 $as_echo_n "checking Boot JDK version... " >&6; } 13294 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13296 $as_echo "$BOOT_JDK_VERSION" >&6; } 13297 fi # end check jdk version 13298 fi # end check rt.jar 13299 fi # end check javac 13300 fi # end check java 13301 fi # end check boot jdk found 13302 fi 13303 13304 done 13305 fi 13306 13307 fi 13308 13309 13310 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13311 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13312 # Do we have a bin/java? 13313 if test ! -x "$BOOT_JDK/bin/java"; then 13314 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13315 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13316 BOOT_JDK_FOUND=no 13317 else 13318 # Do we have a bin/javac? 13319 if test ! -x "$BOOT_JDK/bin/javac"; then 13320 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13321 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13322 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13323 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13324 BOOT_JDK_FOUND=no 13325 else 13326 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13327 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13328 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13329 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13330 BOOT_JDK_FOUND=no 13331 else 13332 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13333 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13334 13335 # Extra M4 quote needed to protect [] in grep expression. 13336 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13337 if test "x$FOUND_VERSION_78" = x; then 13338 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13339 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13340 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13341 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13342 BOOT_JDK_FOUND=no 13343 else 13344 # We're done! :-) 13345 BOOT_JDK_FOUND=yes 13346 13347 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13348 13349 # Input might be given as Windows format, start by converting to 13350 # unix format. 13351 path="$BOOT_JDK" 13352 new_path=`$CYGPATH -u "$path"` 13353 13354 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13355 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13356 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13357 # "foo.exe" is OK but "foo" is an error. 13358 # 13359 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13360 # It is also a way to make sure we got the proper file name for the real test later on. 13361 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13362 if test "x$test_shortpath" = x; then 13363 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13364 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13365 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13366 fi 13367 13368 # Call helper function which possibly converts this using DOS-style short mode. 13369 # If so, the updated path is stored in $new_path. 13370 13371 input_path="$new_path" 13372 # Check if we need to convert this using DOS-style short mode. If the path 13373 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13374 # take no chances and rewrite it. 13375 # Note: m4 eats our [], so we need to use [ and ] instead. 13376 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13377 if test "x$has_forbidden_chars" != x; then 13378 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13379 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13380 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13381 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13382 # Going to short mode and back again did indeed matter. Since short mode is 13383 # case insensitive, let's make it lowercase to improve readability. 13384 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13385 # Now convert it back to Unix-stile (cygpath) 13386 input_path=`$CYGPATH -u "$shortmode_path"` 13387 new_path="$input_path" 13388 fi 13389 fi 13390 13391 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13392 if test "x$test_cygdrive_prefix" = x; then 13393 # As a simple fix, exclude /usr/bin since it's not a real path. 13394 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13395 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13396 # a path prefixed by /cygdrive for fixpath to work. 13397 new_path="$CYGWIN_ROOT_PATH$input_path" 13398 fi 13399 fi 13400 13401 13402 if test "x$path" != "x$new_path"; then 13403 BOOT_JDK="$new_path" 13404 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13405 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13406 fi 13407 13408 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13409 13410 path="$BOOT_JDK" 13411 has_colon=`$ECHO $path | $GREP ^.:` 13412 new_path="$path" 13413 if test "x$has_colon" = x; then 13414 # Not in mixed or Windows style, start by that. 13415 new_path=`cmd //c echo $path` 13416 fi 13417 13418 13419 input_path="$new_path" 13420 # Check if we need to convert this using DOS-style short mode. If the path 13421 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13422 # take no chances and rewrite it. 13423 # Note: m4 eats our [], so we need to use [ and ] instead. 13424 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13425 if test "x$has_forbidden_chars" != x; then 13426 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13427 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13428 fi 13429 13430 13431 windows_path="$new_path" 13432 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13433 unix_path=`$CYGPATH -u "$windows_path"` 13434 new_path="$unix_path" 13435 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13436 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13437 new_path="$unix_path" 13438 fi 13439 13440 if test "x$path" != "x$new_path"; then 13441 BOOT_JDK="$new_path" 13442 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13443 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13444 fi 13445 13446 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13447 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13448 13449 else 13450 # We're on a posix platform. Hooray! :) 13451 path="$BOOT_JDK" 13452 has_space=`$ECHO "$path" | $GREP " "` 13453 if test "x$has_space" != x; then 13454 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13455 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13456 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13457 fi 13458 13459 # Use eval to expand a potential ~ 13460 eval path="$path" 13461 if test ! -f "$path" && test ! -d "$path"; then 13462 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13463 fi 13464 13465 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13466 fi 13467 13468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13469 $as_echo_n "checking for Boot JDK... " >&6; } 13470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13471 $as_echo "$BOOT_JDK" >&6; } 13472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13473 $as_echo_n "checking Boot JDK version... " >&6; } 13474 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13476 $as_echo "$BOOT_JDK_VERSION" >&6; } 13477 fi # end check jdk version 13478 fi # end check rt.jar 13479 fi # end check javac 13480 fi # end check java 13481 fi # end check boot jdk found 13482 fi 13483 13484 13485 if test "x$BOOT_JDK_FOUND" = xno; then 13486 # Now execute the test 13487 13488 if test "x$ProgramFiles" != x; then 13489 VIRTUAL_DIR="$ProgramFiles/Java" 13490 13491 windows_path="$VIRTUAL_DIR" 13492 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13493 unix_path=`$CYGPATH -u "$windows_path"` 13494 VIRTUAL_DIR="$unix_path" 13495 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13496 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13497 VIRTUAL_DIR="$unix_path" 13498 fi 13499 13500 13501 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 13502 BOOT_JDK_SUFFIX="" 13503 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13504 if test "x$ALL_JDKS_FOUND" != x; then 13505 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13506 13507 if test "x$BOOT_JDK_FOUND" = xno; then 13508 # Now execute the test 13509 13510 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13511 if test -d "$BOOT_JDK"; then 13512 BOOT_JDK_FOUND=maybe 13513 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13514 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13515 fi 13516 13517 13518 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13519 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13520 # Do we have a bin/java? 13521 if test ! -x "$BOOT_JDK/bin/java"; then 13522 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13523 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13524 BOOT_JDK_FOUND=no 13525 else 13526 # Do we have a bin/javac? 13527 if test ! -x "$BOOT_JDK/bin/javac"; then 13528 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13529 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13530 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13531 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13532 BOOT_JDK_FOUND=no 13533 else 13534 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13535 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13536 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13537 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13538 BOOT_JDK_FOUND=no 13539 else 13540 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13541 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13542 13543 # Extra M4 quote needed to protect [] in grep expression. 13544 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13545 if test "x$FOUND_VERSION_78" = x; then 13546 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13547 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13548 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13549 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13550 BOOT_JDK_FOUND=no 13551 else 13552 # We're done! :-) 13553 BOOT_JDK_FOUND=yes 13554 13555 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13556 13557 # Input might be given as Windows format, start by converting to 13558 # unix format. 13559 path="$BOOT_JDK" 13560 new_path=`$CYGPATH -u "$path"` 13561 13562 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13563 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13564 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13565 # "foo.exe" is OK but "foo" is an error. 13566 # 13567 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13568 # It is also a way to make sure we got the proper file name for the real test later on. 13569 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13570 if test "x$test_shortpath" = x; then 13571 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13572 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13573 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13574 fi 13575 13576 # Call helper function which possibly converts this using DOS-style short mode. 13577 # If so, the updated path is stored in $new_path. 13578 13579 input_path="$new_path" 13580 # Check if we need to convert this using DOS-style short mode. If the path 13581 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13582 # take no chances and rewrite it. 13583 # Note: m4 eats our [], so we need to use [ and ] instead. 13584 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13585 if test "x$has_forbidden_chars" != x; then 13586 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13587 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13588 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13589 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13590 # Going to short mode and back again did indeed matter. Since short mode is 13591 # case insensitive, let's make it lowercase to improve readability. 13592 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13593 # Now convert it back to Unix-stile (cygpath) 13594 input_path=`$CYGPATH -u "$shortmode_path"` 13595 new_path="$input_path" 13596 fi 13597 fi 13598 13599 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13600 if test "x$test_cygdrive_prefix" = x; then 13601 # As a simple fix, exclude /usr/bin since it's not a real path. 13602 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13603 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13604 # a path prefixed by /cygdrive for fixpath to work. 13605 new_path="$CYGWIN_ROOT_PATH$input_path" 13606 fi 13607 fi 13608 13609 13610 if test "x$path" != "x$new_path"; then 13611 BOOT_JDK="$new_path" 13612 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13613 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13614 fi 13615 13616 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13617 13618 path="$BOOT_JDK" 13619 has_colon=`$ECHO $path | $GREP ^.:` 13620 new_path="$path" 13621 if test "x$has_colon" = x; then 13622 # Not in mixed or Windows style, start by that. 13623 new_path=`cmd //c echo $path` 13624 fi 13625 13626 13627 input_path="$new_path" 13628 # Check if we need to convert this using DOS-style short mode. If the path 13629 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13630 # take no chances and rewrite it. 13631 # Note: m4 eats our [], so we need to use [ and ] instead. 13632 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13633 if test "x$has_forbidden_chars" != x; then 13634 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13635 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13636 fi 13637 13638 13639 windows_path="$new_path" 13640 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13641 unix_path=`$CYGPATH -u "$windows_path"` 13642 new_path="$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 new_path="$unix_path" 13646 fi 13647 13648 if test "x$path" != "x$new_path"; then 13649 BOOT_JDK="$new_path" 13650 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13651 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13652 fi 13653 13654 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13655 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13656 13657 else 13658 # We're on a posix platform. Hooray! :) 13659 path="$BOOT_JDK" 13660 has_space=`$ECHO "$path" | $GREP " "` 13661 if test "x$has_space" != x; then 13662 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13663 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13664 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13665 fi 13666 13667 # Use eval to expand a potential ~ 13668 eval path="$path" 13669 if test ! -f "$path" && test ! -d "$path"; then 13670 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13671 fi 13672 13673 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13674 fi 13675 13676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13677 $as_echo_n "checking for Boot JDK... " >&6; } 13678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13679 $as_echo "$BOOT_JDK" >&6; } 13680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13681 $as_echo_n "checking Boot JDK version... " >&6; } 13682 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13684 $as_echo "$BOOT_JDK_VERSION" >&6; } 13685 fi # end check jdk version 13686 fi # end check rt.jar 13687 fi # end check javac 13688 fi # end check java 13689 fi # end check boot jdk found 13690 fi 13691 13692 done 13693 fi 13694 13695 fi 13696 13697 13698 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13699 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13700 # Do we have a bin/java? 13701 if test ! -x "$BOOT_JDK/bin/java"; then 13702 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13704 BOOT_JDK_FOUND=no 13705 else 13706 # Do we have a bin/javac? 13707 if test ! -x "$BOOT_JDK/bin/javac"; then 13708 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13710 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13711 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13712 BOOT_JDK_FOUND=no 13713 else 13714 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13715 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13716 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13718 BOOT_JDK_FOUND=no 13719 else 13720 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13721 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13722 13723 # Extra M4 quote needed to protect [] in grep expression. 13724 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13725 if test "x$FOUND_VERSION_78" = x; then 13726 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13728 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13729 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13730 BOOT_JDK_FOUND=no 13731 else 13732 # We're done! :-) 13733 BOOT_JDK_FOUND=yes 13734 13735 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13736 13737 # Input might be given as Windows format, start by converting to 13738 # unix format. 13739 path="$BOOT_JDK" 13740 new_path=`$CYGPATH -u "$path"` 13741 13742 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13743 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13744 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13745 # "foo.exe" is OK but "foo" is an error. 13746 # 13747 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13748 # It is also a way to make sure we got the proper file name for the real test later on. 13749 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13750 if test "x$test_shortpath" = x; then 13751 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13753 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13754 fi 13755 13756 # Call helper function which possibly converts this using DOS-style short mode. 13757 # If so, the updated path is stored in $new_path. 13758 13759 input_path="$new_path" 13760 # Check if we need to convert this using DOS-style short mode. If the path 13761 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13762 # take no chances and rewrite it. 13763 # Note: m4 eats our [], so we need to use [ and ] instead. 13764 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13765 if test "x$has_forbidden_chars" != x; then 13766 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13767 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13768 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13769 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13770 # Going to short mode and back again did indeed matter. Since short mode is 13771 # case insensitive, let's make it lowercase to improve readability. 13772 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13773 # Now convert it back to Unix-stile (cygpath) 13774 input_path=`$CYGPATH -u "$shortmode_path"` 13775 new_path="$input_path" 13776 fi 13777 fi 13778 13779 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13780 if test "x$test_cygdrive_prefix" = x; then 13781 # As a simple fix, exclude /usr/bin since it's not a real path. 13782 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13783 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13784 # a path prefixed by /cygdrive for fixpath to work. 13785 new_path="$CYGWIN_ROOT_PATH$input_path" 13786 fi 13787 fi 13788 13789 13790 if test "x$path" != "x$new_path"; then 13791 BOOT_JDK="$new_path" 13792 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13793 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13794 fi 13795 13796 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13797 13798 path="$BOOT_JDK" 13799 has_colon=`$ECHO $path | $GREP ^.:` 13800 new_path="$path" 13801 if test "x$has_colon" = x; then 13802 # Not in mixed or Windows style, start by that. 13803 new_path=`cmd //c echo $path` 13804 fi 13805 13806 13807 input_path="$new_path" 13808 # Check if we need to convert this using DOS-style short mode. If the path 13809 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13810 # take no chances and rewrite it. 13811 # Note: m4 eats our [], so we need to use [ and ] instead. 13812 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13813 if test "x$has_forbidden_chars" != x; then 13814 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13815 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13816 fi 13817 13818 13819 windows_path="$new_path" 13820 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13821 unix_path=`$CYGPATH -u "$windows_path"` 13822 new_path="$unix_path" 13823 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13824 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13825 new_path="$unix_path" 13826 fi 13827 13828 if test "x$path" != "x$new_path"; then 13829 BOOT_JDK="$new_path" 13830 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13831 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13832 fi 13833 13834 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13835 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13836 13837 else 13838 # We're on a posix platform. Hooray! :) 13839 path="$BOOT_JDK" 13840 has_space=`$ECHO "$path" | $GREP " "` 13841 if test "x$has_space" != x; then 13842 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13844 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13845 fi 13846 13847 # Use eval to expand a potential ~ 13848 eval path="$path" 13849 if test ! -f "$path" && test ! -d "$path"; then 13850 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13851 fi 13852 13853 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 13854 fi 13855 13856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13857 $as_echo_n "checking for Boot JDK... " >&6; } 13858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13859 $as_echo "$BOOT_JDK" >&6; } 13860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13861 $as_echo_n "checking Boot JDK version... " >&6; } 13862 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13864 $as_echo "$BOOT_JDK_VERSION" >&6; } 13865 fi # end check jdk version 13866 fi # end check rt.jar 13867 fi # end check javac 13868 fi # end check java 13869 fi # end check boot jdk found 13870 fi 13871 13872 13873 if test "x$BOOT_JDK_FOUND" = xno; then 13874 # Now execute the test 13875 13876 BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java" 13877 BOOT_JDK_SUFFIX="" 13878 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13879 if test "x$ALL_JDKS_FOUND" != x; then 13880 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13881 13882 if test "x$BOOT_JDK_FOUND" = xno; then 13883 # Now execute the test 13884 13885 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13886 if test -d "$BOOT_JDK"; then 13887 BOOT_JDK_FOUND=maybe 13888 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13889 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13890 fi 13891 13892 13893 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13894 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13895 # Do we have a bin/java? 13896 if test ! -x "$BOOT_JDK/bin/java"; then 13897 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13898 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13899 BOOT_JDK_FOUND=no 13900 else 13901 # Do we have a bin/javac? 13902 if test ! -x "$BOOT_JDK/bin/javac"; then 13903 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13904 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13905 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13906 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13907 BOOT_JDK_FOUND=no 13908 else 13909 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13910 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13911 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13912 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13913 BOOT_JDK_FOUND=no 13914 else 13915 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13916 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13917 13918 # Extra M4 quote needed to protect [] in grep expression. 13919 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13920 if test "x$FOUND_VERSION_78" = x; then 13921 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13923 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13924 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13925 BOOT_JDK_FOUND=no 13926 else 13927 # We're done! :-) 13928 BOOT_JDK_FOUND=yes 13929 13930 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13931 13932 # Input might be given as Windows format, start by converting to 13933 # unix format. 13934 path="$BOOT_JDK" 13935 new_path=`$CYGPATH -u "$path"` 13936 13937 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13938 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13939 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13940 # "foo.exe" is OK but "foo" is an error. 13941 # 13942 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13943 # It is also a way to make sure we got the proper file name for the real test later on. 13944 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13945 if test "x$test_shortpath" = x; then 13946 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13947 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13948 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13949 fi 13950 13951 # Call helper function which possibly converts this using DOS-style short mode. 13952 # If so, the updated path is stored in $new_path. 13953 13954 input_path="$new_path" 13955 # Check if we need to convert this using DOS-style short mode. If the path 13956 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13957 # take no chances and rewrite it. 13958 # Note: m4 eats our [], so we need to use [ and ] instead. 13959 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13960 if test "x$has_forbidden_chars" != x; then 13961 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13962 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13963 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13964 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13965 # Going to short mode and back again did indeed matter. Since short mode is 13966 # case insensitive, let's make it lowercase to improve readability. 13967 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13968 # Now convert it back to Unix-stile (cygpath) 13969 input_path=`$CYGPATH -u "$shortmode_path"` 13970 new_path="$input_path" 13971 fi 13972 fi 13973 13974 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13975 if test "x$test_cygdrive_prefix" = x; then 13976 # As a simple fix, exclude /usr/bin since it's not a real path. 13977 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13978 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13979 # a path prefixed by /cygdrive for fixpath to work. 13980 new_path="$CYGWIN_ROOT_PATH$input_path" 13981 fi 13982 fi 13983 13984 13985 if test "x$path" != "x$new_path"; then 13986 BOOT_JDK="$new_path" 13987 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13988 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13989 fi 13990 13991 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13992 13993 path="$BOOT_JDK" 13994 has_colon=`$ECHO $path | $GREP ^.:` 13995 new_path="$path" 13996 if test "x$has_colon" = x; then 13997 # Not in mixed or Windows style, start by that. 13998 new_path=`cmd //c echo $path` 13999 fi 14000 14001 14002 input_path="$new_path" 14003 # Check if we need to convert this using DOS-style short mode. If the path 14004 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14005 # take no chances and rewrite it. 14006 # Note: m4 eats our [], so we need to use [ and ] instead. 14007 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14008 if test "x$has_forbidden_chars" != x; then 14009 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14010 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14011 fi 14012 14013 14014 windows_path="$new_path" 14015 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14016 unix_path=`$CYGPATH -u "$windows_path"` 14017 new_path="$unix_path" 14018 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14019 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14020 new_path="$unix_path" 14021 fi 14022 14023 if test "x$path" != "x$new_path"; then 14024 BOOT_JDK="$new_path" 14025 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14026 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14027 fi 14028 14029 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14030 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14031 14032 else 14033 # We're on a posix platform. Hooray! :) 14034 path="$BOOT_JDK" 14035 has_space=`$ECHO "$path" | $GREP " "` 14036 if test "x$has_space" != x; then 14037 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14038 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14039 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14040 fi 14041 14042 # Use eval to expand a potential ~ 14043 eval path="$path" 14044 if test ! -f "$path" && test ! -d "$path"; then 14045 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14046 fi 14047 14048 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14049 fi 14050 14051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14052 $as_echo_n "checking for Boot JDK... " >&6; } 14053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14054 $as_echo "$BOOT_JDK" >&6; } 14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14056 $as_echo_n "checking Boot JDK version... " >&6; } 14057 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14059 $as_echo "$BOOT_JDK_VERSION" >&6; } 14060 fi # end check jdk version 14061 fi # end check rt.jar 14062 fi # end check javac 14063 fi # end check java 14064 fi # end check boot jdk found 14065 fi 14066 14067 done 14068 fi 14069 14070 14071 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14072 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14073 # Do we have a bin/java? 14074 if test ! -x "$BOOT_JDK/bin/java"; then 14075 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14076 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14077 BOOT_JDK_FOUND=no 14078 else 14079 # Do we have a bin/javac? 14080 if test ! -x "$BOOT_JDK/bin/javac"; then 14081 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14082 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14083 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14084 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14085 BOOT_JDK_FOUND=no 14086 else 14087 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14088 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14089 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14090 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14091 BOOT_JDK_FOUND=no 14092 else 14093 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14094 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14095 14096 # Extra M4 quote needed to protect [] in grep expression. 14097 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14098 if test "x$FOUND_VERSION_78" = x; then 14099 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14101 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14102 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14103 BOOT_JDK_FOUND=no 14104 else 14105 # We're done! :-) 14106 BOOT_JDK_FOUND=yes 14107 14108 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14109 14110 # Input might be given as Windows format, start by converting to 14111 # unix format. 14112 path="$BOOT_JDK" 14113 new_path=`$CYGPATH -u "$path"` 14114 14115 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14116 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14117 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14118 # "foo.exe" is OK but "foo" is an error. 14119 # 14120 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14121 # It is also a way to make sure we got the proper file name for the real test later on. 14122 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14123 if test "x$test_shortpath" = x; then 14124 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14125 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14126 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14127 fi 14128 14129 # Call helper function which possibly converts this using DOS-style short mode. 14130 # If so, the updated path is stored in $new_path. 14131 14132 input_path="$new_path" 14133 # Check if we need to convert this using DOS-style short mode. If the path 14134 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14135 # take no chances and rewrite it. 14136 # Note: m4 eats our [], so we need to use [ and ] instead. 14137 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14138 if test "x$has_forbidden_chars" != x; then 14139 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14140 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14141 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14142 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14143 # Going to short mode and back again did indeed matter. Since short mode is 14144 # case insensitive, let's make it lowercase to improve readability. 14145 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14146 # Now convert it back to Unix-stile (cygpath) 14147 input_path=`$CYGPATH -u "$shortmode_path"` 14148 new_path="$input_path" 14149 fi 14150 fi 14151 14152 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14153 if test "x$test_cygdrive_prefix" = x; then 14154 # As a simple fix, exclude /usr/bin since it's not a real path. 14155 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14156 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14157 # a path prefixed by /cygdrive for fixpath to work. 14158 new_path="$CYGWIN_ROOT_PATH$input_path" 14159 fi 14160 fi 14161 14162 14163 if test "x$path" != "x$new_path"; then 14164 BOOT_JDK="$new_path" 14165 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14166 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14167 fi 14168 14169 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14170 14171 path="$BOOT_JDK" 14172 has_colon=`$ECHO $path | $GREP ^.:` 14173 new_path="$path" 14174 if test "x$has_colon" = x; then 14175 # Not in mixed or Windows style, start by that. 14176 new_path=`cmd //c echo $path` 14177 fi 14178 14179 14180 input_path="$new_path" 14181 # Check if we need to convert this using DOS-style short mode. If the path 14182 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14183 # take no chances and rewrite it. 14184 # Note: m4 eats our [], so we need to use [ and ] instead. 14185 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14186 if test "x$has_forbidden_chars" != x; then 14187 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14188 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14189 fi 14190 14191 14192 windows_path="$new_path" 14193 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14194 unix_path=`$CYGPATH -u "$windows_path"` 14195 new_path="$unix_path" 14196 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14197 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14198 new_path="$unix_path" 14199 fi 14200 14201 if test "x$path" != "x$new_path"; then 14202 BOOT_JDK="$new_path" 14203 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14205 fi 14206 14207 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14208 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14209 14210 else 14211 # We're on a posix platform. Hooray! :) 14212 path="$BOOT_JDK" 14213 has_space=`$ECHO "$path" | $GREP " "` 14214 if test "x$has_space" != x; then 14215 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14217 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14218 fi 14219 14220 # Use eval to expand a potential ~ 14221 eval path="$path" 14222 if test ! -f "$path" && test ! -d "$path"; then 14223 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14224 fi 14225 14226 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14227 fi 14228 14229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14230 $as_echo_n "checking for Boot JDK... " >&6; } 14231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14232 $as_echo "$BOOT_JDK" >&6; } 14233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14234 $as_echo_n "checking Boot JDK version... " >&6; } 14235 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14237 $as_echo "$BOOT_JDK_VERSION" >&6; } 14238 fi # end check jdk version 14239 fi # end check rt.jar 14240 fi # end check javac 14241 fi # end check java 14242 fi # end check boot jdk found 14243 fi 14244 14245 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then 14246 14247 if test "x$BOOT_JDK_FOUND" = xno; then 14248 # Now execute the test 14249 14250 BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines" 14251 BOOT_JDK_SUFFIX="/Contents/Home" 14252 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14253 if test "x$ALL_JDKS_FOUND" != x; then 14254 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14255 14256 if test "x$BOOT_JDK_FOUND" = xno; then 14257 # Now execute the test 14258 14259 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14260 if test -d "$BOOT_JDK"; then 14261 BOOT_JDK_FOUND=maybe 14262 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14263 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14264 fi 14265 14266 14267 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14268 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14269 # Do we have a bin/java? 14270 if test ! -x "$BOOT_JDK/bin/java"; then 14271 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14272 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14273 BOOT_JDK_FOUND=no 14274 else 14275 # Do we have a bin/javac? 14276 if test ! -x "$BOOT_JDK/bin/javac"; then 14277 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14278 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14279 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14280 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14281 BOOT_JDK_FOUND=no 14282 else 14283 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14284 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14285 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14286 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14287 BOOT_JDK_FOUND=no 14288 else 14289 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14290 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14291 14292 # Extra M4 quote needed to protect [] in grep expression. 14293 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14294 if test "x$FOUND_VERSION_78" = x; then 14295 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14296 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14297 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14298 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14299 BOOT_JDK_FOUND=no 14300 else 14301 # We're done! :-) 14302 BOOT_JDK_FOUND=yes 14303 14304 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14305 14306 # Input might be given as Windows format, start by converting to 14307 # unix format. 14308 path="$BOOT_JDK" 14309 new_path=`$CYGPATH -u "$path"` 14310 14311 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14312 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14313 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14314 # "foo.exe" is OK but "foo" is an error. 14315 # 14316 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14317 # It is also a way to make sure we got the proper file name for the real test later on. 14318 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14319 if test "x$test_shortpath" = x; then 14320 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14322 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14323 fi 14324 14325 # Call helper function which possibly converts this using DOS-style short mode. 14326 # If so, the updated path is stored in $new_path. 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 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14337 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14338 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14339 # Going to short mode and back again did indeed matter. Since short mode is 14340 # case insensitive, let's make it lowercase to improve readability. 14341 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14342 # Now convert it back to Unix-stile (cygpath) 14343 input_path=`$CYGPATH -u "$shortmode_path"` 14344 new_path="$input_path" 14345 fi 14346 fi 14347 14348 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14349 if test "x$test_cygdrive_prefix" = x; then 14350 # As a simple fix, exclude /usr/bin since it's not a real path. 14351 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14352 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14353 # a path prefixed by /cygdrive for fixpath to work. 14354 new_path="$CYGWIN_ROOT_PATH$input_path" 14355 fi 14356 fi 14357 14358 14359 if test "x$path" != "x$new_path"; then 14360 BOOT_JDK="$new_path" 14361 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14362 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14363 fi 14364 14365 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14366 14367 path="$BOOT_JDK" 14368 has_colon=`$ECHO $path | $GREP ^.:` 14369 new_path="$path" 14370 if test "x$has_colon" = x; then 14371 # Not in mixed or Windows style, start by that. 14372 new_path=`cmd //c echo $path` 14373 fi 14374 14375 14376 input_path="$new_path" 14377 # Check if we need to convert this using DOS-style short mode. If the path 14378 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14379 # take no chances and rewrite it. 14380 # Note: m4 eats our [], so we need to use [ and ] instead. 14381 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14382 if test "x$has_forbidden_chars" != x; then 14383 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14384 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14385 fi 14386 14387 14388 windows_path="$new_path" 14389 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14390 unix_path=`$CYGPATH -u "$windows_path"` 14391 new_path="$unix_path" 14392 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14393 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14394 new_path="$unix_path" 14395 fi 14396 14397 if test "x$path" != "x$new_path"; then 14398 BOOT_JDK="$new_path" 14399 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14400 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14401 fi 14402 14403 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14404 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14405 14406 else 14407 # We're on a posix platform. Hooray! :) 14408 path="$BOOT_JDK" 14409 has_space=`$ECHO "$path" | $GREP " "` 14410 if test "x$has_space" != x; then 14411 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14412 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14413 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14414 fi 14415 14416 # Use eval to expand a potential ~ 14417 eval path="$path" 14418 if test ! -f "$path" && test ! -d "$path"; then 14419 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14420 fi 14421 14422 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14423 fi 14424 14425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14426 $as_echo_n "checking for Boot JDK... " >&6; } 14427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14428 $as_echo "$BOOT_JDK" >&6; } 14429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14430 $as_echo_n "checking Boot JDK version... " >&6; } 14431 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14433 $as_echo "$BOOT_JDK_VERSION" >&6; } 14434 fi # end check jdk version 14435 fi # end check rt.jar 14436 fi # end check javac 14437 fi # end check java 14438 fi # end check boot jdk found 14439 fi 14440 14441 done 14442 fi 14443 14444 14445 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14446 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14447 # Do we have a bin/java? 14448 if test ! -x "$BOOT_JDK/bin/java"; then 14449 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14450 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14451 BOOT_JDK_FOUND=no 14452 else 14453 # Do we have a bin/javac? 14454 if test ! -x "$BOOT_JDK/bin/javac"; then 14455 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14456 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14457 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14458 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14459 BOOT_JDK_FOUND=no 14460 else 14461 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14462 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14463 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14465 BOOT_JDK_FOUND=no 14466 else 14467 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14468 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14469 14470 # Extra M4 quote needed to protect [] in grep expression. 14471 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14472 if test "x$FOUND_VERSION_78" = x; then 14473 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14474 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14475 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14476 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14477 BOOT_JDK_FOUND=no 14478 else 14479 # We're done! :-) 14480 BOOT_JDK_FOUND=yes 14481 14482 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14483 14484 # Input might be given as Windows format, start by converting to 14485 # unix format. 14486 path="$BOOT_JDK" 14487 new_path=`$CYGPATH -u "$path"` 14488 14489 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14490 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14491 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14492 # "foo.exe" is OK but "foo" is an error. 14493 # 14494 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14495 # It is also a way to make sure we got the proper file name for the real test later on. 14496 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14497 if test "x$test_shortpath" = x; then 14498 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14500 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14501 fi 14502 14503 # Call helper function which possibly converts this using DOS-style short mode. 14504 # If so, the updated path is stored in $new_path. 14505 14506 input_path="$new_path" 14507 # Check if we need to convert this using DOS-style short mode. If the path 14508 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14509 # take no chances and rewrite it. 14510 # Note: m4 eats our [], so we need to use [ and ] instead. 14511 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14512 if test "x$has_forbidden_chars" != x; then 14513 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14514 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14515 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14516 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14517 # Going to short mode and back again did indeed matter. Since short mode is 14518 # case insensitive, let's make it lowercase to improve readability. 14519 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14520 # Now convert it back to Unix-stile (cygpath) 14521 input_path=`$CYGPATH -u "$shortmode_path"` 14522 new_path="$input_path" 14523 fi 14524 fi 14525 14526 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14527 if test "x$test_cygdrive_prefix" = x; then 14528 # As a simple fix, exclude /usr/bin since it's not a real path. 14529 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14530 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14531 # a path prefixed by /cygdrive for fixpath to work. 14532 new_path="$CYGWIN_ROOT_PATH$input_path" 14533 fi 14534 fi 14535 14536 14537 if test "x$path" != "x$new_path"; then 14538 BOOT_JDK="$new_path" 14539 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14541 fi 14542 14543 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14544 14545 path="$BOOT_JDK" 14546 has_colon=`$ECHO $path | $GREP ^.:` 14547 new_path="$path" 14548 if test "x$has_colon" = x; then 14549 # Not in mixed or Windows style, start by that. 14550 new_path=`cmd //c echo $path` 14551 fi 14552 14553 14554 input_path="$new_path" 14555 # Check if we need to convert this using DOS-style short mode. If the path 14556 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14557 # take no chances and rewrite it. 14558 # Note: m4 eats our [], so we need to use [ and ] instead. 14559 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14560 if test "x$has_forbidden_chars" != x; then 14561 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14562 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14563 fi 14564 14565 14566 windows_path="$new_path" 14567 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14568 unix_path=`$CYGPATH -u "$windows_path"` 14569 new_path="$unix_path" 14570 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14571 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14572 new_path="$unix_path" 14573 fi 14574 14575 if test "x$path" != "x$new_path"; then 14576 BOOT_JDK="$new_path" 14577 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14579 fi 14580 14581 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14582 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14583 14584 else 14585 # We're on a posix platform. Hooray! :) 14586 path="$BOOT_JDK" 14587 has_space=`$ECHO "$path" | $GREP " "` 14588 if test "x$has_space" != x; then 14589 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14591 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14592 fi 14593 14594 # Use eval to expand a potential ~ 14595 eval path="$path" 14596 if test ! -f "$path" && test ! -d "$path"; then 14597 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14598 fi 14599 14600 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14601 fi 14602 14603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14604 $as_echo_n "checking for Boot JDK... " >&6; } 14605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14606 $as_echo "$BOOT_JDK" >&6; } 14607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14608 $as_echo_n "checking Boot JDK version... " >&6; } 14609 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14611 $as_echo "$BOOT_JDK_VERSION" >&6; } 14612 fi # end check jdk version 14613 fi # end check rt.jar 14614 fi # end check javac 14615 fi # end check java 14616 fi # end check boot jdk found 14617 fi 14618 14619 14620 if test "x$BOOT_JDK_FOUND" = xno; then 14621 # Now execute the test 14622 14623 BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines" 14624 BOOT_JDK_SUFFIX="/Contents/Home" 14625 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14626 if test "x$ALL_JDKS_FOUND" != x; then 14627 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14628 14629 if test "x$BOOT_JDK_FOUND" = xno; then 14630 # Now execute the test 14631 14632 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14633 if test -d "$BOOT_JDK"; then 14634 BOOT_JDK_FOUND=maybe 14635 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14636 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14637 fi 14638 14639 14640 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14641 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14642 # Do we have a bin/java? 14643 if test ! -x "$BOOT_JDK/bin/java"; then 14644 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14645 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14646 BOOT_JDK_FOUND=no 14647 else 14648 # Do we have a bin/javac? 14649 if test ! -x "$BOOT_JDK/bin/javac"; then 14650 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14651 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14652 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14653 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14654 BOOT_JDK_FOUND=no 14655 else 14656 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14657 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14658 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14660 BOOT_JDK_FOUND=no 14661 else 14662 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14663 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14664 14665 # Extra M4 quote needed to protect [] in grep expression. 14666 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14667 if test "x$FOUND_VERSION_78" = x; then 14668 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14669 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14670 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14671 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14672 BOOT_JDK_FOUND=no 14673 else 14674 # We're done! :-) 14675 BOOT_JDK_FOUND=yes 14676 14677 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14678 14679 # Input might be given as Windows format, start by converting to 14680 # unix format. 14681 path="$BOOT_JDK" 14682 new_path=`$CYGPATH -u "$path"` 14683 14684 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14685 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14686 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14687 # "foo.exe" is OK but "foo" is an error. 14688 # 14689 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14690 # It is also a way to make sure we got the proper file name for the real test later on. 14691 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14692 if test "x$test_shortpath" = x; then 14693 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14694 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14695 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14696 fi 14697 14698 # Call helper function which possibly converts this using DOS-style short mode. 14699 # If so, the updated path is stored in $new_path. 14700 14701 input_path="$new_path" 14702 # Check if we need to convert this using DOS-style short mode. If the path 14703 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14704 # take no chances and rewrite it. 14705 # Note: m4 eats our [], so we need to use [ and ] instead. 14706 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14707 if test "x$has_forbidden_chars" != x; then 14708 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14709 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14710 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14711 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14712 # Going to short mode and back again did indeed matter. Since short mode is 14713 # case insensitive, let's make it lowercase to improve readability. 14714 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14715 # Now convert it back to Unix-stile (cygpath) 14716 input_path=`$CYGPATH -u "$shortmode_path"` 14717 new_path="$input_path" 14718 fi 14719 fi 14720 14721 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14722 if test "x$test_cygdrive_prefix" = x; then 14723 # As a simple fix, exclude /usr/bin since it's not a real path. 14724 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14725 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14726 # a path prefixed by /cygdrive for fixpath to work. 14727 new_path="$CYGWIN_ROOT_PATH$input_path" 14728 fi 14729 fi 14730 14731 14732 if test "x$path" != "x$new_path"; then 14733 BOOT_JDK="$new_path" 14734 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14736 fi 14737 14738 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14739 14740 path="$BOOT_JDK" 14741 has_colon=`$ECHO $path | $GREP ^.:` 14742 new_path="$path" 14743 if test "x$has_colon" = x; then 14744 # Not in mixed or Windows style, start by that. 14745 new_path=`cmd //c echo $path` 14746 fi 14747 14748 14749 input_path="$new_path" 14750 # Check if we need to convert this using DOS-style short mode. If the path 14751 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14752 # take no chances and rewrite it. 14753 # Note: m4 eats our [], so we need to use [ and ] instead. 14754 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14755 if test "x$has_forbidden_chars" != x; then 14756 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14757 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14758 fi 14759 14760 14761 windows_path="$new_path" 14762 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14763 unix_path=`$CYGPATH -u "$windows_path"` 14764 new_path="$unix_path" 14765 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14766 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14767 new_path="$unix_path" 14768 fi 14769 14770 if test "x$path" != "x$new_path"; then 14771 BOOT_JDK="$new_path" 14772 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14773 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14774 fi 14775 14776 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14777 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14778 14779 else 14780 # We're on a posix platform. Hooray! :) 14781 path="$BOOT_JDK" 14782 has_space=`$ECHO "$path" | $GREP " "` 14783 if test "x$has_space" != x; then 14784 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14785 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14786 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14787 fi 14788 14789 # Use eval to expand a potential ~ 14790 eval path="$path" 14791 if test ! -f "$path" && test ! -d "$path"; then 14792 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14793 fi 14794 14795 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14796 fi 14797 14798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14799 $as_echo_n "checking for Boot JDK... " >&6; } 14800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14801 $as_echo "$BOOT_JDK" >&6; } 14802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14803 $as_echo_n "checking Boot JDK version... " >&6; } 14804 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14806 $as_echo "$BOOT_JDK_VERSION" >&6; } 14807 fi # end check jdk version 14808 fi # end check rt.jar 14809 fi # end check javac 14810 fi # end check java 14811 fi # end check boot jdk found 14812 fi 14813 14814 done 14815 fi 14816 14817 14818 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14819 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14820 # Do we have a bin/java? 14821 if test ! -x "$BOOT_JDK/bin/java"; then 14822 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14823 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14824 BOOT_JDK_FOUND=no 14825 else 14826 # Do we have a bin/javac? 14827 if test ! -x "$BOOT_JDK/bin/javac"; then 14828 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14830 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14831 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14832 BOOT_JDK_FOUND=no 14833 else 14834 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14835 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14836 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14837 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14838 BOOT_JDK_FOUND=no 14839 else 14840 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14841 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14842 14843 # Extra M4 quote needed to protect [] in grep expression. 14844 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14845 if test "x$FOUND_VERSION_78" = x; then 14846 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14847 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14848 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14849 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14850 BOOT_JDK_FOUND=no 14851 else 14852 # We're done! :-) 14853 BOOT_JDK_FOUND=yes 14854 14855 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14856 14857 # Input might be given as Windows format, start by converting to 14858 # unix format. 14859 path="$BOOT_JDK" 14860 new_path=`$CYGPATH -u "$path"` 14861 14862 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14863 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14864 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14865 # "foo.exe" is OK but "foo" is an error. 14866 # 14867 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14868 # It is also a way to make sure we got the proper file name for the real test later on. 14869 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14870 if test "x$test_shortpath" = x; then 14871 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14872 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14873 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14874 fi 14875 14876 # Call helper function which possibly converts this using DOS-style short mode. 14877 # If so, the updated path is stored in $new_path. 14878 14879 input_path="$new_path" 14880 # Check if we need to convert this using DOS-style short mode. If the path 14881 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14882 # take no chances and rewrite it. 14883 # Note: m4 eats our [], so we need to use [ and ] instead. 14884 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14885 if test "x$has_forbidden_chars" != x; then 14886 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14887 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14888 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14889 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14890 # Going to short mode and back again did indeed matter. Since short mode is 14891 # case insensitive, let's make it lowercase to improve readability. 14892 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14893 # Now convert it back to Unix-stile (cygpath) 14894 input_path=`$CYGPATH -u "$shortmode_path"` 14895 new_path="$input_path" 14896 fi 14897 fi 14898 14899 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14900 if test "x$test_cygdrive_prefix" = x; then 14901 # As a simple fix, exclude /usr/bin since it's not a real path. 14902 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14903 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14904 # a path prefixed by /cygdrive for fixpath to work. 14905 new_path="$CYGWIN_ROOT_PATH$input_path" 14906 fi 14907 fi 14908 14909 14910 if test "x$path" != "x$new_path"; then 14911 BOOT_JDK="$new_path" 14912 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14913 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14914 fi 14915 14916 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14917 14918 path="$BOOT_JDK" 14919 has_colon=`$ECHO $path | $GREP ^.:` 14920 new_path="$path" 14921 if test "x$has_colon" = x; then 14922 # Not in mixed or Windows style, start by that. 14923 new_path=`cmd //c echo $path` 14924 fi 14925 14926 14927 input_path="$new_path" 14928 # Check if we need to convert this using DOS-style short mode. If the path 14929 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14930 # take no chances and rewrite it. 14931 # Note: m4 eats our [], so we need to use [ and ] instead. 14932 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14933 if test "x$has_forbidden_chars" != x; then 14934 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14935 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14936 fi 14937 14938 14939 windows_path="$new_path" 14940 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14941 unix_path=`$CYGPATH -u "$windows_path"` 14942 new_path="$unix_path" 14943 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14944 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14945 new_path="$unix_path" 14946 fi 14947 14948 if test "x$path" != "x$new_path"; then 14949 BOOT_JDK="$new_path" 14950 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14951 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14952 fi 14953 14954 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14955 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14956 14957 else 14958 # We're on a posix platform. Hooray! :) 14959 path="$BOOT_JDK" 14960 has_space=`$ECHO "$path" | $GREP " "` 14961 if test "x$has_space" != x; then 14962 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14963 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14964 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14965 fi 14966 14967 # Use eval to expand a potential ~ 14968 eval path="$path" 14969 if test ! -f "$path" && test ! -d "$path"; then 14970 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14971 fi 14972 14973 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 14974 fi 14975 14976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14977 $as_echo_n "checking for Boot JDK... " >&6; } 14978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14979 $as_echo "$BOOT_JDK" >&6; } 14980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14981 $as_echo_n "checking Boot JDK version... " >&6; } 14982 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14984 $as_echo "$BOOT_JDK_VERSION" >&6; } 14985 fi # end check jdk version 14986 fi # end check rt.jar 14987 fi # end check javac 14988 fi # end check java 14989 fi # end check boot jdk found 14990 fi 14991 14992 elif test "x$OPENJDK_TARGET_OS" = xlinux; then 14993 14994 if test "x$BOOT_JDK_FOUND" = xno; then 14995 # Now execute the test 14996 14997 BOOT_JDK_PREFIX="/usr/lib/jvm" 14998 BOOT_JDK_SUFFIX="" 14999 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 15000 if test "x$ALL_JDKS_FOUND" != x; then 15001 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 15002 15003 if test "x$BOOT_JDK_FOUND" = xno; then 15004 # Now execute the test 15005 15006 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 15007 if test -d "$BOOT_JDK"; then 15008 BOOT_JDK_FOUND=maybe 15009 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 15010 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 15011 fi 15012 15013 15014 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15015 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15016 # Do we have a bin/java? 15017 if test ! -x "$BOOT_JDK/bin/java"; then 15018 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15019 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15020 BOOT_JDK_FOUND=no 15021 else 15022 # Do we have a bin/javac? 15023 if test ! -x "$BOOT_JDK/bin/javac"; then 15024 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15026 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15027 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15028 BOOT_JDK_FOUND=no 15029 else 15030 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15031 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15032 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15034 BOOT_JDK_FOUND=no 15035 else 15036 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15037 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15038 15039 # Extra M4 quote needed to protect [] in grep expression. 15040 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15041 if test "x$FOUND_VERSION_78" = x; then 15042 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15044 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15045 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15046 BOOT_JDK_FOUND=no 15047 else 15048 # We're done! :-) 15049 BOOT_JDK_FOUND=yes 15050 15051 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15052 15053 # Input might be given as Windows format, start by converting to 15054 # unix format. 15055 path="$BOOT_JDK" 15056 new_path=`$CYGPATH -u "$path"` 15057 15058 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15059 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15060 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15061 # "foo.exe" is OK but "foo" is an error. 15062 # 15063 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15064 # It is also a way to make sure we got the proper file name for the real test later on. 15065 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15066 if test "x$test_shortpath" = x; then 15067 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15068 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15069 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15070 fi 15071 15072 # Call helper function which possibly converts this using DOS-style short mode. 15073 # If so, the updated path is stored in $new_path. 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 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15084 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15085 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15086 # Going to short mode and back again did indeed matter. Since short mode is 15087 # case insensitive, let's make it lowercase to improve readability. 15088 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15089 # Now convert it back to Unix-stile (cygpath) 15090 input_path=`$CYGPATH -u "$shortmode_path"` 15091 new_path="$input_path" 15092 fi 15093 fi 15094 15095 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15096 if test "x$test_cygdrive_prefix" = x; then 15097 # As a simple fix, exclude /usr/bin since it's not a real path. 15098 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15099 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15100 # a path prefixed by /cygdrive for fixpath to work. 15101 new_path="$CYGWIN_ROOT_PATH$input_path" 15102 fi 15103 fi 15104 15105 15106 if test "x$path" != "x$new_path"; then 15107 BOOT_JDK="$new_path" 15108 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15109 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15110 fi 15111 15112 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15113 15114 path="$BOOT_JDK" 15115 has_colon=`$ECHO $path | $GREP ^.:` 15116 new_path="$path" 15117 if test "x$has_colon" = x; then 15118 # Not in mixed or Windows style, start by that. 15119 new_path=`cmd //c echo $path` 15120 fi 15121 15122 15123 input_path="$new_path" 15124 # Check if we need to convert this using DOS-style short mode. If the path 15125 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15126 # take no chances and rewrite it. 15127 # Note: m4 eats our [], so we need to use [ and ] instead. 15128 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15129 if test "x$has_forbidden_chars" != x; then 15130 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15131 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15132 fi 15133 15134 15135 windows_path="$new_path" 15136 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15137 unix_path=`$CYGPATH -u "$windows_path"` 15138 new_path="$unix_path" 15139 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15140 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15141 new_path="$unix_path" 15142 fi 15143 15144 if test "x$path" != "x$new_path"; then 15145 BOOT_JDK="$new_path" 15146 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15147 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15148 fi 15149 15150 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15151 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15152 15153 else 15154 # We're on a posix platform. Hooray! :) 15155 path="$BOOT_JDK" 15156 has_space=`$ECHO "$path" | $GREP " "` 15157 if test "x$has_space" != x; then 15158 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15159 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15160 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15161 fi 15162 15163 # Use eval to expand a potential ~ 15164 eval path="$path" 15165 if test ! -f "$path" && test ! -d "$path"; then 15166 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15167 fi 15168 15169 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 15170 fi 15171 15172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15173 $as_echo_n "checking for Boot JDK... " >&6; } 15174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15175 $as_echo "$BOOT_JDK" >&6; } 15176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15177 $as_echo_n "checking Boot JDK version... " >&6; } 15178 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15180 $as_echo "$BOOT_JDK_VERSION" >&6; } 15181 fi # end check jdk version 15182 fi # end check rt.jar 15183 fi # end check javac 15184 fi # end check java 15185 fi # end check boot jdk found 15186 fi 15187 15188 done 15189 fi 15190 15191 15192 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15193 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15194 # Do we have a bin/java? 15195 if test ! -x "$BOOT_JDK/bin/java"; then 15196 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15198 BOOT_JDK_FOUND=no 15199 else 15200 # Do we have a bin/javac? 15201 if test ! -x "$BOOT_JDK/bin/javac"; then 15202 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15204 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15205 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15206 BOOT_JDK_FOUND=no 15207 else 15208 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15209 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15210 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15212 BOOT_JDK_FOUND=no 15213 else 15214 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15215 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15216 15217 # Extra M4 quote needed to protect [] in grep expression. 15218 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15219 if test "x$FOUND_VERSION_78" = x; then 15220 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15222 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15223 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15224 BOOT_JDK_FOUND=no 15225 else 15226 # We're done! :-) 15227 BOOT_JDK_FOUND=yes 15228 15229 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15230 15231 # Input might be given as Windows format, start by converting to 15232 # unix format. 15233 path="$BOOT_JDK" 15234 new_path=`$CYGPATH -u "$path"` 15235 15236 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15237 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15238 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15239 # "foo.exe" is OK but "foo" is an error. 15240 # 15241 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15242 # It is also a way to make sure we got the proper file name for the real test later on. 15243 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15244 if test "x$test_shortpath" = x; then 15245 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15246 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15247 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15248 fi 15249 15250 # Call helper function which possibly converts this using DOS-style short mode. 15251 # If so, the updated path is stored in $new_path. 15252 15253 input_path="$new_path" 15254 # Check if we need to convert this using DOS-style short mode. If the path 15255 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15256 # take no chances and rewrite it. 15257 # Note: m4 eats our [], so we need to use [ and ] instead. 15258 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15259 if test "x$has_forbidden_chars" != x; then 15260 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15261 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15262 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15263 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15264 # Going to short mode and back again did indeed matter. Since short mode is 15265 # case insensitive, let's make it lowercase to improve readability. 15266 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15267 # Now convert it back to Unix-stile (cygpath) 15268 input_path=`$CYGPATH -u "$shortmode_path"` 15269 new_path="$input_path" 15270 fi 15271 fi 15272 15273 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15274 if test "x$test_cygdrive_prefix" = x; then 15275 # As a simple fix, exclude /usr/bin since it's not a real path. 15276 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15277 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15278 # a path prefixed by /cygdrive for fixpath to work. 15279 new_path="$CYGWIN_ROOT_PATH$input_path" 15280 fi 15281 fi 15282 15283 15284 if test "x$path" != "x$new_path"; then 15285 BOOT_JDK="$new_path" 15286 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15287 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15288 fi 15289 15290 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15291 15292 path="$BOOT_JDK" 15293 has_colon=`$ECHO $path | $GREP ^.:` 15294 new_path="$path" 15295 if test "x$has_colon" = x; then 15296 # Not in mixed or Windows style, start by that. 15297 new_path=`cmd //c echo $path` 15298 fi 15299 15300 15301 input_path="$new_path" 15302 # Check if we need to convert this using DOS-style short mode. If the path 15303 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15304 # take no chances and rewrite it. 15305 # Note: m4 eats our [], so we need to use [ and ] instead. 15306 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15307 if test "x$has_forbidden_chars" != x; then 15308 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15309 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15310 fi 15311 15312 15313 windows_path="$new_path" 15314 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15315 unix_path=`$CYGPATH -u "$windows_path"` 15316 new_path="$unix_path" 15317 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15318 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15319 new_path="$unix_path" 15320 fi 15321 15322 if test "x$path" != "x$new_path"; then 15323 BOOT_JDK="$new_path" 15324 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15325 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15326 fi 15327 15328 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15329 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15330 15331 else 15332 # We're on a posix platform. Hooray! :) 15333 path="$BOOT_JDK" 15334 has_space=`$ECHO "$path" | $GREP " "` 15335 if test "x$has_space" != x; then 15336 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15337 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15338 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15339 fi 15340 15341 # Use eval to expand a potential ~ 15342 eval path="$path" 15343 if test ! -f "$path" && test ! -d "$path"; then 15344 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15345 fi 15346 15347 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 15348 fi 15349 15350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15351 $as_echo_n "checking for Boot JDK... " >&6; } 15352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15353 $as_echo "$BOOT_JDK" >&6; } 15354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15355 $as_echo_n "checking Boot JDK version... " >&6; } 15356 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15358 $as_echo "$BOOT_JDK_VERSION" >&6; } 15359 fi # end check jdk version 15360 fi # end check rt.jar 15361 fi # end check javac 15362 fi # end check java 15363 fi # end check boot jdk found 15364 fi 15365 15366 fi 15367 15368 15369 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15370 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15371 # Do we have a bin/java? 15372 if test ! -x "$BOOT_JDK/bin/java"; then 15373 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15374 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15375 BOOT_JDK_FOUND=no 15376 else 15377 # Do we have a bin/javac? 15378 if test ! -x "$BOOT_JDK/bin/javac"; then 15379 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15381 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15382 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15383 BOOT_JDK_FOUND=no 15384 else 15385 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15386 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15387 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15389 BOOT_JDK_FOUND=no 15390 else 15391 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15392 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15393 15394 # Extra M4 quote needed to protect [] in grep expression. 15395 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15396 if test "x$FOUND_VERSION_78" = x; then 15397 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15398 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15399 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15400 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15401 BOOT_JDK_FOUND=no 15402 else 15403 # We're done! :-) 15404 BOOT_JDK_FOUND=yes 15405 15406 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15407 15408 # Input might be given as Windows format, start by converting to 15409 # unix format. 15410 path="$BOOT_JDK" 15411 new_path=`$CYGPATH -u "$path"` 15412 15413 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15414 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15415 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15416 # "foo.exe" is OK but "foo" is an error. 15417 # 15418 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15419 # It is also a way to make sure we got the proper file name for the real test later on. 15420 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15421 if test "x$test_shortpath" = x; then 15422 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15423 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15424 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15425 fi 15426 15427 # Call helper function which possibly converts this using DOS-style short mode. 15428 # If so, the updated path is stored in $new_path. 15429 15430 input_path="$new_path" 15431 # Check if we need to convert this using DOS-style short mode. If the path 15432 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15433 # take no chances and rewrite it. 15434 # Note: m4 eats our [], so we need to use [ and ] instead. 15435 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15436 if test "x$has_forbidden_chars" != x; then 15437 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15438 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15439 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15440 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15441 # Going to short mode and back again did indeed matter. Since short mode is 15442 # case insensitive, let's make it lowercase to improve readability. 15443 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15444 # Now convert it back to Unix-stile (cygpath) 15445 input_path=`$CYGPATH -u "$shortmode_path"` 15446 new_path="$input_path" 15447 fi 15448 fi 15449 15450 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15451 if test "x$test_cygdrive_prefix" = x; then 15452 # As a simple fix, exclude /usr/bin since it's not a real path. 15453 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15454 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15455 # a path prefixed by /cygdrive for fixpath to work. 15456 new_path="$CYGWIN_ROOT_PATH$input_path" 15457 fi 15458 fi 15459 15460 15461 if test "x$path" != "x$new_path"; then 15462 BOOT_JDK="$new_path" 15463 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15464 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15465 fi 15466 15467 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15468 15469 path="$BOOT_JDK" 15470 has_colon=`$ECHO $path | $GREP ^.:` 15471 new_path="$path" 15472 if test "x$has_colon" = x; then 15473 # Not in mixed or Windows style, start by that. 15474 new_path=`cmd //c echo $path` 15475 fi 15476 15477 15478 input_path="$new_path" 15479 # Check if we need to convert this using DOS-style short mode. If the path 15480 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15481 # take no chances and rewrite it. 15482 # Note: m4 eats our [], so we need to use [ and ] instead. 15483 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15484 if test "x$has_forbidden_chars" != x; then 15485 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15486 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15487 fi 15488 15489 15490 windows_path="$new_path" 15491 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15492 unix_path=`$CYGPATH -u "$windows_path"` 15493 new_path="$unix_path" 15494 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15495 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15496 new_path="$unix_path" 15497 fi 15498 15499 if test "x$path" != "x$new_path"; then 15500 BOOT_JDK="$new_path" 15501 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15502 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15503 fi 15504 15505 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15506 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15507 15508 else 15509 # We're on a posix platform. Hooray! :) 15510 path="$BOOT_JDK" 15511 has_space=`$ECHO "$path" | $GREP " "` 15512 if test "x$has_space" != x; then 15513 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15514 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15515 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15516 fi 15517 15518 # Use eval to expand a potential ~ 15519 eval path="$path" 15520 if test ! -f "$path" && test ! -d "$path"; then 15521 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15522 fi 15523 15524 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`" 15525 fi 15526 15527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15528 $as_echo_n "checking for Boot JDK... " >&6; } 15529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15530 $as_echo "$BOOT_JDK" >&6; } 15531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15532 $as_echo_n "checking Boot JDK version... " >&6; } 15533 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15535 $as_echo "$BOOT_JDK_VERSION" >&6; } 15536 fi # end check jdk version 15537 fi # end check rt.jar 15538 fi # end check javac 15539 fi # end check java 15540 fi # end check boot jdk found 15541 fi 15542 15543 15544 # If we haven't found anything yet, we've truly lost. Give up. 15545 if test "x$BOOT_JDK_FOUND" = xno; then 15546 15547 # Print a helpful message on how to acquire the necessary build dependency. 15548 # openjdk is the help tag: freetyp2, cups, pulse, alsa etc 15549 MISSING_DEPENDENCY=openjdk 15550 PKGHANDLER_COMMAND= 15551 15552 case $PKGHANDLER in 15553 apt-get) 15554 apt_help $MISSING_DEPENDENCY ;; 15555 yum) 15556 yum_help $MISSING_DEPENDENCY ;; 15557 port) 15558 port_help $MISSING_DEPENDENCY ;; 15559 pkgutil) 15560 pkgutil_help $MISSING_DEPENDENCY ;; 15561 pkgadd) 15562 pkgadd_help $MISSING_DEPENDENCY ;; 15563 * ) 15564 break ;; 15565 esac 15566 15567 if test "x$PKGHANDLER_COMMAND" != x; then 15568 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 15569 fi 15570 15571 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5 15572 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;} 15573 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5 15574 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15575 as_fn_error $? "Cannot continue" "$LINENO" 5 15576 fi 15577 15578 # Setup proper paths for what we found 15579 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" 15580 if test ! -f "$BOOT_RTJAR"; then 15581 # On MacOSX it is called classes.jar 15582 BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar" 15583 if test -f "$BOOT_RTJAR"; then 15584 # Remove the .. 15585 BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" 15586 fi 15587 fi 15588 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" 15589 BOOT_JDK="$BOOT_JDK" 15590 15591 15592 15593 15594 # Setup tools from the Boot JDK. 15595 15596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5 15597 $as_echo_n "checking for java in Boot JDK... " >&6; } 15598 JAVA=$BOOT_JDK/bin/java 15599 if test ! -x $JAVA; then 15600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15601 $as_echo "not found" >&6; } 15602 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15603 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15604 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5 15605 fi 15606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15607 $as_echo "ok" >&6; } 15608 15609 15610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5 15611 $as_echo_n "checking for javac in Boot JDK... " >&6; } 15612 JAVAC=$BOOT_JDK/bin/javac 15613 if test ! -x $JAVAC; then 15614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15615 $as_echo "not found" >&6; } 15616 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15617 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15618 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5 15619 fi 15620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15621 $as_echo "ok" >&6; } 15622 15623 15624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5 15625 $as_echo_n "checking for javah in Boot JDK... " >&6; } 15626 JAVAH=$BOOT_JDK/bin/javah 15627 if test ! -x $JAVAH; then 15628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15629 $as_echo "not found" >&6; } 15630 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15631 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15632 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5 15633 fi 15634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15635 $as_echo "ok" >&6; } 15636 15637 15638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5 15639 $as_echo_n "checking for javap in Boot JDK... " >&6; } 15640 JAVAP=$BOOT_JDK/bin/javap 15641 if test ! -x $JAVAP; then 15642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15643 $as_echo "not found" >&6; } 15644 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15645 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15646 as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5 15647 fi 15648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15649 $as_echo "ok" >&6; } 15650 15651 15652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5 15653 $as_echo_n "checking for jar in Boot JDK... " >&6; } 15654 JAR=$BOOT_JDK/bin/jar 15655 if test ! -x $JAR; then 15656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15657 $as_echo "not found" >&6; } 15658 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15659 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15660 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5 15661 fi 15662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15663 $as_echo "ok" >&6; } 15664 15665 15666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5 15667 $as_echo_n "checking for rmic in Boot JDK... " >&6; } 15668 RMIC=$BOOT_JDK/bin/rmic 15669 if test ! -x $RMIC; then 15670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15671 $as_echo "not found" >&6; } 15672 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15673 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15674 as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5 15675 fi 15676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15677 $as_echo "ok" >&6; } 15678 15679 15680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5 15681 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; } 15682 NATIVE2ASCII=$BOOT_JDK/bin/native2ascii 15683 if test ! -x $NATIVE2ASCII; then 15684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15685 $as_echo "not found" >&6; } 15686 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15687 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15688 as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5 15689 fi 15690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15691 $as_echo "ok" >&6; } 15692 15693 15694 # Finally, set some other options... 15695 15696 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility. 15697 BOOT_JDK_SOURCETARGET="-source 7 -target 7" 15698 15699 15700 15701 15702 ############################################################################## 15703 # 15704 # Specify options for anything that is run with the Boot JDK. 15705 # 15706 15707 # Check whether --with-boot-jdk-jvmargs was given. 15708 if test "${with_boot_jdk_jvmargs+set}" = set; then : 15709 withval=$with_boot_jdk_jvmargs; 15710 fi 15711 15712 15713 if test "x$with_boot_jdk_jvmargs" = x; then 15714 # Not all JVM:s accept the same arguments on the command line. 15715 # OpenJDK specific increase in thread stack for JDK build, 15716 # well more specifically, when running javac. 15717 if test "x$BUILD_NUM_BITS" = x32; then 15718 STACK_SIZE=768 15719 else 15720 # Running Javac on a JVM on a 64-bit machine, the stack takes more space 15721 # since 64-bit pointers are pushed on the stach. Apparently, we need 15722 # to increase the stack space when javacing the JDK.... 15723 STACK_SIZE=1536 15724 fi 15725 15726 # Minimum amount of heap memory. 15727 15728 $ECHO "Check if jvm arg is ok: -Xms64M" >&5 15729 $ECHO "Command: $JAVA -Xms64M -version" >&5 15730 OUTPUT=`$JAVA -Xms64M -version 2>&1` 15731 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15732 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15733 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15734 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M" 15735 JVM_ARG_OK=true 15736 else 15737 $ECHO "Arg failed:" >&5 15738 $ECHO "$OUTPUT" >&5 15739 JVM_ARG_OK=false 15740 fi 15741 15742 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 15743 # Why does macosx need more heap? Its the huge JDK batch. 15744 15745 $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5 15746 $ECHO "Command: $JAVA -Xmx1600M -version" >&5 15747 OUTPUT=`$JAVA -Xmx1600M -version 2>&1` 15748 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15749 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15750 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15751 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M" 15752 JVM_ARG_OK=true 15753 else 15754 $ECHO "Arg failed:" >&5 15755 $ECHO "$OUTPUT" >&5 15756 JVM_ARG_OK=false 15757 fi 15758 15759 else 15760 15761 $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5 15762 $ECHO "Command: $JAVA -Xmx1100M -version" >&5 15763 OUTPUT=`$JAVA -Xmx1100M -version 2>&1` 15764 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15765 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15766 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15767 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M" 15768 JVM_ARG_OK=true 15769 else 15770 $ECHO "Arg failed:" >&5 15771 $ECHO "$OUTPUT" >&5 15772 JVM_ARG_OK=false 15773 fi 15774 15775 fi 15776 # When is adding -client something that speeds up the JVM? 15777 # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) 15778 15779 $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5 15780 $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5 15781 OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1` 15782 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15783 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15784 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15785 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m" 15786 JVM_ARG_OK=true 15787 else 15788 $ECHO "Arg failed:" >&5 15789 $ECHO "$OUTPUT" >&5 15790 JVM_ARG_OK=false 15791 fi 15792 15793 15794 $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5 15795 $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5 15796 OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1` 15797 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15798 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15799 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15800 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m" 15801 JVM_ARG_OK=true 15802 else 15803 $ECHO "Arg failed:" >&5 15804 $ECHO "$OUTPUT" >&5 15805 JVM_ARG_OK=false 15806 fi 15807 15808 15809 $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5 15810 $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5 15811 OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1` 15812 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15813 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15814 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15815 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE" 15816 JVM_ARG_OK=true 15817 else 15818 $ECHO "Arg failed:" >&5 15819 $ECHO "$OUTPUT" >&5 15820 JVM_ARG_OK=false 15821 fi 15822 15823 # Disable special log output when a debug build is used as Boot JDK... 15824 15825 $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5 15826 $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5 15827 OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1` 15828 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 15829 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 15830 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15831 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" 15832 JVM_ARG_OK=true 15833 else 15834 $ECHO "Arg failed:" >&5 15835 $ECHO "$OUTPUT" >&5 15836 JVM_ARG_OK=false 15837 fi 15838 15839 fi 15840 15841 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs 15842 15843 15844 15845 ############################################################################### 15846 # 15847 # Configure the sources to use. We can add or override individual directories. 15848 # 15849 ############################################################################### 15850 15851 15852 15853 # Where are the sources. Any of these can be overridden 15854 # using --with-override-corba and the likes. 15855 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" 15856 CORBA_TOPDIR="$SRC_ROOT/corba" 15857 JAXP_TOPDIR="$SRC_ROOT/jaxp" 15858 JAXWS_TOPDIR="$SRC_ROOT/jaxws" 15859 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" 15860 NASHORN_TOPDIR="$SRC_ROOT/nashorn" 15861 JDK_TOPDIR="$SRC_ROOT/jdk" 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 ############################################################################### 15873 # 15874 # Pickup additional source for a component from outside of the source root 15875 # or override source for a component. 15876 # 15877 15878 # Check whether --with-add-source-root was given. 15879 if test "${with_add_source_root+set}" = set; then : 15880 withval=$with_add_source_root; 15881 fi 15882 15883 15884 15885 # Check whether --with-override-source-root was given. 15886 if test "${with_override_source_root+set}" = set; then : 15887 withval=$with_override_source_root; 15888 fi 15889 15890 15891 15892 # Check whether --with-adds-and-overrides was given. 15893 if test "${with_adds_and_overrides+set}" = set; then : 15894 withval=$with_adds_and_overrides; 15895 fi 15896 15897 15898 if test "x$with_adds_and_overrides" != x; then 15899 with_add_source_root="$with_adds_and_overrides/adds" 15900 with_override_source_root="$with_adds_and_overrides/overrides" 15901 fi 15902 15903 if test "x$with_add_source_root" != x; then 15904 if ! test -d $with_add_source_root; then 15905 as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5 15906 fi 15907 CURDIR="$PWD" 15908 cd "$with_add_source_root" 15909 ADD_SRC_ROOT="`pwd`" 15910 cd "$CURDIR" 15911 # Verify that the addon source root does not have any root makefiles. 15912 # If it does, then it is usually an error, prevent this. 15913 if test -f $with_add_source_root/langtools/makefiles/Makefile || \ 15914 test -f $with_add_source_root/langtools/make/Makefile; then 15915 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 15916 fi 15917 if test -f $with_add_source_root/corba/makefiles/Makefile || \ 15918 test -f $with_add_source_root/corba/make/Makefile; then 15919 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 15920 fi 15921 if test -f $with_add_source_root/jaxp/makefiles/Makefile || \ 15922 test -f $with_add_source_root/jaxp/make/Makefile; then 15923 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 15924 fi 15925 if test -f $with_add_source_root/jaxws/makefiles/Makefile || \ 15926 test -f $with_add_source_root/jaxws/make/Makefile; then 15927 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 15928 fi 15929 if test -f $with_add_source_root/hotspot/makefiles/Makefile || \ 15930 test -f $with_add_source_root/hotspot/make/Makefile; then 15931 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 15932 fi 15933 if test -f $with_add_source_root/jdk/makefiles/Makefile || \ 15934 test -f $with_add_source_root/jdk/make/Makefile; then 15935 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 15936 fi 15937 fi 15938 15939 15940 if test "x$with_override_source_root" != x; then 15941 if ! test -d $with_override_source_root; then 15942 as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5 15943 fi 15944 CURDIR="$PWD" 15945 cd "$with_override_source_root" 15946 OVERRIDE_SRC_ROOT="`pwd`" 15947 cd "$CURDIR" 15948 if test -f $with_override_source_root/langtools/makefiles/Makefile || \ 15949 test -f $with_override_source_root/langtools/make/Makefile; then 15950 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 15951 fi 15952 if test -f $with_override_source_root/corba/makefiles/Makefile || \ 15953 test -f $with_override_source_root/corba/make/Makefile; then 15954 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 15955 fi 15956 if test -f $with_override_source_root/jaxp/makefiles/Makefile || \ 15957 test -f $with_override_source_root/jaxp/make/Makefile; then 15958 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 15959 fi 15960 if test -f $with_override_source_root/jaxws/makefiles/Makefile || \ 15961 test -f $with_override_source_root/jaxws/make/Makefile; then 15962 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 15963 fi 15964 if test -f $with_override_source_root/hotspot/makefiles/Makefile || \ 15965 test -f $with_override_source_root/hotspot/make/Makefile; then 15966 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 15967 fi 15968 if test -f $with_override_source_root/jdk/makefiles/Makefile || \ 15969 test -f $with_override_source_root/jdk/make/Makefile; then 15970 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 15971 fi 15972 fi 15973 15974 15975 ############################################################################### 15976 # 15977 # Override a repo completely, this is used for example when you have 3 small 15978 # development sandboxes of the langtools sources and want to avoid having 3 full 15979 # OpenJDK sources checked out on disk. 15980 # 15981 # Assuming that the 3 langtools sandboxes are located here: 15982 # /home/fredrik/sandbox1/langtools 15983 # /home/fredrik/sandbox2/langtools 15984 # /home/fredrik/sandbox3/langtools 15985 # 15986 # From the source root you create build subdirs manually: 15987 # mkdir -p build1 build2 build3 15988 # in each build directory run: 15989 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) 15990 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) 15991 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) 15992 # 15993 15994 15995 # Check whether --with-override-langtools was given. 15996 if test "${with_override_langtools+set}" = set; then : 15997 withval=$with_override_langtools; 15998 fi 15999 16000 16001 16002 # Check whether --with-override-corba was given. 16003 if test "${with_override_corba+set}" = set; then : 16004 withval=$with_override_corba; 16005 fi 16006 16007 16008 16009 # Check whether --with-override-jaxp was given. 16010 if test "${with_override_jaxp+set}" = set; then : 16011 withval=$with_override_jaxp; 16012 fi 16013 16014 16015 16016 # Check whether --with-override-jaxws was given. 16017 if test "${with_override_jaxws+set}" = set; then : 16018 withval=$with_override_jaxws; 16019 fi 16020 16021 16022 16023 # Check whether --with-override-hotspot was given. 16024 if test "${with_override_hotspot+set}" = set; then : 16025 withval=$with_override_hotspot; 16026 fi 16027 16028 16029 16030 # Check whether --with-override-jdk was given. 16031 if test "${with_override_jdk+set}" = set; then : 16032 withval=$with_override_jdk; 16033 fi 16034 16035 16036 if test "x$with_override_langtools" != x; then 16037 CURDIR="$PWD" 16038 cd "$with_override_langtools" 16039 LANGTOOLS_TOPDIR="`pwd`" 16040 cd "$CURDIR" 16041 if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then 16042 as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5 16043 fi 16044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5 16045 $as_echo_n "checking if langtools should be overridden... " >&6; } 16046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5 16047 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; } 16048 fi 16049 if test "x$with_override_corba" != x; then 16050 CURDIR="$PWD" 16051 cd "$with_override_corba" 16052 CORBA_TOPDIR="`pwd`" 16053 cd "$CURDIR" 16054 if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then 16055 as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5 16056 fi 16057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5 16058 $as_echo_n "checking if corba should be overridden... " >&6; } 16059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5 16060 $as_echo "yes with $CORBA_TOPDIR" >&6; } 16061 fi 16062 if test "x$with_override_jaxp" != x; then 16063 CURDIR="$PWD" 16064 cd "$with_override_jaxp" 16065 JAXP_TOPDIR="`pwd`" 16066 cd "$CURDIR" 16067 if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then 16068 as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5 16069 fi 16070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5 16071 $as_echo_n "checking if jaxp should be overridden... " >&6; } 16072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5 16073 $as_echo "yes with $JAXP_TOPDIR" >&6; } 16074 fi 16075 if test "x$with_override_jaxws" != x; then 16076 CURDIR="$PWD" 16077 cd "$with_override_jaxws" 16078 JAXWS_TOPDIR="`pwd`" 16079 cd "$CURDIR" 16080 if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then 16081 as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5 16082 fi 16083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5 16084 $as_echo_n "checking if jaxws should be overridden... " >&6; } 16085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5 16086 $as_echo "yes with $JAXWS_TOPDIR" >&6; } 16087 fi 16088 if test "x$with_override_hotspot" != x; then 16089 CURDIR="$PWD" 16090 cd "$with_override_hotspot" 16091 HOTSPOT_TOPDIR="`pwd`" 16092 cd "$CURDIR" 16093 if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \ 16094 ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then 16095 as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5 16096 fi 16097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5 16098 $as_echo_n "checking if hotspot should be overridden... " >&6; } 16099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5 16100 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; } 16101 fi 16102 if test "x$with_override_nashorn" != x; then 16103 CURDIR="$PWD" 16104 cd "$with_override_nashorn" 16105 NASHORN_TOPDIR="`pwd`" 16106 cd "$CURDIR" 16107 if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then 16108 as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5 16109 fi 16110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5 16111 $as_echo_n "checking if nashorn should be overridden... " >&6; } 16112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5 16113 $as_echo "yes with $NASHORN_TOPDIR" >&6; } 16114 fi 16115 if test "x$with_override_jdk" != x; then 16116 CURDIR="$PWD" 16117 cd "$with_override_jdk" 16118 JDK_TOPDIR="`pwd`" 16119 cd "$CURDIR" 16120 if ! test -f $JDK_TOPDIR/makefiles/Makefile; then 16121 as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5 16122 fi 16123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5 16124 $as_echo_n "checking if JDK should be overridden... " >&6; } 16125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5 16126 $as_echo "yes with $JDK_TOPDIR" >&6; } 16127 fi 16128 16129 16130 16131 BUILD_OUTPUT="$OUTPUT_ROOT" 16132 16133 16134 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" 16135 BUILD_HOTSPOT=true 16136 16137 16138 16139 # Check whether --with-import-hotspot was given. 16140 if test "${with_import_hotspot+set}" = set; then : 16141 withval=$with_import_hotspot; 16142 fi 16143 16144 if test "x$with_import_hotspot" != x; then 16145 CURDIR="$PWD" 16146 cd "$with_import_hotspot" 16147 HOTSPOT_DIST="`pwd`" 16148 cd "$CURDIR" 16149 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then 16150 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5 16151 fi 16152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5 16153 $as_echo_n "checking if hotspot should be imported... " >&6; } 16154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5 16155 $as_echo "yes from $HOTSPOT_DIST" >&6; } 16156 BUILD_HOTSPOT=false 16157 fi 16158 16159 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" 16160 16161 16162 ############################################################################### 16163 # 16164 # Setup the toolchain (compilers etc), i.e. the tools that need to be 16165 # cross-compilation aware. 16166 # 16167 ############################################################################### 16168 16169 16170 ############################################################################### 16171 # 16172 # Configure the development tool paths and potential sysroot. 16173 # 16174 ac_ext=cpp 16175 ac_cpp='$CXXCPP $CPPFLAGS' 16176 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 16177 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 16178 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 16179 16180 16181 # The option used to specify the target .o,.a or .so file. 16182 # When compiling, how to specify the to be created object file. 16183 CC_OUT_OPTION='-o$(SPACE)' 16184 # When linking, how to specify the to be created executable. 16185 EXE_OUT_OPTION='-o$(SPACE)' 16186 # When linking, how to specify the to be created dynamically linkable library. 16187 LD_OUT_OPTION='-o$(SPACE)' 16188 # When archiving, how to specify the to be create static archive for object files. 16189 AR_OUT_OPTION='rcs$(SPACE)' 16190 16191 16192 16193 16194 16195 # Locate the actual tools 16196 16197 16198 # Check whether --with-jtreg was given. 16199 if test "${with_jtreg+set}" = set; then : 16200 withval=$with_jtreg; 16201 else 16202 with_jtreg=no 16203 fi 16204 16205 16206 if test "x$with_jtreg" = xno; then 16207 # jtreg disabled 16208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 16209 $as_echo_n "checking for jtreg... " >&6; } 16210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16211 $as_echo "no" >&6; } 16212 else 16213 if test "x$with_jtreg" != xyes; then 16214 # with path specified. 16215 JT_HOME="$with_jtreg" 16216 fi 16217 16218 if test "x$JT_HOME" != x; then 16219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 16220 $as_echo_n "checking for jtreg... " >&6; } 16221 16222 # use JT_HOME enviroment var. 16223 16224 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16225 16226 # Input might be given as Windows format, start by converting to 16227 # unix format. 16228 path="$JT_HOME" 16229 new_path=`$CYGPATH -u "$path"` 16230 16231 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 16232 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 16233 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 16234 # "foo.exe" is OK but "foo" is an error. 16235 # 16236 # This test is therefore slightly more accurate than "test -f" to check for file precense. 16237 # It is also a way to make sure we got the proper file name for the real test later on. 16238 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 16239 if test "x$test_shortpath" = x; then 16240 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 16241 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} 16242 as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5 16243 fi 16244 16245 # Call helper function which possibly converts this using DOS-style short mode. 16246 # If so, the updated path is stored in $new_path. 16247 16248 input_path="$new_path" 16249 # Check if we need to convert this using DOS-style short mode. If the path 16250 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16251 # take no chances and rewrite it. 16252 # Note: m4 eats our [], so we need to use [ and ] instead. 16253 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 16254 if test "x$has_forbidden_chars" != x; then 16255 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16256 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 16257 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 16258 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 16259 # Going to short mode and back again did indeed matter. Since short mode is 16260 # case insensitive, let's make it lowercase to improve readability. 16261 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16262 # Now convert it back to Unix-stile (cygpath) 16263 input_path=`$CYGPATH -u "$shortmode_path"` 16264 new_path="$input_path" 16265 fi 16266 fi 16267 16268 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 16269 if test "x$test_cygdrive_prefix" = x; then 16270 # As a simple fix, exclude /usr/bin since it's not a real path. 16271 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 16272 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 16273 # a path prefixed by /cygdrive for fixpath to work. 16274 new_path="$CYGWIN_ROOT_PATH$input_path" 16275 fi 16276 fi 16277 16278 16279 if test "x$path" != "x$new_path"; then 16280 JT_HOME="$new_path" 16281 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 16282 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} 16283 fi 16284 16285 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16286 16287 path="$JT_HOME" 16288 has_colon=`$ECHO $path | $GREP ^.:` 16289 new_path="$path" 16290 if test "x$has_colon" = x; then 16291 # Not in mixed or Windows style, start by that. 16292 new_path=`cmd //c echo $path` 16293 fi 16294 16295 16296 input_path="$new_path" 16297 # Check if we need to convert this using DOS-style short mode. If the path 16298 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16299 # take no chances and rewrite it. 16300 # Note: m4 eats our [], so we need to use [ and ] instead. 16301 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 16302 if test "x$has_forbidden_chars" != x; then 16303 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16304 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16305 fi 16306 16307 16308 windows_path="$new_path" 16309 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16310 unix_path=`$CYGPATH -u "$windows_path"` 16311 new_path="$unix_path" 16312 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16313 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16314 new_path="$unix_path" 16315 fi 16316 16317 if test "x$path" != "x$new_path"; then 16318 JT_HOME="$new_path" 16319 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 16320 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} 16321 fi 16322 16323 # Save the first 10 bytes of this path to the storage, so fixpath can work. 16324 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 16325 16326 else 16327 # We're on a posix platform. Hooray! :) 16328 path="$JT_HOME" 16329 has_space=`$ECHO "$path" | $GREP " "` 16330 if test "x$has_space" != x; then 16331 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 16332 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} 16333 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 16334 fi 16335 16336 # Use eval to expand a potential ~ 16337 eval path="$path" 16338 if test ! -f "$path" && test ! -d "$path"; then 16339 as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5 16340 fi 16341 16342 JT_HOME="`cd "$path"; $THEPWDCMD -L`" 16343 fi 16344 16345 16346 # jtreg win32 script works for everybody 16347 JTREGEXE="$JT_HOME/win32/bin/jtreg" 16348 16349 if test ! -f "$JTREGEXE"; then 16350 as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5 16351 fi 16352 16353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 16354 $as_echo "$JTREGEXE" >&6; } 16355 else 16356 # try to find jtreg on path 16357 16358 for ac_prog in jtreg 16359 do 16360 # Extract the first word of "$ac_prog", so it can be a program name with args. 16361 set dummy $ac_prog; ac_word=$2 16362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 16363 $as_echo_n "checking for $ac_word... " >&6; } 16364 if ${ac_cv_path_JTREGEXE+:} false; then : 16365 $as_echo_n "(cached) " >&6 16366 else 16367 case $JTREGEXE in 16368 [\\/]* | ?:[\\/]*) 16369 ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path. 16370 ;; 16371 *) 16372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 16373 for as_dir in $PATH 16374 do 16375 IFS=$as_save_IFS 16376 test -z "$as_dir" && as_dir=. 16377 for ac_exec_ext in '' $ac_executable_extensions; do 16378 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 16379 ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext" 16380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 16381 break 2 16382 fi 16383 done 16384 done 16385 IFS=$as_save_IFS 16386 16387 ;; 16388 esac 16389 fi 16390 JTREGEXE=$ac_cv_path_JTREGEXE 16391 if test -n "$JTREGEXE"; then 16392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 16393 $as_echo "$JTREGEXE" >&6; } 16394 else 16395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16396 $as_echo "no" >&6; } 16397 fi 16398 16399 16400 test -n "$JTREGEXE" && break 16401 done 16402 16403 16404 if test "x$JTREGEXE" = x; then 16405 if test "xjtreg" = x; then 16406 PROG_NAME=jtregexe 16407 else 16408 PROG_NAME=jtreg 16409 fi 16410 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 16411 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 16412 as_fn_error $? "Cannot continue" "$LINENO" 5 16413 fi 16414 16415 16416 JT_HOME="`$DIRNAME $JTREGEXE`" 16417 fi 16418 fi 16419 16420 16421 16422 16423 16424 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 16425 16426 # Store path to cygwin link.exe to help excluding it when searching for 16427 # VS linker. This must be done before changing the PATH when looking for VS. 16428 # Extract the first word of "link", so it can be a program name with args. 16429 set dummy link; ac_word=$2 16430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 16431 $as_echo_n "checking for $ac_word... " >&6; } 16432 if ${ac_cv_path_CYGWIN_LINK+:} false; then : 16433 $as_echo_n "(cached) " >&6 16434 else 16435 case $CYGWIN_LINK in 16436 [\\/]* | ?:[\\/]*) 16437 ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path. 16438 ;; 16439 *) 16440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 16441 for as_dir in $PATH 16442 do 16443 IFS=$as_save_IFS 16444 test -z "$as_dir" && as_dir=. 16445 for ac_exec_ext in '' $ac_executable_extensions; do 16446 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 16447 ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext" 16448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 16449 break 2 16450 fi 16451 done 16452 done 16453 IFS=$as_save_IFS 16454 16455 ;; 16456 esac 16457 fi 16458 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK 16459 if test -n "$CYGWIN_LINK"; then 16460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5 16461 $as_echo "$CYGWIN_LINK" >&6; } 16462 else 16463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16464 $as_echo "no" >&6; } 16465 fi 16466 16467 16468 if test "x$CYGWIN_LINK" != x; then 16469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5 16470 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; } 16471 "$CYGWIN_LINK" --version > /dev/null 16472 if test $? -eq 0 ; then 16473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 16474 $as_echo "yes" >&6; } 16475 else 16476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16477 $as_echo "no" >&6; } 16478 # This might be the VS linker. Don't exclude it later on. 16479 CYGWIN_LINK="" 16480 fi 16481 fi 16482 16483 # First-hand choice is to locate and run the vsvars bat file. 16484 16485 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16486 VCVARSFILE="vc/bin/vcvars32.bat" 16487 else 16488 VCVARSFILE="vc/bin/amd64/vcvars64.bat" 16489 fi 16490 16491 VS_ENV_CMD="" 16492 VS_ENV_ARGS="" 16493 if test "x$with_toolsdir" != x; then 16494 16495 if test "x$VS_ENV_CMD" = x; then 16496 VS100BASE="$with_toolsdir/../.." 16497 METHOD="--with-tools-dir" 16498 16499 windows_path="$VS100BASE" 16500 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16501 unix_path=`$CYGPATH -u "$windows_path"` 16502 VS100BASE="$unix_path" 16503 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16504 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16505 VS100BASE="$unix_path" 16506 fi 16507 16508 if test -d "$VS100BASE"; then 16509 if test -f "$VS100BASE/$VCVARSFILE"; then 16510 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16511 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16512 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16513 else 16514 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16515 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16516 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16517 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16518 fi 16519 fi 16520 fi 16521 16522 fi 16523 16524 if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then 16525 # Having specified an argument which is incorrect will produce an instant failure; 16526 # we should not go on looking 16527 { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5 16528 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;} 16529 { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5 16530 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;} 16531 as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5 16532 fi 16533 16534 if test "x$VS100COMNTOOLS" != x; then 16535 16536 if test "x$VS_ENV_CMD" = x; then 16537 VS100BASE="$VS100COMNTOOLS/../.." 16538 METHOD="VS100COMNTOOLS variable" 16539 16540 windows_path="$VS100BASE" 16541 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16542 unix_path=`$CYGPATH -u "$windows_path"` 16543 VS100BASE="$unix_path" 16544 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16545 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16546 VS100BASE="$unix_path" 16547 fi 16548 16549 if test -d "$VS100BASE"; then 16550 if test -f "$VS100BASE/$VCVARSFILE"; then 16551 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16552 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16553 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16554 else 16555 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16556 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16557 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16558 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16559 fi 16560 fi 16561 fi 16562 16563 fi 16564 if test "x$PROGRAMFILES" != x; then 16565 16566 if test "x$VS_ENV_CMD" = x; then 16567 VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0" 16568 METHOD="well-known name" 16569 16570 windows_path="$VS100BASE" 16571 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16572 unix_path=`$CYGPATH -u "$windows_path"` 16573 VS100BASE="$unix_path" 16574 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16575 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16576 VS100BASE="$unix_path" 16577 fi 16578 16579 if test -d "$VS100BASE"; then 16580 if test -f "$VS100BASE/$VCVARSFILE"; then 16581 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16582 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16583 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16584 else 16585 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16586 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16587 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16588 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16589 fi 16590 fi 16591 fi 16592 16593 fi 16594 16595 if test "x$VS_ENV_CMD" = x; then 16596 VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0" 16597 METHOD="well-known name" 16598 16599 windows_path="$VS100BASE" 16600 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16601 unix_path=`$CYGPATH -u "$windows_path"` 16602 VS100BASE="$unix_path" 16603 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16604 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16605 VS100BASE="$unix_path" 16606 fi 16607 16608 if test -d "$VS100BASE"; then 16609 if test -f "$VS100BASE/$VCVARSFILE"; then 16610 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16611 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16612 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16613 else 16614 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16615 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16616 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16617 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16618 fi 16619 fi 16620 fi 16621 16622 16623 if test "x$VS_ENV_CMD" = x; then 16624 VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0" 16625 METHOD="well-known name" 16626 16627 windows_path="$VS100BASE" 16628 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16629 unix_path=`$CYGPATH -u "$windows_path"` 16630 VS100BASE="$unix_path" 16631 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16632 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16633 VS100BASE="$unix_path" 16634 fi 16635 16636 if test -d "$VS100BASE"; then 16637 if test -f "$VS100BASE/$VCVARSFILE"; then 16638 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16639 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16640 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16641 else 16642 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16643 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16644 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16645 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16646 fi 16647 fi 16648 fi 16649 16650 16651 if test "x$ProgramW6432" != x; then 16652 16653 if test "x$VS_ENV_CMD" = x; then 16654 WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin" 16655 METHOD="well-known name" 16656 16657 windows_path="$WIN_SDK_BASE" 16658 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16659 unix_path=`$CYGPATH -u "$windows_path"` 16660 WIN_SDK_BASE="$unix_path" 16661 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16662 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16663 WIN_SDK_BASE="$unix_path" 16664 fi 16665 16666 if test -d "$WIN_SDK_BASE"; then 16667 # There have been cases of partial or broken SDK installations. A missing 16668 # lib dir is not going to work. 16669 if test ! -d "$WIN_SDK_BASE/../lib"; then 16670 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16671 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16672 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16673 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16674 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16675 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16676 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16677 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16678 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16679 VS_ENV_ARGS="/x86" 16680 else 16681 VS_ENV_ARGS="/x64" 16682 fi 16683 else 16684 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16685 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16686 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16687 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16688 fi 16689 fi 16690 fi 16691 16692 fi 16693 if test "x$PROGRAMW6432" != x; then 16694 16695 if test "x$VS_ENV_CMD" = x; then 16696 WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin" 16697 METHOD="well-known name" 16698 16699 windows_path="$WIN_SDK_BASE" 16700 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16701 unix_path=`$CYGPATH -u "$windows_path"` 16702 WIN_SDK_BASE="$unix_path" 16703 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16704 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16705 WIN_SDK_BASE="$unix_path" 16706 fi 16707 16708 if test -d "$WIN_SDK_BASE"; then 16709 # There have been cases of partial or broken SDK installations. A missing 16710 # lib dir is not going to work. 16711 if test ! -d "$WIN_SDK_BASE/../lib"; then 16712 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16713 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16714 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16715 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16716 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16717 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16718 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16719 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16720 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16721 VS_ENV_ARGS="/x86" 16722 else 16723 VS_ENV_ARGS="/x64" 16724 fi 16725 else 16726 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16727 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16728 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16729 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16730 fi 16731 fi 16732 fi 16733 16734 fi 16735 if test "x$PROGRAMFILES" != x; then 16736 16737 if test "x$VS_ENV_CMD" = x; then 16738 WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin" 16739 METHOD="well-known name" 16740 16741 windows_path="$WIN_SDK_BASE" 16742 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16743 unix_path=`$CYGPATH -u "$windows_path"` 16744 WIN_SDK_BASE="$unix_path" 16745 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16746 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16747 WIN_SDK_BASE="$unix_path" 16748 fi 16749 16750 if test -d "$WIN_SDK_BASE"; then 16751 # There have been cases of partial or broken SDK installations. A missing 16752 # lib dir is not going to work. 16753 if test ! -d "$WIN_SDK_BASE/../lib"; then 16754 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16755 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16756 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16757 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16758 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16759 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16760 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16761 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16762 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16763 VS_ENV_ARGS="/x86" 16764 else 16765 VS_ENV_ARGS="/x64" 16766 fi 16767 else 16768 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16769 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16770 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16771 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16772 fi 16773 fi 16774 fi 16775 16776 fi 16777 16778 if test "x$VS_ENV_CMD" = x; then 16779 WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin" 16780 METHOD="well-known name" 16781 16782 windows_path="$WIN_SDK_BASE" 16783 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16784 unix_path=`$CYGPATH -u "$windows_path"` 16785 WIN_SDK_BASE="$unix_path" 16786 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16787 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16788 WIN_SDK_BASE="$unix_path" 16789 fi 16790 16791 if test -d "$WIN_SDK_BASE"; then 16792 # There have been cases of partial or broken SDK installations. A missing 16793 # lib dir is not going to work. 16794 if test ! -d "$WIN_SDK_BASE/../lib"; then 16795 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16796 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16797 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16798 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16799 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16800 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16801 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16802 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16803 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16804 VS_ENV_ARGS="/x86" 16805 else 16806 VS_ENV_ARGS="/x64" 16807 fi 16808 else 16809 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16810 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16811 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16812 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16813 fi 16814 fi 16815 fi 16816 16817 16818 if test "x$VS_ENV_CMD" = x; then 16819 WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin" 16820 METHOD="well-known name" 16821 16822 windows_path="$WIN_SDK_BASE" 16823 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16824 unix_path=`$CYGPATH -u "$windows_path"` 16825 WIN_SDK_BASE="$unix_path" 16826 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16827 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16828 WIN_SDK_BASE="$unix_path" 16829 fi 16830 16831 if test -d "$WIN_SDK_BASE"; then 16832 # There have been cases of partial or broken SDK installations. A missing 16833 # lib dir is not going to work. 16834 if test ! -d "$WIN_SDK_BASE/../lib"; then 16835 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16836 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16837 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16838 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16839 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16840 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16841 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16842 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16843 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16844 VS_ENV_ARGS="/x86" 16845 else 16846 VS_ENV_ARGS="/x64" 16847 fi 16848 else 16849 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16850 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16851 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16852 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16853 fi 16854 fi 16855 fi 16856 16857 16858 if test "x$VS_ENV_CMD" != x; then 16859 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file. 16860 16861 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16862 16863 # First separate the path from the arguments. This will split at the first 16864 # space. 16865 complete="$VS_ENV_CMD" 16866 path="${complete%% *}" 16867 tmp="$complete EOL" 16868 arguments="${tmp#* }" 16869 16870 # Input might be given as Windows format, start by converting to 16871 # unix format. 16872 new_path=`$CYGPATH -u "$path"` 16873 16874 # Now try to locate executable using which 16875 new_path=`$WHICH "$new_path" 2> /dev/null` 16876 # bat and cmd files are not always considered executable in cygwin causing which 16877 # to not find them 16878 if test "x$new_path" = x \ 16879 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 16880 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 16881 new_path=`$CYGPATH -u "$path"` 16882 fi 16883 if test "x$new_path" = x; then 16884 # Oops. Which didn't find the executable. 16885 # The splitting of arguments from the executable at a space might have been incorrect, 16886 # since paths with space are more likely in Windows. Give it another try with the whole 16887 # argument. 16888 path="$complete" 16889 arguments="EOL" 16890 new_path=`$CYGPATH -u "$path"` 16891 new_path=`$WHICH "$new_path" 2> /dev/null` 16892 # bat and cmd files are not always considered executable in cygwin causing which 16893 # to not find them 16894 if test "x$new_path" = x \ 16895 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 16896 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 16897 new_path=`$CYGPATH -u "$path"` 16898 fi 16899 if test "x$new_path" = x; then 16900 # It's still not found. Now this is an unrecoverable error. 16901 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 16902 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 16903 has_space=`$ECHO "$complete" | $GREP " "` 16904 if test "x$has_space" != x; then 16905 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 16906 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 16907 fi 16908 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16909 fi 16910 fi 16911 16912 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 16913 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 16914 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 16915 # "foo.exe" is OK but "foo" is an error. 16916 # 16917 # This test is therefore slightly more accurate than "test -f" to check for file precense. 16918 # It is also a way to make sure we got the proper file name for the real test later on. 16919 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 16920 if test "x$test_shortpath" = x; then 16921 # Short path failed, file does not exist as specified. 16922 # Try adding .exe or .cmd 16923 if test -f "${new_path}.exe"; then 16924 input_to_shortpath="${new_path}.exe" 16925 elif test -f "${new_path}.cmd"; then 16926 input_to_shortpath="${new_path}.cmd" 16927 else 16928 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5 16929 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;} 16930 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 16931 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 16932 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16933 fi 16934 else 16935 input_to_shortpath="$new_path" 16936 fi 16937 16938 # Call helper function which possibly converts this using DOS-style short mode. 16939 # If so, the updated path is stored in $new_path. 16940 new_path="$input_to_shortpath" 16941 16942 input_path="$input_to_shortpath" 16943 # Check if we need to convert this using DOS-style short mode. If the path 16944 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16945 # take no chances and rewrite it. 16946 # Note: m4 eats our [], so we need to use [ and ] instead. 16947 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 16948 if test "x$has_forbidden_chars" != x; then 16949 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16950 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 16951 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 16952 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 16953 # Going to short mode and back again did indeed matter. Since short mode is 16954 # case insensitive, let's make it lowercase to improve readability. 16955 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16956 # Now convert it back to Unix-stile (cygpath) 16957 input_path=`$CYGPATH -u "$shortmode_path"` 16958 new_path="$input_path" 16959 fi 16960 fi 16961 16962 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 16963 if test "x$test_cygdrive_prefix" = x; then 16964 # As a simple fix, exclude /usr/bin since it's not a real path. 16965 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 16966 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 16967 # a path prefixed by /cygdrive for fixpath to work. 16968 new_path="$CYGWIN_ROOT_PATH$input_path" 16969 fi 16970 fi 16971 16972 # remove trailing .exe if any 16973 new_path="${new_path/%.exe/}" 16974 16975 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16976 16977 # First separate the path from the arguments. This will split at the first 16978 # space. 16979 complete="$VS_ENV_CMD" 16980 path="${complete%% *}" 16981 tmp="$complete EOL" 16982 arguments="${tmp#* }" 16983 16984 # Input might be given as Windows format, start by converting to 16985 # unix format. 16986 new_path="$path" 16987 16988 windows_path="$new_path" 16989 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16990 unix_path=`$CYGPATH -u "$windows_path"` 16991 new_path="$unix_path" 16992 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16993 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16994 new_path="$unix_path" 16995 fi 16996 16997 16998 # Now try to locate executable using which 16999 new_path=`$WHICH "$new_path" 2> /dev/null` 17000 17001 if test "x$new_path" = x; then 17002 # Oops. Which didn't find the executable. 17003 # The splitting of arguments from the executable at a space might have been incorrect, 17004 # since paths with space are more likely in Windows. Give it another try with the whole 17005 # argument. 17006 path="$complete" 17007 arguments="EOL" 17008 new_path="$path" 17009 17010 windows_path="$new_path" 17011 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17012 unix_path=`$CYGPATH -u "$windows_path"` 17013 new_path="$unix_path" 17014 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17015 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17016 new_path="$unix_path" 17017 fi 17018 17019 17020 new_path=`$WHICH "$new_path" 2> /dev/null` 17021 17022 if test "x$new_path" = x; then 17023 # It's still not found. Now this is an unrecoverable error. 17024 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 17025 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 17026 has_space=`$ECHO "$complete" | $GREP " "` 17027 if test "x$has_space" != x; then 17028 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17029 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17030 fi 17031 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 17032 fi 17033 fi 17034 17035 # Now new_path has a complete unix path to the binary 17036 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 17037 # Keep paths in /bin as-is, but remove trailing .exe if any 17038 new_path="${new_path/%.exe/}" 17039 # Do not save /bin paths to all_fixpath_prefixes! 17040 else 17041 # Not in mixed or Windows style, start by that. 17042 new_path=`cmd //c echo $new_path` 17043 17044 input_path="$new_path" 17045 # Check if we need to convert this using DOS-style short mode. If the path 17046 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17047 # take no chances and rewrite it. 17048 # Note: m4 eats our [], so we need to use [ and ] instead. 17049 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17050 if test "x$has_forbidden_chars" != x; then 17051 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17052 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17053 fi 17054 17055 # Output is in $new_path 17056 17057 windows_path="$new_path" 17058 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17059 unix_path=`$CYGPATH -u "$windows_path"` 17060 new_path="$unix_path" 17061 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17062 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17063 new_path="$unix_path" 17064 fi 17065 17066 # remove trailing .exe if any 17067 new_path="${new_path/%.exe/}" 17068 17069 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17070 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17071 fi 17072 17073 else 17074 # We're on a posix platform. Hooray! :) 17075 # First separate the path from the arguments. This will split at the first 17076 # space. 17077 complete="$VS_ENV_CMD" 17078 path="${complete%% *}" 17079 tmp="$complete EOL" 17080 arguments="${tmp#* }" 17081 17082 # Cannot rely on the command "which" here since it doesn't always work. 17083 is_absolute_path=`$ECHO "$path" | $GREP ^/` 17084 if test -z "$is_absolute_path"; then 17085 # Path to executable is not absolute. Find it. 17086 IFS_save="$IFS" 17087 IFS=: 17088 for p in $PATH; do 17089 if test -f "$p/$path" && test -x "$p/$path"; then 17090 new_path="$p/$path" 17091 break 17092 fi 17093 done 17094 IFS="$IFS_save" 17095 else 17096 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5 17097 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;} 17098 new_path="$path" 17099 fi 17100 17101 if test "x$new_path" = x; then 17102 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 17103 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 17104 has_space=`$ECHO "$complete" | $GREP " "` 17105 if test "x$has_space" != x; then 17106 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 17107 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 17108 fi 17109 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 17110 fi 17111 fi 17112 17113 # Now join together the path and the arguments once again 17114 if test "x$arguments" != xEOL; then 17115 new_complete="$new_path ${arguments% *}" 17116 else 17117 new_complete="$new_path" 17118 fi 17119 17120 if test "x$complete" != "x$new_complete"; then 17121 VS_ENV_CMD="$new_complete" 17122 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5 17123 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;} 17124 fi 17125 17126 17127 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat 17128 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5 17129 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;} 17130 cd $OUTPUT_ROOT 17131 # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted 17132 # to autoconf standards. 17133 17134 #---- 17135 17136 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment) 17137 # but calculate the difference in Cygwin environment before/after running it and then 17138 # apply the diff. 17139 17140 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 17141 _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"` 17142 _dosvs10varsall=`cygpath -a -w -s $_vs10varsall` 17143 _dosbash=`cygpath -a -w -s \`which bash\`.*` 17144 else 17145 _dosvs10varsall=`cmd //c echo $VS_ENV_CMD` 17146 _dosbash=`cmd //c echo \`which bash\`` 17147 fi 17148 17149 # generate the set of exported vars before/after the vs10 setup 17150 $ECHO "@echo off" > localdevenvtmp.bat 17151 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat 17152 $ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat 17153 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat 17154 17155 # Now execute the newly created bat file. 17156 # The | cat is to stop SetEnv.Cmd to mess with system colors on msys 17157 cmd /c localdevenvtmp.bat | cat 17158 17159 # apply the diff (less some non-vs10 vars named by "!") 17160 $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort 17161 $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort 17162 $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh 17163 17164 # cleanup 17165 $RM localdevenvtmp* 17166 #---- 17167 cd $CURDIR 17168 if test ! -s $OUTPUT_ROOT/localdevenv.sh; then 17169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17170 $as_echo "no" >&6; } 17171 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5 17172 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;} 17173 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 17174 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} 17175 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 17176 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} 17177 as_fn_error $? "Cannot continue" "$LINENO" 5 17178 fi 17179 17180 # Now set all paths and other env variables. This will allow the rest of 17181 # the configure script to find and run the compiler in the proper way. 17182 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5 17183 $as_echo "$as_me: Setting extracted environment variables" >&6;} 17184 . $OUTPUT_ROOT/localdevenv.sh 17185 else 17186 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. 17187 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5 17188 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;} 17189 fi 17190 17191 # At this point, we should have corrent variables in the environment, or we can't continue. 17192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5 17193 $as_echo_n "checking for Visual Studio variables... " >&6; } 17194 17195 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then 17196 if test "x$INCLUDE" = x || test "x$LIB" = x; then 17197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5 17198 $as_echo "present but broken" >&6; } 17199 as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5 17200 else 17201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 17202 $as_echo "ok" >&6; } 17203 # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk. 17204 VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'` 17205 VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'` 17206 VS_PATH="$PATH" 17207 17208 17209 17210 fi 17211 else 17212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 17213 $as_echo "not found" >&6; } 17214 17215 if test "x$VS_ENV_CMD" = x; then 17216 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5 17217 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;} 17218 { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5 17219 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;} 17220 else 17221 { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5 17222 $as_echo "$as_me: Running the extraction script failed." >&6;} 17223 fi 17224 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 17225 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} 17226 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 17227 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} 17228 as_fn_error $? "Cannot continue" "$LINENO" 5 17229 fi 17230 17231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 17232 $as_echo_n "checking for msvcr100.dll... " >&6; } 17233 17234 # Check whether --with-msvcr-dll was given. 17235 if test "${with_msvcr_dll+set}" = set; then : 17236 withval=$with_msvcr_dll; 17237 fi 17238 17239 if test "x$with_msvcr_dll" != x; then 17240 MSVCR_DLL="$with_msvcr_dll" 17241 else 17242 if test "x$VCINSTALLDIR" != x; then 17243 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 17244 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1` 17245 else 17246 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1` 17247 if test "x$MSVCR_DLL" = x; then 17248 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1` 17249 fi 17250 fi 17251 if test "x$MSVCR_DLL" != x; then 17252 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5 17253 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;} 17254 else 17255 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5 17256 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;} 17257 fi 17258 fi 17259 # Try some fallback alternatives 17260 if test "x$MSVCR_DLL" = x; then 17261 # If visual studio express is installed, there is usually one with the debugger 17262 if test "x$VS100COMNTOOLS" != x; then 17263 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 17264 MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1` 17265 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5 17266 $as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;} 17267 fi 17268 fi 17269 fi 17270 if test "x$MSVCR_DLL" = x; then 17271 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 17272 # Fallback for 32bit builds, look in the windows directory. 17273 if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then 17274 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5 17275 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;} 17276 MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll" 17277 fi 17278 fi 17279 fi 17280 fi 17281 if test "x$MSVCR_DLL" = x; then 17282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17283 $as_echo "no" >&6; } 17284 as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5 17285 fi 17286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 17287 $as_echo "$MSVCR_DLL" >&6; } 17288 17289 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17290 17291 # Input might be given as Windows format, start by converting to 17292 # unix format. 17293 path="$MSVCR_DLL" 17294 new_path=`$CYGPATH -u "$path"` 17295 17296 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17297 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17298 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17299 # "foo.exe" is OK but "foo" is an error. 17300 # 17301 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17302 # It is also a way to make sure we got the proper file name for the real test later on. 17303 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17304 if test "x$test_shortpath" = x; then 17305 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 17306 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} 17307 as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5 17308 fi 17309 17310 # Call helper function which possibly converts this using DOS-style short mode. 17311 # If so, the updated path is stored in $new_path. 17312 17313 input_path="$new_path" 17314 # Check if we need to convert this using DOS-style short mode. If the path 17315 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17316 # take no chances and rewrite it. 17317 # Note: m4 eats our [], so we need to use [ and ] instead. 17318 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17319 if test "x$has_forbidden_chars" != x; then 17320 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17321 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17322 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17323 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17324 # Going to short mode and back again did indeed matter. Since short mode is 17325 # case insensitive, let's make it lowercase to improve readability. 17326 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17327 # Now convert it back to Unix-stile (cygpath) 17328 input_path=`$CYGPATH -u "$shortmode_path"` 17329 new_path="$input_path" 17330 fi 17331 fi 17332 17333 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17334 if test "x$test_cygdrive_prefix" = x; then 17335 # As a simple fix, exclude /usr/bin since it's not a real path. 17336 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17337 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17338 # a path prefixed by /cygdrive for fixpath to work. 17339 new_path="$CYGWIN_ROOT_PATH$input_path" 17340 fi 17341 fi 17342 17343 17344 if test "x$path" != "x$new_path"; then 17345 MSVCR_DLL="$new_path" 17346 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 17347 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} 17348 fi 17349 17350 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17351 17352 path="$MSVCR_DLL" 17353 has_colon=`$ECHO $path | $GREP ^.:` 17354 new_path="$path" 17355 if test "x$has_colon" = x; then 17356 # Not in mixed or Windows style, start by that. 17357 new_path=`cmd //c echo $path` 17358 fi 17359 17360 17361 input_path="$new_path" 17362 # Check if we need to convert this using DOS-style short mode. If the path 17363 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17364 # take no chances and rewrite it. 17365 # Note: m4 eats our [], so we need to use [ and ] instead. 17366 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17367 if test "x$has_forbidden_chars" != x; then 17368 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17369 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17370 fi 17371 17372 17373 windows_path="$new_path" 17374 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17375 unix_path=`$CYGPATH -u "$windows_path"` 17376 new_path="$unix_path" 17377 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17378 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17379 new_path="$unix_path" 17380 fi 17381 17382 if test "x$path" != "x$new_path"; then 17383 MSVCR_DLL="$new_path" 17384 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 17385 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} 17386 fi 17387 17388 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17389 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17390 17391 else 17392 # We're on a posix platform. Hooray! :) 17393 path="$MSVCR_DLL" 17394 has_space=`$ECHO "$path" | $GREP " "` 17395 if test "x$has_space" != x; then 17396 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 17397 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} 17398 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17399 fi 17400 17401 # Use eval to expand a potential ~ 17402 eval path="$path" 17403 if test ! -f "$path" && test ! -d "$path"; then 17404 as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 17405 fi 17406 17407 MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`" 17408 fi 17409 17410 17411 17412 17413 # Check whether --with-dxsdk was given. 17414 if test "${with_dxsdk+set}" = set; then : 17415 withval=$with_dxsdk; 17416 fi 17417 17418 17419 # Check whether --with-dxsdk-lib was given. 17420 if test "${with_dxsdk_lib+set}" = set; then : 17421 withval=$with_dxsdk_lib; 17422 fi 17423 17424 17425 # Check whether --with-dxsdk-include was given. 17426 if test "${with_dxsdk_include+set}" = set; then : 17427 withval=$with_dxsdk_include; 17428 fi 17429 17430 17431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5 17432 $as_echo_n "checking for DirectX SDK... " >&6; } 17433 17434 if test "x$with_dxsdk" != x; then 17435 dxsdk_path="$with_dxsdk" 17436 elif test "x$DXSDK_DIR" != x; then 17437 dxsdk_path="$DXSDK_DIR" 17438 elif test -d "C:/DXSDK"; then 17439 dxsdk_path="C:/DXSDK" 17440 else 17441 as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5 17442 fi 17443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5 17444 $as_echo "$dxsdk_path" >&6; } 17445 17446 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17447 17448 # Input might be given as Windows format, start by converting to 17449 # unix format. 17450 path="$dxsdk_path" 17451 new_path=`$CYGPATH -u "$path"` 17452 17453 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17454 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17455 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17456 # "foo.exe" is OK but "foo" is an error. 17457 # 17458 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17459 # It is also a way to make sure we got the proper file name for the real test later on. 17460 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17461 if test "x$test_shortpath" = x; then 17462 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5 17463 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;} 17464 as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5 17465 fi 17466 17467 # Call helper function which possibly converts this using DOS-style short mode. 17468 # If so, the updated path is stored in $new_path. 17469 17470 input_path="$new_path" 17471 # Check if we need to convert this using DOS-style short mode. If the path 17472 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17473 # take no chances and rewrite it. 17474 # Note: m4 eats our [], so we need to use [ and ] instead. 17475 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17476 if test "x$has_forbidden_chars" != x; then 17477 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17478 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17479 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17480 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17481 # Going to short mode and back again did indeed matter. Since short mode is 17482 # case insensitive, let's make it lowercase to improve readability. 17483 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17484 # Now convert it back to Unix-stile (cygpath) 17485 input_path=`$CYGPATH -u "$shortmode_path"` 17486 new_path="$input_path" 17487 fi 17488 fi 17489 17490 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17491 if test "x$test_cygdrive_prefix" = x; then 17492 # As a simple fix, exclude /usr/bin since it's not a real path. 17493 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17494 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17495 # a path prefixed by /cygdrive for fixpath to work. 17496 new_path="$CYGWIN_ROOT_PATH$input_path" 17497 fi 17498 fi 17499 17500 17501 if test "x$path" != "x$new_path"; then 17502 dxsdk_path="$new_path" 17503 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5 17504 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;} 17505 fi 17506 17507 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17508 17509 path="$dxsdk_path" 17510 has_colon=`$ECHO $path | $GREP ^.:` 17511 new_path="$path" 17512 if test "x$has_colon" = x; then 17513 # Not in mixed or Windows style, start by that. 17514 new_path=`cmd //c echo $path` 17515 fi 17516 17517 17518 input_path="$new_path" 17519 # Check if we need to convert this using DOS-style short mode. If the path 17520 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17521 # take no chances and rewrite it. 17522 # Note: m4 eats our [], so we need to use [ and ] instead. 17523 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17524 if test "x$has_forbidden_chars" != x; then 17525 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17526 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17527 fi 17528 17529 17530 windows_path="$new_path" 17531 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17532 unix_path=`$CYGPATH -u "$windows_path"` 17533 new_path="$unix_path" 17534 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17535 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17536 new_path="$unix_path" 17537 fi 17538 17539 if test "x$path" != "x$new_path"; then 17540 dxsdk_path="$new_path" 17541 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5 17542 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;} 17543 fi 17544 17545 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17546 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17547 17548 else 17549 # We're on a posix platform. Hooray! :) 17550 path="$dxsdk_path" 17551 has_space=`$ECHO "$path" | $GREP " "` 17552 if test "x$has_space" != x; then 17553 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5 17554 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;} 17555 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17556 fi 17557 17558 # Use eval to expand a potential ~ 17559 eval path="$path" 17560 if test ! -f "$path" && test ! -d "$path"; then 17561 as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5 17562 fi 17563 17564 dxsdk_path="`cd "$path"; $THEPWDCMD -L`" 17565 fi 17566 17567 17568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5 17569 $as_echo_n "checking for DirectX SDK lib dir... " >&6; } 17570 if test "x$with_dxsdk_lib" != x; then 17571 DXSDK_LIB_PATH="$with_dxsdk_lib" 17572 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 17573 DXSDK_LIB_PATH="$dxsdk_path/Lib/x64" 17574 else 17575 DXSDK_LIB_PATH="$dxsdk_path/Lib" 17576 fi 17577 # dsound.lib is linked to in jsoundds 17578 if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then 17579 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5 17580 fi 17581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5 17582 $as_echo "$DXSDK_LIB_PATH" >&6; } 17583 17584 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17585 17586 # Input might be given as Windows format, start by converting to 17587 # unix format. 17588 path="$DXSDK_LIB_PATH" 17589 new_path=`$CYGPATH -u "$path"` 17590 17591 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17592 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17593 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17594 # "foo.exe" is OK but "foo" is an error. 17595 # 17596 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17597 # It is also a way to make sure we got the proper file name for the real test later on. 17598 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17599 if test "x$test_shortpath" = x; then 17600 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5 17601 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 17602 as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5 17603 fi 17604 17605 # Call helper function which possibly converts this using DOS-style short mode. 17606 # If so, the updated path is stored in $new_path. 17607 17608 input_path="$new_path" 17609 # Check if we need to convert this using DOS-style short mode. If the path 17610 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17611 # take no chances and rewrite it. 17612 # Note: m4 eats our [], so we need to use [ and ] instead. 17613 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17614 if test "x$has_forbidden_chars" != x; then 17615 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17616 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17617 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17618 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17619 # Going to short mode and back again did indeed matter. Since short mode is 17620 # case insensitive, let's make it lowercase to improve readability. 17621 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17622 # Now convert it back to Unix-stile (cygpath) 17623 input_path=`$CYGPATH -u "$shortmode_path"` 17624 new_path="$input_path" 17625 fi 17626 fi 17627 17628 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17629 if test "x$test_cygdrive_prefix" = x; then 17630 # As a simple fix, exclude /usr/bin since it's not a real path. 17631 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17632 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17633 # a path prefixed by /cygdrive for fixpath to work. 17634 new_path="$CYGWIN_ROOT_PATH$input_path" 17635 fi 17636 fi 17637 17638 17639 if test "x$path" != "x$new_path"; then 17640 DXSDK_LIB_PATH="$new_path" 17641 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5 17642 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;} 17643 fi 17644 17645 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17646 17647 path="$DXSDK_LIB_PATH" 17648 has_colon=`$ECHO $path | $GREP ^.:` 17649 new_path="$path" 17650 if test "x$has_colon" = x; then 17651 # Not in mixed or Windows style, start by that. 17652 new_path=`cmd //c echo $path` 17653 fi 17654 17655 17656 input_path="$new_path" 17657 # Check if we need to convert this using DOS-style short mode. If the path 17658 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17659 # take no chances and rewrite it. 17660 # Note: m4 eats our [], so we need to use [ and ] instead. 17661 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17662 if test "x$has_forbidden_chars" != x; then 17663 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17664 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17665 fi 17666 17667 17668 windows_path="$new_path" 17669 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17670 unix_path=`$CYGPATH -u "$windows_path"` 17671 new_path="$unix_path" 17672 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17673 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17674 new_path="$unix_path" 17675 fi 17676 17677 if test "x$path" != "x$new_path"; then 17678 DXSDK_LIB_PATH="$new_path" 17679 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5 17680 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;} 17681 fi 17682 17683 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17684 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17685 17686 else 17687 # We're on a posix platform. Hooray! :) 17688 path="$DXSDK_LIB_PATH" 17689 has_space=`$ECHO "$path" | $GREP " "` 17690 if test "x$has_space" != x; then 17691 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5 17692 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 17693 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17694 fi 17695 17696 # Use eval to expand a potential ~ 17697 eval path="$path" 17698 if test ! -f "$path" && test ! -d "$path"; then 17699 as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 17700 fi 17701 17702 DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 17703 fi 17704 17705 17706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5 17707 $as_echo_n "checking for DirectX SDK include dir... " >&6; } 17708 if test "x$with_dxsdk_include" != x; then 17709 DXSDK_INCLUDE_PATH="$with_dxsdk_include" 17710 else 17711 DXSDK_INCLUDE_PATH="$dxsdk_path/Include" 17712 fi 17713 # dsound.h is included in jsoundds 17714 if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then 17715 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5 17716 fi 17717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5 17718 $as_echo "$DXSDK_INCLUDE_PATH" >&6; } 17719 17720 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17721 17722 # Input might be given as Windows format, start by converting to 17723 # unix format. 17724 path="$DXSDK_INCLUDE_PATH" 17725 new_path=`$CYGPATH -u "$path"` 17726 17727 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17728 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17729 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17730 # "foo.exe" is OK but "foo" is an error. 17731 # 17732 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17733 # It is also a way to make sure we got the proper file name for the real test later on. 17734 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17735 if test "x$test_shortpath" = x; then 17736 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 17737 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 17738 as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5 17739 fi 17740 17741 # Call helper function which possibly converts this using DOS-style short mode. 17742 # If so, the updated path is stored in $new_path. 17743 17744 input_path="$new_path" 17745 # Check if we need to convert this using DOS-style short mode. If the path 17746 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17747 # take no chances and rewrite it. 17748 # Note: m4 eats our [], so we need to use [ and ] instead. 17749 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17750 if test "x$has_forbidden_chars" != x; then 17751 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17752 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17753 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17754 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17755 # Going to short mode and back again did indeed matter. Since short mode is 17756 # case insensitive, let's make it lowercase to improve readability. 17757 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17758 # Now convert it back to Unix-stile (cygpath) 17759 input_path=`$CYGPATH -u "$shortmode_path"` 17760 new_path="$input_path" 17761 fi 17762 fi 17763 17764 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17765 if test "x$test_cygdrive_prefix" = x; then 17766 # As a simple fix, exclude /usr/bin since it's not a real path. 17767 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17768 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17769 # a path prefixed by /cygdrive for fixpath to work. 17770 new_path="$CYGWIN_ROOT_PATH$input_path" 17771 fi 17772 fi 17773 17774 17775 if test "x$path" != "x$new_path"; then 17776 DXSDK_INCLUDE_PATH="$new_path" 17777 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5 17778 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;} 17779 fi 17780 17781 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17782 17783 path="$DXSDK_INCLUDE_PATH" 17784 has_colon=`$ECHO $path | $GREP ^.:` 17785 new_path="$path" 17786 if test "x$has_colon" = x; then 17787 # Not in mixed or Windows style, start by that. 17788 new_path=`cmd //c echo $path` 17789 fi 17790 17791 17792 input_path="$new_path" 17793 # Check if we need to convert this using DOS-style short mode. If the path 17794 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17795 # take no chances and rewrite it. 17796 # Note: m4 eats our [], so we need to use [ and ] instead. 17797 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17798 if test "x$has_forbidden_chars" != x; then 17799 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17800 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17801 fi 17802 17803 17804 windows_path="$new_path" 17805 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17806 unix_path=`$CYGPATH -u "$windows_path"` 17807 new_path="$unix_path" 17808 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17809 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17810 new_path="$unix_path" 17811 fi 17812 17813 if test "x$path" != "x$new_path"; then 17814 DXSDK_INCLUDE_PATH="$new_path" 17815 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5 17816 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;} 17817 fi 17818 17819 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17820 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17821 17822 else 17823 # We're on a posix platform. Hooray! :) 17824 path="$DXSDK_INCLUDE_PATH" 17825 has_space=`$ECHO "$path" | $GREP " "` 17826 if test "x$has_space" != x; then 17827 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 17828 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 17829 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17830 fi 17831 17832 # Use eval to expand a potential ~ 17833 eval path="$path" 17834 if test ! -f "$path" && test ! -d "$path"; then 17835 as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 17836 fi 17837 17838 DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 17839 fi 17840 17841 17842 17843 17844 LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH" 17845 17846 fi 17847 17848 17849 17850 # If --build AND --host is set, then the configure script will find any 17851 # cross compilation tools in the PATH. Cross compilation tools 17852 # follows the cross compilation standard where they are prefixed with ${host}. 17853 # For example the binary i686-sun-solaris2.10-gcc 17854 # will cross compile for i686-sun-solaris2.10 17855 # If neither of build and host is not set, then build=host and the 17856 # default compiler found in the path will be used. 17857 # Setting only --host, does not seem to be really supported. 17858 # Please set both --build and --host if you want to cross compile. 17859 17860 if test "x$COMPILE_TYPE" = "xcross"; then 17861 # Now we to find a C/C++ compiler that can build executables for the build 17862 # platform. We can't use the AC_PROG_CC macro, since it can only be used 17863 # once. Also, we need to do this before adding a tools dir to the path, 17864 # otherwise we might pick up cross-compilers which don't use standard naming. 17865 # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have 17866 # to wait until they are properly discovered. 17867 for ac_prog in cl cc gcc 17868 do 17869 # Extract the first word of "$ac_prog", so it can be a program name with args. 17870 set dummy $ac_prog; ac_word=$2 17871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 17872 $as_echo_n "checking for $ac_word... " >&6; } 17873 if ${ac_cv_path_BUILD_CC+:} false; then : 17874 $as_echo_n "(cached) " >&6 17875 else 17876 case $BUILD_CC in 17877 [\\/]* | ?:[\\/]*) 17878 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. 17879 ;; 17880 *) 17881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 17882 for as_dir in $PATH 17883 do 17884 IFS=$as_save_IFS 17885 test -z "$as_dir" && as_dir=. 17886 for ac_exec_ext in '' $ac_executable_extensions; do 17887 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 17888 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" 17889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 17890 break 2 17891 fi 17892 done 17893 done 17894 IFS=$as_save_IFS 17895 17896 ;; 17897 esac 17898 fi 17899 BUILD_CC=$ac_cv_path_BUILD_CC 17900 if test -n "$BUILD_CC"; then 17901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 17902 $as_echo "$BUILD_CC" >&6; } 17903 else 17904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17905 $as_echo "no" >&6; } 17906 fi 17907 17908 17909 test -n "$BUILD_CC" && break 17910 done 17911 17912 17913 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17914 17915 # First separate the path from the arguments. This will split at the first 17916 # space. 17917 complete="$BUILD_CC" 17918 path="${complete%% *}" 17919 tmp="$complete EOL" 17920 arguments="${tmp#* }" 17921 17922 # Input might be given as Windows format, start by converting to 17923 # unix format. 17924 new_path=`$CYGPATH -u "$path"` 17925 17926 # Now try to locate executable using which 17927 new_path=`$WHICH "$new_path" 2> /dev/null` 17928 # bat and cmd files are not always considered executable in cygwin causing which 17929 # to not find them 17930 if test "x$new_path" = x \ 17931 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17932 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17933 new_path=`$CYGPATH -u "$path"` 17934 fi 17935 if test "x$new_path" = x; then 17936 # Oops. Which didn't find the executable. 17937 # The splitting of arguments from the executable at a space might have been incorrect, 17938 # since paths with space are more likely in Windows. Give it another try with the whole 17939 # argument. 17940 path="$complete" 17941 arguments="EOL" 17942 new_path=`$CYGPATH -u "$path"` 17943 new_path=`$WHICH "$new_path" 2> /dev/null` 17944 # bat and cmd files are not always considered executable in cygwin causing which 17945 # to not find them 17946 if test "x$new_path" = x \ 17947 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17948 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17949 new_path=`$CYGPATH -u "$path"` 17950 fi 17951 if test "x$new_path" = x; then 17952 # It's still not found. Now this is an unrecoverable error. 17953 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 17954 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 17955 has_space=`$ECHO "$complete" | $GREP " "` 17956 if test "x$has_space" != x; then 17957 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17959 fi 17960 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17961 fi 17962 fi 17963 17964 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17965 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17966 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17967 # "foo.exe" is OK but "foo" is an error. 17968 # 17969 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17970 # It is also a way to make sure we got the proper file name for the real test later on. 17971 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17972 if test "x$test_shortpath" = x; then 17973 # Short path failed, file does not exist as specified. 17974 # Try adding .exe or .cmd 17975 if test -f "${new_path}.exe"; then 17976 input_to_shortpath="${new_path}.exe" 17977 elif test -f "${new_path}.cmd"; then 17978 input_to_shortpath="${new_path}.cmd" 17979 else 17980 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5 17981 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;} 17982 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 17983 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 17984 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17985 fi 17986 else 17987 input_to_shortpath="$new_path" 17988 fi 17989 17990 # Call helper function which possibly converts this using DOS-style short mode. 17991 # If so, the updated path is stored in $new_path. 17992 new_path="$input_to_shortpath" 17993 17994 input_path="$input_to_shortpath" 17995 # Check if we need to convert this using DOS-style short mode. If the path 17996 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17997 # take no chances and rewrite it. 17998 # Note: m4 eats our [], so we need to use [ and ] instead. 17999 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18000 if test "x$has_forbidden_chars" != x; then 18001 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18002 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18003 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18004 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18005 # Going to short mode and back again did indeed matter. Since short mode is 18006 # case insensitive, let's make it lowercase to improve readability. 18007 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18008 # Now convert it back to Unix-stile (cygpath) 18009 input_path=`$CYGPATH -u "$shortmode_path"` 18010 new_path="$input_path" 18011 fi 18012 fi 18013 18014 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18015 if test "x$test_cygdrive_prefix" = x; then 18016 # As a simple fix, exclude /usr/bin since it's not a real path. 18017 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18018 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18019 # a path prefixed by /cygdrive for fixpath to work. 18020 new_path="$CYGWIN_ROOT_PATH$input_path" 18021 fi 18022 fi 18023 18024 # remove trailing .exe if any 18025 new_path="${new_path/%.exe/}" 18026 18027 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18028 18029 # First separate the path from the arguments. This will split at the first 18030 # space. 18031 complete="$BUILD_CC" 18032 path="${complete%% *}" 18033 tmp="$complete EOL" 18034 arguments="${tmp#* }" 18035 18036 # Input might be given as Windows format, start by converting to 18037 # unix format. 18038 new_path="$path" 18039 18040 windows_path="$new_path" 18041 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18042 unix_path=`$CYGPATH -u "$windows_path"` 18043 new_path="$unix_path" 18044 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18045 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18046 new_path="$unix_path" 18047 fi 18048 18049 18050 # Now try to locate executable using which 18051 new_path=`$WHICH "$new_path" 2> /dev/null` 18052 18053 if test "x$new_path" = x; then 18054 # Oops. Which didn't find the executable. 18055 # The splitting of arguments from the executable at a space might have been incorrect, 18056 # since paths with space are more likely in Windows. Give it another try with the whole 18057 # argument. 18058 path="$complete" 18059 arguments="EOL" 18060 new_path="$path" 18061 18062 windows_path="$new_path" 18063 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18064 unix_path=`$CYGPATH -u "$windows_path"` 18065 new_path="$unix_path" 18066 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18067 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18068 new_path="$unix_path" 18069 fi 18070 18071 18072 new_path=`$WHICH "$new_path" 2> /dev/null` 18073 18074 if test "x$new_path" = x; then 18075 # It's still not found. Now this is an unrecoverable error. 18076 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 18077 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 18078 has_space=`$ECHO "$complete" | $GREP " "` 18079 if test "x$has_space" != x; then 18080 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18081 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18082 fi 18083 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 18084 fi 18085 fi 18086 18087 # Now new_path has a complete unix path to the binary 18088 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18089 # Keep paths in /bin as-is, but remove trailing .exe if any 18090 new_path="${new_path/%.exe/}" 18091 # Do not save /bin paths to all_fixpath_prefixes! 18092 else 18093 # Not in mixed or Windows style, start by that. 18094 new_path=`cmd //c echo $new_path` 18095 18096 input_path="$new_path" 18097 # Check if we need to convert this using DOS-style short mode. If the path 18098 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18099 # take no chances and rewrite it. 18100 # Note: m4 eats our [], so we need to use [ and ] instead. 18101 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18102 if test "x$has_forbidden_chars" != x; then 18103 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18104 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18105 fi 18106 18107 # Output is in $new_path 18108 18109 windows_path="$new_path" 18110 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18111 unix_path=`$CYGPATH -u "$windows_path"` 18112 new_path="$unix_path" 18113 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18114 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18115 new_path="$unix_path" 18116 fi 18117 18118 # remove trailing .exe if any 18119 new_path="${new_path/%.exe/}" 18120 18121 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18122 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18123 fi 18124 18125 else 18126 # We're on a posix platform. Hooray! :) 18127 # First separate the path from the arguments. This will split at the first 18128 # space. 18129 complete="$BUILD_CC" 18130 path="${complete%% *}" 18131 tmp="$complete EOL" 18132 arguments="${tmp#* }" 18133 18134 # Cannot rely on the command "which" here since it doesn't always work. 18135 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18136 if test -z "$is_absolute_path"; then 18137 # Path to executable is not absolute. Find it. 18138 IFS_save="$IFS" 18139 IFS=: 18140 for p in $PATH; do 18141 if test -f "$p/$path" && test -x "$p/$path"; then 18142 new_path="$p/$path" 18143 break 18144 fi 18145 done 18146 IFS="$IFS_save" 18147 else 18148 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5 18149 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;} 18150 new_path="$path" 18151 fi 18152 18153 if test "x$new_path" = x; then 18154 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 18155 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 18156 has_space=`$ECHO "$complete" | $GREP " "` 18157 if test "x$has_space" != x; then 18158 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18159 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18160 fi 18161 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 18162 fi 18163 fi 18164 18165 # Now join together the path and the arguments once again 18166 if test "x$arguments" != xEOL; then 18167 new_complete="$new_path ${arguments% *}" 18168 else 18169 new_complete="$new_path" 18170 fi 18171 18172 if test "x$complete" != "x$new_complete"; then 18173 BUILD_CC="$new_complete" 18174 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5 18175 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;} 18176 fi 18177 18178 for ac_prog in cl CC g++ 18179 do 18180 # Extract the first word of "$ac_prog", so it can be a program name with args. 18181 set dummy $ac_prog; ac_word=$2 18182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18183 $as_echo_n "checking for $ac_word... " >&6; } 18184 if ${ac_cv_path_BUILD_CXX+:} false; then : 18185 $as_echo_n "(cached) " >&6 18186 else 18187 case $BUILD_CXX in 18188 [\\/]* | ?:[\\/]*) 18189 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. 18190 ;; 18191 *) 18192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18193 for as_dir in $PATH 18194 do 18195 IFS=$as_save_IFS 18196 test -z "$as_dir" && as_dir=. 18197 for ac_exec_ext in '' $ac_executable_extensions; do 18198 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18199 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" 18200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18201 break 2 18202 fi 18203 done 18204 done 18205 IFS=$as_save_IFS 18206 18207 ;; 18208 esac 18209 fi 18210 BUILD_CXX=$ac_cv_path_BUILD_CXX 18211 if test -n "$BUILD_CXX"; then 18212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 18213 $as_echo "$BUILD_CXX" >&6; } 18214 else 18215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18216 $as_echo "no" >&6; } 18217 fi 18218 18219 18220 test -n "$BUILD_CXX" && break 18221 done 18222 18223 18224 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18225 18226 # First separate the path from the arguments. This will split at the first 18227 # space. 18228 complete="$BUILD_CXX" 18229 path="${complete%% *}" 18230 tmp="$complete EOL" 18231 arguments="${tmp#* }" 18232 18233 # Input might be given as Windows format, start by converting to 18234 # unix format. 18235 new_path=`$CYGPATH -u "$path"` 18236 18237 # Now try to locate executable using which 18238 new_path=`$WHICH "$new_path" 2> /dev/null` 18239 # bat and cmd files are not always considered executable in cygwin causing which 18240 # to not find them 18241 if test "x$new_path" = x \ 18242 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18243 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18244 new_path=`$CYGPATH -u "$path"` 18245 fi 18246 if test "x$new_path" = x; then 18247 # Oops. Which didn't find the executable. 18248 # The splitting of arguments from the executable at a space might have been incorrect, 18249 # since paths with space are more likely in Windows. Give it another try with the whole 18250 # argument. 18251 path="$complete" 18252 arguments="EOL" 18253 new_path=`$CYGPATH -u "$path"` 18254 new_path=`$WHICH "$new_path" 2> /dev/null` 18255 # bat and cmd files are not always considered executable in cygwin causing which 18256 # to not find them 18257 if test "x$new_path" = x \ 18258 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18259 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18260 new_path=`$CYGPATH -u "$path"` 18261 fi 18262 if test "x$new_path" = x; then 18263 # It's still not found. Now this is an unrecoverable error. 18264 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18265 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18266 has_space=`$ECHO "$complete" | $GREP " "` 18267 if test "x$has_space" != x; then 18268 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18269 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18270 fi 18271 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18272 fi 18273 fi 18274 18275 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18276 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18277 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18278 # "foo.exe" is OK but "foo" is an error. 18279 # 18280 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18281 # It is also a way to make sure we got the proper file name for the real test later on. 18282 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18283 if test "x$test_shortpath" = x; then 18284 # Short path failed, file does not exist as specified. 18285 # Try adding .exe or .cmd 18286 if test -f "${new_path}.exe"; then 18287 input_to_shortpath="${new_path}.exe" 18288 elif test -f "${new_path}.cmd"; then 18289 input_to_shortpath="${new_path}.cmd" 18290 else 18291 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5 18292 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;} 18293 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18294 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18295 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18296 fi 18297 else 18298 input_to_shortpath="$new_path" 18299 fi 18300 18301 # Call helper function which possibly converts this using DOS-style short mode. 18302 # If so, the updated path is stored in $new_path. 18303 new_path="$input_to_shortpath" 18304 18305 input_path="$input_to_shortpath" 18306 # Check if we need to convert this using DOS-style short mode. If the path 18307 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18308 # take no chances and rewrite it. 18309 # Note: m4 eats our [], so we need to use [ and ] instead. 18310 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18311 if test "x$has_forbidden_chars" != x; then 18312 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18313 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18314 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18315 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18316 # Going to short mode and back again did indeed matter. Since short mode is 18317 # case insensitive, let's make it lowercase to improve readability. 18318 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18319 # Now convert it back to Unix-stile (cygpath) 18320 input_path=`$CYGPATH -u "$shortmode_path"` 18321 new_path="$input_path" 18322 fi 18323 fi 18324 18325 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18326 if test "x$test_cygdrive_prefix" = x; then 18327 # As a simple fix, exclude /usr/bin since it's not a real path. 18328 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18329 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18330 # a path prefixed by /cygdrive for fixpath to work. 18331 new_path="$CYGWIN_ROOT_PATH$input_path" 18332 fi 18333 fi 18334 18335 # remove trailing .exe if any 18336 new_path="${new_path/%.exe/}" 18337 18338 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18339 18340 # First separate the path from the arguments. This will split at the first 18341 # space. 18342 complete="$BUILD_CXX" 18343 path="${complete%% *}" 18344 tmp="$complete EOL" 18345 arguments="${tmp#* }" 18346 18347 # Input might be given as Windows format, start by converting to 18348 # unix format. 18349 new_path="$path" 18350 18351 windows_path="$new_path" 18352 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18353 unix_path=`$CYGPATH -u "$windows_path"` 18354 new_path="$unix_path" 18355 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18356 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18357 new_path="$unix_path" 18358 fi 18359 18360 18361 # Now try to locate executable using which 18362 new_path=`$WHICH "$new_path" 2> /dev/null` 18363 18364 if test "x$new_path" = x; then 18365 # Oops. Which didn't find the executable. 18366 # The splitting of arguments from the executable at a space might have been incorrect, 18367 # since paths with space are more likely in Windows. Give it another try with the whole 18368 # argument. 18369 path="$complete" 18370 arguments="EOL" 18371 new_path="$path" 18372 18373 windows_path="$new_path" 18374 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18375 unix_path=`$CYGPATH -u "$windows_path"` 18376 new_path="$unix_path" 18377 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18378 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18379 new_path="$unix_path" 18380 fi 18381 18382 18383 new_path=`$WHICH "$new_path" 2> /dev/null` 18384 18385 if test "x$new_path" = x; then 18386 # It's still not found. Now this is an unrecoverable error. 18387 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18388 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18389 has_space=`$ECHO "$complete" | $GREP " "` 18390 if test "x$has_space" != x; then 18391 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18392 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18393 fi 18394 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18395 fi 18396 fi 18397 18398 # Now new_path has a complete unix path to the binary 18399 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18400 # Keep paths in /bin as-is, but remove trailing .exe if any 18401 new_path="${new_path/%.exe/}" 18402 # Do not save /bin paths to all_fixpath_prefixes! 18403 else 18404 # Not in mixed or Windows style, start by that. 18405 new_path=`cmd //c echo $new_path` 18406 18407 input_path="$new_path" 18408 # Check if we need to convert this using DOS-style short mode. If the path 18409 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18410 # take no chances and rewrite it. 18411 # Note: m4 eats our [], so we need to use [ and ] instead. 18412 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18413 if test "x$has_forbidden_chars" != x; then 18414 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18415 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18416 fi 18417 18418 # Output is in $new_path 18419 18420 windows_path="$new_path" 18421 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18422 unix_path=`$CYGPATH -u "$windows_path"` 18423 new_path="$unix_path" 18424 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18425 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18426 new_path="$unix_path" 18427 fi 18428 18429 # remove trailing .exe if any 18430 new_path="${new_path/%.exe/}" 18431 18432 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18433 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18434 fi 18435 18436 else 18437 # We're on a posix platform. Hooray! :) 18438 # First separate the path from the arguments. This will split at the first 18439 # space. 18440 complete="$BUILD_CXX" 18441 path="${complete%% *}" 18442 tmp="$complete EOL" 18443 arguments="${tmp#* }" 18444 18445 # Cannot rely on the command "which" here since it doesn't always work. 18446 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18447 if test -z "$is_absolute_path"; then 18448 # Path to executable is not absolute. Find it. 18449 IFS_save="$IFS" 18450 IFS=: 18451 for p in $PATH; do 18452 if test -f "$p/$path" && test -x "$p/$path"; then 18453 new_path="$p/$path" 18454 break 18455 fi 18456 done 18457 IFS="$IFS_save" 18458 else 18459 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5 18460 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;} 18461 new_path="$path" 18462 fi 18463 18464 if test "x$new_path" = x; then 18465 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18466 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18467 has_space=`$ECHO "$complete" | $GREP " "` 18468 if test "x$has_space" != x; then 18469 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18470 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18471 fi 18472 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18473 fi 18474 fi 18475 18476 # Now join together the path and the arguments once again 18477 if test "x$arguments" != xEOL; then 18478 new_complete="$new_path ${arguments% *}" 18479 else 18480 new_complete="$new_path" 18481 fi 18482 18483 if test "x$complete" != "x$new_complete"; then 18484 BUILD_CXX="$new_complete" 18485 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5 18486 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;} 18487 fi 18488 18489 # Extract the first word of "ld", so it can be a program name with args. 18490 set dummy ld; ac_word=$2 18491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18492 $as_echo_n "checking for $ac_word... " >&6; } 18493 if ${ac_cv_path_BUILD_LD+:} false; then : 18494 $as_echo_n "(cached) " >&6 18495 else 18496 case $BUILD_LD in 18497 [\\/]* | ?:[\\/]*) 18498 ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. 18499 ;; 18500 *) 18501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18502 for as_dir in $PATH 18503 do 18504 IFS=$as_save_IFS 18505 test -z "$as_dir" && as_dir=. 18506 for ac_exec_ext in '' $ac_executable_extensions; do 18507 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18508 ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" 18509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18510 break 2 18511 fi 18512 done 18513 done 18514 IFS=$as_save_IFS 18515 18516 ;; 18517 esac 18518 fi 18519 BUILD_LD=$ac_cv_path_BUILD_LD 18520 if test -n "$BUILD_LD"; then 18521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 18522 $as_echo "$BUILD_LD" >&6; } 18523 else 18524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18525 $as_echo "no" >&6; } 18526 fi 18527 18528 18529 18530 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18531 18532 # First separate the path from the arguments. This will split at the first 18533 # space. 18534 complete="$BUILD_LD" 18535 path="${complete%% *}" 18536 tmp="$complete EOL" 18537 arguments="${tmp#* }" 18538 18539 # Input might be given as Windows format, start by converting to 18540 # unix format. 18541 new_path=`$CYGPATH -u "$path"` 18542 18543 # Now try to locate executable using which 18544 new_path=`$WHICH "$new_path" 2> /dev/null` 18545 # bat and cmd files are not always considered executable in cygwin causing which 18546 # to not find them 18547 if test "x$new_path" = x \ 18548 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18549 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18550 new_path=`$CYGPATH -u "$path"` 18551 fi 18552 if test "x$new_path" = x; then 18553 # Oops. Which didn't find the executable. 18554 # The splitting of arguments from the executable at a space might have been incorrect, 18555 # since paths with space are more likely in Windows. Give it another try with the whole 18556 # argument. 18557 path="$complete" 18558 arguments="EOL" 18559 new_path=`$CYGPATH -u "$path"` 18560 new_path=`$WHICH "$new_path" 2> /dev/null` 18561 # bat and cmd files are not always considered executable in cygwin causing which 18562 # to not find them 18563 if test "x$new_path" = x \ 18564 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18565 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18566 new_path=`$CYGPATH -u "$path"` 18567 fi 18568 if test "x$new_path" = x; then 18569 # It's still not found. Now this is an unrecoverable error. 18570 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18571 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18572 has_space=`$ECHO "$complete" | $GREP " "` 18573 if test "x$has_space" != x; then 18574 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18575 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18576 fi 18577 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18578 fi 18579 fi 18580 18581 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18582 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18583 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18584 # "foo.exe" is OK but "foo" is an error. 18585 # 18586 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18587 # It is also a way to make sure we got the proper file name for the real test later on. 18588 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18589 if test "x$test_shortpath" = x; then 18590 # Short path failed, file does not exist as specified. 18591 # Try adding .exe or .cmd 18592 if test -f "${new_path}.exe"; then 18593 input_to_shortpath="${new_path}.exe" 18594 elif test -f "${new_path}.cmd"; then 18595 input_to_shortpath="${new_path}.cmd" 18596 else 18597 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5 18598 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;} 18599 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18600 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18601 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18602 fi 18603 else 18604 input_to_shortpath="$new_path" 18605 fi 18606 18607 # Call helper function which possibly converts this using DOS-style short mode. 18608 # If so, the updated path is stored in $new_path. 18609 new_path="$input_to_shortpath" 18610 18611 input_path="$input_to_shortpath" 18612 # Check if we need to convert this using DOS-style short mode. If the path 18613 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18614 # take no chances and rewrite it. 18615 # Note: m4 eats our [], so we need to use [ and ] instead. 18616 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18617 if test "x$has_forbidden_chars" != x; then 18618 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18619 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18620 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18621 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18622 # Going to short mode and back again did indeed matter. Since short mode is 18623 # case insensitive, let's make it lowercase to improve readability. 18624 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18625 # Now convert it back to Unix-stile (cygpath) 18626 input_path=`$CYGPATH -u "$shortmode_path"` 18627 new_path="$input_path" 18628 fi 18629 fi 18630 18631 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18632 if test "x$test_cygdrive_prefix" = x; then 18633 # As a simple fix, exclude /usr/bin since it's not a real path. 18634 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18635 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18636 # a path prefixed by /cygdrive for fixpath to work. 18637 new_path="$CYGWIN_ROOT_PATH$input_path" 18638 fi 18639 fi 18640 18641 # remove trailing .exe if any 18642 new_path="${new_path/%.exe/}" 18643 18644 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18645 18646 # First separate the path from the arguments. This will split at the first 18647 # space. 18648 complete="$BUILD_LD" 18649 path="${complete%% *}" 18650 tmp="$complete EOL" 18651 arguments="${tmp#* }" 18652 18653 # Input might be given as Windows format, start by converting to 18654 # unix format. 18655 new_path="$path" 18656 18657 windows_path="$new_path" 18658 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18659 unix_path=`$CYGPATH -u "$windows_path"` 18660 new_path="$unix_path" 18661 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18662 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18663 new_path="$unix_path" 18664 fi 18665 18666 18667 # Now try to locate executable using which 18668 new_path=`$WHICH "$new_path" 2> /dev/null` 18669 18670 if test "x$new_path" = x; then 18671 # Oops. Which didn't find the executable. 18672 # The splitting of arguments from the executable at a space might have been incorrect, 18673 # since paths with space are more likely in Windows. Give it another try with the whole 18674 # argument. 18675 path="$complete" 18676 arguments="EOL" 18677 new_path="$path" 18678 18679 windows_path="$new_path" 18680 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18681 unix_path=`$CYGPATH -u "$windows_path"` 18682 new_path="$unix_path" 18683 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18684 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18685 new_path="$unix_path" 18686 fi 18687 18688 18689 new_path=`$WHICH "$new_path" 2> /dev/null` 18690 18691 if test "x$new_path" = x; then 18692 # It's still not found. Now this is an unrecoverable error. 18693 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18694 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18695 has_space=`$ECHO "$complete" | $GREP " "` 18696 if test "x$has_space" != x; then 18697 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18698 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18699 fi 18700 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18701 fi 18702 fi 18703 18704 # Now new_path has a complete unix path to the binary 18705 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18706 # Keep paths in /bin as-is, but remove trailing .exe if any 18707 new_path="${new_path/%.exe/}" 18708 # Do not save /bin paths to all_fixpath_prefixes! 18709 else 18710 # Not in mixed or Windows style, start by that. 18711 new_path=`cmd //c echo $new_path` 18712 18713 input_path="$new_path" 18714 # Check if we need to convert this using DOS-style short mode. If the path 18715 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18716 # take no chances and rewrite it. 18717 # Note: m4 eats our [], so we need to use [ and ] instead. 18718 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18719 if test "x$has_forbidden_chars" != x; then 18720 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18721 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18722 fi 18723 18724 # Output is in $new_path 18725 18726 windows_path="$new_path" 18727 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18728 unix_path=`$CYGPATH -u "$windows_path"` 18729 new_path="$unix_path" 18730 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18731 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18732 new_path="$unix_path" 18733 fi 18734 18735 # remove trailing .exe if any 18736 new_path="${new_path/%.exe/}" 18737 18738 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18739 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18740 fi 18741 18742 else 18743 # We're on a posix platform. Hooray! :) 18744 # First separate the path from the arguments. This will split at the first 18745 # space. 18746 complete="$BUILD_LD" 18747 path="${complete%% *}" 18748 tmp="$complete EOL" 18749 arguments="${tmp#* }" 18750 18751 # Cannot rely on the command "which" here since it doesn't always work. 18752 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18753 if test -z "$is_absolute_path"; then 18754 # Path to executable is not absolute. Find it. 18755 IFS_save="$IFS" 18756 IFS=: 18757 for p in $PATH; do 18758 if test -f "$p/$path" && test -x "$p/$path"; then 18759 new_path="$p/$path" 18760 break 18761 fi 18762 done 18763 IFS="$IFS_save" 18764 else 18765 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5 18766 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;} 18767 new_path="$path" 18768 fi 18769 18770 if test "x$new_path" = x; then 18771 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18772 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18773 has_space=`$ECHO "$complete" | $GREP " "` 18774 if test "x$has_space" != x; then 18775 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18776 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18777 fi 18778 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18779 fi 18780 fi 18781 18782 # Now join together the path and the arguments once again 18783 if test "x$arguments" != xEOL; then 18784 new_complete="$new_path ${arguments% *}" 18785 else 18786 new_complete="$new_path" 18787 fi 18788 18789 if test "x$complete" != "x$new_complete"; then 18790 BUILD_LD="$new_complete" 18791 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5 18792 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;} 18793 fi 18794 18795 fi 18796 18797 18798 18799 18800 # If a devkit is found on the builddeps server, then prepend its path to the 18801 # PATH variable. If there are cross compilers available in the devkit, these 18802 # will be found by AC_PROG_CC et al. 18803 DEVKIT= 18804 18805 18806 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 18807 # Source the builddeps file again, to make sure it uses the latest variables! 18808 . $builddepsfile 18809 # Look for a target and build machine specific resource! 18810 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 18811 if test "x$resource" = x; then 18812 # Ok, lets instead look for a target specific resource 18813 eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}} 18814 fi 18815 if test "x$resource" = x; then 18816 # Ok, lets instead look for a build specific resource 18817 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}} 18818 fi 18819 if test "x$resource" = x; then 18820 # Ok, lets instead look for a generic resource 18821 # (The devkit comes from M4 and not the shell, thus no need for eval here.) 18822 resource=${builddep_devkit} 18823 fi 18824 if test "x$resource" != x; then 18825 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5 18826 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;} 18827 # If the resource in the builddeps.conf file is an existing directory, 18828 # for example /java/linux/cups 18829 if test -d ${resource}; then 18830 depdir=${resource} 18831 else 18832 18833 # devkit is for example mymodule 18834 # $resource is for example libs/general/libmymod_1_2_3.zip 18835 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 18836 # $with_builddeps_dir is for example /localhome/builddeps 18837 # depdir is the name of the variable into which we store the depdir, eg MYMOD 18838 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 18839 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 18840 filename=`basename $resource` 18841 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 18842 filebase=${filename%%.*} 18843 extension=${filename#*.} 18844 installdir=$with_builddeps_dir/$filebase 18845 if test ! -f $installdir/$filename.unpacked; then 18846 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5 18847 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;} 18848 if test ! -d $installdir; then 18849 mkdir -p $installdir 18850 fi 18851 if test ! -d $installdir; then 18852 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 18853 fi 18854 tmpfile=`mktemp $installdir/devkit.XXXXXXXXX` 18855 touch $tmpfile 18856 if test ! -f $tmpfile; then 18857 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 18858 fi 18859 18860 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 18861 # $tmpfile is the local file name for the downloaded file. 18862 VALID_TOOL=no 18863 if test "x$BDEPS_FTP" = xwget; then 18864 VALID_TOOL=yes 18865 wget -O $tmpfile $with_builddeps_server/$resource 18866 fi 18867 if test "x$BDEPS_FTP" = xlftp; then 18868 VALID_TOOL=yes 18869 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 18870 fi 18871 if test "x$BDEPS_FTP" = xftp; then 18872 VALID_TOOL=yes 18873 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 18874 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 18875 FTPUSERPWD=${FTPSERVER%%@*} 18876 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 18877 FTPUSER=${userpwd%%:*} 18878 FTPPWD=${userpwd#*@} 18879 FTPSERVER=${FTPSERVER#*@} 18880 else 18881 FTPUSER=ftp 18882 FTPPWD=ftp 18883 fi 18884 # the "pass" command does not work on some 18885 # ftp clients (read ftp.exe) but if it works, 18886 # passive mode is better! 18887 (\ 18888 echo "user $FTPUSER $FTPPWD" ;\ 18889 echo "pass" ;\ 18890 echo "bin" ;\ 18891 echo "get $FTPPATH $tmpfile" ;\ 18892 ) | ftp -in $FTPSERVER 18893 fi 18894 if test "x$VALID_TOOL" != xyes; then 18895 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 18896 fi 18897 18898 mv $tmpfile $installdir/$filename 18899 if test ! -s $installdir/$filename; then 18900 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 18901 fi 18902 case "$extension" in 18903 zip) echo "Unzipping $installdir/$filename..." 18904 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 18905 ;; 18906 tar.gz) echo "Untaring $installdir/$filename..." 18907 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 18908 ;; 18909 tgz) echo "Untaring $installdir/$filename..." 18910 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 18911 ;; 18912 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 18913 ;; 18914 esac 18915 fi 18916 if test -f $installdir/$filename.unpacked; then 18917 depdir=$installdir 18918 fi 18919 18920 fi 18921 # Source the builddeps file again, because in the previous command, the depdir 18922 # was updated to point at the current build dependency install directory. 18923 . $builddepsfile 18924 # Now extract variables from the builddeps.conf files. 18925 theroot=${builddep_devkit_ROOT} 18926 thecflags=${builddep_devkit_CFLAGS} 18927 thelibs=${builddep_devkit_LIBS} 18928 if test "x$depdir" = x; then 18929 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5 18930 fi 18931 DEVKIT=$depdir 18932 if test "x$theroot" != x; then 18933 DEVKIT="$theroot" 18934 fi 18935 if test "x$thecflags" != x; then 18936 DEVKIT_CFLAGS="$thecflags" 18937 fi 18938 if test "x$thelibs" != x; then 18939 DEVKIT_LIBS="$thelibs" 18940 fi 18941 # Found devkit 18942 PATH="$DEVKIT/bin:$PATH" 18943 SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" 18944 if test "x$x_includes" = "xNONE"; then 18945 x_includes="$SYS_ROOT/usr/include/X11" 18946 fi 18947 if test "x$x_libraries" = "xNONE"; then 18948 x_libraries="$SYS_ROOT/usr/lib" 18949 fi 18950 18951 18952 fi 18953 18954 fi 18955 18956 18957 if test "x$SYS_ROOT" != "x/" ; then 18958 CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" 18959 CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" 18960 OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 18961 OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 18962 CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" 18963 LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" 18964 fi 18965 18966 # Store the CFLAGS etal passed to the configure script. 18967 ORG_CFLAGS="$CFLAGS" 18968 ORG_CXXFLAGS="$CXXFLAGS" 18969 ORG_OBJCFLAGS="$OBJCFLAGS" 18970 18971 # autoconf magic only relies on PATH, so update it if tools dir is specified 18972 OLD_PATH="$PATH" 18973 if test "x$TOOLS_DIR" != x; then 18974 PATH=$TOOLS_DIR:$PATH 18975 fi 18976 18977 18978 ### Locate C compiler (CC) 18979 18980 # On windows, only cl.exe is supported. 18981 # On Solaris, cc is preferred to gcc. 18982 # Elsewhere, gcc is preferred to cc. 18983 18984 if test "x$CC" != x; then 18985 COMPILER_CHECK_LIST="$CC" 18986 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 18987 COMPILER_CHECK_LIST="cl" 18988 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 18989 COMPILER_CHECK_LIST="cc gcc" 18990 else 18991 COMPILER_CHECK_LIST="gcc cc" 18992 fi 18993 18994 18995 COMPILER_NAME=C 18996 18997 CC= 18998 # If TOOLS_DIR is set, check for all compiler names in there first 18999 # before checking the rest of the PATH. 19000 if test -n "$TOOLS_DIR"; then 19001 PATH_save="$PATH" 19002 PATH="$TOOLS_DIR" 19003 for ac_prog in $COMPILER_CHECK_LIST 19004 do 19005 # Extract the first word of "$ac_prog", so it can be a program name with args. 19006 set dummy $ac_prog; ac_word=$2 19007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19008 $as_echo_n "checking for $ac_word... " >&6; } 19009 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then : 19010 $as_echo_n "(cached) " >&6 19011 else 19012 case $TOOLS_DIR_CC in 19013 [\\/]* | ?:[\\/]*) 19014 ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path. 19015 ;; 19016 *) 19017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19018 for as_dir in $PATH 19019 do 19020 IFS=$as_save_IFS 19021 test -z "$as_dir" && as_dir=. 19022 for ac_exec_ext in '' $ac_executable_extensions; do 19023 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19024 ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext" 19025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19026 break 2 19027 fi 19028 done 19029 done 19030 IFS=$as_save_IFS 19031 19032 ;; 19033 esac 19034 fi 19035 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC 19036 if test -n "$TOOLS_DIR_CC"; then 19037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5 19038 $as_echo "$TOOLS_DIR_CC" >&6; } 19039 else 19040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19041 $as_echo "no" >&6; } 19042 fi 19043 19044 19045 test -n "$TOOLS_DIR_CC" && break 19046 done 19047 19048 CC=$TOOLS_DIR_CC 19049 PATH="$PATH_save" 19050 fi 19051 19052 # AC_PATH_PROGS can't be run multiple times with the same variable, 19053 # so create a new name for this run. 19054 if test "x$CC" = x; then 19055 for ac_prog in $COMPILER_CHECK_LIST 19056 do 19057 # Extract the first word of "$ac_prog", so it can be a program name with args. 19058 set dummy $ac_prog; ac_word=$2 19059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19060 $as_echo_n "checking for $ac_word... " >&6; } 19061 if ${ac_cv_path_POTENTIAL_CC+:} false; then : 19062 $as_echo_n "(cached) " >&6 19063 else 19064 case $POTENTIAL_CC in 19065 [\\/]* | ?:[\\/]*) 19066 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path. 19067 ;; 19068 *) 19069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19070 for as_dir in $PATH 19071 do 19072 IFS=$as_save_IFS 19073 test -z "$as_dir" && as_dir=. 19074 for ac_exec_ext in '' $ac_executable_extensions; do 19075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19076 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" 19077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19078 break 2 19079 fi 19080 done 19081 done 19082 IFS=$as_save_IFS 19083 19084 ;; 19085 esac 19086 fi 19087 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC 19088 if test -n "$POTENTIAL_CC"; then 19089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5 19090 $as_echo "$POTENTIAL_CC" >&6; } 19091 else 19092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19093 $as_echo "no" >&6; } 19094 fi 19095 19096 19097 test -n "$POTENTIAL_CC" && break 19098 done 19099 19100 CC=$POTENTIAL_CC 19101 fi 19102 19103 if test "x$CC" = x; then 19104 19105 # Print a helpful message on how to acquire the necessary build dependency. 19106 # devkit is the help tag: freetyp2, cups, pulse, alsa etc 19107 MISSING_DEPENDENCY=devkit 19108 PKGHANDLER_COMMAND= 19109 19110 case $PKGHANDLER in 19111 apt-get) 19112 apt_help $MISSING_DEPENDENCY ;; 19113 yum) 19114 yum_help $MISSING_DEPENDENCY ;; 19115 port) 19116 port_help $MISSING_DEPENDENCY ;; 19117 pkgutil) 19118 pkgutil_help $MISSING_DEPENDENCY ;; 19119 pkgadd) 19120 pkgadd_help $MISSING_DEPENDENCY ;; 19121 * ) 19122 break ;; 19123 esac 19124 19125 if test "x$PKGHANDLER_COMMAND" != x; then 19126 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 19127 fi 19128 19129 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 19130 fi 19131 19132 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19133 19134 # First separate the path from the arguments. This will split at the first 19135 # space. 19136 complete="$CC" 19137 path="${complete%% *}" 19138 tmp="$complete EOL" 19139 arguments="${tmp#* }" 19140 19141 # Input might be given as Windows format, start by converting to 19142 # unix format. 19143 new_path=`$CYGPATH -u "$path"` 19144 19145 # Now try to locate executable using which 19146 new_path=`$WHICH "$new_path" 2> /dev/null` 19147 # bat and cmd files are not always considered executable in cygwin causing which 19148 # to not find them 19149 if test "x$new_path" = x \ 19150 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19151 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19152 new_path=`$CYGPATH -u "$path"` 19153 fi 19154 if test "x$new_path" = x; then 19155 # Oops. Which didn't find the executable. 19156 # The splitting of arguments from the executable at a space might have been incorrect, 19157 # since paths with space are more likely in Windows. Give it another try with the whole 19158 # argument. 19159 path="$complete" 19160 arguments="EOL" 19161 new_path=`$CYGPATH -u "$path"` 19162 new_path=`$WHICH "$new_path" 2> /dev/null` 19163 # bat and cmd files are not always considered executable in cygwin causing which 19164 # to not find them 19165 if test "x$new_path" = x \ 19166 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19167 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19168 new_path=`$CYGPATH -u "$path"` 19169 fi 19170 if test "x$new_path" = x; then 19171 # It's still not found. Now this is an unrecoverable error. 19172 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 19173 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 19174 has_space=`$ECHO "$complete" | $GREP " "` 19175 if test "x$has_space" != x; then 19176 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19177 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19178 fi 19179 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19180 fi 19181 fi 19182 19183 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 19184 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 19185 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 19186 # "foo.exe" is OK but "foo" is an error. 19187 # 19188 # This test is therefore slightly more accurate than "test -f" to check for file precense. 19189 # It is also a way to make sure we got the proper file name for the real test later on. 19190 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 19191 if test "x$test_shortpath" = x; then 19192 # Short path failed, file does not exist as specified. 19193 # Try adding .exe or .cmd 19194 if test -f "${new_path}.exe"; then 19195 input_to_shortpath="${new_path}.exe" 19196 elif test -f "${new_path}.cmd"; then 19197 input_to_shortpath="${new_path}.cmd" 19198 else 19199 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5 19200 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;} 19201 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 19202 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 19203 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19204 fi 19205 else 19206 input_to_shortpath="$new_path" 19207 fi 19208 19209 # Call helper function which possibly converts this using DOS-style short mode. 19210 # If so, the updated path is stored in $new_path. 19211 new_path="$input_to_shortpath" 19212 19213 input_path="$input_to_shortpath" 19214 # Check if we need to convert this using DOS-style short mode. If the path 19215 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19216 # take no chances and rewrite it. 19217 # Note: m4 eats our [], so we need to use [ and ] instead. 19218 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 19219 if test "x$has_forbidden_chars" != x; then 19220 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19221 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 19222 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 19223 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 19224 # Going to short mode and back again did indeed matter. Since short mode is 19225 # case insensitive, let's make it lowercase to improve readability. 19226 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19227 # Now convert it back to Unix-stile (cygpath) 19228 input_path=`$CYGPATH -u "$shortmode_path"` 19229 new_path="$input_path" 19230 fi 19231 fi 19232 19233 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 19234 if test "x$test_cygdrive_prefix" = x; then 19235 # As a simple fix, exclude /usr/bin since it's not a real path. 19236 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 19237 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 19238 # a path prefixed by /cygdrive for fixpath to work. 19239 new_path="$CYGWIN_ROOT_PATH$input_path" 19240 fi 19241 fi 19242 19243 # remove trailing .exe if any 19244 new_path="${new_path/%.exe/}" 19245 19246 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19247 19248 # First separate the path from the arguments. This will split at the first 19249 # space. 19250 complete="$CC" 19251 path="${complete%% *}" 19252 tmp="$complete EOL" 19253 arguments="${tmp#* }" 19254 19255 # Input might be given as Windows format, start by converting to 19256 # unix format. 19257 new_path="$path" 19258 19259 windows_path="$new_path" 19260 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19261 unix_path=`$CYGPATH -u "$windows_path"` 19262 new_path="$unix_path" 19263 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19264 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19265 new_path="$unix_path" 19266 fi 19267 19268 19269 # Now try to locate executable using which 19270 new_path=`$WHICH "$new_path" 2> /dev/null` 19271 19272 if test "x$new_path" = x; then 19273 # Oops. Which didn't find the executable. 19274 # The splitting of arguments from the executable at a space might have been incorrect, 19275 # since paths with space are more likely in Windows. Give it another try with the whole 19276 # argument. 19277 path="$complete" 19278 arguments="EOL" 19279 new_path="$path" 19280 19281 windows_path="$new_path" 19282 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19283 unix_path=`$CYGPATH -u "$windows_path"` 19284 new_path="$unix_path" 19285 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19286 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19287 new_path="$unix_path" 19288 fi 19289 19290 19291 new_path=`$WHICH "$new_path" 2> /dev/null` 19292 19293 if test "x$new_path" = x; then 19294 # It's still not found. Now this is an unrecoverable error. 19295 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 19296 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 19297 has_space=`$ECHO "$complete" | $GREP " "` 19298 if test "x$has_space" != x; then 19299 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19300 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19301 fi 19302 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19303 fi 19304 fi 19305 19306 # Now new_path has a complete unix path to the binary 19307 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 19308 # Keep paths in /bin as-is, but remove trailing .exe if any 19309 new_path="${new_path/%.exe/}" 19310 # Do not save /bin paths to all_fixpath_prefixes! 19311 else 19312 # Not in mixed or Windows style, start by that. 19313 new_path=`cmd //c echo $new_path` 19314 19315 input_path="$new_path" 19316 # Check if we need to convert this using DOS-style short mode. If the path 19317 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19318 # take no chances and rewrite it. 19319 # Note: m4 eats our [], so we need to use [ and ] instead. 19320 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 19321 if test "x$has_forbidden_chars" != x; then 19322 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19323 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19324 fi 19325 19326 # Output is in $new_path 19327 19328 windows_path="$new_path" 19329 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19330 unix_path=`$CYGPATH -u "$windows_path"` 19331 new_path="$unix_path" 19332 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19333 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19334 new_path="$unix_path" 19335 fi 19336 19337 # remove trailing .exe if any 19338 new_path="${new_path/%.exe/}" 19339 19340 # Save the first 10 bytes of this path to the storage, so fixpath can work. 19341 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 19342 fi 19343 19344 else 19345 # We're on a posix platform. Hooray! :) 19346 # First separate the path from the arguments. This will split at the first 19347 # space. 19348 complete="$CC" 19349 path="${complete%% *}" 19350 tmp="$complete EOL" 19351 arguments="${tmp#* }" 19352 19353 # Cannot rely on the command "which" here since it doesn't always work. 19354 is_absolute_path=`$ECHO "$path" | $GREP ^/` 19355 if test -z "$is_absolute_path"; then 19356 # Path to executable is not absolute. Find it. 19357 IFS_save="$IFS" 19358 IFS=: 19359 for p in $PATH; do 19360 if test -f "$p/$path" && test -x "$p/$path"; then 19361 new_path="$p/$path" 19362 break 19363 fi 19364 done 19365 IFS="$IFS_save" 19366 else 19367 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5 19368 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;} 19369 new_path="$path" 19370 fi 19371 19372 if test "x$new_path" = x; then 19373 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 19374 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 19375 has_space=`$ECHO "$complete" | $GREP " "` 19376 if test "x$has_space" != x; then 19377 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 19378 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 19379 fi 19380 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19381 fi 19382 fi 19383 19384 # Now join together the path and the arguments once again 19385 if test "x$arguments" != xEOL; then 19386 new_complete="$new_path ${arguments% *}" 19387 else 19388 new_complete="$new_path" 19389 fi 19390 19391 if test "x$complete" != "x$new_complete"; then 19392 CC="$new_complete" 19393 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5 19394 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;} 19395 fi 19396 19397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 19398 $as_echo_n "checking resolved symbolic links for CC... " >&6; } 19399 TEST_COMPILER="$CC" 19400 19401 if test "x$OPENJDK_BUILD_OS" != xwindows; then 19402 # Follow a chain of symbolic links. Use readlink 19403 # where it exists, else fall back to horribly 19404 # complicated shell code. 19405 if test "x$READLINK_TESTED" != yes; then 19406 # On MacOSX there is a readlink tool with a different 19407 # purpose than the GNU readlink tool. Check the found readlink. 19408 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 19409 if test "x$ISGNU" = x; then 19410 # A readlink that we do not know how to use. 19411 # Are there other non-GNU readlinks out there? 19412 READLINK_TESTED=yes 19413 READLINK= 19414 fi 19415 fi 19416 19417 if test "x$READLINK" != x; then 19418 TEST_COMPILER=`$READLINK -f $TEST_COMPILER` 19419 else 19420 # Save the current directory for restoring afterwards 19421 STARTDIR=$PWD 19422 COUNTER=0 19423 sym_link_dir=`$DIRNAME $TEST_COMPILER` 19424 sym_link_file=`$BASENAME $TEST_COMPILER` 19425 cd $sym_link_dir 19426 # Use -P flag to resolve symlinks in directories. 19427 cd `$THEPWDCMD -P` 19428 sym_link_dir=`$THEPWDCMD -P` 19429 # Resolve file symlinks 19430 while test $COUNTER -lt 20; do 19431 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 19432 if test "x$ISLINK" == x; then 19433 # This is not a symbolic link! We are done! 19434 break 19435 fi 19436 # Again resolve directory symlinks since the target of the just found 19437 # link could be in a different directory 19438 cd `$DIRNAME $ISLINK` 19439 sym_link_dir=`$THEPWDCMD -P` 19440 sym_link_file=`$BASENAME $ISLINK` 19441 let COUNTER=COUNTER+1 19442 done 19443 cd $STARTDIR 19444 TEST_COMPILER=$sym_link_dir/$sym_link_file 19445 fi 19446 fi 19447 19448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 19449 $as_echo "$TEST_COMPILER" >&6; } 19450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5 19451 $as_echo_n "checking if CC is disguised ccache... " >&6; } 19452 19453 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 19454 if test "x$COMPILER_BASENAME" = "xccache"; then 19455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 19456 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } 19457 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. 19458 # We want to control ccache invocation ourselves, so ignore this cc and try 19459 # searching again. 19460 19461 # Remove the path to the fake ccache cc from the PATH 19462 RETRY_COMPILER_SAVED_PATH="$PATH" 19463 COMPILER_DIRNAME=`$DIRNAME $CC` 19464 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" 19465 19466 # Try again looking for our compiler 19467 if test -n "$ac_tool_prefix"; then 19468 for ac_prog in $COMPILER_CHECK_LIST 19469 do 19470 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 19471 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 19472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19473 $as_echo_n "checking for $ac_word... " >&6; } 19474 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then : 19475 $as_echo_n "(cached) " >&6 19476 else 19477 if test -n "$PROPER_COMPILER_CC"; then 19478 ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test. 19479 else 19480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19481 for as_dir in $PATH 19482 do 19483 IFS=$as_save_IFS 19484 test -z "$as_dir" && as_dir=. 19485 for ac_exec_ext in '' $ac_executable_extensions; do 19486 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19487 ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog" 19488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19489 break 2 19490 fi 19491 done 19492 done 19493 IFS=$as_save_IFS 19494 19495 fi 19496 fi 19497 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC 19498 if test -n "$PROPER_COMPILER_CC"; then 19499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 19500 $as_echo "$PROPER_COMPILER_CC" >&6; } 19501 else 19502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19503 $as_echo "no" >&6; } 19504 fi 19505 19506 19507 test -n "$PROPER_COMPILER_CC" && break 19508 done 19509 fi 19510 if test -z "$PROPER_COMPILER_CC"; then 19511 ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC 19512 for ac_prog in $COMPILER_CHECK_LIST 19513 do 19514 # Extract the first word of "$ac_prog", so it can be a program name with args. 19515 set dummy $ac_prog; ac_word=$2 19516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19517 $as_echo_n "checking for $ac_word... " >&6; } 19518 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then : 19519 $as_echo_n "(cached) " >&6 19520 else 19521 if test -n "$ac_ct_PROPER_COMPILER_CC"; then 19522 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test. 19523 else 19524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19525 for as_dir in $PATH 19526 do 19527 IFS=$as_save_IFS 19528 test -z "$as_dir" && as_dir=. 19529 for ac_exec_ext in '' $ac_executable_extensions; do 19530 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19531 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog" 19532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19533 break 2 19534 fi 19535 done 19536 done 19537 IFS=$as_save_IFS 19538 19539 fi 19540 fi 19541 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC 19542 if test -n "$ac_ct_PROPER_COMPILER_CC"; then 19543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5 19544 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; } 19545 else 19546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19547 $as_echo "no" >&6; } 19548 fi 19549 19550 19551 test -n "$ac_ct_PROPER_COMPILER_CC" && break 19552 done 19553 19554 if test "x$ac_ct_PROPER_COMPILER_CC" = x; then 19555 PROPER_COMPILER_CC="" 19556 else 19557 case $cross_compiling:$ac_tool_warned in 19558 yes:) 19559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 19560 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 19561 ac_tool_warned=yes ;; 19562 esac 19563 PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC 19564 fi 19565 fi 19566 19567 19568 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19569 19570 # First separate the path from the arguments. This will split at the first 19571 # space. 19572 complete="$PROPER_COMPILER_CC" 19573 path="${complete%% *}" 19574 tmp="$complete EOL" 19575 arguments="${tmp#* }" 19576 19577 # Input might be given as Windows format, start by converting to 19578 # unix format. 19579 new_path=`$CYGPATH -u "$path"` 19580 19581 # Now try to locate executable using which 19582 new_path=`$WHICH "$new_path" 2> /dev/null` 19583 # bat and cmd files are not always considered executable in cygwin causing which 19584 # to not find them 19585 if test "x$new_path" = x \ 19586 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19587 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19588 new_path=`$CYGPATH -u "$path"` 19589 fi 19590 if test "x$new_path" = x; then 19591 # Oops. Which didn't find the executable. 19592 # The splitting of arguments from the executable at a space might have been incorrect, 19593 # since paths with space are more likely in Windows. Give it another try with the whole 19594 # argument. 19595 path="$complete" 19596 arguments="EOL" 19597 new_path=`$CYGPATH -u "$path"` 19598 new_path=`$WHICH "$new_path" 2> /dev/null` 19599 # bat and cmd files are not always considered executable in cygwin causing which 19600 # to not find them 19601 if test "x$new_path" = x \ 19602 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19603 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19604 new_path=`$CYGPATH -u "$path"` 19605 fi 19606 if test "x$new_path" = x; then 19607 # It's still not found. Now this is an unrecoverable error. 19608 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19609 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19610 has_space=`$ECHO "$complete" | $GREP " "` 19611 if test "x$has_space" != x; then 19612 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19614 fi 19615 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19616 fi 19617 fi 19618 19619 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 19620 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 19621 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 19622 # "foo.exe" is OK but "foo" is an error. 19623 # 19624 # This test is therefore slightly more accurate than "test -f" to check for file precense. 19625 # It is also a way to make sure we got the proper file name for the real test later on. 19626 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 19627 if test "x$test_shortpath" = x; then 19628 # Short path failed, file does not exist as specified. 19629 # Try adding .exe or .cmd 19630 if test -f "${new_path}.exe"; then 19631 input_to_shortpath="${new_path}.exe" 19632 elif test -f "${new_path}.cmd"; then 19633 input_to_shortpath="${new_path}.cmd" 19634 else 19635 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5 19636 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;} 19637 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 19638 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 19639 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19640 fi 19641 else 19642 input_to_shortpath="$new_path" 19643 fi 19644 19645 # Call helper function which possibly converts this using DOS-style short mode. 19646 # If so, the updated path is stored in $new_path. 19647 new_path="$input_to_shortpath" 19648 19649 input_path="$input_to_shortpath" 19650 # Check if we need to convert this using DOS-style short mode. If the path 19651 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19652 # take no chances and rewrite it. 19653 # Note: m4 eats our [], so we need to use [ and ] instead. 19654 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 19655 if test "x$has_forbidden_chars" != x; then 19656 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19657 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 19658 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 19659 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 19660 # Going to short mode and back again did indeed matter. Since short mode is 19661 # case insensitive, let's make it lowercase to improve readability. 19662 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19663 # Now convert it back to Unix-stile (cygpath) 19664 input_path=`$CYGPATH -u "$shortmode_path"` 19665 new_path="$input_path" 19666 fi 19667 fi 19668 19669 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 19670 if test "x$test_cygdrive_prefix" = x; then 19671 # As a simple fix, exclude /usr/bin since it's not a real path. 19672 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 19673 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 19674 # a path prefixed by /cygdrive for fixpath to work. 19675 new_path="$CYGWIN_ROOT_PATH$input_path" 19676 fi 19677 fi 19678 19679 # remove trailing .exe if any 19680 new_path="${new_path/%.exe/}" 19681 19682 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19683 19684 # First separate the path from the arguments. This will split at the first 19685 # space. 19686 complete="$PROPER_COMPILER_CC" 19687 path="${complete%% *}" 19688 tmp="$complete EOL" 19689 arguments="${tmp#* }" 19690 19691 # Input might be given as Windows format, start by converting to 19692 # unix format. 19693 new_path="$path" 19694 19695 windows_path="$new_path" 19696 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19697 unix_path=`$CYGPATH -u "$windows_path"` 19698 new_path="$unix_path" 19699 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19700 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19701 new_path="$unix_path" 19702 fi 19703 19704 19705 # Now try to locate executable using which 19706 new_path=`$WHICH "$new_path" 2> /dev/null` 19707 19708 if test "x$new_path" = x; then 19709 # Oops. Which didn't find the executable. 19710 # The splitting of arguments from the executable at a space might have been incorrect, 19711 # since paths with space are more likely in Windows. Give it another try with the whole 19712 # argument. 19713 path="$complete" 19714 arguments="EOL" 19715 new_path="$path" 19716 19717 windows_path="$new_path" 19718 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19719 unix_path=`$CYGPATH -u "$windows_path"` 19720 new_path="$unix_path" 19721 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19722 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19723 new_path="$unix_path" 19724 fi 19725 19726 19727 new_path=`$WHICH "$new_path" 2> /dev/null` 19728 19729 if test "x$new_path" = x; then 19730 # It's still not found. Now this is an unrecoverable error. 19731 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19732 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19733 has_space=`$ECHO "$complete" | $GREP " "` 19734 if test "x$has_space" != x; then 19735 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19736 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19737 fi 19738 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19739 fi 19740 fi 19741 19742 # Now new_path has a complete unix path to the binary 19743 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 19744 # Keep paths in /bin as-is, but remove trailing .exe if any 19745 new_path="${new_path/%.exe/}" 19746 # Do not save /bin paths to all_fixpath_prefixes! 19747 else 19748 # Not in mixed or Windows style, start by that. 19749 new_path=`cmd //c echo $new_path` 19750 19751 input_path="$new_path" 19752 # Check if we need to convert this using DOS-style short mode. If the path 19753 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19754 # take no chances and rewrite it. 19755 # Note: m4 eats our [], so we need to use [ and ] instead. 19756 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 19757 if test "x$has_forbidden_chars" != x; then 19758 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19759 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19760 fi 19761 19762 # Output is in $new_path 19763 19764 windows_path="$new_path" 19765 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19766 unix_path=`$CYGPATH -u "$windows_path"` 19767 new_path="$unix_path" 19768 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19769 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19770 new_path="$unix_path" 19771 fi 19772 19773 # remove trailing .exe if any 19774 new_path="${new_path/%.exe/}" 19775 19776 # Save the first 10 bytes of this path to the storage, so fixpath can work. 19777 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 19778 fi 19779 19780 else 19781 # We're on a posix platform. Hooray! :) 19782 # First separate the path from the arguments. This will split at the first 19783 # space. 19784 complete="$PROPER_COMPILER_CC" 19785 path="${complete%% *}" 19786 tmp="$complete EOL" 19787 arguments="${tmp#* }" 19788 19789 # Cannot rely on the command "which" here since it doesn't always work. 19790 is_absolute_path=`$ECHO "$path" | $GREP ^/` 19791 if test -z "$is_absolute_path"; then 19792 # Path to executable is not absolute. Find it. 19793 IFS_save="$IFS" 19794 IFS=: 19795 for p in $PATH; do 19796 if test -f "$p/$path" && test -x "$p/$path"; then 19797 new_path="$p/$path" 19798 break 19799 fi 19800 done 19801 IFS="$IFS_save" 19802 else 19803 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5 19804 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;} 19805 new_path="$path" 19806 fi 19807 19808 if test "x$new_path" = x; then 19809 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19810 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19811 has_space=`$ECHO "$complete" | $GREP " "` 19812 if test "x$has_space" != x; then 19813 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 19814 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 19815 fi 19816 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19817 fi 19818 fi 19819 19820 # Now join together the path and the arguments once again 19821 if test "x$arguments" != xEOL; then 19822 new_complete="$new_path ${arguments% *}" 19823 else 19824 new_complete="$new_path" 19825 fi 19826 19827 if test "x$complete" != "x$new_complete"; then 19828 PROPER_COMPILER_CC="$new_complete" 19829 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 19830 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;} 19831 fi 19832 19833 PATH="$RETRY_COMPILER_SAVED_PATH" 19834 19835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5 19836 $as_echo_n "checking for resolved symbolic links for CC... " >&6; } 19837 19838 if test "x$OPENJDK_BUILD_OS" != xwindows; then 19839 # Follow a chain of symbolic links. Use readlink 19840 # where it exists, else fall back to horribly 19841 # complicated shell code. 19842 if test "x$READLINK_TESTED" != yes; then 19843 # On MacOSX there is a readlink tool with a different 19844 # purpose than the GNU readlink tool. Check the found readlink. 19845 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 19846 if test "x$ISGNU" = x; then 19847 # A readlink that we do not know how to use. 19848 # Are there other non-GNU readlinks out there? 19849 READLINK_TESTED=yes 19850 READLINK= 19851 fi 19852 fi 19853 19854 if test "x$READLINK" != x; then 19855 PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC` 19856 else 19857 # Save the current directory for restoring afterwards 19858 STARTDIR=$PWD 19859 COUNTER=0 19860 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC` 19861 sym_link_file=`$BASENAME $PROPER_COMPILER_CC` 19862 cd $sym_link_dir 19863 # Use -P flag to resolve symlinks in directories. 19864 cd `$THEPWDCMD -P` 19865 sym_link_dir=`$THEPWDCMD -P` 19866 # Resolve file symlinks 19867 while test $COUNTER -lt 20; do 19868 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 19869 if test "x$ISLINK" == x; then 19870 # This is not a symbolic link! We are done! 19871 break 19872 fi 19873 # Again resolve directory symlinks since the target of the just found 19874 # link could be in a different directory 19875 cd `$DIRNAME $ISLINK` 19876 sym_link_dir=`$THEPWDCMD -P` 19877 sym_link_file=`$BASENAME $ISLINK` 19878 let COUNTER=COUNTER+1 19879 done 19880 cd $STARTDIR 19881 PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file 19882 fi 19883 fi 19884 19885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 19886 $as_echo "$PROPER_COMPILER_CC" >&6; } 19887 CC="$PROPER_COMPILER_CC" 19888 else 19889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5 19890 $as_echo "no, keeping CC" >&6; } 19891 CC="$TEST_COMPILER" 19892 fi 19893 19894 COMPILER=$CC 19895 COMPILER_NAME=$COMPILER_NAME 19896 19897 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 19898 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work 19899 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` 19900 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 19901 if test $? -ne 0; then 19902 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 19903 19904 { $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 19905 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} 19906 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 19907 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} 19908 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 19909 else 19910 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` 19911 COMPILER_VENDOR="Sun Studio" 19912 fi 19913 elif test "x$OPENJDK_TARGET_OS" = xwindows; then 19914 # First line typically looks something like: 19915 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 19916 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` 19917 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` 19918 COMPILER_VENDOR="Microsoft CL.EXE" 19919 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` 19920 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then 19921 if test "x$COMPILER_CPU_TEST" != "x80x86"; then 19922 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 19923 fi 19924 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 19925 if test "x$COMPILER_CPU_TEST" != "xx64"; then 19926 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 19927 fi 19928 fi 19929 else 19930 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 19931 # Check that this is likely to be GCC. 19932 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null 19933 if test $? -ne 0; then 19934 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 19935 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} 19936 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 19937 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} 19938 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 19939 fi 19940 19941 # First line typically looks something like: 19942 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 19943 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` 19944 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` 19945 fi 19946 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) 19947 CC_VERSION="$COMPILER_VERSION" 19948 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) 19949 CC_VENDOR="$COMPILER_VENDOR" 19950 19951 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 19952 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} 19953 19954 19955 # Now that we have resolved CC ourself, let autoconf have its go at it 19956 ac_ext=c 19957 ac_cpp='$CPP $CPPFLAGS' 19958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 19959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 19960 ac_compiler_gnu=$ac_cv_c_compiler_gnu 19961 if test -n "$ac_tool_prefix"; then 19962 for ac_prog in $CC 19963 do 19964 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 19965 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 19966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19967 $as_echo_n "checking for $ac_word... " >&6; } 19968 if ${ac_cv_prog_CC+:} false; then : 19969 $as_echo_n "(cached) " >&6 19970 else 19971 if test -n "$CC"; then 19972 ac_cv_prog_CC="$CC" # Let the user override the test. 19973 else 19974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19975 for as_dir in $PATH 19976 do 19977 IFS=$as_save_IFS 19978 test -z "$as_dir" && as_dir=. 19979 for ac_exec_ext in '' $ac_executable_extensions; do 19980 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19981 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 19982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19983 break 2 19984 fi 19985 done 19986 done 19987 IFS=$as_save_IFS 19988 19989 fi 19990 fi 19991 CC=$ac_cv_prog_CC 19992 if test -n "$CC"; then 19993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 19994 $as_echo "$CC" >&6; } 19995 else 19996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19997 $as_echo "no" >&6; } 19998 fi 19999 20000 20001 test -n "$CC" && break 20002 done 20003 fi 20004 if test -z "$CC"; then 20005 ac_ct_CC=$CC 20006 for ac_prog in $CC 20007 do 20008 # Extract the first word of "$ac_prog", so it can be a program name with args. 20009 set dummy $ac_prog; ac_word=$2 20010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20011 $as_echo_n "checking for $ac_word... " >&6; } 20012 if ${ac_cv_prog_ac_ct_CC+:} false; then : 20013 $as_echo_n "(cached) " >&6 20014 else 20015 if test -n "$ac_ct_CC"; then 20016 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 20017 else 20018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20019 for as_dir in $PATH 20020 do 20021 IFS=$as_save_IFS 20022 test -z "$as_dir" && as_dir=. 20023 for ac_exec_ext in '' $ac_executable_extensions; do 20024 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20025 ac_cv_prog_ac_ct_CC="$ac_prog" 20026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20027 break 2 20028 fi 20029 done 20030 done 20031 IFS=$as_save_IFS 20032 20033 fi 20034 fi 20035 ac_ct_CC=$ac_cv_prog_ac_ct_CC 20036 if test -n "$ac_ct_CC"; then 20037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 20038 $as_echo "$ac_ct_CC" >&6; } 20039 else 20040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20041 $as_echo "no" >&6; } 20042 fi 20043 20044 20045 test -n "$ac_ct_CC" && break 20046 done 20047 20048 if test "x$ac_ct_CC" = x; then 20049 CC="" 20050 else 20051 case $cross_compiling:$ac_tool_warned in 20052 yes:) 20053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 20054 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 20055 ac_tool_warned=yes ;; 20056 esac 20057 CC=$ac_ct_CC 20058 fi 20059 fi 20060 20061 20062 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20063 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20064 as_fn_error $? "no acceptable C compiler found in \$PATH 20065 See \`config.log' for more details" "$LINENO" 5; } 20066 20067 # Provide some information about the compiler. 20068 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 20069 set X $ac_compile 20070 ac_compiler=$2 20071 for ac_option in --version -v -V -qversion; do 20072 { { ac_try="$ac_compiler $ac_option >&5" 20073 case "(($ac_try" in 20074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20075 *) ac_try_echo=$ac_try;; 20076 esac 20077 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20078 $as_echo "$ac_try_echo"; } >&5 20079 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 20080 ac_status=$? 20081 if test -s conftest.err; then 20082 sed '10a\ 20083 ... rest of stderr output deleted ... 20084 10q' conftest.err >conftest.er1 20085 cat conftest.er1 >&5 20086 fi 20087 rm -f conftest.er1 conftest.err 20088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20089 test $ac_status = 0; } 20090 done 20091 20092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20093 /* end confdefs.h. */ 20094 20095 int 20096 main () 20097 { 20098 20099 ; 20100 return 0; 20101 } 20102 _ACEOF 20103 ac_clean_files_save=$ac_clean_files 20104 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 20105 # Try to create an executable without -o first, disregard a.out. 20106 # It will help us diagnose broken compilers, and finding out an intuition 20107 # of exeext. 20108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 20109 $as_echo_n "checking whether the C compiler works... " >&6; } 20110 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 20111 20112 # The possible output files: 20113 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 20114 20115 ac_rmfiles= 20116 for ac_file in $ac_files 20117 do 20118 case $ac_file in 20119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 20120 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 20121 esac 20122 done 20123 rm -f $ac_rmfiles 20124 20125 if { { ac_try="$ac_link_default" 20126 case "(($ac_try" in 20127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20128 *) ac_try_echo=$ac_try;; 20129 esac 20130 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20131 $as_echo "$ac_try_echo"; } >&5 20132 (eval "$ac_link_default") 2>&5 20133 ac_status=$? 20134 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20135 test $ac_status = 0; }; then : 20136 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 20137 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 20138 # in a Makefile. We should not override ac_cv_exeext if it was cached, 20139 # so that the user can short-circuit this test for compilers unknown to 20140 # Autoconf. 20141 for ac_file in $ac_files '' 20142 do 20143 test -f "$ac_file" || continue 20144 case $ac_file in 20145 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 20146 ;; 20147 [ab].out ) 20148 # We found the default executable, but exeext='' is most 20149 # certainly right. 20150 break;; 20151 *.* ) 20152 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 20153 then :; else 20154 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 20155 fi 20156 # We set ac_cv_exeext here because the later test for it is not 20157 # safe: cross compilers may not add the suffix if given an `-o' 20158 # argument, so we may need to know it at that point already. 20159 # Even if this section looks crufty: it has the advantage of 20160 # actually working. 20161 break;; 20162 * ) 20163 break;; 20164 esac 20165 done 20166 test "$ac_cv_exeext" = no && ac_cv_exeext= 20167 20168 else 20169 ac_file='' 20170 fi 20171 if test -z "$ac_file"; then : 20172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20173 $as_echo "no" >&6; } 20174 $as_echo "$as_me: failed program was:" >&5 20175 sed 's/^/| /' conftest.$ac_ext >&5 20176 20177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20178 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20179 as_fn_error 77 "C compiler cannot create executables 20180 See \`config.log' for more details" "$LINENO" 5; } 20181 else 20182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 20183 $as_echo "yes" >&6; } 20184 fi 20185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 20186 $as_echo_n "checking for C compiler default output file name... " >&6; } 20187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 20188 $as_echo "$ac_file" >&6; } 20189 ac_exeext=$ac_cv_exeext 20190 20191 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 20192 ac_clean_files=$ac_clean_files_save 20193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 20194 $as_echo_n "checking for suffix of executables... " >&6; } 20195 if { { ac_try="$ac_link" 20196 case "(($ac_try" in 20197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20198 *) ac_try_echo=$ac_try;; 20199 esac 20200 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20201 $as_echo "$ac_try_echo"; } >&5 20202 (eval "$ac_link") 2>&5 20203 ac_status=$? 20204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20205 test $ac_status = 0; }; then : 20206 # If both `conftest.exe' and `conftest' are `present' (well, observable) 20207 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 20208 # work properly (i.e., refer to `conftest.exe'), while it won't with 20209 # `rm'. 20210 for ac_file in conftest.exe conftest conftest.*; do 20211 test -f "$ac_file" || continue 20212 case $ac_file in 20213 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 20214 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 20215 break;; 20216 * ) break;; 20217 esac 20218 done 20219 else 20220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20222 as_fn_error $? "cannot compute suffix of executables: cannot compile and link 20223 See \`config.log' for more details" "$LINENO" 5; } 20224 fi 20225 rm -f conftest conftest$ac_cv_exeext 20226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 20227 $as_echo "$ac_cv_exeext" >&6; } 20228 20229 rm -f conftest.$ac_ext 20230 EXEEXT=$ac_cv_exeext 20231 ac_exeext=$EXEEXT 20232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20233 /* end confdefs.h. */ 20234 #include <stdio.h> 20235 int 20236 main () 20237 { 20238 FILE *f = fopen ("conftest.out", "w"); 20239 return ferror (f) || fclose (f) != 0; 20240 20241 ; 20242 return 0; 20243 } 20244 _ACEOF 20245 ac_clean_files="$ac_clean_files conftest.out" 20246 # Check that the compiler produces executables we can run. If not, either 20247 # the compiler is broken, or we cross compile. 20248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 20249 $as_echo_n "checking whether we are cross compiling... " >&6; } 20250 if test "$cross_compiling" != yes; then 20251 { { ac_try="$ac_link" 20252 case "(($ac_try" in 20253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20254 *) ac_try_echo=$ac_try;; 20255 esac 20256 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20257 $as_echo "$ac_try_echo"; } >&5 20258 (eval "$ac_link") 2>&5 20259 ac_status=$? 20260 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20261 test $ac_status = 0; } 20262 if { ac_try='./conftest$ac_cv_exeext' 20263 { { case "(($ac_try" in 20264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20265 *) ac_try_echo=$ac_try;; 20266 esac 20267 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20268 $as_echo "$ac_try_echo"; } >&5 20269 (eval "$ac_try") 2>&5 20270 ac_status=$? 20271 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20272 test $ac_status = 0; }; }; then 20273 cross_compiling=no 20274 else 20275 if test "$cross_compiling" = maybe; then 20276 cross_compiling=yes 20277 else 20278 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20279 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20280 as_fn_error $? "cannot run C compiled programs. 20281 If you meant to cross compile, use \`--host'. 20282 See \`config.log' for more details" "$LINENO" 5; } 20283 fi 20284 fi 20285 fi 20286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 20287 $as_echo "$cross_compiling" >&6; } 20288 20289 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 20290 ac_clean_files=$ac_clean_files_save 20291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 20292 $as_echo_n "checking for suffix of object files... " >&6; } 20293 if ${ac_cv_objext+:} false; then : 20294 $as_echo_n "(cached) " >&6 20295 else 20296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20297 /* end confdefs.h. */ 20298 20299 int 20300 main () 20301 { 20302 20303 ; 20304 return 0; 20305 } 20306 _ACEOF 20307 rm -f conftest.o conftest.obj 20308 if { { ac_try="$ac_compile" 20309 case "(($ac_try" in 20310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20311 *) ac_try_echo=$ac_try;; 20312 esac 20313 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 20314 $as_echo "$ac_try_echo"; } >&5 20315 (eval "$ac_compile") 2>&5 20316 ac_status=$? 20317 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20318 test $ac_status = 0; }; then : 20319 for ac_file in conftest.o conftest.obj conftest.*; do 20320 test -f "$ac_file" || continue; 20321 case $ac_file in 20322 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 20323 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 20324 break;; 20325 esac 20326 done 20327 else 20328 $as_echo "$as_me: failed program was:" >&5 20329 sed 's/^/| /' conftest.$ac_ext >&5 20330 20331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20332 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20333 as_fn_error $? "cannot compute suffix of object files: cannot compile 20334 See \`config.log' for more details" "$LINENO" 5; } 20335 fi 20336 rm -f conftest.$ac_cv_objext conftest.$ac_ext 20337 fi 20338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 20339 $as_echo "$ac_cv_objext" >&6; } 20340 OBJEXT=$ac_cv_objext 20341 ac_objext=$OBJEXT 20342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 20343 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 20344 if ${ac_cv_c_compiler_gnu+:} false; then : 20345 $as_echo_n "(cached) " >&6 20346 else 20347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20348 /* end confdefs.h. */ 20349 20350 int 20351 main () 20352 { 20353 #ifndef __GNUC__ 20354 choke me 20355 #endif 20356 20357 ; 20358 return 0; 20359 } 20360 _ACEOF 20361 if ac_fn_c_try_compile "$LINENO"; then : 20362 ac_compiler_gnu=yes 20363 else 20364 ac_compiler_gnu=no 20365 fi 20366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20367 ac_cv_c_compiler_gnu=$ac_compiler_gnu 20368 20369 fi 20370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 20371 $as_echo "$ac_cv_c_compiler_gnu" >&6; } 20372 if test $ac_compiler_gnu = yes; then 20373 GCC=yes 20374 else 20375 GCC= 20376 fi 20377 ac_test_CFLAGS=${CFLAGS+set} 20378 ac_save_CFLAGS=$CFLAGS 20379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 20380 $as_echo_n "checking whether $CC accepts -g... " >&6; } 20381 if ${ac_cv_prog_cc_g+:} false; then : 20382 $as_echo_n "(cached) " >&6 20383 else 20384 ac_save_c_werror_flag=$ac_c_werror_flag 20385 ac_c_werror_flag=yes 20386 ac_cv_prog_cc_g=no 20387 CFLAGS="-g" 20388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20389 /* end confdefs.h. */ 20390 20391 int 20392 main () 20393 { 20394 20395 ; 20396 return 0; 20397 } 20398 _ACEOF 20399 if ac_fn_c_try_compile "$LINENO"; then : 20400 ac_cv_prog_cc_g=yes 20401 else 20402 CFLAGS="" 20403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20404 /* end confdefs.h. */ 20405 20406 int 20407 main () 20408 { 20409 20410 ; 20411 return 0; 20412 } 20413 _ACEOF 20414 if ac_fn_c_try_compile "$LINENO"; then : 20415 20416 else 20417 ac_c_werror_flag=$ac_save_c_werror_flag 20418 CFLAGS="-g" 20419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20420 /* end confdefs.h. */ 20421 20422 int 20423 main () 20424 { 20425 20426 ; 20427 return 0; 20428 } 20429 _ACEOF 20430 if ac_fn_c_try_compile "$LINENO"; then : 20431 ac_cv_prog_cc_g=yes 20432 fi 20433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20434 fi 20435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20436 fi 20437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20438 ac_c_werror_flag=$ac_save_c_werror_flag 20439 fi 20440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 20441 $as_echo "$ac_cv_prog_cc_g" >&6; } 20442 if test "$ac_test_CFLAGS" = set; then 20443 CFLAGS=$ac_save_CFLAGS 20444 elif test $ac_cv_prog_cc_g = yes; then 20445 if test "$GCC" = yes; then 20446 CFLAGS="-g -O2" 20447 else 20448 CFLAGS="-g" 20449 fi 20450 else 20451 if test "$GCC" = yes; then 20452 CFLAGS="-O2" 20453 else 20454 CFLAGS= 20455 fi 20456 fi 20457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 20458 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 20459 if ${ac_cv_prog_cc_c89+:} false; then : 20460 $as_echo_n "(cached) " >&6 20461 else 20462 ac_cv_prog_cc_c89=no 20463 ac_save_CC=$CC 20464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20465 /* end confdefs.h. */ 20466 #include <stdarg.h> 20467 #include <stdio.h> 20468 #include <sys/types.h> 20469 #include <sys/stat.h> 20470 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 20471 struct buf { int x; }; 20472 FILE * (*rcsopen) (struct buf *, struct stat *, int); 20473 static char *e (p, i) 20474 char **p; 20475 int i; 20476 { 20477 return p[i]; 20478 } 20479 static char *f (char * (*g) (char **, int), char **p, ...) 20480 { 20481 char *s; 20482 va_list v; 20483 va_start (v,p); 20484 s = g (p, va_arg (v,int)); 20485 va_end (v); 20486 return s; 20487 } 20488 20489 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 20490 function prototypes and stuff, but not '\xHH' hex character constants. 20491 These don't provoke an error unfortunately, instead are silently treated 20492 as 'x'. The following induces an error, until -std is added to get 20493 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 20494 array size at least. It's necessary to write '\x00'==0 to get something 20495 that's true only with -std. */ 20496 int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 20497 20498 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 20499 inside strings and character constants. */ 20500 #define FOO(x) 'x' 20501 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 20502 20503 int test (int i, double x); 20504 struct s1 {int (*f) (int a);}; 20505 struct s2 {int (*f) (double a);}; 20506 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 20507 int argc; 20508 char **argv; 20509 int 20510 main () 20511 { 20512 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 20513 ; 20514 return 0; 20515 } 20516 _ACEOF 20517 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 20518 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 20519 do 20520 CC="$ac_save_CC $ac_arg" 20521 if ac_fn_c_try_compile "$LINENO"; then : 20522 ac_cv_prog_cc_c89=$ac_arg 20523 fi 20524 rm -f core conftest.err conftest.$ac_objext 20525 test "x$ac_cv_prog_cc_c89" != "xno" && break 20526 done 20527 rm -f conftest.$ac_ext 20528 CC=$ac_save_CC 20529 20530 fi 20531 # AC_CACHE_VAL 20532 case "x$ac_cv_prog_cc_c89" in 20533 x) 20534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 20535 $as_echo "none needed" >&6; } ;; 20536 xno) 20537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 20538 $as_echo "unsupported" >&6; } ;; 20539 *) 20540 CC="$CC $ac_cv_prog_cc_c89" 20541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 20542 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 20543 esac 20544 if test "x$ac_cv_prog_cc_c89" != xno; then : 20545 20546 fi 20547 20548 ac_ext=cpp 20549 ac_cpp='$CXXCPP $CPPFLAGS' 20550 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 20551 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 20552 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 20553 20554 20555 ### Locate C++ compiler (CXX) 20556 20557 if test "x$CXX" != x; then 20558 COMPILER_CHECK_LIST="$CXX" 20559 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 20560 COMPILER_CHECK_LIST="cl" 20561 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 20562 COMPILER_CHECK_LIST="CC g++" 20563 else 20564 COMPILER_CHECK_LIST="g++ CC" 20565 fi 20566 20567 20568 COMPILER_NAME=C++ 20569 20570 CXX= 20571 # If TOOLS_DIR is set, check for all compiler names in there first 20572 # before checking the rest of the PATH. 20573 if test -n "$TOOLS_DIR"; then 20574 PATH_save="$PATH" 20575 PATH="$TOOLS_DIR" 20576 for ac_prog in $COMPILER_CHECK_LIST 20577 do 20578 # Extract the first word of "$ac_prog", so it can be a program name with args. 20579 set dummy $ac_prog; ac_word=$2 20580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20581 $as_echo_n "checking for $ac_word... " >&6; } 20582 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then : 20583 $as_echo_n "(cached) " >&6 20584 else 20585 case $TOOLS_DIR_CXX in 20586 [\\/]* | ?:[\\/]*) 20587 ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path. 20588 ;; 20589 *) 20590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20591 for as_dir in $PATH 20592 do 20593 IFS=$as_save_IFS 20594 test -z "$as_dir" && as_dir=. 20595 for ac_exec_ext in '' $ac_executable_extensions; do 20596 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20597 ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext" 20598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20599 break 2 20600 fi 20601 done 20602 done 20603 IFS=$as_save_IFS 20604 20605 ;; 20606 esac 20607 fi 20608 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX 20609 if test -n "$TOOLS_DIR_CXX"; then 20610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5 20611 $as_echo "$TOOLS_DIR_CXX" >&6; } 20612 else 20613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20614 $as_echo "no" >&6; } 20615 fi 20616 20617 20618 test -n "$TOOLS_DIR_CXX" && break 20619 done 20620 20621 CXX=$TOOLS_DIR_CXX 20622 PATH="$PATH_save" 20623 fi 20624 20625 # AC_PATH_PROGS can't be run multiple times with the same variable, 20626 # so create a new name for this run. 20627 if test "x$CXX" = x; then 20628 for ac_prog in $COMPILER_CHECK_LIST 20629 do 20630 # Extract the first word of "$ac_prog", so it can be a program name with args. 20631 set dummy $ac_prog; ac_word=$2 20632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20633 $as_echo_n "checking for $ac_word... " >&6; } 20634 if ${ac_cv_path_POTENTIAL_CXX+:} false; then : 20635 $as_echo_n "(cached) " >&6 20636 else 20637 case $POTENTIAL_CXX in 20638 [\\/]* | ?:[\\/]*) 20639 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path. 20640 ;; 20641 *) 20642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20643 for as_dir in $PATH 20644 do 20645 IFS=$as_save_IFS 20646 test -z "$as_dir" && as_dir=. 20647 for ac_exec_ext in '' $ac_executable_extensions; do 20648 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20649 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" 20650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20651 break 2 20652 fi 20653 done 20654 done 20655 IFS=$as_save_IFS 20656 20657 ;; 20658 esac 20659 fi 20660 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX 20661 if test -n "$POTENTIAL_CXX"; then 20662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5 20663 $as_echo "$POTENTIAL_CXX" >&6; } 20664 else 20665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20666 $as_echo "no" >&6; } 20667 fi 20668 20669 20670 test -n "$POTENTIAL_CXX" && break 20671 done 20672 20673 CXX=$POTENTIAL_CXX 20674 fi 20675 20676 if test "x$CXX" = x; then 20677 20678 # Print a helpful message on how to acquire the necessary build dependency. 20679 # devkit is the help tag: freetyp2, cups, pulse, alsa etc 20680 MISSING_DEPENDENCY=devkit 20681 PKGHANDLER_COMMAND= 20682 20683 case $PKGHANDLER in 20684 apt-get) 20685 apt_help $MISSING_DEPENDENCY ;; 20686 yum) 20687 yum_help $MISSING_DEPENDENCY ;; 20688 port) 20689 port_help $MISSING_DEPENDENCY ;; 20690 pkgutil) 20691 pkgutil_help $MISSING_DEPENDENCY ;; 20692 pkgadd) 20693 pkgadd_help $MISSING_DEPENDENCY ;; 20694 * ) 20695 break ;; 20696 esac 20697 20698 if test "x$PKGHANDLER_COMMAND" != x; then 20699 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 20700 fi 20701 20702 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 20703 fi 20704 20705 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20706 20707 # First separate the path from the arguments. This will split at the first 20708 # space. 20709 complete="$CXX" 20710 path="${complete%% *}" 20711 tmp="$complete EOL" 20712 arguments="${tmp#* }" 20713 20714 # Input might be given as Windows format, start by converting to 20715 # unix format. 20716 new_path=`$CYGPATH -u "$path"` 20717 20718 # Now try to locate executable using which 20719 new_path=`$WHICH "$new_path" 2> /dev/null` 20720 # bat and cmd files are not always considered executable in cygwin causing which 20721 # to not find them 20722 if test "x$new_path" = x \ 20723 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20724 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20725 new_path=`$CYGPATH -u "$path"` 20726 fi 20727 if test "x$new_path" = x; then 20728 # Oops. Which didn't find the executable. 20729 # The splitting of arguments from the executable at a space might have been incorrect, 20730 # since paths with space are more likely in Windows. Give it another try with the whole 20731 # argument. 20732 path="$complete" 20733 arguments="EOL" 20734 new_path=`$CYGPATH -u "$path"` 20735 new_path=`$WHICH "$new_path" 2> /dev/null` 20736 # bat and cmd files are not always considered executable in cygwin causing which 20737 # to not find them 20738 if test "x$new_path" = x \ 20739 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20740 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20741 new_path=`$CYGPATH -u "$path"` 20742 fi 20743 if test "x$new_path" = x; then 20744 # It's still not found. Now this is an unrecoverable error. 20745 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20746 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20747 has_space=`$ECHO "$complete" | $GREP " "` 20748 if test "x$has_space" != x; then 20749 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20750 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20751 fi 20752 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20753 fi 20754 fi 20755 20756 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 20757 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 20758 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 20759 # "foo.exe" is OK but "foo" is an error. 20760 # 20761 # This test is therefore slightly more accurate than "test -f" to check for file precense. 20762 # It is also a way to make sure we got the proper file name for the real test later on. 20763 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 20764 if test "x$test_shortpath" = x; then 20765 # Short path failed, file does not exist as specified. 20766 # Try adding .exe or .cmd 20767 if test -f "${new_path}.exe"; then 20768 input_to_shortpath="${new_path}.exe" 20769 elif test -f "${new_path}.cmd"; then 20770 input_to_shortpath="${new_path}.cmd" 20771 else 20772 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5 20773 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;} 20774 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 20775 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 20776 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20777 fi 20778 else 20779 input_to_shortpath="$new_path" 20780 fi 20781 20782 # Call helper function which possibly converts this using DOS-style short mode. 20783 # If so, the updated path is stored in $new_path. 20784 new_path="$input_to_shortpath" 20785 20786 input_path="$input_to_shortpath" 20787 # Check if we need to convert this using DOS-style short mode. If the path 20788 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20789 # take no chances and rewrite it. 20790 # Note: m4 eats our [], so we need to use [ and ] instead. 20791 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 20792 if test "x$has_forbidden_chars" != x; then 20793 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20794 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 20795 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 20796 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 20797 # Going to short mode and back again did indeed matter. Since short mode is 20798 # case insensitive, let's make it lowercase to improve readability. 20799 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20800 # Now convert it back to Unix-stile (cygpath) 20801 input_path=`$CYGPATH -u "$shortmode_path"` 20802 new_path="$input_path" 20803 fi 20804 fi 20805 20806 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 20807 if test "x$test_cygdrive_prefix" = x; then 20808 # As a simple fix, exclude /usr/bin since it's not a real path. 20809 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 20810 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 20811 # a path prefixed by /cygdrive for fixpath to work. 20812 new_path="$CYGWIN_ROOT_PATH$input_path" 20813 fi 20814 fi 20815 20816 # remove trailing .exe if any 20817 new_path="${new_path/%.exe/}" 20818 20819 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20820 20821 # First separate the path from the arguments. This will split at the first 20822 # space. 20823 complete="$CXX" 20824 path="${complete%% *}" 20825 tmp="$complete EOL" 20826 arguments="${tmp#* }" 20827 20828 # Input might be given as Windows format, start by converting to 20829 # unix format. 20830 new_path="$path" 20831 20832 windows_path="$new_path" 20833 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20834 unix_path=`$CYGPATH -u "$windows_path"` 20835 new_path="$unix_path" 20836 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20837 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20838 new_path="$unix_path" 20839 fi 20840 20841 20842 # Now try to locate executable using which 20843 new_path=`$WHICH "$new_path" 2> /dev/null` 20844 20845 if test "x$new_path" = x; then 20846 # Oops. Which didn't find the executable. 20847 # The splitting of arguments from the executable at a space might have been incorrect, 20848 # since paths with space are more likely in Windows. Give it another try with the whole 20849 # argument. 20850 path="$complete" 20851 arguments="EOL" 20852 new_path="$path" 20853 20854 windows_path="$new_path" 20855 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20856 unix_path=`$CYGPATH -u "$windows_path"` 20857 new_path="$unix_path" 20858 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20859 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20860 new_path="$unix_path" 20861 fi 20862 20863 20864 new_path=`$WHICH "$new_path" 2> /dev/null` 20865 20866 if test "x$new_path" = x; then 20867 # It's still not found. Now this is an unrecoverable error. 20868 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20869 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20870 has_space=`$ECHO "$complete" | $GREP " "` 20871 if test "x$has_space" != x; then 20872 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20873 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20874 fi 20875 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20876 fi 20877 fi 20878 20879 # Now new_path has a complete unix path to the binary 20880 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 20881 # Keep paths in /bin as-is, but remove trailing .exe if any 20882 new_path="${new_path/%.exe/}" 20883 # Do not save /bin paths to all_fixpath_prefixes! 20884 else 20885 # Not in mixed or Windows style, start by that. 20886 new_path=`cmd //c echo $new_path` 20887 20888 input_path="$new_path" 20889 # Check if we need to convert this using DOS-style short mode. If the path 20890 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20891 # take no chances and rewrite it. 20892 # Note: m4 eats our [], so we need to use [ and ] instead. 20893 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 20894 if test "x$has_forbidden_chars" != x; then 20895 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20896 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20897 fi 20898 20899 # Output is in $new_path 20900 20901 windows_path="$new_path" 20902 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20903 unix_path=`$CYGPATH -u "$windows_path"` 20904 new_path="$unix_path" 20905 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20906 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20907 new_path="$unix_path" 20908 fi 20909 20910 # remove trailing .exe if any 20911 new_path="${new_path/%.exe/}" 20912 20913 # Save the first 10 bytes of this path to the storage, so fixpath can work. 20914 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 20915 fi 20916 20917 else 20918 # We're on a posix platform. Hooray! :) 20919 # First separate the path from the arguments. This will split at the first 20920 # space. 20921 complete="$CXX" 20922 path="${complete%% *}" 20923 tmp="$complete EOL" 20924 arguments="${tmp#* }" 20925 20926 # Cannot rely on the command "which" here since it doesn't always work. 20927 is_absolute_path=`$ECHO "$path" | $GREP ^/` 20928 if test -z "$is_absolute_path"; then 20929 # Path to executable is not absolute. Find it. 20930 IFS_save="$IFS" 20931 IFS=: 20932 for p in $PATH; do 20933 if test -f "$p/$path" && test -x "$p/$path"; then 20934 new_path="$p/$path" 20935 break 20936 fi 20937 done 20938 IFS="$IFS_save" 20939 else 20940 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5 20941 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;} 20942 new_path="$path" 20943 fi 20944 20945 if test "x$new_path" = x; then 20946 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20947 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20948 has_space=`$ECHO "$complete" | $GREP " "` 20949 if test "x$has_space" != x; then 20950 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 20951 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 20952 fi 20953 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20954 fi 20955 fi 20956 20957 # Now join together the path and the arguments once again 20958 if test "x$arguments" != xEOL; then 20959 new_complete="$new_path ${arguments% *}" 20960 else 20961 new_complete="$new_path" 20962 fi 20963 20964 if test "x$complete" != "x$new_complete"; then 20965 CXX="$new_complete" 20966 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5 20967 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;} 20968 fi 20969 20970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 20971 $as_echo_n "checking resolved symbolic links for CXX... " >&6; } 20972 TEST_COMPILER="$CXX" 20973 20974 if test "x$OPENJDK_BUILD_OS" != xwindows; then 20975 # Follow a chain of symbolic links. Use readlink 20976 # where it exists, else fall back to horribly 20977 # complicated shell code. 20978 if test "x$READLINK_TESTED" != yes; then 20979 # On MacOSX there is a readlink tool with a different 20980 # purpose than the GNU readlink tool. Check the found readlink. 20981 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 20982 if test "x$ISGNU" = x; then 20983 # A readlink that we do not know how to use. 20984 # Are there other non-GNU readlinks out there? 20985 READLINK_TESTED=yes 20986 READLINK= 20987 fi 20988 fi 20989 20990 if test "x$READLINK" != x; then 20991 TEST_COMPILER=`$READLINK -f $TEST_COMPILER` 20992 else 20993 # Save the current directory for restoring afterwards 20994 STARTDIR=$PWD 20995 COUNTER=0 20996 sym_link_dir=`$DIRNAME $TEST_COMPILER` 20997 sym_link_file=`$BASENAME $TEST_COMPILER` 20998 cd $sym_link_dir 20999 # Use -P flag to resolve symlinks in directories. 21000 cd `$THEPWDCMD -P` 21001 sym_link_dir=`$THEPWDCMD -P` 21002 # Resolve file symlinks 21003 while test $COUNTER -lt 20; do 21004 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 21005 if test "x$ISLINK" == x; then 21006 # This is not a symbolic link! We are done! 21007 break 21008 fi 21009 # Again resolve directory symlinks since the target of the just found 21010 # link could be in a different directory 21011 cd `$DIRNAME $ISLINK` 21012 sym_link_dir=`$THEPWDCMD -P` 21013 sym_link_file=`$BASENAME $ISLINK` 21014 let COUNTER=COUNTER+1 21015 done 21016 cd $STARTDIR 21017 TEST_COMPILER=$sym_link_dir/$sym_link_file 21018 fi 21019 fi 21020 21021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 21022 $as_echo "$TEST_COMPILER" >&6; } 21023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5 21024 $as_echo_n "checking if CXX is disguised ccache... " >&6; } 21025 21026 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 21027 if test "x$COMPILER_BASENAME" = "xccache"; then 21028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 21029 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } 21030 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. 21031 # We want to control ccache invocation ourselves, so ignore this cc and try 21032 # searching again. 21033 21034 # Remove the path to the fake ccache cc from the PATH 21035 RETRY_COMPILER_SAVED_PATH="$PATH" 21036 COMPILER_DIRNAME=`$DIRNAME $CXX` 21037 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" 21038 21039 # Try again looking for our compiler 21040 if test -n "$ac_tool_prefix"; then 21041 for ac_prog in $COMPILER_CHECK_LIST 21042 do 21043 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21044 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21046 $as_echo_n "checking for $ac_word... " >&6; } 21047 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then : 21048 $as_echo_n "(cached) " >&6 21049 else 21050 if test -n "$PROPER_COMPILER_CXX"; then 21051 ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test. 21052 else 21053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21054 for as_dir in $PATH 21055 do 21056 IFS=$as_save_IFS 21057 test -z "$as_dir" && as_dir=. 21058 for ac_exec_ext in '' $ac_executable_extensions; do 21059 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21060 ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog" 21061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21062 break 2 21063 fi 21064 done 21065 done 21066 IFS=$as_save_IFS 21067 21068 fi 21069 fi 21070 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX 21071 if test -n "$PROPER_COMPILER_CXX"; then 21072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 21073 $as_echo "$PROPER_COMPILER_CXX" >&6; } 21074 else 21075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21076 $as_echo "no" >&6; } 21077 fi 21078 21079 21080 test -n "$PROPER_COMPILER_CXX" && break 21081 done 21082 fi 21083 if test -z "$PROPER_COMPILER_CXX"; then 21084 ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX 21085 for ac_prog in $COMPILER_CHECK_LIST 21086 do 21087 # Extract the first word of "$ac_prog", so it can be a program name with args. 21088 set dummy $ac_prog; ac_word=$2 21089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21090 $as_echo_n "checking for $ac_word... " >&6; } 21091 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then : 21092 $as_echo_n "(cached) " >&6 21093 else 21094 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then 21095 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test. 21096 else 21097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21098 for as_dir in $PATH 21099 do 21100 IFS=$as_save_IFS 21101 test -z "$as_dir" && as_dir=. 21102 for ac_exec_ext in '' $ac_executable_extensions; do 21103 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21104 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog" 21105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21106 break 2 21107 fi 21108 done 21109 done 21110 IFS=$as_save_IFS 21111 21112 fi 21113 fi 21114 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX 21115 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then 21116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5 21117 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; } 21118 else 21119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21120 $as_echo "no" >&6; } 21121 fi 21122 21123 21124 test -n "$ac_ct_PROPER_COMPILER_CXX" && break 21125 done 21126 21127 if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then 21128 PROPER_COMPILER_CXX="" 21129 else 21130 case $cross_compiling:$ac_tool_warned in 21131 yes:) 21132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21133 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21134 ac_tool_warned=yes ;; 21135 esac 21136 PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX 21137 fi 21138 fi 21139 21140 21141 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21142 21143 # First separate the path from the arguments. This will split at the first 21144 # space. 21145 complete="$PROPER_COMPILER_CXX" 21146 path="${complete%% *}" 21147 tmp="$complete EOL" 21148 arguments="${tmp#* }" 21149 21150 # Input might be given as Windows format, start by converting to 21151 # unix format. 21152 new_path=`$CYGPATH -u "$path"` 21153 21154 # Now try to locate executable using which 21155 new_path=`$WHICH "$new_path" 2> /dev/null` 21156 # bat and cmd files are not always considered executable in cygwin causing which 21157 # to not find them 21158 if test "x$new_path" = x \ 21159 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 21160 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 21161 new_path=`$CYGPATH -u "$path"` 21162 fi 21163 if test "x$new_path" = x; then 21164 # Oops. Which didn't find the executable. 21165 # The splitting of arguments from the executable at a space might have been incorrect, 21166 # since paths with space are more likely in Windows. Give it another try with the whole 21167 # argument. 21168 path="$complete" 21169 arguments="EOL" 21170 new_path=`$CYGPATH -u "$path"` 21171 new_path=`$WHICH "$new_path" 2> /dev/null` 21172 # bat and cmd files are not always considered executable in cygwin causing which 21173 # to not find them 21174 if test "x$new_path" = x \ 21175 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 21176 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 21177 new_path=`$CYGPATH -u "$path"` 21178 fi 21179 if test "x$new_path" = x; then 21180 # It's still not found. Now this is an unrecoverable error. 21181 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 21182 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 21183 has_space=`$ECHO "$complete" | $GREP " "` 21184 if test "x$has_space" != x; then 21185 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21186 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21187 fi 21188 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21189 fi 21190 fi 21191 21192 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 21193 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 21194 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 21195 # "foo.exe" is OK but "foo" is an error. 21196 # 21197 # This test is therefore slightly more accurate than "test -f" to check for file precense. 21198 # It is also a way to make sure we got the proper file name for the real test later on. 21199 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 21200 if test "x$test_shortpath" = x; then 21201 # Short path failed, file does not exist as specified. 21202 # Try adding .exe or .cmd 21203 if test -f "${new_path}.exe"; then 21204 input_to_shortpath="${new_path}.exe" 21205 elif test -f "${new_path}.cmd"; then 21206 input_to_shortpath="${new_path}.cmd" 21207 else 21208 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5 21209 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;} 21210 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 21211 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 21212 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21213 fi 21214 else 21215 input_to_shortpath="$new_path" 21216 fi 21217 21218 # Call helper function which possibly converts this using DOS-style short mode. 21219 # If so, the updated path is stored in $new_path. 21220 new_path="$input_to_shortpath" 21221 21222 input_path="$input_to_shortpath" 21223 # Check if we need to convert this using DOS-style short mode. If the path 21224 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21225 # take no chances and rewrite it. 21226 # Note: m4 eats our [], so we need to use [ and ] instead. 21227 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 21228 if test "x$has_forbidden_chars" != x; then 21229 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21230 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 21231 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 21232 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 21233 # Going to short mode and back again did indeed matter. Since short mode is 21234 # case insensitive, let's make it lowercase to improve readability. 21235 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21236 # Now convert it back to Unix-stile (cygpath) 21237 input_path=`$CYGPATH -u "$shortmode_path"` 21238 new_path="$input_path" 21239 fi 21240 fi 21241 21242 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 21243 if test "x$test_cygdrive_prefix" = x; then 21244 # As a simple fix, exclude /usr/bin since it's not a real path. 21245 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 21246 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 21247 # a path prefixed by /cygdrive for fixpath to work. 21248 new_path="$CYGWIN_ROOT_PATH$input_path" 21249 fi 21250 fi 21251 21252 # remove trailing .exe if any 21253 new_path="${new_path/%.exe/}" 21254 21255 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21256 21257 # First separate the path from the arguments. This will split at the first 21258 # space. 21259 complete="$PROPER_COMPILER_CXX" 21260 path="${complete%% *}" 21261 tmp="$complete EOL" 21262 arguments="${tmp#* }" 21263 21264 # Input might be given as Windows format, start by converting to 21265 # unix format. 21266 new_path="$path" 21267 21268 windows_path="$new_path" 21269 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21270 unix_path=`$CYGPATH -u "$windows_path"` 21271 new_path="$unix_path" 21272 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21273 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21274 new_path="$unix_path" 21275 fi 21276 21277 21278 # Now try to locate executable using which 21279 new_path=`$WHICH "$new_path" 2> /dev/null` 21280 21281 if test "x$new_path" = x; then 21282 # Oops. Which didn't find the executable. 21283 # The splitting of arguments from the executable at a space might have been incorrect, 21284 # since paths with space are more likely in Windows. Give it another try with the whole 21285 # argument. 21286 path="$complete" 21287 arguments="EOL" 21288 new_path="$path" 21289 21290 windows_path="$new_path" 21291 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21292 unix_path=`$CYGPATH -u "$windows_path"` 21293 new_path="$unix_path" 21294 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21295 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21296 new_path="$unix_path" 21297 fi 21298 21299 21300 new_path=`$WHICH "$new_path" 2> /dev/null` 21301 21302 if test "x$new_path" = x; then 21303 # It's still not found. Now this is an unrecoverable error. 21304 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 21305 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 21306 has_space=`$ECHO "$complete" | $GREP " "` 21307 if test "x$has_space" != x; then 21308 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21309 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21310 fi 21311 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21312 fi 21313 fi 21314 21315 # Now new_path has a complete unix path to the binary 21316 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 21317 # Keep paths in /bin as-is, but remove trailing .exe if any 21318 new_path="${new_path/%.exe/}" 21319 # Do not save /bin paths to all_fixpath_prefixes! 21320 else 21321 # Not in mixed or Windows style, start by that. 21322 new_path=`cmd //c echo $new_path` 21323 21324 input_path="$new_path" 21325 # Check if we need to convert this using DOS-style short mode. If the path 21326 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21327 # take no chances and rewrite it. 21328 # Note: m4 eats our [], so we need to use [ and ] instead. 21329 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 21330 if test "x$has_forbidden_chars" != x; then 21331 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21332 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21333 fi 21334 21335 # Output is in $new_path 21336 21337 windows_path="$new_path" 21338 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21339 unix_path=`$CYGPATH -u "$windows_path"` 21340 new_path="$unix_path" 21341 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21342 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21343 new_path="$unix_path" 21344 fi 21345 21346 # remove trailing .exe if any 21347 new_path="${new_path/%.exe/}" 21348 21349 # Save the first 10 bytes of this path to the storage, so fixpath can work. 21350 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 21351 fi 21352 21353 else 21354 # We're on a posix platform. Hooray! :) 21355 # First separate the path from the arguments. This will split at the first 21356 # space. 21357 complete="$PROPER_COMPILER_CXX" 21358 path="${complete%% *}" 21359 tmp="$complete EOL" 21360 arguments="${tmp#* }" 21361 21362 # Cannot rely on the command "which" here since it doesn't always work. 21363 is_absolute_path=`$ECHO "$path" | $GREP ^/` 21364 if test -z "$is_absolute_path"; then 21365 # Path to executable is not absolute. Find it. 21366 IFS_save="$IFS" 21367 IFS=: 21368 for p in $PATH; do 21369 if test -f "$p/$path" && test -x "$p/$path"; then 21370 new_path="$p/$path" 21371 break 21372 fi 21373 done 21374 IFS="$IFS_save" 21375 else 21376 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5 21377 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;} 21378 new_path="$path" 21379 fi 21380 21381 if test "x$new_path" = x; then 21382 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 21383 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 21384 has_space=`$ECHO "$complete" | $GREP " "` 21385 if test "x$has_space" != x; then 21386 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 21387 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 21388 fi 21389 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21390 fi 21391 fi 21392 21393 # Now join together the path and the arguments once again 21394 if test "x$arguments" != xEOL; then 21395 new_complete="$new_path ${arguments% *}" 21396 else 21397 new_complete="$new_path" 21398 fi 21399 21400 if test "x$complete" != "x$new_complete"; then 21401 PROPER_COMPILER_CXX="$new_complete" 21402 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 21403 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;} 21404 fi 21405 21406 PATH="$RETRY_COMPILER_SAVED_PATH" 21407 21408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5 21409 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; } 21410 21411 if test "x$OPENJDK_BUILD_OS" != xwindows; then 21412 # Follow a chain of symbolic links. Use readlink 21413 # where it exists, else fall back to horribly 21414 # complicated shell code. 21415 if test "x$READLINK_TESTED" != yes; then 21416 # On MacOSX there is a readlink tool with a different 21417 # purpose than the GNU readlink tool. Check the found readlink. 21418 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 21419 if test "x$ISGNU" = x; then 21420 # A readlink that we do not know how to use. 21421 # Are there other non-GNU readlinks out there? 21422 READLINK_TESTED=yes 21423 READLINK= 21424 fi 21425 fi 21426 21427 if test "x$READLINK" != x; then 21428 PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX` 21429 else 21430 # Save the current directory for restoring afterwards 21431 STARTDIR=$PWD 21432 COUNTER=0 21433 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX` 21434 sym_link_file=`$BASENAME $PROPER_COMPILER_CXX` 21435 cd $sym_link_dir 21436 # Use -P flag to resolve symlinks in directories. 21437 cd `$THEPWDCMD -P` 21438 sym_link_dir=`$THEPWDCMD -P` 21439 # Resolve file symlinks 21440 while test $COUNTER -lt 20; do 21441 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 21442 if test "x$ISLINK" == x; then 21443 # This is not a symbolic link! We are done! 21444 break 21445 fi 21446 # Again resolve directory symlinks since the target of the just found 21447 # link could be in a different directory 21448 cd `$DIRNAME $ISLINK` 21449 sym_link_dir=`$THEPWDCMD -P` 21450 sym_link_file=`$BASENAME $ISLINK` 21451 let COUNTER=COUNTER+1 21452 done 21453 cd $STARTDIR 21454 PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file 21455 fi 21456 fi 21457 21458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 21459 $as_echo "$PROPER_COMPILER_CXX" >&6; } 21460 CXX="$PROPER_COMPILER_CXX" 21461 else 21462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5 21463 $as_echo "no, keeping CXX" >&6; } 21464 CXX="$TEST_COMPILER" 21465 fi 21466 21467 COMPILER=$CXX 21468 COMPILER_NAME=$COMPILER_NAME 21469 21470 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 21471 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work 21472 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` 21473 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 21474 if test $? -ne 0; then 21475 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 21476 21477 { $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 21478 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} 21479 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 21480 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} 21481 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 21482 else 21483 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` 21484 COMPILER_VENDOR="Sun Studio" 21485 fi 21486 elif test "x$OPENJDK_TARGET_OS" = xwindows; then 21487 # First line typically looks something like: 21488 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 21489 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` 21490 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` 21491 COMPILER_VENDOR="Microsoft CL.EXE" 21492 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` 21493 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then 21494 if test "x$COMPILER_CPU_TEST" != "x80x86"; then 21495 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 21496 fi 21497 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 21498 if test "x$COMPILER_CPU_TEST" != "xx64"; then 21499 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 21500 fi 21501 fi 21502 else 21503 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 21504 # Check that this is likely to be GCC. 21505 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null 21506 if test $? -ne 0; then 21507 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 21508 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} 21509 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 21510 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} 21511 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 21512 fi 21513 21514 # First line typically looks something like: 21515 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 21516 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` 21517 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` 21518 fi 21519 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) 21520 CXX_VERSION="$COMPILER_VERSION" 21521 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) 21522 CXX_VENDOR="$COMPILER_VENDOR" 21523 21524 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 21525 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} 21526 21527 21528 # Now that we have resolved CXX ourself, let autoconf have its go at it 21529 ac_ext=cpp 21530 ac_cpp='$CXXCPP $CPPFLAGS' 21531 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21532 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21533 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21534 if test -z "$CXX"; then 21535 if test -n "$CCC"; then 21536 CXX=$CCC 21537 else 21538 if test -n "$ac_tool_prefix"; then 21539 for ac_prog in $CXX 21540 do 21541 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21542 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21544 $as_echo_n "checking for $ac_word... " >&6; } 21545 if ${ac_cv_prog_CXX+:} false; then : 21546 $as_echo_n "(cached) " >&6 21547 else 21548 if test -n "$CXX"; then 21549 ac_cv_prog_CXX="$CXX" # Let the user override the test. 21550 else 21551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21552 for as_dir in $PATH 21553 do 21554 IFS=$as_save_IFS 21555 test -z "$as_dir" && as_dir=. 21556 for ac_exec_ext in '' $ac_executable_extensions; do 21557 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21558 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 21559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21560 break 2 21561 fi 21562 done 21563 done 21564 IFS=$as_save_IFS 21565 21566 fi 21567 fi 21568 CXX=$ac_cv_prog_CXX 21569 if test -n "$CXX"; then 21570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 21571 $as_echo "$CXX" >&6; } 21572 else 21573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21574 $as_echo "no" >&6; } 21575 fi 21576 21577 21578 test -n "$CXX" && break 21579 done 21580 fi 21581 if test -z "$CXX"; then 21582 ac_ct_CXX=$CXX 21583 for ac_prog in $CXX 21584 do 21585 # Extract the first word of "$ac_prog", so it can be a program name with args. 21586 set dummy $ac_prog; ac_word=$2 21587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21588 $as_echo_n "checking for $ac_word... " >&6; } 21589 if ${ac_cv_prog_ac_ct_CXX+:} false; then : 21590 $as_echo_n "(cached) " >&6 21591 else 21592 if test -n "$ac_ct_CXX"; then 21593 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 21594 else 21595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21596 for as_dir in $PATH 21597 do 21598 IFS=$as_save_IFS 21599 test -z "$as_dir" && as_dir=. 21600 for ac_exec_ext in '' $ac_executable_extensions; do 21601 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21602 ac_cv_prog_ac_ct_CXX="$ac_prog" 21603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21604 break 2 21605 fi 21606 done 21607 done 21608 IFS=$as_save_IFS 21609 21610 fi 21611 fi 21612 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 21613 if test -n "$ac_ct_CXX"; then 21614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 21615 $as_echo "$ac_ct_CXX" >&6; } 21616 else 21617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21618 $as_echo "no" >&6; } 21619 fi 21620 21621 21622 test -n "$ac_ct_CXX" && break 21623 done 21624 21625 if test "x$ac_ct_CXX" = x; then 21626 CXX="g++" 21627 else 21628 case $cross_compiling:$ac_tool_warned in 21629 yes:) 21630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21631 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21632 ac_tool_warned=yes ;; 21633 esac 21634 CXX=$ac_ct_CXX 21635 fi 21636 fi 21637 21638 fi 21639 fi 21640 # Provide some information about the compiler. 21641 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 21642 set X $ac_compile 21643 ac_compiler=$2 21644 for ac_option in --version -v -V -qversion; do 21645 { { ac_try="$ac_compiler $ac_option >&5" 21646 case "(($ac_try" in 21647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21648 *) ac_try_echo=$ac_try;; 21649 esac 21650 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 21651 $as_echo "$ac_try_echo"; } >&5 21652 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 21653 ac_status=$? 21654 if test -s conftest.err; then 21655 sed '10a\ 21656 ... rest of stderr output deleted ... 21657 10q' conftest.err >conftest.er1 21658 cat conftest.er1 >&5 21659 fi 21660 rm -f conftest.er1 conftest.err 21661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 21662 test $ac_status = 0; } 21663 done 21664 21665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 21666 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } 21667 if ${ac_cv_cxx_compiler_gnu+:} false; then : 21668 $as_echo_n "(cached) " >&6 21669 else 21670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21671 /* end confdefs.h. */ 21672 21673 int 21674 main () 21675 { 21676 #ifndef __GNUC__ 21677 choke me 21678 #endif 21679 21680 ; 21681 return 0; 21682 } 21683 _ACEOF 21684 if ac_fn_cxx_try_compile "$LINENO"; then : 21685 ac_compiler_gnu=yes 21686 else 21687 ac_compiler_gnu=no 21688 fi 21689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21690 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 21691 21692 fi 21693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 21694 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } 21695 if test $ac_compiler_gnu = yes; then 21696 GXX=yes 21697 else 21698 GXX= 21699 fi 21700 ac_test_CXXFLAGS=${CXXFLAGS+set} 21701 ac_save_CXXFLAGS=$CXXFLAGS 21702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 21703 $as_echo_n "checking whether $CXX accepts -g... " >&6; } 21704 if ${ac_cv_prog_cxx_g+:} false; then : 21705 $as_echo_n "(cached) " >&6 21706 else 21707 ac_save_cxx_werror_flag=$ac_cxx_werror_flag 21708 ac_cxx_werror_flag=yes 21709 ac_cv_prog_cxx_g=no 21710 CXXFLAGS="-g" 21711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21712 /* end confdefs.h. */ 21713 21714 int 21715 main () 21716 { 21717 21718 ; 21719 return 0; 21720 } 21721 _ACEOF 21722 if ac_fn_cxx_try_compile "$LINENO"; then : 21723 ac_cv_prog_cxx_g=yes 21724 else 21725 CXXFLAGS="" 21726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21727 /* end confdefs.h. */ 21728 21729 int 21730 main () 21731 { 21732 21733 ; 21734 return 0; 21735 } 21736 _ACEOF 21737 if ac_fn_cxx_try_compile "$LINENO"; then : 21738 21739 else 21740 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21741 CXXFLAGS="-g" 21742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21743 /* end confdefs.h. */ 21744 21745 int 21746 main () 21747 { 21748 21749 ; 21750 return 0; 21751 } 21752 _ACEOF 21753 if ac_fn_cxx_try_compile "$LINENO"; then : 21754 ac_cv_prog_cxx_g=yes 21755 fi 21756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21757 fi 21758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21759 fi 21760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21761 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21762 fi 21763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 21764 $as_echo "$ac_cv_prog_cxx_g" >&6; } 21765 if test "$ac_test_CXXFLAGS" = set; then 21766 CXXFLAGS=$ac_save_CXXFLAGS 21767 elif test $ac_cv_prog_cxx_g = yes; then 21768 if test "$GXX" = yes; then 21769 CXXFLAGS="-g -O2" 21770 else 21771 CXXFLAGS="-g" 21772 fi 21773 else 21774 if test "$GXX" = yes; then 21775 CXXFLAGS="-O2" 21776 else 21777 CXXFLAGS= 21778 fi 21779 fi 21780 ac_ext=cpp 21781 ac_cpp='$CXXCPP $CPPFLAGS' 21782 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21783 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21784 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21785 21786 21787 ### Locate other tools 21788 21789 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 21790 ac_ext=m 21791 ac_cpp='$OBJCPP $CPPFLAGS' 21792 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21793 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21794 ac_compiler_gnu=$ac_cv_objc_compiler_gnu 21795 if test -n "$ac_tool_prefix"; then 21796 for ac_prog in gcc objcc objc cc CC 21797 do 21798 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21799 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21801 $as_echo_n "checking for $ac_word... " >&6; } 21802 if ${ac_cv_prog_OBJC+:} false; then : 21803 $as_echo_n "(cached) " >&6 21804 else 21805 if test -n "$OBJC"; then 21806 ac_cv_prog_OBJC="$OBJC" # Let the user override the test. 21807 else 21808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21809 for as_dir in $PATH 21810 do 21811 IFS=$as_save_IFS 21812 test -z "$as_dir" && as_dir=. 21813 for ac_exec_ext in '' $ac_executable_extensions; do 21814 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21815 ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" 21816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21817 break 2 21818 fi 21819 done 21820 done 21821 IFS=$as_save_IFS 21822 21823 fi 21824 fi 21825 OBJC=$ac_cv_prog_OBJC 21826 if test -n "$OBJC"; then 21827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 21828 $as_echo "$OBJC" >&6; } 21829 else 21830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21831 $as_echo "no" >&6; } 21832 fi 21833 21834 21835 test -n "$OBJC" && break 21836 done 21837 fi 21838 if test -z "$OBJC"; then 21839 ac_ct_OBJC=$OBJC 21840 for ac_prog in gcc objcc objc cc CC 21841 do 21842 # Extract the first word of "$ac_prog", so it can be a program name with args. 21843 set dummy $ac_prog; ac_word=$2 21844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21845 $as_echo_n "checking for $ac_word... " >&6; } 21846 if ${ac_cv_prog_ac_ct_OBJC+:} false; then : 21847 $as_echo_n "(cached) " >&6 21848 else 21849 if test -n "$ac_ct_OBJC"; then 21850 ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. 21851 else 21852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21853 for as_dir in $PATH 21854 do 21855 IFS=$as_save_IFS 21856 test -z "$as_dir" && as_dir=. 21857 for ac_exec_ext in '' $ac_executable_extensions; do 21858 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21859 ac_cv_prog_ac_ct_OBJC="$ac_prog" 21860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21861 break 2 21862 fi 21863 done 21864 done 21865 IFS=$as_save_IFS 21866 21867 fi 21868 fi 21869 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC 21870 if test -n "$ac_ct_OBJC"; then 21871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 21872 $as_echo "$ac_ct_OBJC" >&6; } 21873 else 21874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21875 $as_echo "no" >&6; } 21876 fi 21877 21878 21879 test -n "$ac_ct_OBJC" && break 21880 done 21881 21882 if test "x$ac_ct_OBJC" = x; then 21883 OBJC="gcc" 21884 else 21885 case $cross_compiling:$ac_tool_warned in 21886 yes:) 21887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21888 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21889 ac_tool_warned=yes ;; 21890 esac 21891 OBJC=$ac_ct_OBJC 21892 fi 21893 fi 21894 21895 # Provide some information about the compiler. 21896 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 21897 set X $ac_compile 21898 ac_compiler=$2 21899 for ac_option in --version -v -V -qversion; do 21900 { { ac_try="$ac_compiler $ac_option >&5" 21901 case "(($ac_try" in 21902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21903 *) ac_try_echo=$ac_try;; 21904 esac 21905 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 21906 $as_echo "$ac_try_echo"; } >&5 21907 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 21908 ac_status=$? 21909 if test -s conftest.err; then 21910 sed '10a\ 21911 ... rest of stderr output deleted ... 21912 10q' conftest.err >conftest.er1 21913 cat conftest.er1 >&5 21914 fi 21915 rm -f conftest.er1 conftest.err 21916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 21917 test $ac_status = 0; } 21918 done 21919 21920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5 21921 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; } 21922 if ${ac_cv_objc_compiler_gnu+:} false; then : 21923 $as_echo_n "(cached) " >&6 21924 else 21925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21926 /* end confdefs.h. */ 21927 21928 int 21929 main () 21930 { 21931 #ifndef __GNUC__ 21932 choke me 21933 #endif 21934 21935 ; 21936 return 0; 21937 } 21938 _ACEOF 21939 if ac_fn_objc_try_compile "$LINENO"; then : 21940 ac_compiler_gnu=yes 21941 else 21942 ac_compiler_gnu=no 21943 fi 21944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21945 ac_cv_objc_compiler_gnu=$ac_compiler_gnu 21946 21947 fi 21948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 21949 $as_echo "$ac_cv_objc_compiler_gnu" >&6; } 21950 if test $ac_compiler_gnu = yes; then 21951 GOBJC=yes 21952 else 21953 GOBJC= 21954 fi 21955 ac_test_OBJCFLAGS=${OBJCFLAGS+set} 21956 ac_save_OBJCFLAGS=$OBJCFLAGS 21957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 21958 $as_echo_n "checking whether $OBJC accepts -g... " >&6; } 21959 if ${ac_cv_prog_objc_g+:} false; then : 21960 $as_echo_n "(cached) " >&6 21961 else 21962 ac_save_objc_werror_flag=$ac_objc_werror_flag 21963 ac_objc_werror_flag=yes 21964 ac_cv_prog_objc_g=no 21965 OBJCFLAGS="-g" 21966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21967 /* end confdefs.h. */ 21968 21969 int 21970 main () 21971 { 21972 21973 ; 21974 return 0; 21975 } 21976 _ACEOF 21977 if ac_fn_objc_try_compile "$LINENO"; then : 21978 ac_cv_prog_objc_g=yes 21979 else 21980 OBJCFLAGS="" 21981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21982 /* end confdefs.h. */ 21983 21984 int 21985 main () 21986 { 21987 21988 ; 21989 return 0; 21990 } 21991 _ACEOF 21992 if ac_fn_objc_try_compile "$LINENO"; then : 21993 21994 else 21995 ac_objc_werror_flag=$ac_save_objc_werror_flag 21996 OBJCFLAGS="-g" 21997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21998 /* end confdefs.h. */ 21999 22000 int 22001 main () 22002 { 22003 22004 ; 22005 return 0; 22006 } 22007 _ACEOF 22008 if ac_fn_objc_try_compile "$LINENO"; then : 22009 ac_cv_prog_objc_g=yes 22010 fi 22011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22012 fi 22013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22014 fi 22015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22016 ac_objc_werror_flag=$ac_save_objc_werror_flag 22017 fi 22018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 22019 $as_echo "$ac_cv_prog_objc_g" >&6; } 22020 if test "$ac_test_OBJCFLAGS" = set; then 22021 OBJCFLAGS=$ac_save_OBJCFLAGS 22022 elif test $ac_cv_prog_objc_g = yes; then 22023 if test "$GOBJC" = yes; then 22024 OBJCFLAGS="-g -O2" 22025 else 22026 OBJCFLAGS="-g" 22027 fi 22028 else 22029 if test "$GOBJC" = yes; then 22030 OBJCFLAGS="-O2" 22031 else 22032 OBJCFLAGS= 22033 fi 22034 fi 22035 ac_ext=cpp 22036 ac_cpp='$CXXCPP $CPPFLAGS' 22037 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 22038 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 22039 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 22040 22041 22042 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22043 22044 # First separate the path from the arguments. This will split at the first 22045 # space. 22046 complete="$OBJC" 22047 path="${complete%% *}" 22048 tmp="$complete EOL" 22049 arguments="${tmp#* }" 22050 22051 # Input might be given as Windows format, start by converting to 22052 # unix format. 22053 new_path=`$CYGPATH -u "$path"` 22054 22055 # Now try to locate executable using which 22056 new_path=`$WHICH "$new_path" 2> /dev/null` 22057 # bat and cmd files are not always considered executable in cygwin causing which 22058 # to not find them 22059 if test "x$new_path" = x \ 22060 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22061 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22062 new_path=`$CYGPATH -u "$path"` 22063 fi 22064 if test "x$new_path" = x; then 22065 # Oops. Which didn't find the executable. 22066 # The splitting of arguments from the executable at a space might have been incorrect, 22067 # since paths with space are more likely in Windows. Give it another try with the whole 22068 # argument. 22069 path="$complete" 22070 arguments="EOL" 22071 new_path=`$CYGPATH -u "$path"` 22072 new_path=`$WHICH "$new_path" 2> /dev/null` 22073 # bat and cmd files are not always considered executable in cygwin causing which 22074 # to not find them 22075 if test "x$new_path" = x \ 22076 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22077 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22078 new_path=`$CYGPATH -u "$path"` 22079 fi 22080 if test "x$new_path" = x; then 22081 # It's still not found. Now this is an unrecoverable error. 22082 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 22083 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 22084 has_space=`$ECHO "$complete" | $GREP " "` 22085 if test "x$has_space" != x; then 22086 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22087 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22088 fi 22089 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 22090 fi 22091 fi 22092 22093 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22094 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22095 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22096 # "foo.exe" is OK but "foo" is an error. 22097 # 22098 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22099 # It is also a way to make sure we got the proper file name for the real test later on. 22100 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22101 if test "x$test_shortpath" = x; then 22102 # Short path failed, file does not exist as specified. 22103 # Try adding .exe or .cmd 22104 if test -f "${new_path}.exe"; then 22105 input_to_shortpath="${new_path}.exe" 22106 elif test -f "${new_path}.cmd"; then 22107 input_to_shortpath="${new_path}.cmd" 22108 else 22109 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5 22110 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;} 22111 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22112 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22113 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 22114 fi 22115 else 22116 input_to_shortpath="$new_path" 22117 fi 22118 22119 # Call helper function which possibly converts this using DOS-style short mode. 22120 # If so, the updated path is stored in $new_path. 22121 new_path="$input_to_shortpath" 22122 22123 input_path="$input_to_shortpath" 22124 # Check if we need to convert this using DOS-style short mode. If the path 22125 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22126 # take no chances and rewrite it. 22127 # Note: m4 eats our [], so we need to use [ and ] instead. 22128 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22129 if test "x$has_forbidden_chars" != x; then 22130 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22131 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22132 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22133 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22134 # Going to short mode and back again did indeed matter. Since short mode is 22135 # case insensitive, let's make it lowercase to improve readability. 22136 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22137 # Now convert it back to Unix-stile (cygpath) 22138 input_path=`$CYGPATH -u "$shortmode_path"` 22139 new_path="$input_path" 22140 fi 22141 fi 22142 22143 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22144 if test "x$test_cygdrive_prefix" = x; then 22145 # As a simple fix, exclude /usr/bin since it's not a real path. 22146 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22147 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22148 # a path prefixed by /cygdrive for fixpath to work. 22149 new_path="$CYGWIN_ROOT_PATH$input_path" 22150 fi 22151 fi 22152 22153 # remove trailing .exe if any 22154 new_path="${new_path/%.exe/}" 22155 22156 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22157 22158 # First separate the path from the arguments. This will split at the first 22159 # space. 22160 complete="$OBJC" 22161 path="${complete%% *}" 22162 tmp="$complete EOL" 22163 arguments="${tmp#* }" 22164 22165 # Input might be given as Windows format, start by converting to 22166 # unix format. 22167 new_path="$path" 22168 22169 windows_path="$new_path" 22170 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22171 unix_path=`$CYGPATH -u "$windows_path"` 22172 new_path="$unix_path" 22173 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22174 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22175 new_path="$unix_path" 22176 fi 22177 22178 22179 # Now try to locate executable using which 22180 new_path=`$WHICH "$new_path" 2> /dev/null` 22181 22182 if test "x$new_path" = x; then 22183 # Oops. Which didn't find the executable. 22184 # The splitting of arguments from the executable at a space might have been incorrect, 22185 # since paths with space are more likely in Windows. Give it another try with the whole 22186 # argument. 22187 path="$complete" 22188 arguments="EOL" 22189 new_path="$path" 22190 22191 windows_path="$new_path" 22192 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22193 unix_path=`$CYGPATH -u "$windows_path"` 22194 new_path="$unix_path" 22195 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22196 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22197 new_path="$unix_path" 22198 fi 22199 22200 22201 new_path=`$WHICH "$new_path" 2> /dev/null` 22202 22203 if test "x$new_path" = x; then 22204 # It's still not found. Now this is an unrecoverable error. 22205 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 22206 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 22207 has_space=`$ECHO "$complete" | $GREP " "` 22208 if test "x$has_space" != x; then 22209 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22210 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22211 fi 22212 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 22213 fi 22214 fi 22215 22216 # Now new_path has a complete unix path to the binary 22217 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22218 # Keep paths in /bin as-is, but remove trailing .exe if any 22219 new_path="${new_path/%.exe/}" 22220 # Do not save /bin paths to all_fixpath_prefixes! 22221 else 22222 # Not in mixed or Windows style, start by that. 22223 new_path=`cmd //c echo $new_path` 22224 22225 input_path="$new_path" 22226 # Check if we need to convert this using DOS-style short mode. If the path 22227 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22228 # take no chances and rewrite it. 22229 # Note: m4 eats our [], so we need to use [ and ] instead. 22230 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22231 if test "x$has_forbidden_chars" != x; then 22232 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22233 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22234 fi 22235 22236 # Output is in $new_path 22237 22238 windows_path="$new_path" 22239 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22240 unix_path=`$CYGPATH -u "$windows_path"` 22241 new_path="$unix_path" 22242 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22243 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22244 new_path="$unix_path" 22245 fi 22246 22247 # remove trailing .exe if any 22248 new_path="${new_path/%.exe/}" 22249 22250 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22251 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22252 fi 22253 22254 else 22255 # We're on a posix platform. Hooray! :) 22256 # First separate the path from the arguments. This will split at the first 22257 # space. 22258 complete="$OBJC" 22259 path="${complete%% *}" 22260 tmp="$complete EOL" 22261 arguments="${tmp#* }" 22262 22263 # Cannot rely on the command "which" here since it doesn't always work. 22264 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22265 if test -z "$is_absolute_path"; then 22266 # Path to executable is not absolute. Find it. 22267 IFS_save="$IFS" 22268 IFS=: 22269 for p in $PATH; do 22270 if test -f "$p/$path" && test -x "$p/$path"; then 22271 new_path="$p/$path" 22272 break 22273 fi 22274 done 22275 IFS="$IFS_save" 22276 else 22277 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5 22278 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;} 22279 new_path="$path" 22280 fi 22281 22282 if test "x$new_path" = x; then 22283 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 22284 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 22285 has_space=`$ECHO "$complete" | $GREP " "` 22286 if test "x$has_space" != x; then 22287 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 22288 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 22289 fi 22290 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 22291 fi 22292 fi 22293 22294 # Now join together the path and the arguments once again 22295 if test "x$arguments" != xEOL; then 22296 new_complete="$new_path ${arguments% *}" 22297 else 22298 new_complete="$new_path" 22299 fi 22300 22301 if test "x$complete" != "x$new_complete"; then 22302 OBJC="$new_complete" 22303 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5 22304 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;} 22305 fi 22306 22307 else 22308 OBJC= 22309 fi 22310 22311 # Restore the flags to the user specified values. 22312 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" 22313 CFLAGS="$ORG_CFLAGS" 22314 CXXFLAGS="$ORG_CXXFLAGS" 22315 OBJCFLAGS="$ORG_OBJCFLAGS" 22316 22317 LD="$CC" 22318 LDEXE="$CC" 22319 LDCXX="$CXX" 22320 LDEXECXX="$CXX" 22321 22322 # LDEXE is the linker to use, when creating executables. 22323 22324 # Linking C++ libraries. 22325 22326 # Linking C++ executables. 22327 22328 22329 if test "x$OPENJDK_TARGET_OS" != xwindows; then 22330 if test -n "$ac_tool_prefix"; then 22331 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 22332 set dummy ${ac_tool_prefix}ar; ac_word=$2 22333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22334 $as_echo_n "checking for $ac_word... " >&6; } 22335 if ${ac_cv_prog_AR+:} false; then : 22336 $as_echo_n "(cached) " >&6 22337 else 22338 if test -n "$AR"; then 22339 ac_cv_prog_AR="$AR" # Let the user override the test. 22340 else 22341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22342 for as_dir in $PATH 22343 do 22344 IFS=$as_save_IFS 22345 test -z "$as_dir" && as_dir=. 22346 for ac_exec_ext in '' $ac_executable_extensions; do 22347 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22348 ac_cv_prog_AR="${ac_tool_prefix}ar" 22349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22350 break 2 22351 fi 22352 done 22353 done 22354 IFS=$as_save_IFS 22355 22356 fi 22357 fi 22358 AR=$ac_cv_prog_AR 22359 if test -n "$AR"; then 22360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 22361 $as_echo "$AR" >&6; } 22362 else 22363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22364 $as_echo "no" >&6; } 22365 fi 22366 22367 22368 fi 22369 if test -z "$ac_cv_prog_AR"; then 22370 ac_ct_AR=$AR 22371 # Extract the first word of "ar", so it can be a program name with args. 22372 set dummy ar; ac_word=$2 22373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22374 $as_echo_n "checking for $ac_word... " >&6; } 22375 if ${ac_cv_prog_ac_ct_AR+:} false; then : 22376 $as_echo_n "(cached) " >&6 22377 else 22378 if test -n "$ac_ct_AR"; then 22379 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 22380 else 22381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22382 for as_dir in $PATH 22383 do 22384 IFS=$as_save_IFS 22385 test -z "$as_dir" && as_dir=. 22386 for ac_exec_ext in '' $ac_executable_extensions; do 22387 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22388 ac_cv_prog_ac_ct_AR="ar" 22389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22390 break 2 22391 fi 22392 done 22393 done 22394 IFS=$as_save_IFS 22395 22396 fi 22397 fi 22398 ac_ct_AR=$ac_cv_prog_ac_ct_AR 22399 if test -n "$ac_ct_AR"; then 22400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 22401 $as_echo "$ac_ct_AR" >&6; } 22402 else 22403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22404 $as_echo "no" >&6; } 22405 fi 22406 22407 if test "x$ac_ct_AR" = x; then 22408 AR="" 22409 else 22410 case $cross_compiling:$ac_tool_warned in 22411 yes:) 22412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 22413 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 22414 ac_tool_warned=yes ;; 22415 esac 22416 AR=$ac_ct_AR 22417 fi 22418 else 22419 AR="$ac_cv_prog_AR" 22420 fi 22421 22422 22423 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22424 22425 # First separate the path from the arguments. This will split at the first 22426 # space. 22427 complete="$AR" 22428 path="${complete%% *}" 22429 tmp="$complete EOL" 22430 arguments="${tmp#* }" 22431 22432 # Input might be given as Windows format, start by converting to 22433 # unix format. 22434 new_path=`$CYGPATH -u "$path"` 22435 22436 # Now try to locate executable using which 22437 new_path=`$WHICH "$new_path" 2> /dev/null` 22438 # bat and cmd files are not always considered executable in cygwin causing which 22439 # to not find them 22440 if test "x$new_path" = x \ 22441 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22442 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22443 new_path=`$CYGPATH -u "$path"` 22444 fi 22445 if test "x$new_path" = x; then 22446 # Oops. Which didn't find the executable. 22447 # The splitting of arguments from the executable at a space might have been incorrect, 22448 # since paths with space are more likely in Windows. Give it another try with the whole 22449 # argument. 22450 path="$complete" 22451 arguments="EOL" 22452 new_path=`$CYGPATH -u "$path"` 22453 new_path=`$WHICH "$new_path" 2> /dev/null` 22454 # bat and cmd files are not always considered executable in cygwin causing which 22455 # to not find them 22456 if test "x$new_path" = x \ 22457 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22458 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22459 new_path=`$CYGPATH -u "$path"` 22460 fi 22461 if test "x$new_path" = x; then 22462 # It's still not found. Now this is an unrecoverable error. 22463 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22464 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22465 has_space=`$ECHO "$complete" | $GREP " "` 22466 if test "x$has_space" != x; then 22467 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22468 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22469 fi 22470 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22471 fi 22472 fi 22473 22474 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22475 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22476 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22477 # "foo.exe" is OK but "foo" is an error. 22478 # 22479 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22480 # It is also a way to make sure we got the proper file name for the real test later on. 22481 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22482 if test "x$test_shortpath" = x; then 22483 # Short path failed, file does not exist as specified. 22484 # Try adding .exe or .cmd 22485 if test -f "${new_path}.exe"; then 22486 input_to_shortpath="${new_path}.exe" 22487 elif test -f "${new_path}.cmd"; then 22488 input_to_shortpath="${new_path}.cmd" 22489 else 22490 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5 22491 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;} 22492 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22493 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22494 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22495 fi 22496 else 22497 input_to_shortpath="$new_path" 22498 fi 22499 22500 # Call helper function which possibly converts this using DOS-style short mode. 22501 # If so, the updated path is stored in $new_path. 22502 new_path="$input_to_shortpath" 22503 22504 input_path="$input_to_shortpath" 22505 # Check if we need to convert this using DOS-style short mode. If the path 22506 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22507 # take no chances and rewrite it. 22508 # Note: m4 eats our [], so we need to use [ and ] instead. 22509 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22510 if test "x$has_forbidden_chars" != x; then 22511 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22512 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22513 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22514 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22515 # Going to short mode and back again did indeed matter. Since short mode is 22516 # case insensitive, let's make it lowercase to improve readability. 22517 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22518 # Now convert it back to Unix-stile (cygpath) 22519 input_path=`$CYGPATH -u "$shortmode_path"` 22520 new_path="$input_path" 22521 fi 22522 fi 22523 22524 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22525 if test "x$test_cygdrive_prefix" = x; then 22526 # As a simple fix, exclude /usr/bin since it's not a real path. 22527 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22528 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22529 # a path prefixed by /cygdrive for fixpath to work. 22530 new_path="$CYGWIN_ROOT_PATH$input_path" 22531 fi 22532 fi 22533 22534 # remove trailing .exe if any 22535 new_path="${new_path/%.exe/}" 22536 22537 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22538 22539 # First separate the path from the arguments. This will split at the first 22540 # space. 22541 complete="$AR" 22542 path="${complete%% *}" 22543 tmp="$complete EOL" 22544 arguments="${tmp#* }" 22545 22546 # Input might be given as Windows format, start by converting to 22547 # unix format. 22548 new_path="$path" 22549 22550 windows_path="$new_path" 22551 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22552 unix_path=`$CYGPATH -u "$windows_path"` 22553 new_path="$unix_path" 22554 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22555 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22556 new_path="$unix_path" 22557 fi 22558 22559 22560 # Now try to locate executable using which 22561 new_path=`$WHICH "$new_path" 2> /dev/null` 22562 22563 if test "x$new_path" = x; then 22564 # Oops. Which didn't find the executable. 22565 # The splitting of arguments from the executable at a space might have been incorrect, 22566 # since paths with space are more likely in Windows. Give it another try with the whole 22567 # argument. 22568 path="$complete" 22569 arguments="EOL" 22570 new_path="$path" 22571 22572 windows_path="$new_path" 22573 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22574 unix_path=`$CYGPATH -u "$windows_path"` 22575 new_path="$unix_path" 22576 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22577 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22578 new_path="$unix_path" 22579 fi 22580 22581 22582 new_path=`$WHICH "$new_path" 2> /dev/null` 22583 22584 if test "x$new_path" = x; then 22585 # It's still not found. Now this is an unrecoverable error. 22586 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22587 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22588 has_space=`$ECHO "$complete" | $GREP " "` 22589 if test "x$has_space" != x; then 22590 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22591 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22592 fi 22593 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22594 fi 22595 fi 22596 22597 # Now new_path has a complete unix path to the binary 22598 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22599 # Keep paths in /bin as-is, but remove trailing .exe if any 22600 new_path="${new_path/%.exe/}" 22601 # Do not save /bin paths to all_fixpath_prefixes! 22602 else 22603 # Not in mixed or Windows style, start by that. 22604 new_path=`cmd //c echo $new_path` 22605 22606 input_path="$new_path" 22607 # Check if we need to convert this using DOS-style short mode. If the path 22608 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22609 # take no chances and rewrite it. 22610 # Note: m4 eats our [], so we need to use [ and ] instead. 22611 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22612 if test "x$has_forbidden_chars" != x; then 22613 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22614 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22615 fi 22616 22617 # Output is in $new_path 22618 22619 windows_path="$new_path" 22620 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22621 unix_path=`$CYGPATH -u "$windows_path"` 22622 new_path="$unix_path" 22623 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22624 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22625 new_path="$unix_path" 22626 fi 22627 22628 # remove trailing .exe if any 22629 new_path="${new_path/%.exe/}" 22630 22631 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22632 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22633 fi 22634 22635 else 22636 # We're on a posix platform. Hooray! :) 22637 # First separate the path from the arguments. This will split at the first 22638 # space. 22639 complete="$AR" 22640 path="${complete%% *}" 22641 tmp="$complete EOL" 22642 arguments="${tmp#* }" 22643 22644 # Cannot rely on the command "which" here since it doesn't always work. 22645 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22646 if test -z "$is_absolute_path"; then 22647 # Path to executable is not absolute. Find it. 22648 IFS_save="$IFS" 22649 IFS=: 22650 for p in $PATH; do 22651 if test -f "$p/$path" && test -x "$p/$path"; then 22652 new_path="$p/$path" 22653 break 22654 fi 22655 done 22656 IFS="$IFS_save" 22657 else 22658 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5 22659 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;} 22660 new_path="$path" 22661 fi 22662 22663 if test "x$new_path" = x; then 22664 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22665 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22666 has_space=`$ECHO "$complete" | $GREP " "` 22667 if test "x$has_space" != x; then 22668 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 22669 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 22670 fi 22671 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22672 fi 22673 fi 22674 22675 # Now join together the path and the arguments once again 22676 if test "x$arguments" != xEOL; then 22677 new_complete="$new_path ${arguments% *}" 22678 else 22679 new_complete="$new_path" 22680 fi 22681 22682 if test "x$complete" != "x$new_complete"; then 22683 AR="$new_complete" 22684 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5 22685 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;} 22686 fi 22687 22688 fi 22689 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 22690 ARFLAGS="-r" 22691 else 22692 ARFLAGS="" 22693 fi 22694 22695 22696 # For hotspot, we need these in Windows mixed path; other platforms keep them the same 22697 HOTSPOT_CXX="$CXX" 22698 HOTSPOT_LD="$LD" 22699 22700 22701 22702 COMPILER_NAME=gcc 22703 COMPILER_TYPE=CC 22704 if test "x$OPENJDK_TARGET_OS" = xwindows; then : 22705 22706 # For now, assume that we are always compiling using cl.exe. 22707 CC_OUT_OPTION=-Fo 22708 EXE_OUT_OPTION=-out: 22709 LD_OUT_OPTION=-out: 22710 AR_OUT_OPTION=-out: 22711 # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin 22712 # program for something completely different. 22713 # Extract the first word of "link", so it can be a program name with args. 22714 set dummy link; ac_word=$2 22715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22716 $as_echo_n "checking for $ac_word... " >&6; } 22717 if ${ac_cv_prog_WINLD+:} false; then : 22718 $as_echo_n "(cached) " >&6 22719 else 22720 if test -n "$WINLD"; then 22721 ac_cv_prog_WINLD="$WINLD" # Let the user override the test. 22722 else 22723 ac_prog_rejected=no 22724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22725 for as_dir in $PATH 22726 do 22727 IFS=$as_save_IFS 22728 test -z "$as_dir" && as_dir=. 22729 for ac_exec_ext in '' $ac_executable_extensions; do 22730 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22731 if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then 22732 ac_prog_rejected=yes 22733 continue 22734 fi 22735 ac_cv_prog_WINLD="link" 22736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22737 break 2 22738 fi 22739 done 22740 done 22741 IFS=$as_save_IFS 22742 22743 if test $ac_prog_rejected = yes; then 22744 # We found a bogon in the path, so make sure we never use it. 22745 set dummy $ac_cv_prog_WINLD 22746 shift 22747 if test $# != 0; then 22748 # We chose a different compiler from the bogus one. 22749 # However, it has the same basename, so the bogon will be chosen 22750 # first if we set WINLD to just the basename; use the full file name. 22751 shift 22752 ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@" 22753 fi 22754 fi 22755 fi 22756 fi 22757 WINLD=$ac_cv_prog_WINLD 22758 if test -n "$WINLD"; then 22759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5 22760 $as_echo "$WINLD" >&6; } 22761 else 22762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22763 $as_echo "no" >&6; } 22764 fi 22765 22766 22767 # Since we must ignore the first found link, WINLD will contain 22768 # the full path to the link.exe program. 22769 22770 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22771 22772 # First separate the path from the arguments. This will split at the first 22773 # space. 22774 complete="$WINLD" 22775 path="${complete%% *}" 22776 tmp="$complete EOL" 22777 arguments="${tmp#* }" 22778 22779 # Input might be given as Windows format, start by converting to 22780 # unix format. 22781 new_path=`$CYGPATH -u "$path"` 22782 22783 # Now try to locate executable using which 22784 new_path=`$WHICH "$new_path" 2> /dev/null` 22785 # bat and cmd files are not always considered executable in cygwin causing which 22786 # to not find them 22787 if test "x$new_path" = x \ 22788 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22789 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22790 new_path=`$CYGPATH -u "$path"` 22791 fi 22792 if test "x$new_path" = x; then 22793 # Oops. Which didn't find the executable. 22794 # The splitting of arguments from the executable at a space might have been incorrect, 22795 # since paths with space are more likely in Windows. Give it another try with the whole 22796 # argument. 22797 path="$complete" 22798 arguments="EOL" 22799 new_path=`$CYGPATH -u "$path"` 22800 new_path=`$WHICH "$new_path" 2> /dev/null` 22801 # bat and cmd files are not always considered executable in cygwin causing which 22802 # to not find them 22803 if test "x$new_path" = x \ 22804 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22805 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22806 new_path=`$CYGPATH -u "$path"` 22807 fi 22808 if test "x$new_path" = x; then 22809 # It's still not found. Now this is an unrecoverable error. 22810 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22811 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22812 has_space=`$ECHO "$complete" | $GREP " "` 22813 if test "x$has_space" != x; then 22814 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22815 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22816 fi 22817 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22818 fi 22819 fi 22820 22821 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22822 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22823 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22824 # "foo.exe" is OK but "foo" is an error. 22825 # 22826 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22827 # It is also a way to make sure we got the proper file name for the real test later on. 22828 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22829 if test "x$test_shortpath" = x; then 22830 # Short path failed, file does not exist as specified. 22831 # Try adding .exe or .cmd 22832 if test -f "${new_path}.exe"; then 22833 input_to_shortpath="${new_path}.exe" 22834 elif test -f "${new_path}.cmd"; then 22835 input_to_shortpath="${new_path}.cmd" 22836 else 22837 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5 22838 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;} 22839 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22840 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22841 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22842 fi 22843 else 22844 input_to_shortpath="$new_path" 22845 fi 22846 22847 # Call helper function which possibly converts this using DOS-style short mode. 22848 # If so, the updated path is stored in $new_path. 22849 new_path="$input_to_shortpath" 22850 22851 input_path="$input_to_shortpath" 22852 # Check if we need to convert this using DOS-style short mode. If the path 22853 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22854 # take no chances and rewrite it. 22855 # Note: m4 eats our [], so we need to use [ and ] instead. 22856 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22857 if test "x$has_forbidden_chars" != x; then 22858 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22859 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22860 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22861 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22862 # Going to short mode and back again did indeed matter. Since short mode is 22863 # case insensitive, let's make it lowercase to improve readability. 22864 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22865 # Now convert it back to Unix-stile (cygpath) 22866 input_path=`$CYGPATH -u "$shortmode_path"` 22867 new_path="$input_path" 22868 fi 22869 fi 22870 22871 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22872 if test "x$test_cygdrive_prefix" = x; then 22873 # As a simple fix, exclude /usr/bin since it's not a real path. 22874 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22875 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22876 # a path prefixed by /cygdrive for fixpath to work. 22877 new_path="$CYGWIN_ROOT_PATH$input_path" 22878 fi 22879 fi 22880 22881 # remove trailing .exe if any 22882 new_path="${new_path/%.exe/}" 22883 22884 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22885 22886 # First separate the path from the arguments. This will split at the first 22887 # space. 22888 complete="$WINLD" 22889 path="${complete%% *}" 22890 tmp="$complete EOL" 22891 arguments="${tmp#* }" 22892 22893 # Input might be given as Windows format, start by converting to 22894 # unix format. 22895 new_path="$path" 22896 22897 windows_path="$new_path" 22898 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22899 unix_path=`$CYGPATH -u "$windows_path"` 22900 new_path="$unix_path" 22901 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22902 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22903 new_path="$unix_path" 22904 fi 22905 22906 22907 # Now try to locate executable using which 22908 new_path=`$WHICH "$new_path" 2> /dev/null` 22909 22910 if test "x$new_path" = x; then 22911 # Oops. Which didn't find the executable. 22912 # The splitting of arguments from the executable at a space might have been incorrect, 22913 # since paths with space are more likely in Windows. Give it another try with the whole 22914 # argument. 22915 path="$complete" 22916 arguments="EOL" 22917 new_path="$path" 22918 22919 windows_path="$new_path" 22920 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22921 unix_path=`$CYGPATH -u "$windows_path"` 22922 new_path="$unix_path" 22923 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22924 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22925 new_path="$unix_path" 22926 fi 22927 22928 22929 new_path=`$WHICH "$new_path" 2> /dev/null` 22930 22931 if test "x$new_path" = x; then 22932 # It's still not found. Now this is an unrecoverable error. 22933 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22934 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22935 has_space=`$ECHO "$complete" | $GREP " "` 22936 if test "x$has_space" != x; then 22937 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22938 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22939 fi 22940 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22941 fi 22942 fi 22943 22944 # Now new_path has a complete unix path to the binary 22945 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22946 # Keep paths in /bin as-is, but remove trailing .exe if any 22947 new_path="${new_path/%.exe/}" 22948 # Do not save /bin paths to all_fixpath_prefixes! 22949 else 22950 # Not in mixed or Windows style, start by that. 22951 new_path=`cmd //c echo $new_path` 22952 22953 input_path="$new_path" 22954 # Check if we need to convert this using DOS-style short mode. If the path 22955 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22956 # take no chances and rewrite it. 22957 # Note: m4 eats our [], so we need to use [ and ] instead. 22958 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22959 if test "x$has_forbidden_chars" != x; then 22960 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22961 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22962 fi 22963 22964 # Output is in $new_path 22965 22966 windows_path="$new_path" 22967 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22968 unix_path=`$CYGPATH -u "$windows_path"` 22969 new_path="$unix_path" 22970 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22971 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22972 new_path="$unix_path" 22973 fi 22974 22975 # remove trailing .exe if any 22976 new_path="${new_path/%.exe/}" 22977 22978 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22979 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22980 fi 22981 22982 else 22983 # We're on a posix platform. Hooray! :) 22984 # First separate the path from the arguments. This will split at the first 22985 # space. 22986 complete="$WINLD" 22987 path="${complete%% *}" 22988 tmp="$complete EOL" 22989 arguments="${tmp#* }" 22990 22991 # Cannot rely on the command "which" here since it doesn't always work. 22992 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22993 if test -z "$is_absolute_path"; then 22994 # Path to executable is not absolute. Find it. 22995 IFS_save="$IFS" 22996 IFS=: 22997 for p in $PATH; do 22998 if test -f "$p/$path" && test -x "$p/$path"; then 22999 new_path="$p/$path" 23000 break 23001 fi 23002 done 23003 IFS="$IFS_save" 23004 else 23005 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5 23006 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;} 23007 new_path="$path" 23008 fi 23009 23010 if test "x$new_path" = x; then 23011 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 23012 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 23013 has_space=`$ECHO "$complete" | $GREP " "` 23014 if test "x$has_space" != x; then 23015 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23016 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23017 fi 23018 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 23019 fi 23020 fi 23021 23022 # Now join together the path and the arguments once again 23023 if test "x$arguments" != xEOL; then 23024 new_complete="$new_path ${arguments% *}" 23025 else 23026 new_complete="$new_path" 23027 fi 23028 23029 if test "x$complete" != "x$new_complete"; then 23030 WINLD="$new_complete" 23031 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5 23032 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;} 23033 fi 23034 23035 printf "Windows linker was found at $WINLD\n" 23036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5 23037 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; } 23038 "$WINLD" --version > /dev/null 23039 if test $? -eq 0 ; then 23040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23041 $as_echo "no" >&6; } 23042 as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5 23043 else 23044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 23045 $as_echo "yes" >&6; } 23046 fi 23047 LD="$WINLD" 23048 LDEXE="$WINLD" 23049 LDCXX="$WINLD" 23050 LDEXECXX="$WINLD" 23051 23052 # Extract the first word of "mt", so it can be a program name with args. 23053 set dummy mt; ac_word=$2 23054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23055 $as_echo_n "checking for $ac_word... " >&6; } 23056 if ${ac_cv_prog_MT+:} false; then : 23057 $as_echo_n "(cached) " >&6 23058 else 23059 if test -n "$MT"; then 23060 ac_cv_prog_MT="$MT" # Let the user override the test. 23061 else 23062 ac_prog_rejected=no 23063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23064 for as_dir in $PATH 23065 do 23066 IFS=$as_save_IFS 23067 test -z "$as_dir" && as_dir=. 23068 for ac_exec_ext in '' $ac_executable_extensions; do 23069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23070 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then 23071 ac_prog_rejected=yes 23072 continue 23073 fi 23074 ac_cv_prog_MT="mt" 23075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23076 break 2 23077 fi 23078 done 23079 done 23080 IFS=$as_save_IFS 23081 23082 if test $ac_prog_rejected = yes; then 23083 # We found a bogon in the path, so make sure we never use it. 23084 set dummy $ac_cv_prog_MT 23085 shift 23086 if test $# != 0; then 23087 # We chose a different compiler from the bogus one. 23088 # However, it has the same basename, so the bogon will be chosen 23089 # first if we set MT to just the basename; use the full file name. 23090 shift 23091 ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@" 23092 fi 23093 fi 23094 fi 23095 fi 23096 MT=$ac_cv_prog_MT 23097 if test -n "$MT"; then 23098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5 23099 $as_echo "$MT" >&6; } 23100 else 23101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23102 $as_echo "no" >&6; } 23103 fi 23104 23105 23106 23107 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23108 23109 # First separate the path from the arguments. This will split at the first 23110 # space. 23111 complete="$MT" 23112 path="${complete%% *}" 23113 tmp="$complete EOL" 23114 arguments="${tmp#* }" 23115 23116 # Input might be given as Windows format, start by converting to 23117 # unix format. 23118 new_path=`$CYGPATH -u "$path"` 23119 23120 # Now try to locate executable using which 23121 new_path=`$WHICH "$new_path" 2> /dev/null` 23122 # bat and cmd files are not always considered executable in cygwin causing which 23123 # to not find them 23124 if test "x$new_path" = x \ 23125 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23126 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23127 new_path=`$CYGPATH -u "$path"` 23128 fi 23129 if test "x$new_path" = x; then 23130 # Oops. Which didn't find the executable. 23131 # The splitting of arguments from the executable at a space might have been incorrect, 23132 # since paths with space are more likely in Windows. Give it another try with the whole 23133 # argument. 23134 path="$complete" 23135 arguments="EOL" 23136 new_path=`$CYGPATH -u "$path"` 23137 new_path=`$WHICH "$new_path" 2> /dev/null` 23138 # bat and cmd files are not always considered executable in cygwin causing which 23139 # to not find them 23140 if test "x$new_path" = x \ 23141 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23142 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23143 new_path=`$CYGPATH -u "$path"` 23144 fi 23145 if test "x$new_path" = x; then 23146 # It's still not found. Now this is an unrecoverable error. 23147 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 23148 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 23149 has_space=`$ECHO "$complete" | $GREP " "` 23150 if test "x$has_space" != x; then 23151 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23152 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23153 fi 23154 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23155 fi 23156 fi 23157 23158 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23159 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23160 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23161 # "foo.exe" is OK but "foo" is an error. 23162 # 23163 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23164 # It is also a way to make sure we got the proper file name for the real test later on. 23165 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23166 if test "x$test_shortpath" = x; then 23167 # Short path failed, file does not exist as specified. 23168 # Try adding .exe or .cmd 23169 if test -f "${new_path}.exe"; then 23170 input_to_shortpath="${new_path}.exe" 23171 elif test -f "${new_path}.cmd"; then 23172 input_to_shortpath="${new_path}.cmd" 23173 else 23174 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5 23175 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;} 23176 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23177 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23178 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23179 fi 23180 else 23181 input_to_shortpath="$new_path" 23182 fi 23183 23184 # Call helper function which possibly converts this using DOS-style short mode. 23185 # If so, the updated path is stored in $new_path. 23186 new_path="$input_to_shortpath" 23187 23188 input_path="$input_to_shortpath" 23189 # Check if we need to convert this using DOS-style short mode. If the path 23190 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23191 # take no chances and rewrite it. 23192 # Note: m4 eats our [], so we need to use [ and ] instead. 23193 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23194 if test "x$has_forbidden_chars" != x; then 23195 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23196 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23197 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23198 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23199 # Going to short mode and back again did indeed matter. Since short mode is 23200 # case insensitive, let's make it lowercase to improve readability. 23201 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23202 # Now convert it back to Unix-stile (cygpath) 23203 input_path=`$CYGPATH -u "$shortmode_path"` 23204 new_path="$input_path" 23205 fi 23206 fi 23207 23208 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23209 if test "x$test_cygdrive_prefix" = x; then 23210 # As a simple fix, exclude /usr/bin since it's not a real path. 23211 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23212 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23213 # a path prefixed by /cygdrive for fixpath to work. 23214 new_path="$CYGWIN_ROOT_PATH$input_path" 23215 fi 23216 fi 23217 23218 # remove trailing .exe if any 23219 new_path="${new_path/%.exe/}" 23220 23221 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23222 23223 # First separate the path from the arguments. This will split at the first 23224 # space. 23225 complete="$MT" 23226 path="${complete%% *}" 23227 tmp="$complete EOL" 23228 arguments="${tmp#* }" 23229 23230 # Input might be given as Windows format, start by converting to 23231 # unix format. 23232 new_path="$path" 23233 23234 windows_path="$new_path" 23235 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23236 unix_path=`$CYGPATH -u "$windows_path"` 23237 new_path="$unix_path" 23238 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23239 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23240 new_path="$unix_path" 23241 fi 23242 23243 23244 # Now try to locate executable using which 23245 new_path=`$WHICH "$new_path" 2> /dev/null` 23246 23247 if test "x$new_path" = x; then 23248 # Oops. Which didn't find the executable. 23249 # The splitting of arguments from the executable at a space might have been incorrect, 23250 # since paths with space are more likely in Windows. Give it another try with the whole 23251 # argument. 23252 path="$complete" 23253 arguments="EOL" 23254 new_path="$path" 23255 23256 windows_path="$new_path" 23257 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23258 unix_path=`$CYGPATH -u "$windows_path"` 23259 new_path="$unix_path" 23260 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23261 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23262 new_path="$unix_path" 23263 fi 23264 23265 23266 new_path=`$WHICH "$new_path" 2> /dev/null` 23267 23268 if test "x$new_path" = x; then 23269 # It's still not found. Now this is an unrecoverable error. 23270 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 23271 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 23272 has_space=`$ECHO "$complete" | $GREP " "` 23273 if test "x$has_space" != x; then 23274 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23275 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23276 fi 23277 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23278 fi 23279 fi 23280 23281 # Now new_path has a complete unix path to the binary 23282 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23283 # Keep paths in /bin as-is, but remove trailing .exe if any 23284 new_path="${new_path/%.exe/}" 23285 # Do not save /bin paths to all_fixpath_prefixes! 23286 else 23287 # Not in mixed or Windows style, start by that. 23288 new_path=`cmd //c echo $new_path` 23289 23290 input_path="$new_path" 23291 # Check if we need to convert this using DOS-style short mode. If the path 23292 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23293 # take no chances and rewrite it. 23294 # Note: m4 eats our [], so we need to use [ and ] instead. 23295 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23296 if test "x$has_forbidden_chars" != x; then 23297 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23298 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23299 fi 23300 23301 # Output is in $new_path 23302 23303 windows_path="$new_path" 23304 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23305 unix_path=`$CYGPATH -u "$windows_path"` 23306 new_path="$unix_path" 23307 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23308 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23309 new_path="$unix_path" 23310 fi 23311 23312 # remove trailing .exe if any 23313 new_path="${new_path/%.exe/}" 23314 23315 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23316 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23317 fi 23318 23319 else 23320 # We're on a posix platform. Hooray! :) 23321 # First separate the path from the arguments. This will split at the first 23322 # space. 23323 complete="$MT" 23324 path="${complete%% *}" 23325 tmp="$complete EOL" 23326 arguments="${tmp#* }" 23327 23328 # Cannot rely on the command "which" here since it doesn't always work. 23329 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23330 if test -z "$is_absolute_path"; then 23331 # Path to executable is not absolute. Find it. 23332 IFS_save="$IFS" 23333 IFS=: 23334 for p in $PATH; do 23335 if test -f "$p/$path" && test -x "$p/$path"; then 23336 new_path="$p/$path" 23337 break 23338 fi 23339 done 23340 IFS="$IFS_save" 23341 else 23342 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5 23343 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;} 23344 new_path="$path" 23345 fi 23346 23347 if test "x$new_path" = x; then 23348 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 23349 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 23350 has_space=`$ECHO "$complete" | $GREP " "` 23351 if test "x$has_space" != x; then 23352 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23353 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23354 fi 23355 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23356 fi 23357 fi 23358 23359 # Now join together the path and the arguments once again 23360 if test "x$arguments" != xEOL; then 23361 new_complete="$new_path ${arguments% *}" 23362 else 23363 new_complete="$new_path" 23364 fi 23365 23366 if test "x$complete" != "x$new_complete"; then 23367 MT="$new_complete" 23368 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5 23369 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;} 23370 fi 23371 23372 # The resource compiler 23373 # Extract the first word of "rc", so it can be a program name with args. 23374 set dummy rc; ac_word=$2 23375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23376 $as_echo_n "checking for $ac_word... " >&6; } 23377 if ${ac_cv_prog_RC+:} false; then : 23378 $as_echo_n "(cached) " >&6 23379 else 23380 if test -n "$RC"; then 23381 ac_cv_prog_RC="$RC" # Let the user override the test. 23382 else 23383 ac_prog_rejected=no 23384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23385 for as_dir in $PATH 23386 do 23387 IFS=$as_save_IFS 23388 test -z "$as_dir" && as_dir=. 23389 for ac_exec_ext in '' $ac_executable_extensions; do 23390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then 23392 ac_prog_rejected=yes 23393 continue 23394 fi 23395 ac_cv_prog_RC="rc" 23396 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23397 break 2 23398 fi 23399 done 23400 done 23401 IFS=$as_save_IFS 23402 23403 if test $ac_prog_rejected = yes; then 23404 # We found a bogon in the path, so make sure we never use it. 23405 set dummy $ac_cv_prog_RC 23406 shift 23407 if test $# != 0; then 23408 # We chose a different compiler from the bogus one. 23409 # However, it has the same basename, so the bogon will be chosen 23410 # first if we set RC to just the basename; use the full file name. 23411 shift 23412 ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@" 23413 fi 23414 fi 23415 fi 23416 fi 23417 RC=$ac_cv_prog_RC 23418 if test -n "$RC"; then 23419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 23420 $as_echo "$RC" >&6; } 23421 else 23422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23423 $as_echo "no" >&6; } 23424 fi 23425 23426 23427 23428 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23429 23430 # First separate the path from the arguments. This will split at the first 23431 # space. 23432 complete="$RC" 23433 path="${complete%% *}" 23434 tmp="$complete EOL" 23435 arguments="${tmp#* }" 23436 23437 # Input might be given as Windows format, start by converting to 23438 # unix format. 23439 new_path=`$CYGPATH -u "$path"` 23440 23441 # Now try to locate executable using which 23442 new_path=`$WHICH "$new_path" 2> /dev/null` 23443 # bat and cmd files are not always considered executable in cygwin causing which 23444 # to not find them 23445 if test "x$new_path" = x \ 23446 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23447 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23448 new_path=`$CYGPATH -u "$path"` 23449 fi 23450 if test "x$new_path" = x; then 23451 # Oops. Which didn't find the executable. 23452 # The splitting of arguments from the executable at a space might have been incorrect, 23453 # since paths with space are more likely in Windows. Give it another try with the whole 23454 # argument. 23455 path="$complete" 23456 arguments="EOL" 23457 new_path=`$CYGPATH -u "$path"` 23458 new_path=`$WHICH "$new_path" 2> /dev/null` 23459 # bat and cmd files are not always considered executable in cygwin causing which 23460 # to not find them 23461 if test "x$new_path" = x \ 23462 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23463 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23464 new_path=`$CYGPATH -u "$path"` 23465 fi 23466 if test "x$new_path" = x; then 23467 # It's still not found. Now this is an unrecoverable error. 23468 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23469 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23470 has_space=`$ECHO "$complete" | $GREP " "` 23471 if test "x$has_space" != x; then 23472 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23473 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23474 fi 23475 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23476 fi 23477 fi 23478 23479 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23480 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23481 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23482 # "foo.exe" is OK but "foo" is an error. 23483 # 23484 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23485 # It is also a way to make sure we got the proper file name for the real test later on. 23486 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23487 if test "x$test_shortpath" = x; then 23488 # Short path failed, file does not exist as specified. 23489 # Try adding .exe or .cmd 23490 if test -f "${new_path}.exe"; then 23491 input_to_shortpath="${new_path}.exe" 23492 elif test -f "${new_path}.cmd"; then 23493 input_to_shortpath="${new_path}.cmd" 23494 else 23495 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5 23496 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;} 23497 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23498 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23499 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23500 fi 23501 else 23502 input_to_shortpath="$new_path" 23503 fi 23504 23505 # Call helper function which possibly converts this using DOS-style short mode. 23506 # If so, the updated path is stored in $new_path. 23507 new_path="$input_to_shortpath" 23508 23509 input_path="$input_to_shortpath" 23510 # Check if we need to convert this using DOS-style short mode. If the path 23511 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23512 # take no chances and rewrite it. 23513 # Note: m4 eats our [], so we need to use [ and ] instead. 23514 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23515 if test "x$has_forbidden_chars" != x; then 23516 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23517 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23518 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23519 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23520 # Going to short mode and back again did indeed matter. Since short mode is 23521 # case insensitive, let's make it lowercase to improve readability. 23522 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23523 # Now convert it back to Unix-stile (cygpath) 23524 input_path=`$CYGPATH -u "$shortmode_path"` 23525 new_path="$input_path" 23526 fi 23527 fi 23528 23529 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23530 if test "x$test_cygdrive_prefix" = x; then 23531 # As a simple fix, exclude /usr/bin since it's not a real path. 23532 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23533 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23534 # a path prefixed by /cygdrive for fixpath to work. 23535 new_path="$CYGWIN_ROOT_PATH$input_path" 23536 fi 23537 fi 23538 23539 # remove trailing .exe if any 23540 new_path="${new_path/%.exe/}" 23541 23542 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23543 23544 # First separate the path from the arguments. This will split at the first 23545 # space. 23546 complete="$RC" 23547 path="${complete%% *}" 23548 tmp="$complete EOL" 23549 arguments="${tmp#* }" 23550 23551 # Input might be given as Windows format, start by converting to 23552 # unix format. 23553 new_path="$path" 23554 23555 windows_path="$new_path" 23556 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23557 unix_path=`$CYGPATH -u "$windows_path"` 23558 new_path="$unix_path" 23559 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23560 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23561 new_path="$unix_path" 23562 fi 23563 23564 23565 # Now try to locate executable using which 23566 new_path=`$WHICH "$new_path" 2> /dev/null` 23567 23568 if test "x$new_path" = x; then 23569 # Oops. Which didn't find the executable. 23570 # The splitting of arguments from the executable at a space might have been incorrect, 23571 # since paths with space are more likely in Windows. Give it another try with the whole 23572 # argument. 23573 path="$complete" 23574 arguments="EOL" 23575 new_path="$path" 23576 23577 windows_path="$new_path" 23578 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23579 unix_path=`$CYGPATH -u "$windows_path"` 23580 new_path="$unix_path" 23581 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23582 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23583 new_path="$unix_path" 23584 fi 23585 23586 23587 new_path=`$WHICH "$new_path" 2> /dev/null` 23588 23589 if test "x$new_path" = x; then 23590 # It's still not found. Now this is an unrecoverable error. 23591 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23592 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23593 has_space=`$ECHO "$complete" | $GREP " "` 23594 if test "x$has_space" != x; then 23595 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23596 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23597 fi 23598 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23599 fi 23600 fi 23601 23602 # Now new_path has a complete unix path to the binary 23603 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23604 # Keep paths in /bin as-is, but remove trailing .exe if any 23605 new_path="${new_path/%.exe/}" 23606 # Do not save /bin paths to all_fixpath_prefixes! 23607 else 23608 # Not in mixed or Windows style, start by that. 23609 new_path=`cmd //c echo $new_path` 23610 23611 input_path="$new_path" 23612 # Check if we need to convert this using DOS-style short mode. If the path 23613 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23614 # take no chances and rewrite it. 23615 # Note: m4 eats our [], so we need to use [ and ] instead. 23616 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23617 if test "x$has_forbidden_chars" != x; then 23618 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23619 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23620 fi 23621 23622 # Output is in $new_path 23623 23624 windows_path="$new_path" 23625 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23626 unix_path=`$CYGPATH -u "$windows_path"` 23627 new_path="$unix_path" 23628 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23629 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23630 new_path="$unix_path" 23631 fi 23632 23633 # remove trailing .exe if any 23634 new_path="${new_path/%.exe/}" 23635 23636 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23637 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23638 fi 23639 23640 else 23641 # We're on a posix platform. Hooray! :) 23642 # First separate the path from the arguments. This will split at the first 23643 # space. 23644 complete="$RC" 23645 path="${complete%% *}" 23646 tmp="$complete EOL" 23647 arguments="${tmp#* }" 23648 23649 # Cannot rely on the command "which" here since it doesn't always work. 23650 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23651 if test -z "$is_absolute_path"; then 23652 # Path to executable is not absolute. Find it. 23653 IFS_save="$IFS" 23654 IFS=: 23655 for p in $PATH; do 23656 if test -f "$p/$path" && test -x "$p/$path"; then 23657 new_path="$p/$path" 23658 break 23659 fi 23660 done 23661 IFS="$IFS_save" 23662 else 23663 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5 23664 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;} 23665 new_path="$path" 23666 fi 23667 23668 if test "x$new_path" = x; then 23669 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23670 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23671 has_space=`$ECHO "$complete" | $GREP " "` 23672 if test "x$has_space" != x; then 23673 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23674 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23675 fi 23676 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23677 fi 23678 fi 23679 23680 # Now join together the path and the arguments once again 23681 if test "x$arguments" != xEOL; then 23682 new_complete="$new_path ${arguments% *}" 23683 else 23684 new_complete="$new_path" 23685 fi 23686 23687 if test "x$complete" != "x$new_complete"; then 23688 RC="$new_complete" 23689 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5 23690 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;} 23691 fi 23692 23693 23694 # For hotspot, we need these in Windows mixed path, 23695 # so rewrite them all. Need added .exe suffix. 23696 HOTSPOT_CXX="$CXX.exe" 23697 HOTSPOT_LD="$LD.exe" 23698 HOTSPOT_MT="$MT.exe" 23699 HOTSPOT_RC="$RC.exe" 23700 23701 unix_path="$HOTSPOT_CXX" 23702 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23703 windows_path=`$CYGPATH -m "$unix_path"` 23704 HOTSPOT_CXX="$windows_path" 23705 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23706 windows_path=`cmd //c echo $unix_path` 23707 HOTSPOT_CXX="$windows_path" 23708 fi 23709 23710 23711 unix_path="$HOTSPOT_LD" 23712 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23713 windows_path=`$CYGPATH -m "$unix_path"` 23714 HOTSPOT_LD="$windows_path" 23715 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23716 windows_path=`cmd //c echo $unix_path` 23717 HOTSPOT_LD="$windows_path" 23718 fi 23719 23720 23721 unix_path="$HOTSPOT_MT" 23722 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23723 windows_path=`$CYGPATH -m "$unix_path"` 23724 HOTSPOT_MT="$windows_path" 23725 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23726 windows_path=`cmd //c echo $unix_path` 23727 HOTSPOT_MT="$windows_path" 23728 fi 23729 23730 23731 unix_path="$HOTSPOT_RC" 23732 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23733 windows_path=`$CYGPATH -m "$unix_path"` 23734 HOTSPOT_RC="$windows_path" 23735 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23736 windows_path=`cmd //c echo $unix_path` 23737 HOTSPOT_RC="$windows_path" 23738 fi 23739 23740 23741 23742 23743 RC_FLAGS="-nologo -l 0x409 -r" 23744 if test "x$VARIANT" = xOPT; then : 23745 23746 RC_FLAGS="$RC_FLAGS -d NDEBUG" 23747 23748 fi 23749 JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION 23750 if test "x$JDK_UPDATE_VERSION" = x; then : 23751 23752 JDK_UPDATE_VERSION_NOTNULL=0 23753 23754 fi 23755 RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\"" 23756 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\"" 23757 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\"" 23758 RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\"" 23759 RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\"" 23760 RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\"" 23761 RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\"" 23762 23763 # lib.exe is used to create static libraries. 23764 # Extract the first word of "lib", so it can be a program name with args. 23765 set dummy lib; ac_word=$2 23766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23767 $as_echo_n "checking for $ac_word... " >&6; } 23768 if ${ac_cv_prog_WINAR+:} false; then : 23769 $as_echo_n "(cached) " >&6 23770 else 23771 if test -n "$WINAR"; then 23772 ac_cv_prog_WINAR="$WINAR" # Let the user override the test. 23773 else 23774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23775 for as_dir in $PATH 23776 do 23777 IFS=$as_save_IFS 23778 test -z "$as_dir" && as_dir=. 23779 for ac_exec_ext in '' $ac_executable_extensions; do 23780 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23781 ac_cv_prog_WINAR="lib" 23782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23783 break 2 23784 fi 23785 done 23786 done 23787 IFS=$as_save_IFS 23788 23789 fi 23790 fi 23791 WINAR=$ac_cv_prog_WINAR 23792 if test -n "$WINAR"; then 23793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5 23794 $as_echo "$WINAR" >&6; } 23795 else 23796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23797 $as_echo "no" >&6; } 23798 fi 23799 23800 23801 23802 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23803 23804 # First separate the path from the arguments. This will split at the first 23805 # space. 23806 complete="$WINAR" 23807 path="${complete%% *}" 23808 tmp="$complete EOL" 23809 arguments="${tmp#* }" 23810 23811 # Input might be given as Windows format, start by converting to 23812 # unix format. 23813 new_path=`$CYGPATH -u "$path"` 23814 23815 # Now try to locate executable using which 23816 new_path=`$WHICH "$new_path" 2> /dev/null` 23817 # bat and cmd files are not always considered executable in cygwin causing which 23818 # to not find them 23819 if test "x$new_path" = x \ 23820 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23821 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23822 new_path=`$CYGPATH -u "$path"` 23823 fi 23824 if test "x$new_path" = x; then 23825 # Oops. Which didn't find the executable. 23826 # The splitting of arguments from the executable at a space might have been incorrect, 23827 # since paths with space are more likely in Windows. Give it another try with the whole 23828 # argument. 23829 path="$complete" 23830 arguments="EOL" 23831 new_path=`$CYGPATH -u "$path"` 23832 new_path=`$WHICH "$new_path" 2> /dev/null` 23833 # bat and cmd files are not always considered executable in cygwin causing which 23834 # to not find them 23835 if test "x$new_path" = x \ 23836 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23837 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23838 new_path=`$CYGPATH -u "$path"` 23839 fi 23840 if test "x$new_path" = x; then 23841 # It's still not found. Now this is an unrecoverable error. 23842 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23843 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23844 has_space=`$ECHO "$complete" | $GREP " "` 23845 if test "x$has_space" != x; then 23846 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23847 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23848 fi 23849 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23850 fi 23851 fi 23852 23853 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23854 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23855 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23856 # "foo.exe" is OK but "foo" is an error. 23857 # 23858 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23859 # It is also a way to make sure we got the proper file name for the real test later on. 23860 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23861 if test "x$test_shortpath" = x; then 23862 # Short path failed, file does not exist as specified. 23863 # Try adding .exe or .cmd 23864 if test -f "${new_path}.exe"; then 23865 input_to_shortpath="${new_path}.exe" 23866 elif test -f "${new_path}.cmd"; then 23867 input_to_shortpath="${new_path}.cmd" 23868 else 23869 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5 23870 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;} 23871 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23872 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23873 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23874 fi 23875 else 23876 input_to_shortpath="$new_path" 23877 fi 23878 23879 # Call helper function which possibly converts this using DOS-style short mode. 23880 # If so, the updated path is stored in $new_path. 23881 new_path="$input_to_shortpath" 23882 23883 input_path="$input_to_shortpath" 23884 # Check if we need to convert this using DOS-style short mode. If the path 23885 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23886 # take no chances and rewrite it. 23887 # Note: m4 eats our [], so we need to use [ and ] instead. 23888 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23889 if test "x$has_forbidden_chars" != x; then 23890 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23891 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23892 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23893 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23894 # Going to short mode and back again did indeed matter. Since short mode is 23895 # case insensitive, let's make it lowercase to improve readability. 23896 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23897 # Now convert it back to Unix-stile (cygpath) 23898 input_path=`$CYGPATH -u "$shortmode_path"` 23899 new_path="$input_path" 23900 fi 23901 fi 23902 23903 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23904 if test "x$test_cygdrive_prefix" = x; then 23905 # As a simple fix, exclude /usr/bin since it's not a real path. 23906 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23907 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23908 # a path prefixed by /cygdrive for fixpath to work. 23909 new_path="$CYGWIN_ROOT_PATH$input_path" 23910 fi 23911 fi 23912 23913 # remove trailing .exe if any 23914 new_path="${new_path/%.exe/}" 23915 23916 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23917 23918 # First separate the path from the arguments. This will split at the first 23919 # space. 23920 complete="$WINAR" 23921 path="${complete%% *}" 23922 tmp="$complete EOL" 23923 arguments="${tmp#* }" 23924 23925 # Input might be given as Windows format, start by converting to 23926 # unix format. 23927 new_path="$path" 23928 23929 windows_path="$new_path" 23930 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23931 unix_path=`$CYGPATH -u "$windows_path"` 23932 new_path="$unix_path" 23933 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23934 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23935 new_path="$unix_path" 23936 fi 23937 23938 23939 # Now try to locate executable using which 23940 new_path=`$WHICH "$new_path" 2> /dev/null` 23941 23942 if test "x$new_path" = x; then 23943 # Oops. Which didn't find the executable. 23944 # The splitting of arguments from the executable at a space might have been incorrect, 23945 # since paths with space are more likely in Windows. Give it another try with the whole 23946 # argument. 23947 path="$complete" 23948 arguments="EOL" 23949 new_path="$path" 23950 23951 windows_path="$new_path" 23952 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23953 unix_path=`$CYGPATH -u "$windows_path"` 23954 new_path="$unix_path" 23955 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23956 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23957 new_path="$unix_path" 23958 fi 23959 23960 23961 new_path=`$WHICH "$new_path" 2> /dev/null` 23962 23963 if test "x$new_path" = x; then 23964 # It's still not found. Now this is an unrecoverable error. 23965 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23966 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23967 has_space=`$ECHO "$complete" | $GREP " "` 23968 if test "x$has_space" != x; then 23969 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23970 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23971 fi 23972 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23973 fi 23974 fi 23975 23976 # Now new_path has a complete unix path to the binary 23977 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23978 # Keep paths in /bin as-is, but remove trailing .exe if any 23979 new_path="${new_path/%.exe/}" 23980 # Do not save /bin paths to all_fixpath_prefixes! 23981 else 23982 # Not in mixed or Windows style, start by that. 23983 new_path=`cmd //c echo $new_path` 23984 23985 input_path="$new_path" 23986 # Check if we need to convert this using DOS-style short mode. If the path 23987 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23988 # take no chances and rewrite it. 23989 # Note: m4 eats our [], so we need to use [ and ] instead. 23990 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23991 if test "x$has_forbidden_chars" != x; then 23992 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23993 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23994 fi 23995 23996 # Output is in $new_path 23997 23998 windows_path="$new_path" 23999 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24000 unix_path=`$CYGPATH -u "$windows_path"` 24001 new_path="$unix_path" 24002 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24003 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24004 new_path="$unix_path" 24005 fi 24006 24007 # remove trailing .exe if any 24008 new_path="${new_path/%.exe/}" 24009 24010 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24011 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24012 fi 24013 24014 else 24015 # We're on a posix platform. Hooray! :) 24016 # First separate the path from the arguments. This will split at the first 24017 # space. 24018 complete="$WINAR" 24019 path="${complete%% *}" 24020 tmp="$complete EOL" 24021 arguments="${tmp#* }" 24022 24023 # Cannot rely on the command "which" here since it doesn't always work. 24024 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24025 if test -z "$is_absolute_path"; then 24026 # Path to executable is not absolute. Find it. 24027 IFS_save="$IFS" 24028 IFS=: 24029 for p in $PATH; do 24030 if test -f "$p/$path" && test -x "$p/$path"; then 24031 new_path="$p/$path" 24032 break 24033 fi 24034 done 24035 IFS="$IFS_save" 24036 else 24037 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5 24038 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;} 24039 new_path="$path" 24040 fi 24041 24042 if test "x$new_path" = x; then 24043 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 24044 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 24045 has_space=`$ECHO "$complete" | $GREP " "` 24046 if test "x$has_space" != x; then 24047 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24048 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24049 fi 24050 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 24051 fi 24052 fi 24053 24054 # Now join together the path and the arguments once again 24055 if test "x$arguments" != xEOL; then 24056 new_complete="$new_path ${arguments% *}" 24057 else 24058 new_complete="$new_path" 24059 fi 24060 24061 if test "x$complete" != "x$new_complete"; then 24062 WINAR="$new_complete" 24063 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5 24064 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;} 24065 fi 24066 24067 AR="$WINAR" 24068 ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" 24069 24070 # Extract the first word of "dumpbin", so it can be a program name with args. 24071 set dummy dumpbin; ac_word=$2 24072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 24073 $as_echo_n "checking for $ac_word... " >&6; } 24074 if ${ac_cv_prog_DUMPBIN+:} false; then : 24075 $as_echo_n "(cached) " >&6 24076 else 24077 if test -n "$DUMPBIN"; then 24078 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. 24079 else 24080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 24081 for as_dir in $PATH 24082 do 24083 IFS=$as_save_IFS 24084 test -z "$as_dir" && as_dir=. 24085 for ac_exec_ext in '' $ac_executable_extensions; do 24086 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 24087 ac_cv_prog_DUMPBIN="dumpbin" 24088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 24089 break 2 24090 fi 24091 done 24092 done 24093 IFS=$as_save_IFS 24094 24095 fi 24096 fi 24097 DUMPBIN=$ac_cv_prog_DUMPBIN 24098 if test -n "$DUMPBIN"; then 24099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 24100 $as_echo "$DUMPBIN" >&6; } 24101 else 24102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 24103 $as_echo "no" >&6; } 24104 fi 24105 24106 24107 24108 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24109 24110 # First separate the path from the arguments. This will split at the first 24111 # space. 24112 complete="$DUMPBIN" 24113 path="${complete%% *}" 24114 tmp="$complete EOL" 24115 arguments="${tmp#* }" 24116 24117 # Input might be given as Windows format, start by converting to 24118 # unix format. 24119 new_path=`$CYGPATH -u "$path"` 24120 24121 # Now try to locate executable using which 24122 new_path=`$WHICH "$new_path" 2> /dev/null` 24123 # bat and cmd files are not always considered executable in cygwin causing which 24124 # to not find them 24125 if test "x$new_path" = x \ 24126 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24127 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24128 new_path=`$CYGPATH -u "$path"` 24129 fi 24130 if test "x$new_path" = x; then 24131 # Oops. Which didn't find the executable. 24132 # The splitting of arguments from the executable at a space might have been incorrect, 24133 # since paths with space are more likely in Windows. Give it another try with the whole 24134 # argument. 24135 path="$complete" 24136 arguments="EOL" 24137 new_path=`$CYGPATH -u "$path"` 24138 new_path=`$WHICH "$new_path" 2> /dev/null` 24139 # bat and cmd files are not always considered executable in cygwin causing which 24140 # to not find them 24141 if test "x$new_path" = x \ 24142 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24143 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24144 new_path=`$CYGPATH -u "$path"` 24145 fi 24146 if test "x$new_path" = x; then 24147 # It's still not found. Now this is an unrecoverable error. 24148 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 24149 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 24150 has_space=`$ECHO "$complete" | $GREP " "` 24151 if test "x$has_space" != x; then 24152 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24153 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24154 fi 24155 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24156 fi 24157 fi 24158 24159 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24160 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24161 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24162 # "foo.exe" is OK but "foo" is an error. 24163 # 24164 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24165 # It is also a way to make sure we got the proper file name for the real test later on. 24166 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24167 if test "x$test_shortpath" = x; then 24168 # Short path failed, file does not exist as specified. 24169 # Try adding .exe or .cmd 24170 if test -f "${new_path}.exe"; then 24171 input_to_shortpath="${new_path}.exe" 24172 elif test -f "${new_path}.cmd"; then 24173 input_to_shortpath="${new_path}.cmd" 24174 else 24175 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5 24176 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;} 24177 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24178 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24179 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24180 fi 24181 else 24182 input_to_shortpath="$new_path" 24183 fi 24184 24185 # Call helper function which possibly converts this using DOS-style short mode. 24186 # If so, the updated path is stored in $new_path. 24187 new_path="$input_to_shortpath" 24188 24189 input_path="$input_to_shortpath" 24190 # Check if we need to convert this using DOS-style short mode. If the path 24191 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24192 # take no chances and rewrite it. 24193 # Note: m4 eats our [], so we need to use [ and ] instead. 24194 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24195 if test "x$has_forbidden_chars" != x; then 24196 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24197 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24198 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24199 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24200 # Going to short mode and back again did indeed matter. Since short mode is 24201 # case insensitive, let's make it lowercase to improve readability. 24202 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24203 # Now convert it back to Unix-stile (cygpath) 24204 input_path=`$CYGPATH -u "$shortmode_path"` 24205 new_path="$input_path" 24206 fi 24207 fi 24208 24209 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24210 if test "x$test_cygdrive_prefix" = x; then 24211 # As a simple fix, exclude /usr/bin since it's not a real path. 24212 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24213 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24214 # a path prefixed by /cygdrive for fixpath to work. 24215 new_path="$CYGWIN_ROOT_PATH$input_path" 24216 fi 24217 fi 24218 24219 # remove trailing .exe if any 24220 new_path="${new_path/%.exe/}" 24221 24222 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24223 24224 # First separate the path from the arguments. This will split at the first 24225 # space. 24226 complete="$DUMPBIN" 24227 path="${complete%% *}" 24228 tmp="$complete EOL" 24229 arguments="${tmp#* }" 24230 24231 # Input might be given as Windows format, start by converting to 24232 # unix format. 24233 new_path="$path" 24234 24235 windows_path="$new_path" 24236 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24237 unix_path=`$CYGPATH -u "$windows_path"` 24238 new_path="$unix_path" 24239 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24240 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24241 new_path="$unix_path" 24242 fi 24243 24244 24245 # Now try to locate executable using which 24246 new_path=`$WHICH "$new_path" 2> /dev/null` 24247 24248 if test "x$new_path" = x; then 24249 # Oops. Which didn't find the executable. 24250 # The splitting of arguments from the executable at a space might have been incorrect, 24251 # since paths with space are more likely in Windows. Give it another try with the whole 24252 # argument. 24253 path="$complete" 24254 arguments="EOL" 24255 new_path="$path" 24256 24257 windows_path="$new_path" 24258 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24259 unix_path=`$CYGPATH -u "$windows_path"` 24260 new_path="$unix_path" 24261 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24262 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24263 new_path="$unix_path" 24264 fi 24265 24266 24267 new_path=`$WHICH "$new_path" 2> /dev/null` 24268 24269 if test "x$new_path" = x; then 24270 # It's still not found. Now this is an unrecoverable error. 24271 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 24272 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 24273 has_space=`$ECHO "$complete" | $GREP " "` 24274 if test "x$has_space" != x; then 24275 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24276 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24277 fi 24278 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24279 fi 24280 fi 24281 24282 # Now new_path has a complete unix path to the binary 24283 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24284 # Keep paths in /bin as-is, but remove trailing .exe if any 24285 new_path="${new_path/%.exe/}" 24286 # Do not save /bin paths to all_fixpath_prefixes! 24287 else 24288 # Not in mixed or Windows style, start by that. 24289 new_path=`cmd //c echo $new_path` 24290 24291 input_path="$new_path" 24292 # Check if we need to convert this using DOS-style short mode. If the path 24293 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24294 # take no chances and rewrite it. 24295 # Note: m4 eats our [], so we need to use [ and ] instead. 24296 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24297 if test "x$has_forbidden_chars" != x; then 24298 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24299 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24300 fi 24301 24302 # Output is in $new_path 24303 24304 windows_path="$new_path" 24305 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24306 unix_path=`$CYGPATH -u "$windows_path"` 24307 new_path="$unix_path" 24308 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24309 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24310 new_path="$unix_path" 24311 fi 24312 24313 # remove trailing .exe if any 24314 new_path="${new_path/%.exe/}" 24315 24316 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24317 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24318 fi 24319 24320 else 24321 # We're on a posix platform. Hooray! :) 24322 # First separate the path from the arguments. This will split at the first 24323 # space. 24324 complete="$DUMPBIN" 24325 path="${complete%% *}" 24326 tmp="$complete EOL" 24327 arguments="${tmp#* }" 24328 24329 # Cannot rely on the command "which" here since it doesn't always work. 24330 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24331 if test -z "$is_absolute_path"; then 24332 # Path to executable is not absolute. Find it. 24333 IFS_save="$IFS" 24334 IFS=: 24335 for p in $PATH; do 24336 if test -f "$p/$path" && test -x "$p/$path"; then 24337 new_path="$p/$path" 24338 break 24339 fi 24340 done 24341 IFS="$IFS_save" 24342 else 24343 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5 24344 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;} 24345 new_path="$path" 24346 fi 24347 24348 if test "x$new_path" = x; then 24349 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 24350 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 24351 has_space=`$ECHO "$complete" | $GREP " "` 24352 if test "x$has_space" != x; then 24353 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24354 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24355 fi 24356 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24357 fi 24358 fi 24359 24360 # Now join together the path and the arguments once again 24361 if test "x$arguments" != xEOL; then 24362 new_complete="$new_path ${arguments% *}" 24363 else 24364 new_complete="$new_path" 24365 fi 24366 24367 if test "x$complete" != "x$new_complete"; then 24368 DUMPBIN="$new_complete" 24369 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5 24370 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;} 24371 fi 24372 24373 24374 COMPILER_TYPE=CL 24375 CCXXFLAGS="$CCXXFLAGS -nologo" 24376 24377 fi 24378 24379 24380 24381 ac_ext=c 24382 ac_cpp='$CPP $CPPFLAGS' 24383 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24384 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24385 ac_compiler_gnu=$ac_cv_c_compiler_gnu 24386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 24387 $as_echo_n "checking how to run the C preprocessor... " >&6; } 24388 # On Suns, sometimes $CPP names a directory. 24389 if test -n "$CPP" && test -d "$CPP"; then 24390 CPP= 24391 fi 24392 if test -z "$CPP"; then 24393 if ${ac_cv_prog_CPP+:} false; then : 24394 $as_echo_n "(cached) " >&6 24395 else 24396 # Double quotes because CPP needs to be expanded 24397 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 24398 do 24399 ac_preproc_ok=false 24400 for ac_c_preproc_warn_flag in '' yes 24401 do 24402 # Use a header file that comes with gcc, so configuring glibc 24403 # with a fresh cross-compiler works. 24404 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24405 # <limits.h> exists even on freestanding compilers. 24406 # On the NeXT, cc -E runs the code through the compiler's parser, 24407 # not just through cpp. "Syntax error" is here to catch this case. 24408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24409 /* end confdefs.h. */ 24410 #ifdef __STDC__ 24411 # include <limits.h> 24412 #else 24413 # include <assert.h> 24414 #endif 24415 Syntax error 24416 _ACEOF 24417 if ac_fn_c_try_cpp "$LINENO"; then : 24418 24419 else 24420 # Broken: fails on valid input. 24421 continue 24422 fi 24423 rm -f conftest.err conftest.i conftest.$ac_ext 24424 24425 # OK, works on sane cases. Now check whether nonexistent headers 24426 # can be detected and how. 24427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24428 /* end confdefs.h. */ 24429 #include <ac_nonexistent.h> 24430 _ACEOF 24431 if ac_fn_c_try_cpp "$LINENO"; then : 24432 # Broken: success on invalid input. 24433 continue 24434 else 24435 # Passes both tests. 24436 ac_preproc_ok=: 24437 break 24438 fi 24439 rm -f conftest.err conftest.i conftest.$ac_ext 24440 24441 done 24442 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24443 rm -f conftest.i conftest.err conftest.$ac_ext 24444 if $ac_preproc_ok; then : 24445 break 24446 fi 24447 24448 done 24449 ac_cv_prog_CPP=$CPP 24450 24451 fi 24452 CPP=$ac_cv_prog_CPP 24453 else 24454 ac_cv_prog_CPP=$CPP 24455 fi 24456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 24457 $as_echo "$CPP" >&6; } 24458 ac_preproc_ok=false 24459 for ac_c_preproc_warn_flag in '' yes 24460 do 24461 # Use a header file that comes with gcc, so configuring glibc 24462 # with a fresh cross-compiler works. 24463 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24464 # <limits.h> exists even on freestanding compilers. 24465 # On the NeXT, cc -E runs the code through the compiler's parser, 24466 # not just through cpp. "Syntax error" is here to catch this case. 24467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24468 /* end confdefs.h. */ 24469 #ifdef __STDC__ 24470 # include <limits.h> 24471 #else 24472 # include <assert.h> 24473 #endif 24474 Syntax error 24475 _ACEOF 24476 if ac_fn_c_try_cpp "$LINENO"; then : 24477 24478 else 24479 # Broken: fails on valid input. 24480 continue 24481 fi 24482 rm -f conftest.err conftest.i conftest.$ac_ext 24483 24484 # OK, works on sane cases. Now check whether nonexistent headers 24485 # can be detected and how. 24486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24487 /* end confdefs.h. */ 24488 #include <ac_nonexistent.h> 24489 _ACEOF 24490 if ac_fn_c_try_cpp "$LINENO"; then : 24491 # Broken: success on invalid input. 24492 continue 24493 else 24494 # Passes both tests. 24495 ac_preproc_ok=: 24496 break 24497 fi 24498 rm -f conftest.err conftest.i conftest.$ac_ext 24499 24500 done 24501 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24502 rm -f conftest.i conftest.err conftest.$ac_ext 24503 if $ac_preproc_ok; then : 24504 24505 else 24506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 24507 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 24508 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 24509 See \`config.log' for more details" "$LINENO" 5; } 24510 fi 24511 24512 ac_ext=cpp 24513 ac_cpp='$CXXCPP $CPPFLAGS' 24514 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24515 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24516 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24517 24518 24519 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24520 24521 # First separate the path from the arguments. This will split at the first 24522 # space. 24523 complete="$CPP" 24524 path="${complete%% *}" 24525 tmp="$complete EOL" 24526 arguments="${tmp#* }" 24527 24528 # Input might be given as Windows format, start by converting to 24529 # unix format. 24530 new_path=`$CYGPATH -u "$path"` 24531 24532 # Now try to locate executable using which 24533 new_path=`$WHICH "$new_path" 2> /dev/null` 24534 # bat and cmd files are not always considered executable in cygwin causing which 24535 # to not find them 24536 if test "x$new_path" = x \ 24537 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24538 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24539 new_path=`$CYGPATH -u "$path"` 24540 fi 24541 if test "x$new_path" = x; then 24542 # Oops. Which didn't find the executable. 24543 # The splitting of arguments from the executable at a space might have been incorrect, 24544 # since paths with space are more likely in Windows. Give it another try with the whole 24545 # argument. 24546 path="$complete" 24547 arguments="EOL" 24548 new_path=`$CYGPATH -u "$path"` 24549 new_path=`$WHICH "$new_path" 2> /dev/null` 24550 # bat and cmd files are not always considered executable in cygwin causing which 24551 # to not find them 24552 if test "x$new_path" = x \ 24553 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24554 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24555 new_path=`$CYGPATH -u "$path"` 24556 fi 24557 if test "x$new_path" = x; then 24558 # It's still not found. Now this is an unrecoverable error. 24559 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24560 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24561 has_space=`$ECHO "$complete" | $GREP " "` 24562 if test "x$has_space" != x; then 24563 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24564 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24565 fi 24566 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24567 fi 24568 fi 24569 24570 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24571 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24572 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24573 # "foo.exe" is OK but "foo" is an error. 24574 # 24575 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24576 # It is also a way to make sure we got the proper file name for the real test later on. 24577 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24578 if test "x$test_shortpath" = x; then 24579 # Short path failed, file does not exist as specified. 24580 # Try adding .exe or .cmd 24581 if test -f "${new_path}.exe"; then 24582 input_to_shortpath="${new_path}.exe" 24583 elif test -f "${new_path}.cmd"; then 24584 input_to_shortpath="${new_path}.cmd" 24585 else 24586 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5 24587 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;} 24588 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24589 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24590 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24591 fi 24592 else 24593 input_to_shortpath="$new_path" 24594 fi 24595 24596 # Call helper function which possibly converts this using DOS-style short mode. 24597 # If so, the updated path is stored in $new_path. 24598 new_path="$input_to_shortpath" 24599 24600 input_path="$input_to_shortpath" 24601 # Check if we need to convert this using DOS-style short mode. If the path 24602 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24603 # take no chances and rewrite it. 24604 # Note: m4 eats our [], so we need to use [ and ] instead. 24605 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24606 if test "x$has_forbidden_chars" != x; then 24607 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24608 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24609 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24610 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24611 # Going to short mode and back again did indeed matter. Since short mode is 24612 # case insensitive, let's make it lowercase to improve readability. 24613 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24614 # Now convert it back to Unix-stile (cygpath) 24615 input_path=`$CYGPATH -u "$shortmode_path"` 24616 new_path="$input_path" 24617 fi 24618 fi 24619 24620 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24621 if test "x$test_cygdrive_prefix" = x; then 24622 # As a simple fix, exclude /usr/bin since it's not a real path. 24623 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24624 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24625 # a path prefixed by /cygdrive for fixpath to work. 24626 new_path="$CYGWIN_ROOT_PATH$input_path" 24627 fi 24628 fi 24629 24630 # remove trailing .exe if any 24631 new_path="${new_path/%.exe/}" 24632 24633 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24634 24635 # First separate the path from the arguments. This will split at the first 24636 # space. 24637 complete="$CPP" 24638 path="${complete%% *}" 24639 tmp="$complete EOL" 24640 arguments="${tmp#* }" 24641 24642 # Input might be given as Windows format, start by converting to 24643 # unix format. 24644 new_path="$path" 24645 24646 windows_path="$new_path" 24647 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24648 unix_path=`$CYGPATH -u "$windows_path"` 24649 new_path="$unix_path" 24650 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24651 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24652 new_path="$unix_path" 24653 fi 24654 24655 24656 # Now try to locate executable using which 24657 new_path=`$WHICH "$new_path" 2> /dev/null` 24658 24659 if test "x$new_path" = x; then 24660 # Oops. Which didn't find the executable. 24661 # The splitting of arguments from the executable at a space might have been incorrect, 24662 # since paths with space are more likely in Windows. Give it another try with the whole 24663 # argument. 24664 path="$complete" 24665 arguments="EOL" 24666 new_path="$path" 24667 24668 windows_path="$new_path" 24669 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24670 unix_path=`$CYGPATH -u "$windows_path"` 24671 new_path="$unix_path" 24672 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24673 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24674 new_path="$unix_path" 24675 fi 24676 24677 24678 new_path=`$WHICH "$new_path" 2> /dev/null` 24679 24680 if test "x$new_path" = x; then 24681 # It's still not found. Now this is an unrecoverable error. 24682 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24683 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24684 has_space=`$ECHO "$complete" | $GREP " "` 24685 if test "x$has_space" != x; then 24686 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24687 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24688 fi 24689 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24690 fi 24691 fi 24692 24693 # Now new_path has a complete unix path to the binary 24694 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24695 # Keep paths in /bin as-is, but remove trailing .exe if any 24696 new_path="${new_path/%.exe/}" 24697 # Do not save /bin paths to all_fixpath_prefixes! 24698 else 24699 # Not in mixed or Windows style, start by that. 24700 new_path=`cmd //c echo $new_path` 24701 24702 input_path="$new_path" 24703 # Check if we need to convert this using DOS-style short mode. If the path 24704 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24705 # take no chances and rewrite it. 24706 # Note: m4 eats our [], so we need to use [ and ] instead. 24707 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24708 if test "x$has_forbidden_chars" != x; then 24709 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24710 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24711 fi 24712 24713 # Output is in $new_path 24714 24715 windows_path="$new_path" 24716 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24717 unix_path=`$CYGPATH -u "$windows_path"` 24718 new_path="$unix_path" 24719 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24720 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24721 new_path="$unix_path" 24722 fi 24723 24724 # remove trailing .exe if any 24725 new_path="${new_path/%.exe/}" 24726 24727 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24728 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24729 fi 24730 24731 else 24732 # We're on a posix platform. Hooray! :) 24733 # First separate the path from the arguments. This will split at the first 24734 # space. 24735 complete="$CPP" 24736 path="${complete%% *}" 24737 tmp="$complete EOL" 24738 arguments="${tmp#* }" 24739 24740 # Cannot rely on the command "which" here since it doesn't always work. 24741 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24742 if test -z "$is_absolute_path"; then 24743 # Path to executable is not absolute. Find it. 24744 IFS_save="$IFS" 24745 IFS=: 24746 for p in $PATH; do 24747 if test -f "$p/$path" && test -x "$p/$path"; then 24748 new_path="$p/$path" 24749 break 24750 fi 24751 done 24752 IFS="$IFS_save" 24753 else 24754 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5 24755 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;} 24756 new_path="$path" 24757 fi 24758 24759 if test "x$new_path" = x; then 24760 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24761 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24762 has_space=`$ECHO "$complete" | $GREP " "` 24763 if test "x$has_space" != x; then 24764 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24765 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24766 fi 24767 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24768 fi 24769 fi 24770 24771 # Now join together the path and the arguments once again 24772 if test "x$arguments" != xEOL; then 24773 new_complete="$new_path ${arguments% *}" 24774 else 24775 new_complete="$new_path" 24776 fi 24777 24778 if test "x$complete" != "x$new_complete"; then 24779 CPP="$new_complete" 24780 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5 24781 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;} 24782 fi 24783 24784 24785 ac_ext=cpp 24786 ac_cpp='$CXXCPP $CPPFLAGS' 24787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 24791 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } 24792 if test -z "$CXXCPP"; then 24793 if ${ac_cv_prog_CXXCPP+:} false; then : 24794 $as_echo_n "(cached) " >&6 24795 else 24796 # Double quotes because CXXCPP needs to be expanded 24797 for CXXCPP in "$CXX -E" "/lib/cpp" 24798 do 24799 ac_preproc_ok=false 24800 for ac_cxx_preproc_warn_flag in '' yes 24801 do 24802 # Use a header file that comes with gcc, so configuring glibc 24803 # with a fresh cross-compiler works. 24804 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24805 # <limits.h> exists even on freestanding compilers. 24806 # On the NeXT, cc -E runs the code through the compiler's parser, 24807 # not just through cpp. "Syntax error" is here to catch this case. 24808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24809 /* end confdefs.h. */ 24810 #ifdef __STDC__ 24811 # include <limits.h> 24812 #else 24813 # include <assert.h> 24814 #endif 24815 Syntax error 24816 _ACEOF 24817 if ac_fn_cxx_try_cpp "$LINENO"; then : 24818 24819 else 24820 # Broken: fails on valid input. 24821 continue 24822 fi 24823 rm -f conftest.err conftest.i conftest.$ac_ext 24824 24825 # OK, works on sane cases. Now check whether nonexistent headers 24826 # can be detected and how. 24827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24828 /* end confdefs.h. */ 24829 #include <ac_nonexistent.h> 24830 _ACEOF 24831 if ac_fn_cxx_try_cpp "$LINENO"; then : 24832 # Broken: success on invalid input. 24833 continue 24834 else 24835 # Passes both tests. 24836 ac_preproc_ok=: 24837 break 24838 fi 24839 rm -f conftest.err conftest.i conftest.$ac_ext 24840 24841 done 24842 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24843 rm -f conftest.i conftest.err conftest.$ac_ext 24844 if $ac_preproc_ok; then : 24845 break 24846 fi 24847 24848 done 24849 ac_cv_prog_CXXCPP=$CXXCPP 24850 24851 fi 24852 CXXCPP=$ac_cv_prog_CXXCPP 24853 else 24854 ac_cv_prog_CXXCPP=$CXXCPP 24855 fi 24856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 24857 $as_echo "$CXXCPP" >&6; } 24858 ac_preproc_ok=false 24859 for ac_cxx_preproc_warn_flag in '' yes 24860 do 24861 # Use a header file that comes with gcc, so configuring glibc 24862 # with a fresh cross-compiler works. 24863 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24864 # <limits.h> exists even on freestanding compilers. 24865 # On the NeXT, cc -E runs the code through the compiler's parser, 24866 # not just through cpp. "Syntax error" is here to catch this case. 24867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24868 /* end confdefs.h. */ 24869 #ifdef __STDC__ 24870 # include <limits.h> 24871 #else 24872 # include <assert.h> 24873 #endif 24874 Syntax error 24875 _ACEOF 24876 if ac_fn_cxx_try_cpp "$LINENO"; then : 24877 24878 else 24879 # Broken: fails on valid input. 24880 continue 24881 fi 24882 rm -f conftest.err conftest.i conftest.$ac_ext 24883 24884 # OK, works on sane cases. Now check whether nonexistent headers 24885 # can be detected and how. 24886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24887 /* end confdefs.h. */ 24888 #include <ac_nonexistent.h> 24889 _ACEOF 24890 if ac_fn_cxx_try_cpp "$LINENO"; then : 24891 # Broken: success on invalid input. 24892 continue 24893 else 24894 # Passes both tests. 24895 ac_preproc_ok=: 24896 break 24897 fi 24898 rm -f conftest.err conftest.i conftest.$ac_ext 24899 24900 done 24901 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24902 rm -f conftest.i conftest.err conftest.$ac_ext 24903 if $ac_preproc_ok; then : 24904 24905 else 24906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 24907 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 24908 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check 24909 See \`config.log' for more details" "$LINENO" 5; } 24910 fi 24911 24912 ac_ext=cpp 24913 ac_cpp='$CXXCPP $CPPFLAGS' 24914 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24915 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24916 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24917 24918 24919 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24920 24921 # First separate the path from the arguments. This will split at the first 24922 # space. 24923 complete="$CXXCPP" 24924 path="${complete%% *}" 24925 tmp="$complete EOL" 24926 arguments="${tmp#* }" 24927 24928 # Input might be given as Windows format, start by converting to 24929 # unix format. 24930 new_path=`$CYGPATH -u "$path"` 24931 24932 # Now try to locate executable using which 24933 new_path=`$WHICH "$new_path" 2> /dev/null` 24934 # bat and cmd files are not always considered executable in cygwin causing which 24935 # to not find them 24936 if test "x$new_path" = x \ 24937 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24938 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24939 new_path=`$CYGPATH -u "$path"` 24940 fi 24941 if test "x$new_path" = x; then 24942 # Oops. Which didn't find the executable. 24943 # The splitting of arguments from the executable at a space might have been incorrect, 24944 # since paths with space are more likely in Windows. Give it another try with the whole 24945 # argument. 24946 path="$complete" 24947 arguments="EOL" 24948 new_path=`$CYGPATH -u "$path"` 24949 new_path=`$WHICH "$new_path" 2> /dev/null` 24950 # bat and cmd files are not always considered executable in cygwin causing which 24951 # to not find them 24952 if test "x$new_path" = x \ 24953 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24954 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24955 new_path=`$CYGPATH -u "$path"` 24956 fi 24957 if test "x$new_path" = x; then 24958 # It's still not found. Now this is an unrecoverable error. 24959 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 24960 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 24961 has_space=`$ECHO "$complete" | $GREP " "` 24962 if test "x$has_space" != x; then 24963 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24964 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24965 fi 24966 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24967 fi 24968 fi 24969 24970 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24971 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24972 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24973 # "foo.exe" is OK but "foo" is an error. 24974 # 24975 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24976 # It is also a way to make sure we got the proper file name for the real test later on. 24977 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24978 if test "x$test_shortpath" = x; then 24979 # Short path failed, file does not exist as specified. 24980 # Try adding .exe or .cmd 24981 if test -f "${new_path}.exe"; then 24982 input_to_shortpath="${new_path}.exe" 24983 elif test -f "${new_path}.cmd"; then 24984 input_to_shortpath="${new_path}.cmd" 24985 else 24986 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5 24987 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;} 24988 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24989 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24990 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24991 fi 24992 else 24993 input_to_shortpath="$new_path" 24994 fi 24995 24996 # Call helper function which possibly converts this using DOS-style short mode. 24997 # If so, the updated path is stored in $new_path. 24998 new_path="$input_to_shortpath" 24999 25000 input_path="$input_to_shortpath" 25001 # Check if we need to convert this using DOS-style short mode. If the path 25002 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25003 # take no chances and rewrite it. 25004 # Note: m4 eats our [], so we need to use [ and ] instead. 25005 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25006 if test "x$has_forbidden_chars" != x; then 25007 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25008 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25009 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25010 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25011 # Going to short mode and back again did indeed matter. Since short mode is 25012 # case insensitive, let's make it lowercase to improve readability. 25013 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25014 # Now convert it back to Unix-stile (cygpath) 25015 input_path=`$CYGPATH -u "$shortmode_path"` 25016 new_path="$input_path" 25017 fi 25018 fi 25019 25020 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25021 if test "x$test_cygdrive_prefix" = x; then 25022 # As a simple fix, exclude /usr/bin since it's not a real path. 25023 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25024 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25025 # a path prefixed by /cygdrive for fixpath to work. 25026 new_path="$CYGWIN_ROOT_PATH$input_path" 25027 fi 25028 fi 25029 25030 # remove trailing .exe if any 25031 new_path="${new_path/%.exe/}" 25032 25033 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25034 25035 # First separate the path from the arguments. This will split at the first 25036 # space. 25037 complete="$CXXCPP" 25038 path="${complete%% *}" 25039 tmp="$complete EOL" 25040 arguments="${tmp#* }" 25041 25042 # Input might be given as Windows format, start by converting to 25043 # unix format. 25044 new_path="$path" 25045 25046 windows_path="$new_path" 25047 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25048 unix_path=`$CYGPATH -u "$windows_path"` 25049 new_path="$unix_path" 25050 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25051 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25052 new_path="$unix_path" 25053 fi 25054 25055 25056 # Now try to locate executable using which 25057 new_path=`$WHICH "$new_path" 2> /dev/null` 25058 25059 if test "x$new_path" = x; then 25060 # Oops. Which didn't find the executable. 25061 # The splitting of arguments from the executable at a space might have been incorrect, 25062 # since paths with space are more likely in Windows. Give it another try with the whole 25063 # argument. 25064 path="$complete" 25065 arguments="EOL" 25066 new_path="$path" 25067 25068 windows_path="$new_path" 25069 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25070 unix_path=`$CYGPATH -u "$windows_path"` 25071 new_path="$unix_path" 25072 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25073 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25074 new_path="$unix_path" 25075 fi 25076 25077 25078 new_path=`$WHICH "$new_path" 2> /dev/null` 25079 25080 if test "x$new_path" = x; then 25081 # It's still not found. Now this is an unrecoverable error. 25082 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 25083 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 25084 has_space=`$ECHO "$complete" | $GREP " "` 25085 if test "x$has_space" != x; then 25086 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25087 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25088 fi 25089 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 25090 fi 25091 fi 25092 25093 # Now new_path has a complete unix path to the binary 25094 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25095 # Keep paths in /bin as-is, but remove trailing .exe if any 25096 new_path="${new_path/%.exe/}" 25097 # Do not save /bin paths to all_fixpath_prefixes! 25098 else 25099 # Not in mixed or Windows style, start by that. 25100 new_path=`cmd //c echo $new_path` 25101 25102 input_path="$new_path" 25103 # Check if we need to convert this using DOS-style short mode. If the path 25104 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25105 # take no chances and rewrite it. 25106 # Note: m4 eats our [], so we need to use [ and ] instead. 25107 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25108 if test "x$has_forbidden_chars" != x; then 25109 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25110 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25111 fi 25112 25113 # Output is in $new_path 25114 25115 windows_path="$new_path" 25116 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25117 unix_path=`$CYGPATH -u "$windows_path"` 25118 new_path="$unix_path" 25119 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25120 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25121 new_path="$unix_path" 25122 fi 25123 25124 # remove trailing .exe if any 25125 new_path="${new_path/%.exe/}" 25126 25127 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25128 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25129 fi 25130 25131 else 25132 # We're on a posix platform. Hooray! :) 25133 # First separate the path from the arguments. This will split at the first 25134 # space. 25135 complete="$CXXCPP" 25136 path="${complete%% *}" 25137 tmp="$complete EOL" 25138 arguments="${tmp#* }" 25139 25140 # Cannot rely on the command "which" here since it doesn't always work. 25141 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25142 if test -z "$is_absolute_path"; then 25143 # Path to executable is not absolute. Find it. 25144 IFS_save="$IFS" 25145 IFS=: 25146 for p in $PATH; do 25147 if test -f "$p/$path" && test -x "$p/$path"; then 25148 new_path="$p/$path" 25149 break 25150 fi 25151 done 25152 IFS="$IFS_save" 25153 else 25154 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5 25155 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;} 25156 new_path="$path" 25157 fi 25158 25159 if test "x$new_path" = x; then 25160 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 25161 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 25162 has_space=`$ECHO "$complete" | $GREP " "` 25163 if test "x$has_space" != x; then 25164 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25165 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25166 fi 25167 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 25168 fi 25169 fi 25170 25171 # Now join together the path and the arguments once again 25172 if test "x$arguments" != xEOL; then 25173 new_complete="$new_path ${arguments% *}" 25174 else 25175 new_complete="$new_path" 25176 fi 25177 25178 if test "x$complete" != "x$new_complete"; then 25179 CXXCPP="$new_complete" 25180 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5 25181 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;} 25182 fi 25183 25184 25185 if test "x$COMPILE_TYPE" != "xcross"; then 25186 # If we are not cross compiling, use the same compilers for 25187 # building the build platform executables. The cross-compilation 25188 # case needed to be done earlier, but this can only be done after 25189 # the native tools have been localized. 25190 BUILD_CC="$CC" 25191 BUILD_CXX="$CXX" 25192 BUILD_LD="$LD" 25193 fi 25194 25195 # for solaris we really need solaris tools, and not gnu equivalent 25196 # these seems to normally reside in /usr/ccs/bin so add that to path before 25197 # starting to probe 25198 # 25199 # NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH 25200 # so that it can be overriden --with-tools-dir 25201 if test "x$OPENJDK_BUILD_OS" = xsolaris; then 25202 PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" 25203 fi 25204 25205 # Find the right assembler. 25206 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 25207 # Extract the first word of "as", so it can be a program name with args. 25208 set dummy as; ac_word=$2 25209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25210 $as_echo_n "checking for $ac_word... " >&6; } 25211 if ${ac_cv_path_AS+:} false; then : 25212 $as_echo_n "(cached) " >&6 25213 else 25214 case $AS in 25215 [\\/]* | ?:[\\/]*) 25216 ac_cv_path_AS="$AS" # Let the user override the test with a path. 25217 ;; 25218 *) 25219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25220 for as_dir in $PATH 25221 do 25222 IFS=$as_save_IFS 25223 test -z "$as_dir" && as_dir=. 25224 for ac_exec_ext in '' $ac_executable_extensions; do 25225 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25226 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" 25227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25228 break 2 25229 fi 25230 done 25231 done 25232 IFS=$as_save_IFS 25233 25234 ;; 25235 esac 25236 fi 25237 AS=$ac_cv_path_AS 25238 if test -n "$AS"; then 25239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 25240 $as_echo "$AS" >&6; } 25241 else 25242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25243 $as_echo "no" >&6; } 25244 fi 25245 25246 25247 25248 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25249 25250 # First separate the path from the arguments. This will split at the first 25251 # space. 25252 complete="$AS" 25253 path="${complete%% *}" 25254 tmp="$complete EOL" 25255 arguments="${tmp#* }" 25256 25257 # Input might be given as Windows format, start by converting to 25258 # unix format. 25259 new_path=`$CYGPATH -u "$path"` 25260 25261 # Now try to locate executable using which 25262 new_path=`$WHICH "$new_path" 2> /dev/null` 25263 # bat and cmd files are not always considered executable in cygwin causing which 25264 # to not find them 25265 if test "x$new_path" = x \ 25266 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25267 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25268 new_path=`$CYGPATH -u "$path"` 25269 fi 25270 if test "x$new_path" = x; then 25271 # Oops. Which didn't find the executable. 25272 # The splitting of arguments from the executable at a space might have been incorrect, 25273 # since paths with space are more likely in Windows. Give it another try with the whole 25274 # argument. 25275 path="$complete" 25276 arguments="EOL" 25277 new_path=`$CYGPATH -u "$path"` 25278 new_path=`$WHICH "$new_path" 2> /dev/null` 25279 # bat and cmd files are not always considered executable in cygwin causing which 25280 # to not find them 25281 if test "x$new_path" = x \ 25282 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25283 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25284 new_path=`$CYGPATH -u "$path"` 25285 fi 25286 if test "x$new_path" = x; then 25287 # It's still not found. Now this is an unrecoverable error. 25288 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25289 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25290 has_space=`$ECHO "$complete" | $GREP " "` 25291 if test "x$has_space" != x; then 25292 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25294 fi 25295 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25296 fi 25297 fi 25298 25299 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25300 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25301 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25302 # "foo.exe" is OK but "foo" is an error. 25303 # 25304 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25305 # It is also a way to make sure we got the proper file name for the real test later on. 25306 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25307 if test "x$test_shortpath" = x; then 25308 # Short path failed, file does not exist as specified. 25309 # Try adding .exe or .cmd 25310 if test -f "${new_path}.exe"; then 25311 input_to_shortpath="${new_path}.exe" 25312 elif test -f "${new_path}.cmd"; then 25313 input_to_shortpath="${new_path}.cmd" 25314 else 25315 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5 25316 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;} 25317 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25319 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25320 fi 25321 else 25322 input_to_shortpath="$new_path" 25323 fi 25324 25325 # Call helper function which possibly converts this using DOS-style short mode. 25326 # If so, the updated path is stored in $new_path. 25327 new_path="$input_to_shortpath" 25328 25329 input_path="$input_to_shortpath" 25330 # Check if we need to convert this using DOS-style short mode. If the path 25331 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25332 # take no chances and rewrite it. 25333 # Note: m4 eats our [], so we need to use [ and ] instead. 25334 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25335 if test "x$has_forbidden_chars" != x; then 25336 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25337 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25338 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25339 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25340 # Going to short mode and back again did indeed matter. Since short mode is 25341 # case insensitive, let's make it lowercase to improve readability. 25342 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25343 # Now convert it back to Unix-stile (cygpath) 25344 input_path=`$CYGPATH -u "$shortmode_path"` 25345 new_path="$input_path" 25346 fi 25347 fi 25348 25349 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25350 if test "x$test_cygdrive_prefix" = x; then 25351 # As a simple fix, exclude /usr/bin since it's not a real path. 25352 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25353 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25354 # a path prefixed by /cygdrive for fixpath to work. 25355 new_path="$CYGWIN_ROOT_PATH$input_path" 25356 fi 25357 fi 25358 25359 # remove trailing .exe if any 25360 new_path="${new_path/%.exe/}" 25361 25362 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25363 25364 # First separate the path from the arguments. This will split at the first 25365 # space. 25366 complete="$AS" 25367 path="${complete%% *}" 25368 tmp="$complete EOL" 25369 arguments="${tmp#* }" 25370 25371 # Input might be given as Windows format, start by converting to 25372 # unix format. 25373 new_path="$path" 25374 25375 windows_path="$new_path" 25376 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25377 unix_path=`$CYGPATH -u "$windows_path"` 25378 new_path="$unix_path" 25379 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25380 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25381 new_path="$unix_path" 25382 fi 25383 25384 25385 # Now try to locate executable using which 25386 new_path=`$WHICH "$new_path" 2> /dev/null` 25387 25388 if test "x$new_path" = x; then 25389 # Oops. Which didn't find the executable. 25390 # The splitting of arguments from the executable at a space might have been incorrect, 25391 # since paths with space are more likely in Windows. Give it another try with the whole 25392 # argument. 25393 path="$complete" 25394 arguments="EOL" 25395 new_path="$path" 25396 25397 windows_path="$new_path" 25398 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25399 unix_path=`$CYGPATH -u "$windows_path"` 25400 new_path="$unix_path" 25401 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25402 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25403 new_path="$unix_path" 25404 fi 25405 25406 25407 new_path=`$WHICH "$new_path" 2> /dev/null` 25408 25409 if test "x$new_path" = x; then 25410 # It's still not found. Now this is an unrecoverable error. 25411 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25412 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25413 has_space=`$ECHO "$complete" | $GREP " "` 25414 if test "x$has_space" != x; then 25415 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25417 fi 25418 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25419 fi 25420 fi 25421 25422 # Now new_path has a complete unix path to the binary 25423 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25424 # Keep paths in /bin as-is, but remove trailing .exe if any 25425 new_path="${new_path/%.exe/}" 25426 # Do not save /bin paths to all_fixpath_prefixes! 25427 else 25428 # Not in mixed or Windows style, start by that. 25429 new_path=`cmd //c echo $new_path` 25430 25431 input_path="$new_path" 25432 # Check if we need to convert this using DOS-style short mode. If the path 25433 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25434 # take no chances and rewrite it. 25435 # Note: m4 eats our [], so we need to use [ and ] instead. 25436 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25437 if test "x$has_forbidden_chars" != x; then 25438 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25439 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25440 fi 25441 25442 # Output is in $new_path 25443 25444 windows_path="$new_path" 25445 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25446 unix_path=`$CYGPATH -u "$windows_path"` 25447 new_path="$unix_path" 25448 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25449 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25450 new_path="$unix_path" 25451 fi 25452 25453 # remove trailing .exe if any 25454 new_path="${new_path/%.exe/}" 25455 25456 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25457 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25458 fi 25459 25460 else 25461 # We're on a posix platform. Hooray! :) 25462 # First separate the path from the arguments. This will split at the first 25463 # space. 25464 complete="$AS" 25465 path="${complete%% *}" 25466 tmp="$complete EOL" 25467 arguments="${tmp#* }" 25468 25469 # Cannot rely on the command "which" here since it doesn't always work. 25470 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25471 if test -z "$is_absolute_path"; then 25472 # Path to executable is not absolute. Find it. 25473 IFS_save="$IFS" 25474 IFS=: 25475 for p in $PATH; do 25476 if test -f "$p/$path" && test -x "$p/$path"; then 25477 new_path="$p/$path" 25478 break 25479 fi 25480 done 25481 IFS="$IFS_save" 25482 else 25483 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5 25484 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;} 25485 new_path="$path" 25486 fi 25487 25488 if test "x$new_path" = x; then 25489 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25490 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25491 has_space=`$ECHO "$complete" | $GREP " "` 25492 if test "x$has_space" != x; then 25493 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25494 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25495 fi 25496 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25497 fi 25498 fi 25499 25500 # Now join together the path and the arguments once again 25501 if test "x$arguments" != xEOL; then 25502 new_complete="$new_path ${arguments% *}" 25503 else 25504 new_complete="$new_path" 25505 fi 25506 25507 if test "x$complete" != "x$new_complete"; then 25508 AS="$new_complete" 25509 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5 25510 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;} 25511 fi 25512 25513 else 25514 AS="$CC -c" 25515 fi 25516 25517 25518 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 25519 # Extract the first word of "nm", so it can be a program name with args. 25520 set dummy nm; ac_word=$2 25521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25522 $as_echo_n "checking for $ac_word... " >&6; } 25523 if ${ac_cv_path_NM+:} false; then : 25524 $as_echo_n "(cached) " >&6 25525 else 25526 case $NM in 25527 [\\/]* | ?:[\\/]*) 25528 ac_cv_path_NM="$NM" # Let the user override the test with a path. 25529 ;; 25530 *) 25531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25532 for as_dir in $PATH 25533 do 25534 IFS=$as_save_IFS 25535 test -z "$as_dir" && as_dir=. 25536 for ac_exec_ext in '' $ac_executable_extensions; do 25537 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25538 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" 25539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25540 break 2 25541 fi 25542 done 25543 done 25544 IFS=$as_save_IFS 25545 25546 ;; 25547 esac 25548 fi 25549 NM=$ac_cv_path_NM 25550 if test -n "$NM"; then 25551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 25552 $as_echo "$NM" >&6; } 25553 else 25554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25555 $as_echo "no" >&6; } 25556 fi 25557 25558 25559 25560 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25561 25562 # First separate the path from the arguments. This will split at the first 25563 # space. 25564 complete="$NM" 25565 path="${complete%% *}" 25566 tmp="$complete EOL" 25567 arguments="${tmp#* }" 25568 25569 # Input might be given as Windows format, start by converting to 25570 # unix format. 25571 new_path=`$CYGPATH -u "$path"` 25572 25573 # Now try to locate executable using which 25574 new_path=`$WHICH "$new_path" 2> /dev/null` 25575 # bat and cmd files are not always considered executable in cygwin causing which 25576 # to not find them 25577 if test "x$new_path" = x \ 25578 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25579 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25580 new_path=`$CYGPATH -u "$path"` 25581 fi 25582 if test "x$new_path" = x; then 25583 # Oops. Which didn't find the executable. 25584 # The splitting of arguments from the executable at a space might have been incorrect, 25585 # since paths with space are more likely in Windows. Give it another try with the whole 25586 # argument. 25587 path="$complete" 25588 arguments="EOL" 25589 new_path=`$CYGPATH -u "$path"` 25590 new_path=`$WHICH "$new_path" 2> /dev/null` 25591 # bat and cmd files are not always considered executable in cygwin causing which 25592 # to not find them 25593 if test "x$new_path" = x \ 25594 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25595 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25596 new_path=`$CYGPATH -u "$path"` 25597 fi 25598 if test "x$new_path" = x; then 25599 # It's still not found. Now this is an unrecoverable error. 25600 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25601 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25602 has_space=`$ECHO "$complete" | $GREP " "` 25603 if test "x$has_space" != x; then 25604 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25605 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25606 fi 25607 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25608 fi 25609 fi 25610 25611 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25612 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25613 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25614 # "foo.exe" is OK but "foo" is an error. 25615 # 25616 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25617 # It is also a way to make sure we got the proper file name for the real test later on. 25618 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25619 if test "x$test_shortpath" = x; then 25620 # Short path failed, file does not exist as specified. 25621 # Try adding .exe or .cmd 25622 if test -f "${new_path}.exe"; then 25623 input_to_shortpath="${new_path}.exe" 25624 elif test -f "${new_path}.cmd"; then 25625 input_to_shortpath="${new_path}.cmd" 25626 else 25627 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 25628 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} 25629 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25630 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25631 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25632 fi 25633 else 25634 input_to_shortpath="$new_path" 25635 fi 25636 25637 # Call helper function which possibly converts this using DOS-style short mode. 25638 # If so, the updated path is stored in $new_path. 25639 new_path="$input_to_shortpath" 25640 25641 input_path="$input_to_shortpath" 25642 # Check if we need to convert this using DOS-style short mode. If the path 25643 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25644 # take no chances and rewrite it. 25645 # Note: m4 eats our [], so we need to use [ and ] instead. 25646 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25647 if test "x$has_forbidden_chars" != x; then 25648 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25649 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25650 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25651 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25652 # Going to short mode and back again did indeed matter. Since short mode is 25653 # case insensitive, let's make it lowercase to improve readability. 25654 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25655 # Now convert it back to Unix-stile (cygpath) 25656 input_path=`$CYGPATH -u "$shortmode_path"` 25657 new_path="$input_path" 25658 fi 25659 fi 25660 25661 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25662 if test "x$test_cygdrive_prefix" = x; then 25663 # As a simple fix, exclude /usr/bin since it's not a real path. 25664 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25665 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25666 # a path prefixed by /cygdrive for fixpath to work. 25667 new_path="$CYGWIN_ROOT_PATH$input_path" 25668 fi 25669 fi 25670 25671 # remove trailing .exe if any 25672 new_path="${new_path/%.exe/}" 25673 25674 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25675 25676 # First separate the path from the arguments. This will split at the first 25677 # space. 25678 complete="$NM" 25679 path="${complete%% *}" 25680 tmp="$complete EOL" 25681 arguments="${tmp#* }" 25682 25683 # Input might be given as Windows format, start by converting to 25684 # unix format. 25685 new_path="$path" 25686 25687 windows_path="$new_path" 25688 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25689 unix_path=`$CYGPATH -u "$windows_path"` 25690 new_path="$unix_path" 25691 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25692 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25693 new_path="$unix_path" 25694 fi 25695 25696 25697 # Now try to locate executable using which 25698 new_path=`$WHICH "$new_path" 2> /dev/null` 25699 25700 if test "x$new_path" = x; then 25701 # Oops. Which didn't find the executable. 25702 # The splitting of arguments from the executable at a space might have been incorrect, 25703 # since paths with space are more likely in Windows. Give it another try with the whole 25704 # argument. 25705 path="$complete" 25706 arguments="EOL" 25707 new_path="$path" 25708 25709 windows_path="$new_path" 25710 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25711 unix_path=`$CYGPATH -u "$windows_path"` 25712 new_path="$unix_path" 25713 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25714 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25715 new_path="$unix_path" 25716 fi 25717 25718 25719 new_path=`$WHICH "$new_path" 2> /dev/null` 25720 25721 if test "x$new_path" = x; then 25722 # It's still not found. Now this is an unrecoverable error. 25723 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25724 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25725 has_space=`$ECHO "$complete" | $GREP " "` 25726 if test "x$has_space" != x; then 25727 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25728 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25729 fi 25730 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25731 fi 25732 fi 25733 25734 # Now new_path has a complete unix path to the binary 25735 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25736 # Keep paths in /bin as-is, but remove trailing .exe if any 25737 new_path="${new_path/%.exe/}" 25738 # Do not save /bin paths to all_fixpath_prefixes! 25739 else 25740 # Not in mixed or Windows style, start by that. 25741 new_path=`cmd //c echo $new_path` 25742 25743 input_path="$new_path" 25744 # Check if we need to convert this using DOS-style short mode. If the path 25745 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25746 # take no chances and rewrite it. 25747 # Note: m4 eats our [], so we need to use [ and ] instead. 25748 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25749 if test "x$has_forbidden_chars" != x; then 25750 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25751 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25752 fi 25753 25754 # Output is in $new_path 25755 25756 windows_path="$new_path" 25757 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25758 unix_path=`$CYGPATH -u "$windows_path"` 25759 new_path="$unix_path" 25760 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25761 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25762 new_path="$unix_path" 25763 fi 25764 25765 # remove trailing .exe if any 25766 new_path="${new_path/%.exe/}" 25767 25768 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25769 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25770 fi 25771 25772 else 25773 # We're on a posix platform. Hooray! :) 25774 # First separate the path from the arguments. This will split at the first 25775 # space. 25776 complete="$NM" 25777 path="${complete%% *}" 25778 tmp="$complete EOL" 25779 arguments="${tmp#* }" 25780 25781 # Cannot rely on the command "which" here since it doesn't always work. 25782 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25783 if test -z "$is_absolute_path"; then 25784 # Path to executable is not absolute. Find it. 25785 IFS_save="$IFS" 25786 IFS=: 25787 for p in $PATH; do 25788 if test -f "$p/$path" && test -x "$p/$path"; then 25789 new_path="$p/$path" 25790 break 25791 fi 25792 done 25793 IFS="$IFS_save" 25794 else 25795 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 25796 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} 25797 new_path="$path" 25798 fi 25799 25800 if test "x$new_path" = x; then 25801 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25802 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25803 has_space=`$ECHO "$complete" | $GREP " "` 25804 if test "x$has_space" != x; then 25805 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25806 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25807 fi 25808 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25809 fi 25810 fi 25811 25812 # Now join together the path and the arguments once again 25813 if test "x$arguments" != xEOL; then 25814 new_complete="$new_path ${arguments% *}" 25815 else 25816 new_complete="$new_path" 25817 fi 25818 25819 if test "x$complete" != "x$new_complete"; then 25820 NM="$new_complete" 25821 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 25822 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} 25823 fi 25824 25825 # Extract the first word of "gnm", so it can be a program name with args. 25826 set dummy gnm; ac_word=$2 25827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25828 $as_echo_n "checking for $ac_word... " >&6; } 25829 if ${ac_cv_path_GNM+:} false; then : 25830 $as_echo_n "(cached) " >&6 25831 else 25832 case $GNM in 25833 [\\/]* | ?:[\\/]*) 25834 ac_cv_path_GNM="$GNM" # Let the user override the test with a path. 25835 ;; 25836 *) 25837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25838 for as_dir in $PATH 25839 do 25840 IFS=$as_save_IFS 25841 test -z "$as_dir" && as_dir=. 25842 for ac_exec_ext in '' $ac_executable_extensions; do 25843 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25844 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" 25845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25846 break 2 25847 fi 25848 done 25849 done 25850 IFS=$as_save_IFS 25851 25852 ;; 25853 esac 25854 fi 25855 GNM=$ac_cv_path_GNM 25856 if test -n "$GNM"; then 25857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 25858 $as_echo "$GNM" >&6; } 25859 else 25860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25861 $as_echo "no" >&6; } 25862 fi 25863 25864 25865 25866 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25867 25868 # First separate the path from the arguments. This will split at the first 25869 # space. 25870 complete="$GNM" 25871 path="${complete%% *}" 25872 tmp="$complete EOL" 25873 arguments="${tmp#* }" 25874 25875 # Input might be given as Windows format, start by converting to 25876 # unix format. 25877 new_path=`$CYGPATH -u "$path"` 25878 25879 # Now try to locate executable using which 25880 new_path=`$WHICH "$new_path" 2> /dev/null` 25881 # bat and cmd files are not always considered executable in cygwin causing which 25882 # to not find them 25883 if test "x$new_path" = x \ 25884 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25885 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25886 new_path=`$CYGPATH -u "$path"` 25887 fi 25888 if test "x$new_path" = x; then 25889 # Oops. Which didn't find the executable. 25890 # The splitting of arguments from the executable at a space might have been incorrect, 25891 # since paths with space are more likely in Windows. Give it another try with the whole 25892 # argument. 25893 path="$complete" 25894 arguments="EOL" 25895 new_path=`$CYGPATH -u "$path"` 25896 new_path=`$WHICH "$new_path" 2> /dev/null` 25897 # bat and cmd files are not always considered executable in cygwin causing which 25898 # to not find them 25899 if test "x$new_path" = x \ 25900 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25901 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25902 new_path=`$CYGPATH -u "$path"` 25903 fi 25904 if test "x$new_path" = x; then 25905 # It's still not found. Now this is an unrecoverable error. 25906 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 25907 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 25908 has_space=`$ECHO "$complete" | $GREP " "` 25909 if test "x$has_space" != x; then 25910 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25911 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25912 fi 25913 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25914 fi 25915 fi 25916 25917 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25918 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25919 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25920 # "foo.exe" is OK but "foo" is an error. 25921 # 25922 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25923 # It is also a way to make sure we got the proper file name for the real test later on. 25924 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25925 if test "x$test_shortpath" = x; then 25926 # Short path failed, file does not exist as specified. 25927 # Try adding .exe or .cmd 25928 if test -f "${new_path}.exe"; then 25929 input_to_shortpath="${new_path}.exe" 25930 elif test -f "${new_path}.cmd"; then 25931 input_to_shortpath="${new_path}.cmd" 25932 else 25933 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5 25934 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;} 25935 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25936 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25937 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25938 fi 25939 else 25940 input_to_shortpath="$new_path" 25941 fi 25942 25943 # Call helper function which possibly converts this using DOS-style short mode. 25944 # If so, the updated path is stored in $new_path. 25945 new_path="$input_to_shortpath" 25946 25947 input_path="$input_to_shortpath" 25948 # Check if we need to convert this using DOS-style short mode. If the path 25949 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25950 # take no chances and rewrite it. 25951 # Note: m4 eats our [], so we need to use [ and ] instead. 25952 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25953 if test "x$has_forbidden_chars" != x; then 25954 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25955 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25956 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25957 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25958 # Going to short mode and back again did indeed matter. Since short mode is 25959 # case insensitive, let's make it lowercase to improve readability. 25960 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25961 # Now convert it back to Unix-stile (cygpath) 25962 input_path=`$CYGPATH -u "$shortmode_path"` 25963 new_path="$input_path" 25964 fi 25965 fi 25966 25967 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25968 if test "x$test_cygdrive_prefix" = x; then 25969 # As a simple fix, exclude /usr/bin since it's not a real path. 25970 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25971 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25972 # a path prefixed by /cygdrive for fixpath to work. 25973 new_path="$CYGWIN_ROOT_PATH$input_path" 25974 fi 25975 fi 25976 25977 # remove trailing .exe if any 25978 new_path="${new_path/%.exe/}" 25979 25980 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25981 25982 # First separate the path from the arguments. This will split at the first 25983 # space. 25984 complete="$GNM" 25985 path="${complete%% *}" 25986 tmp="$complete EOL" 25987 arguments="${tmp#* }" 25988 25989 # Input might be given as Windows format, start by converting to 25990 # unix format. 25991 new_path="$path" 25992 25993 windows_path="$new_path" 25994 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25995 unix_path=`$CYGPATH -u "$windows_path"` 25996 new_path="$unix_path" 25997 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25998 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25999 new_path="$unix_path" 26000 fi 26001 26002 26003 # Now try to locate executable using which 26004 new_path=`$WHICH "$new_path" 2> /dev/null` 26005 26006 if test "x$new_path" = x; then 26007 # Oops. Which didn't find the executable. 26008 # The splitting of arguments from the executable at a space might have been incorrect, 26009 # since paths with space are more likely in Windows. Give it another try with the whole 26010 # argument. 26011 path="$complete" 26012 arguments="EOL" 26013 new_path="$path" 26014 26015 windows_path="$new_path" 26016 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26017 unix_path=`$CYGPATH -u "$windows_path"` 26018 new_path="$unix_path" 26019 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26020 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26021 new_path="$unix_path" 26022 fi 26023 26024 26025 new_path=`$WHICH "$new_path" 2> /dev/null` 26026 26027 if test "x$new_path" = x; then 26028 # It's still not found. Now this is an unrecoverable error. 26029 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 26030 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 26031 has_space=`$ECHO "$complete" | $GREP " "` 26032 if test "x$has_space" != x; then 26033 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26034 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26035 fi 26036 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 26037 fi 26038 fi 26039 26040 # Now new_path has a complete unix path to the binary 26041 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26042 # Keep paths in /bin as-is, but remove trailing .exe if any 26043 new_path="${new_path/%.exe/}" 26044 # Do not save /bin paths to all_fixpath_prefixes! 26045 else 26046 # Not in mixed or Windows style, start by that. 26047 new_path=`cmd //c echo $new_path` 26048 26049 input_path="$new_path" 26050 # Check if we need to convert this using DOS-style short mode. If the path 26051 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26052 # take no chances and rewrite it. 26053 # Note: m4 eats our [], so we need to use [ and ] instead. 26054 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26055 if test "x$has_forbidden_chars" != x; then 26056 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26057 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26058 fi 26059 26060 # Output is in $new_path 26061 26062 windows_path="$new_path" 26063 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26064 unix_path=`$CYGPATH -u "$windows_path"` 26065 new_path="$unix_path" 26066 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26067 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26068 new_path="$unix_path" 26069 fi 26070 26071 # remove trailing .exe if any 26072 new_path="${new_path/%.exe/}" 26073 26074 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26075 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26076 fi 26077 26078 else 26079 # We're on a posix platform. Hooray! :) 26080 # First separate the path from the arguments. This will split at the first 26081 # space. 26082 complete="$GNM" 26083 path="${complete%% *}" 26084 tmp="$complete EOL" 26085 arguments="${tmp#* }" 26086 26087 # Cannot rely on the command "which" here since it doesn't always work. 26088 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26089 if test -z "$is_absolute_path"; then 26090 # Path to executable is not absolute. Find it. 26091 IFS_save="$IFS" 26092 IFS=: 26093 for p in $PATH; do 26094 if test -f "$p/$path" && test -x "$p/$path"; then 26095 new_path="$p/$path" 26096 break 26097 fi 26098 done 26099 IFS="$IFS_save" 26100 else 26101 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5 26102 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;} 26103 new_path="$path" 26104 fi 26105 26106 if test "x$new_path" = x; then 26107 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 26108 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 26109 has_space=`$ECHO "$complete" | $GREP " "` 26110 if test "x$has_space" != x; then 26111 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26112 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26113 fi 26114 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 26115 fi 26116 fi 26117 26118 # Now join together the path and the arguments once again 26119 if test "x$arguments" != xEOL; then 26120 new_complete="$new_path ${arguments% *}" 26121 else 26122 new_complete="$new_path" 26123 fi 26124 26125 if test "x$complete" != "x$new_complete"; then 26126 GNM="$new_complete" 26127 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5 26128 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;} 26129 fi 26130 26131 # Extract the first word of "strip", so it can be a program name with args. 26132 set dummy strip; ac_word=$2 26133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26134 $as_echo_n "checking for $ac_word... " >&6; } 26135 if ${ac_cv_path_STRIP+:} false; then : 26136 $as_echo_n "(cached) " >&6 26137 else 26138 case $STRIP in 26139 [\\/]* | ?:[\\/]*) 26140 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. 26141 ;; 26142 *) 26143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26144 for as_dir in $PATH 26145 do 26146 IFS=$as_save_IFS 26147 test -z "$as_dir" && as_dir=. 26148 for ac_exec_ext in '' $ac_executable_extensions; do 26149 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26150 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" 26151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26152 break 2 26153 fi 26154 done 26155 done 26156 IFS=$as_save_IFS 26157 26158 ;; 26159 esac 26160 fi 26161 STRIP=$ac_cv_path_STRIP 26162 if test -n "$STRIP"; then 26163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 26164 $as_echo "$STRIP" >&6; } 26165 else 26166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26167 $as_echo "no" >&6; } 26168 fi 26169 26170 26171 26172 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26173 26174 # First separate the path from the arguments. This will split at the first 26175 # space. 26176 complete="$STRIP" 26177 path="${complete%% *}" 26178 tmp="$complete EOL" 26179 arguments="${tmp#* }" 26180 26181 # Input might be given as Windows format, start by converting to 26182 # unix format. 26183 new_path=`$CYGPATH -u "$path"` 26184 26185 # Now try to locate executable using which 26186 new_path=`$WHICH "$new_path" 2> /dev/null` 26187 # bat and cmd files are not always considered executable in cygwin causing which 26188 # to not find them 26189 if test "x$new_path" = x \ 26190 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26191 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26192 new_path=`$CYGPATH -u "$path"` 26193 fi 26194 if test "x$new_path" = x; then 26195 # Oops. Which didn't find the executable. 26196 # The splitting of arguments from the executable at a space might have been incorrect, 26197 # since paths with space are more likely in Windows. Give it another try with the whole 26198 # argument. 26199 path="$complete" 26200 arguments="EOL" 26201 new_path=`$CYGPATH -u "$path"` 26202 new_path=`$WHICH "$new_path" 2> /dev/null` 26203 # bat and cmd files are not always considered executable in cygwin causing which 26204 # to not find them 26205 if test "x$new_path" = x \ 26206 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26207 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26208 new_path=`$CYGPATH -u "$path"` 26209 fi 26210 if test "x$new_path" = x; then 26211 # It's still not found. Now this is an unrecoverable error. 26212 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26213 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26214 has_space=`$ECHO "$complete" | $GREP " "` 26215 if test "x$has_space" != x; then 26216 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26217 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26218 fi 26219 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26220 fi 26221 fi 26222 26223 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26224 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26225 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26226 # "foo.exe" is OK but "foo" is an error. 26227 # 26228 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26229 # It is also a way to make sure we got the proper file name for the real test later on. 26230 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26231 if test "x$test_shortpath" = x; then 26232 # Short path failed, file does not exist as specified. 26233 # Try adding .exe or .cmd 26234 if test -f "${new_path}.exe"; then 26235 input_to_shortpath="${new_path}.exe" 26236 elif test -f "${new_path}.cmd"; then 26237 input_to_shortpath="${new_path}.cmd" 26238 else 26239 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 26240 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} 26241 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26242 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26243 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26244 fi 26245 else 26246 input_to_shortpath="$new_path" 26247 fi 26248 26249 # Call helper function which possibly converts this using DOS-style short mode. 26250 # If so, the updated path is stored in $new_path. 26251 new_path="$input_to_shortpath" 26252 26253 input_path="$input_to_shortpath" 26254 # Check if we need to convert this using DOS-style short mode. If the path 26255 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26256 # take no chances and rewrite it. 26257 # Note: m4 eats our [], so we need to use [ and ] instead. 26258 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26259 if test "x$has_forbidden_chars" != x; then 26260 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26261 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26262 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26263 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26264 # Going to short mode and back again did indeed matter. Since short mode is 26265 # case insensitive, let's make it lowercase to improve readability. 26266 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26267 # Now convert it back to Unix-stile (cygpath) 26268 input_path=`$CYGPATH -u "$shortmode_path"` 26269 new_path="$input_path" 26270 fi 26271 fi 26272 26273 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26274 if test "x$test_cygdrive_prefix" = x; then 26275 # As a simple fix, exclude /usr/bin since it's not a real path. 26276 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26277 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26278 # a path prefixed by /cygdrive for fixpath to work. 26279 new_path="$CYGWIN_ROOT_PATH$input_path" 26280 fi 26281 fi 26282 26283 # remove trailing .exe if any 26284 new_path="${new_path/%.exe/}" 26285 26286 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26287 26288 # First separate the path from the arguments. This will split at the first 26289 # space. 26290 complete="$STRIP" 26291 path="${complete%% *}" 26292 tmp="$complete EOL" 26293 arguments="${tmp#* }" 26294 26295 # Input might be given as Windows format, start by converting to 26296 # unix format. 26297 new_path="$path" 26298 26299 windows_path="$new_path" 26300 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26301 unix_path=`$CYGPATH -u "$windows_path"` 26302 new_path="$unix_path" 26303 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26304 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26305 new_path="$unix_path" 26306 fi 26307 26308 26309 # Now try to locate executable using which 26310 new_path=`$WHICH "$new_path" 2> /dev/null` 26311 26312 if test "x$new_path" = x; then 26313 # Oops. Which didn't find the executable. 26314 # The splitting of arguments from the executable at a space might have been incorrect, 26315 # since paths with space are more likely in Windows. Give it another try with the whole 26316 # argument. 26317 path="$complete" 26318 arguments="EOL" 26319 new_path="$path" 26320 26321 windows_path="$new_path" 26322 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26323 unix_path=`$CYGPATH -u "$windows_path"` 26324 new_path="$unix_path" 26325 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26326 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26327 new_path="$unix_path" 26328 fi 26329 26330 26331 new_path=`$WHICH "$new_path" 2> /dev/null` 26332 26333 if test "x$new_path" = x; then 26334 # It's still not found. Now this is an unrecoverable error. 26335 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26336 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26337 has_space=`$ECHO "$complete" | $GREP " "` 26338 if test "x$has_space" != x; then 26339 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26340 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26341 fi 26342 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26343 fi 26344 fi 26345 26346 # Now new_path has a complete unix path to the binary 26347 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26348 # Keep paths in /bin as-is, but remove trailing .exe if any 26349 new_path="${new_path/%.exe/}" 26350 # Do not save /bin paths to all_fixpath_prefixes! 26351 else 26352 # Not in mixed or Windows style, start by that. 26353 new_path=`cmd //c echo $new_path` 26354 26355 input_path="$new_path" 26356 # Check if we need to convert this using DOS-style short mode. If the path 26357 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26358 # take no chances and rewrite it. 26359 # Note: m4 eats our [], so we need to use [ and ] instead. 26360 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26361 if test "x$has_forbidden_chars" != x; then 26362 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26363 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26364 fi 26365 26366 # Output is in $new_path 26367 26368 windows_path="$new_path" 26369 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26370 unix_path=`$CYGPATH -u "$windows_path"` 26371 new_path="$unix_path" 26372 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26373 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26374 new_path="$unix_path" 26375 fi 26376 26377 # remove trailing .exe if any 26378 new_path="${new_path/%.exe/}" 26379 26380 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26381 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26382 fi 26383 26384 else 26385 # We're on a posix platform. Hooray! :) 26386 # First separate the path from the arguments. This will split at the first 26387 # space. 26388 complete="$STRIP" 26389 path="${complete%% *}" 26390 tmp="$complete EOL" 26391 arguments="${tmp#* }" 26392 26393 # Cannot rely on the command "which" here since it doesn't always work. 26394 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26395 if test -z "$is_absolute_path"; then 26396 # Path to executable is not absolute. Find it. 26397 IFS_save="$IFS" 26398 IFS=: 26399 for p in $PATH; do 26400 if test -f "$p/$path" && test -x "$p/$path"; then 26401 new_path="$p/$path" 26402 break 26403 fi 26404 done 26405 IFS="$IFS_save" 26406 else 26407 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 26408 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} 26409 new_path="$path" 26410 fi 26411 26412 if test "x$new_path" = x; then 26413 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26414 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26415 has_space=`$ECHO "$complete" | $GREP " "` 26416 if test "x$has_space" != x; then 26417 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26418 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26419 fi 26420 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26421 fi 26422 fi 26423 26424 # Now join together the path and the arguments once again 26425 if test "x$arguments" != xEOL; then 26426 new_complete="$new_path ${arguments% *}" 26427 else 26428 new_complete="$new_path" 26429 fi 26430 26431 if test "x$complete" != "x$new_complete"; then 26432 STRIP="$new_complete" 26433 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 26434 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} 26435 fi 26436 26437 # Extract the first word of "mcs", so it can be a program name with args. 26438 set dummy mcs; ac_word=$2 26439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26440 $as_echo_n "checking for $ac_word... " >&6; } 26441 if ${ac_cv_path_MCS+:} false; then : 26442 $as_echo_n "(cached) " >&6 26443 else 26444 case $MCS in 26445 [\\/]* | ?:[\\/]*) 26446 ac_cv_path_MCS="$MCS" # Let the user override the test with a path. 26447 ;; 26448 *) 26449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26450 for as_dir in $PATH 26451 do 26452 IFS=$as_save_IFS 26453 test -z "$as_dir" && as_dir=. 26454 for ac_exec_ext in '' $ac_executable_extensions; do 26455 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26456 ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" 26457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26458 break 2 26459 fi 26460 done 26461 done 26462 IFS=$as_save_IFS 26463 26464 ;; 26465 esac 26466 fi 26467 MCS=$ac_cv_path_MCS 26468 if test -n "$MCS"; then 26469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 26470 $as_echo "$MCS" >&6; } 26471 else 26472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26473 $as_echo "no" >&6; } 26474 fi 26475 26476 26477 26478 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26479 26480 # First separate the path from the arguments. This will split at the first 26481 # space. 26482 complete="$MCS" 26483 path="${complete%% *}" 26484 tmp="$complete EOL" 26485 arguments="${tmp#* }" 26486 26487 # Input might be given as Windows format, start by converting to 26488 # unix format. 26489 new_path=`$CYGPATH -u "$path"` 26490 26491 # Now try to locate executable using which 26492 new_path=`$WHICH "$new_path" 2> /dev/null` 26493 # bat and cmd files are not always considered executable in cygwin causing which 26494 # to not find them 26495 if test "x$new_path" = x \ 26496 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26497 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26498 new_path=`$CYGPATH -u "$path"` 26499 fi 26500 if test "x$new_path" = x; then 26501 # Oops. Which didn't find the executable. 26502 # The splitting of arguments from the executable at a space might have been incorrect, 26503 # since paths with space are more likely in Windows. Give it another try with the whole 26504 # argument. 26505 path="$complete" 26506 arguments="EOL" 26507 new_path=`$CYGPATH -u "$path"` 26508 new_path=`$WHICH "$new_path" 2> /dev/null` 26509 # bat and cmd files are not always considered executable in cygwin causing which 26510 # to not find them 26511 if test "x$new_path" = x \ 26512 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26513 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26514 new_path=`$CYGPATH -u "$path"` 26515 fi 26516 if test "x$new_path" = x; then 26517 # It's still not found. Now this is an unrecoverable error. 26518 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26519 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26520 has_space=`$ECHO "$complete" | $GREP " "` 26521 if test "x$has_space" != x; then 26522 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26523 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26524 fi 26525 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26526 fi 26527 fi 26528 26529 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26530 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26531 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26532 # "foo.exe" is OK but "foo" is an error. 26533 # 26534 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26535 # It is also a way to make sure we got the proper file name for the real test later on. 26536 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26537 if test "x$test_shortpath" = x; then 26538 # Short path failed, file does not exist as specified. 26539 # Try adding .exe or .cmd 26540 if test -f "${new_path}.exe"; then 26541 input_to_shortpath="${new_path}.exe" 26542 elif test -f "${new_path}.cmd"; then 26543 input_to_shortpath="${new_path}.cmd" 26544 else 26545 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5 26546 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;} 26547 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26548 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26549 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26550 fi 26551 else 26552 input_to_shortpath="$new_path" 26553 fi 26554 26555 # Call helper function which possibly converts this using DOS-style short mode. 26556 # If so, the updated path is stored in $new_path. 26557 new_path="$input_to_shortpath" 26558 26559 input_path="$input_to_shortpath" 26560 # Check if we need to convert this using DOS-style short mode. If the path 26561 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26562 # take no chances and rewrite it. 26563 # Note: m4 eats our [], so we need to use [ and ] instead. 26564 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26565 if test "x$has_forbidden_chars" != x; then 26566 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26567 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26568 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26569 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26570 # Going to short mode and back again did indeed matter. Since short mode is 26571 # case insensitive, let's make it lowercase to improve readability. 26572 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26573 # Now convert it back to Unix-stile (cygpath) 26574 input_path=`$CYGPATH -u "$shortmode_path"` 26575 new_path="$input_path" 26576 fi 26577 fi 26578 26579 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26580 if test "x$test_cygdrive_prefix" = x; then 26581 # As a simple fix, exclude /usr/bin since it's not a real path. 26582 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26583 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26584 # a path prefixed by /cygdrive for fixpath to work. 26585 new_path="$CYGWIN_ROOT_PATH$input_path" 26586 fi 26587 fi 26588 26589 # remove trailing .exe if any 26590 new_path="${new_path/%.exe/}" 26591 26592 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26593 26594 # First separate the path from the arguments. This will split at the first 26595 # space. 26596 complete="$MCS" 26597 path="${complete%% *}" 26598 tmp="$complete EOL" 26599 arguments="${tmp#* }" 26600 26601 # Input might be given as Windows format, start by converting to 26602 # unix format. 26603 new_path="$path" 26604 26605 windows_path="$new_path" 26606 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26607 unix_path=`$CYGPATH -u "$windows_path"` 26608 new_path="$unix_path" 26609 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26610 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26611 new_path="$unix_path" 26612 fi 26613 26614 26615 # Now try to locate executable using which 26616 new_path=`$WHICH "$new_path" 2> /dev/null` 26617 26618 if test "x$new_path" = x; then 26619 # Oops. Which didn't find the executable. 26620 # The splitting of arguments from the executable at a space might have been incorrect, 26621 # since paths with space are more likely in Windows. Give it another try with the whole 26622 # argument. 26623 path="$complete" 26624 arguments="EOL" 26625 new_path="$path" 26626 26627 windows_path="$new_path" 26628 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26629 unix_path=`$CYGPATH -u "$windows_path"` 26630 new_path="$unix_path" 26631 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26632 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26633 new_path="$unix_path" 26634 fi 26635 26636 26637 new_path=`$WHICH "$new_path" 2> /dev/null` 26638 26639 if test "x$new_path" = x; then 26640 # It's still not found. Now this is an unrecoverable error. 26641 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26642 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26643 has_space=`$ECHO "$complete" | $GREP " "` 26644 if test "x$has_space" != x; then 26645 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26646 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26647 fi 26648 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26649 fi 26650 fi 26651 26652 # Now new_path has a complete unix path to the binary 26653 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26654 # Keep paths in /bin as-is, but remove trailing .exe if any 26655 new_path="${new_path/%.exe/}" 26656 # Do not save /bin paths to all_fixpath_prefixes! 26657 else 26658 # Not in mixed or Windows style, start by that. 26659 new_path=`cmd //c echo $new_path` 26660 26661 input_path="$new_path" 26662 # Check if we need to convert this using DOS-style short mode. If the path 26663 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26664 # take no chances and rewrite it. 26665 # Note: m4 eats our [], so we need to use [ and ] instead. 26666 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26667 if test "x$has_forbidden_chars" != x; then 26668 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26669 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26670 fi 26671 26672 # Output is in $new_path 26673 26674 windows_path="$new_path" 26675 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26676 unix_path=`$CYGPATH -u "$windows_path"` 26677 new_path="$unix_path" 26678 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26679 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26680 new_path="$unix_path" 26681 fi 26682 26683 # remove trailing .exe if any 26684 new_path="${new_path/%.exe/}" 26685 26686 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26687 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26688 fi 26689 26690 else 26691 # We're on a posix platform. Hooray! :) 26692 # First separate the path from the arguments. This will split at the first 26693 # space. 26694 complete="$MCS" 26695 path="${complete%% *}" 26696 tmp="$complete EOL" 26697 arguments="${tmp#* }" 26698 26699 # Cannot rely on the command "which" here since it doesn't always work. 26700 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26701 if test -z "$is_absolute_path"; then 26702 # Path to executable is not absolute. Find it. 26703 IFS_save="$IFS" 26704 IFS=: 26705 for p in $PATH; do 26706 if test -f "$p/$path" && test -x "$p/$path"; then 26707 new_path="$p/$path" 26708 break 26709 fi 26710 done 26711 IFS="$IFS_save" 26712 else 26713 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5 26714 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;} 26715 new_path="$path" 26716 fi 26717 26718 if test "x$new_path" = x; then 26719 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26720 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26721 has_space=`$ECHO "$complete" | $GREP " "` 26722 if test "x$has_space" != x; then 26723 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26724 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26725 fi 26726 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26727 fi 26728 fi 26729 26730 # Now join together the path and the arguments once again 26731 if test "x$arguments" != xEOL; then 26732 new_complete="$new_path ${arguments% *}" 26733 else 26734 new_complete="$new_path" 26735 fi 26736 26737 if test "x$complete" != "x$new_complete"; then 26738 MCS="$new_complete" 26739 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5 26740 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;} 26741 fi 26742 26743 elif test "x$OPENJDK_TARGET_OS" != xwindows; then 26744 if test -n "$ac_tool_prefix"; then 26745 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. 26746 set dummy ${ac_tool_prefix}nm; ac_word=$2 26747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26748 $as_echo_n "checking for $ac_word... " >&6; } 26749 if ${ac_cv_prog_NM+:} false; then : 26750 $as_echo_n "(cached) " >&6 26751 else 26752 if test -n "$NM"; then 26753 ac_cv_prog_NM="$NM" # Let the user override the test. 26754 else 26755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26756 for as_dir in $PATH 26757 do 26758 IFS=$as_save_IFS 26759 test -z "$as_dir" && as_dir=. 26760 for ac_exec_ext in '' $ac_executable_extensions; do 26761 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26762 ac_cv_prog_NM="${ac_tool_prefix}nm" 26763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26764 break 2 26765 fi 26766 done 26767 done 26768 IFS=$as_save_IFS 26769 26770 fi 26771 fi 26772 NM=$ac_cv_prog_NM 26773 if test -n "$NM"; then 26774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 26775 $as_echo "$NM" >&6; } 26776 else 26777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26778 $as_echo "no" >&6; } 26779 fi 26780 26781 26782 fi 26783 if test -z "$ac_cv_prog_NM"; then 26784 ac_ct_NM=$NM 26785 # Extract the first word of "nm", so it can be a program name with args. 26786 set dummy nm; ac_word=$2 26787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26788 $as_echo_n "checking for $ac_word... " >&6; } 26789 if ${ac_cv_prog_ac_ct_NM+:} false; then : 26790 $as_echo_n "(cached) " >&6 26791 else 26792 if test -n "$ac_ct_NM"; then 26793 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. 26794 else 26795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26796 for as_dir in $PATH 26797 do 26798 IFS=$as_save_IFS 26799 test -z "$as_dir" && as_dir=. 26800 for ac_exec_ext in '' $ac_executable_extensions; do 26801 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26802 ac_cv_prog_ac_ct_NM="nm" 26803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26804 break 2 26805 fi 26806 done 26807 done 26808 IFS=$as_save_IFS 26809 26810 fi 26811 fi 26812 ac_ct_NM=$ac_cv_prog_ac_ct_NM 26813 if test -n "$ac_ct_NM"; then 26814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 26815 $as_echo "$ac_ct_NM" >&6; } 26816 else 26817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26818 $as_echo "no" >&6; } 26819 fi 26820 26821 if test "x$ac_ct_NM" = x; then 26822 NM="" 26823 else 26824 case $cross_compiling:$ac_tool_warned in 26825 yes:) 26826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 26827 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 26828 ac_tool_warned=yes ;; 26829 esac 26830 NM=$ac_ct_NM 26831 fi 26832 else 26833 NM="$ac_cv_prog_NM" 26834 fi 26835 26836 26837 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26838 26839 # First separate the path from the arguments. This will split at the first 26840 # space. 26841 complete="$NM" 26842 path="${complete%% *}" 26843 tmp="$complete EOL" 26844 arguments="${tmp#* }" 26845 26846 # Input might be given as Windows format, start by converting to 26847 # unix format. 26848 new_path=`$CYGPATH -u "$path"` 26849 26850 # Now try to locate executable using which 26851 new_path=`$WHICH "$new_path" 2> /dev/null` 26852 # bat and cmd files are not always considered executable in cygwin causing which 26853 # to not find them 26854 if test "x$new_path" = x \ 26855 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26856 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26857 new_path=`$CYGPATH -u "$path"` 26858 fi 26859 if test "x$new_path" = x; then 26860 # Oops. Which didn't find the executable. 26861 # The splitting of arguments from the executable at a space might have been incorrect, 26862 # since paths with space are more likely in Windows. Give it another try with the whole 26863 # argument. 26864 path="$complete" 26865 arguments="EOL" 26866 new_path=`$CYGPATH -u "$path"` 26867 new_path=`$WHICH "$new_path" 2> /dev/null` 26868 # bat and cmd files are not always considered executable in cygwin causing which 26869 # to not find them 26870 if test "x$new_path" = x \ 26871 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26872 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26873 new_path=`$CYGPATH -u "$path"` 26874 fi 26875 if test "x$new_path" = x; then 26876 # It's still not found. Now this is an unrecoverable error. 26877 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 26878 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 26879 has_space=`$ECHO "$complete" | $GREP " "` 26880 if test "x$has_space" != x; then 26881 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26882 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26883 fi 26884 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26885 fi 26886 fi 26887 26888 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26889 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26890 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26891 # "foo.exe" is OK but "foo" is an error. 26892 # 26893 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26894 # It is also a way to make sure we got the proper file name for the real test later on. 26895 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26896 if test "x$test_shortpath" = x; then 26897 # Short path failed, file does not exist as specified. 26898 # Try adding .exe or .cmd 26899 if test -f "${new_path}.exe"; then 26900 input_to_shortpath="${new_path}.exe" 26901 elif test -f "${new_path}.cmd"; then 26902 input_to_shortpath="${new_path}.cmd" 26903 else 26904 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 26905 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} 26906 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26907 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26908 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26909 fi 26910 else 26911 input_to_shortpath="$new_path" 26912 fi 26913 26914 # Call helper function which possibly converts this using DOS-style short mode. 26915 # If so, the updated path is stored in $new_path. 26916 new_path="$input_to_shortpath" 26917 26918 input_path="$input_to_shortpath" 26919 # Check if we need to convert this using DOS-style short mode. If the path 26920 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26921 # take no chances and rewrite it. 26922 # Note: m4 eats our [], so we need to use [ and ] instead. 26923 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26924 if test "x$has_forbidden_chars" != x; then 26925 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26926 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26927 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26928 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26929 # Going to short mode and back again did indeed matter. Since short mode is 26930 # case insensitive, let's make it lowercase to improve readability. 26931 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26932 # Now convert it back to Unix-stile (cygpath) 26933 input_path=`$CYGPATH -u "$shortmode_path"` 26934 new_path="$input_path" 26935 fi 26936 fi 26937 26938 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26939 if test "x$test_cygdrive_prefix" = x; then 26940 # As a simple fix, exclude /usr/bin since it's not a real path. 26941 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26942 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26943 # a path prefixed by /cygdrive for fixpath to work. 26944 new_path="$CYGWIN_ROOT_PATH$input_path" 26945 fi 26946 fi 26947 26948 # remove trailing .exe if any 26949 new_path="${new_path/%.exe/}" 26950 26951 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26952 26953 # First separate the path from the arguments. This will split at the first 26954 # space. 26955 complete="$NM" 26956 path="${complete%% *}" 26957 tmp="$complete EOL" 26958 arguments="${tmp#* }" 26959 26960 # Input might be given as Windows format, start by converting to 26961 # unix format. 26962 new_path="$path" 26963 26964 windows_path="$new_path" 26965 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26966 unix_path=`$CYGPATH -u "$windows_path"` 26967 new_path="$unix_path" 26968 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26969 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26970 new_path="$unix_path" 26971 fi 26972 26973 26974 # Now try to locate executable using which 26975 new_path=`$WHICH "$new_path" 2> /dev/null` 26976 26977 if test "x$new_path" = x; then 26978 # Oops. Which didn't find the executable. 26979 # The splitting of arguments from the executable at a space might have been incorrect, 26980 # since paths with space are more likely in Windows. Give it another try with the whole 26981 # argument. 26982 path="$complete" 26983 arguments="EOL" 26984 new_path="$path" 26985 26986 windows_path="$new_path" 26987 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26988 unix_path=`$CYGPATH -u "$windows_path"` 26989 new_path="$unix_path" 26990 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26991 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26992 new_path="$unix_path" 26993 fi 26994 26995 26996 new_path=`$WHICH "$new_path" 2> /dev/null` 26997 26998 if test "x$new_path" = x; then 26999 # It's still not found. Now this is an unrecoverable error. 27000 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 27001 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 27002 has_space=`$ECHO "$complete" | $GREP " "` 27003 if test "x$has_space" != x; then 27004 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27005 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27006 fi 27007 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 27008 fi 27009 fi 27010 27011 # Now new_path has a complete unix path to the binary 27012 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27013 # Keep paths in /bin as-is, but remove trailing .exe if any 27014 new_path="${new_path/%.exe/}" 27015 # Do not save /bin paths to all_fixpath_prefixes! 27016 else 27017 # Not in mixed or Windows style, start by that. 27018 new_path=`cmd //c echo $new_path` 27019 27020 input_path="$new_path" 27021 # Check if we need to convert this using DOS-style short mode. If the path 27022 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27023 # take no chances and rewrite it. 27024 # Note: m4 eats our [], so we need to use [ and ] instead. 27025 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27026 if test "x$has_forbidden_chars" != x; then 27027 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27028 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27029 fi 27030 27031 # Output is in $new_path 27032 27033 windows_path="$new_path" 27034 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27035 unix_path=`$CYGPATH -u "$windows_path"` 27036 new_path="$unix_path" 27037 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27038 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27039 new_path="$unix_path" 27040 fi 27041 27042 # remove trailing .exe if any 27043 new_path="${new_path/%.exe/}" 27044 27045 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27046 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27047 fi 27048 27049 else 27050 # We're on a posix platform. Hooray! :) 27051 # First separate the path from the arguments. This will split at the first 27052 # space. 27053 complete="$NM" 27054 path="${complete%% *}" 27055 tmp="$complete EOL" 27056 arguments="${tmp#* }" 27057 27058 # Cannot rely on the command "which" here since it doesn't always work. 27059 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27060 if test -z "$is_absolute_path"; then 27061 # Path to executable is not absolute. Find it. 27062 IFS_save="$IFS" 27063 IFS=: 27064 for p in $PATH; do 27065 if test -f "$p/$path" && test -x "$p/$path"; then 27066 new_path="$p/$path" 27067 break 27068 fi 27069 done 27070 IFS="$IFS_save" 27071 else 27072 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 27073 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} 27074 new_path="$path" 27075 fi 27076 27077 if test "x$new_path" = x; then 27078 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 27079 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 27080 has_space=`$ECHO "$complete" | $GREP " "` 27081 if test "x$has_space" != x; then 27082 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27083 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27084 fi 27085 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 27086 fi 27087 fi 27088 27089 # Now join together the path and the arguments once again 27090 if test "x$arguments" != xEOL; then 27091 new_complete="$new_path ${arguments% *}" 27092 else 27093 new_complete="$new_path" 27094 fi 27095 27096 if test "x$complete" != "x$new_complete"; then 27097 NM="$new_complete" 27098 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 27099 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} 27100 fi 27101 27102 GNM="$NM" 27103 27104 if test -n "$ac_tool_prefix"; then 27105 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 27106 set dummy ${ac_tool_prefix}strip; ac_word=$2 27107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27108 $as_echo_n "checking for $ac_word... " >&6; } 27109 if ${ac_cv_prog_STRIP+:} false; then : 27110 $as_echo_n "(cached) " >&6 27111 else 27112 if test -n "$STRIP"; then 27113 ac_cv_prog_STRIP="$STRIP" # Let the user override the test. 27114 else 27115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27116 for as_dir in $PATH 27117 do 27118 IFS=$as_save_IFS 27119 test -z "$as_dir" && as_dir=. 27120 for ac_exec_ext in '' $ac_executable_extensions; do 27121 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27122 ac_cv_prog_STRIP="${ac_tool_prefix}strip" 27123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27124 break 2 27125 fi 27126 done 27127 done 27128 IFS=$as_save_IFS 27129 27130 fi 27131 fi 27132 STRIP=$ac_cv_prog_STRIP 27133 if test -n "$STRIP"; then 27134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 27135 $as_echo "$STRIP" >&6; } 27136 else 27137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27138 $as_echo "no" >&6; } 27139 fi 27140 27141 27142 fi 27143 if test -z "$ac_cv_prog_STRIP"; then 27144 ac_ct_STRIP=$STRIP 27145 # Extract the first word of "strip", so it can be a program name with args. 27146 set dummy strip; ac_word=$2 27147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27148 $as_echo_n "checking for $ac_word... " >&6; } 27149 if ${ac_cv_prog_ac_ct_STRIP+:} false; then : 27150 $as_echo_n "(cached) " >&6 27151 else 27152 if test -n "$ac_ct_STRIP"; then 27153 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. 27154 else 27155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27156 for as_dir in $PATH 27157 do 27158 IFS=$as_save_IFS 27159 test -z "$as_dir" && as_dir=. 27160 for ac_exec_ext in '' $ac_executable_extensions; do 27161 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27162 ac_cv_prog_ac_ct_STRIP="strip" 27163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27164 break 2 27165 fi 27166 done 27167 done 27168 IFS=$as_save_IFS 27169 27170 fi 27171 fi 27172 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP 27173 if test -n "$ac_ct_STRIP"; then 27174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 27175 $as_echo "$ac_ct_STRIP" >&6; } 27176 else 27177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27178 $as_echo "no" >&6; } 27179 fi 27180 27181 if test "x$ac_ct_STRIP" = x; then 27182 STRIP="" 27183 else 27184 case $cross_compiling:$ac_tool_warned in 27185 yes:) 27186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27187 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27188 ac_tool_warned=yes ;; 27189 esac 27190 STRIP=$ac_ct_STRIP 27191 fi 27192 else 27193 STRIP="$ac_cv_prog_STRIP" 27194 fi 27195 27196 27197 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27198 27199 # First separate the path from the arguments. This will split at the first 27200 # space. 27201 complete="$STRIP" 27202 path="${complete%% *}" 27203 tmp="$complete EOL" 27204 arguments="${tmp#* }" 27205 27206 # Input might be given as Windows format, start by converting to 27207 # unix format. 27208 new_path=`$CYGPATH -u "$path"` 27209 27210 # Now try to locate executable using which 27211 new_path=`$WHICH "$new_path" 2> /dev/null` 27212 # bat and cmd files are not always considered executable in cygwin causing which 27213 # to not find them 27214 if test "x$new_path" = x \ 27215 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27216 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27217 new_path=`$CYGPATH -u "$path"` 27218 fi 27219 if test "x$new_path" = x; then 27220 # Oops. Which didn't find the executable. 27221 # The splitting of arguments from the executable at a space might have been incorrect, 27222 # since paths with space are more likely in Windows. Give it another try with the whole 27223 # argument. 27224 path="$complete" 27225 arguments="EOL" 27226 new_path=`$CYGPATH -u "$path"` 27227 new_path=`$WHICH "$new_path" 2> /dev/null` 27228 # bat and cmd files are not always considered executable in cygwin causing which 27229 # to not find them 27230 if test "x$new_path" = x \ 27231 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27232 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27233 new_path=`$CYGPATH -u "$path"` 27234 fi 27235 if test "x$new_path" = x; then 27236 # It's still not found. Now this is an unrecoverable error. 27237 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27238 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27239 has_space=`$ECHO "$complete" | $GREP " "` 27240 if test "x$has_space" != x; then 27241 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27242 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27243 fi 27244 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27245 fi 27246 fi 27247 27248 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27249 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27250 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27251 # "foo.exe" is OK but "foo" is an error. 27252 # 27253 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27254 # It is also a way to make sure we got the proper file name for the real test later on. 27255 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27256 if test "x$test_shortpath" = x; then 27257 # Short path failed, file does not exist as specified. 27258 # Try adding .exe or .cmd 27259 if test -f "${new_path}.exe"; then 27260 input_to_shortpath="${new_path}.exe" 27261 elif test -f "${new_path}.cmd"; then 27262 input_to_shortpath="${new_path}.cmd" 27263 else 27264 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 27265 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} 27266 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27267 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27268 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27269 fi 27270 else 27271 input_to_shortpath="$new_path" 27272 fi 27273 27274 # Call helper function which possibly converts this using DOS-style short mode. 27275 # If so, the updated path is stored in $new_path. 27276 new_path="$input_to_shortpath" 27277 27278 input_path="$input_to_shortpath" 27279 # Check if we need to convert this using DOS-style short mode. If the path 27280 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27281 # take no chances and rewrite it. 27282 # Note: m4 eats our [], so we need to use [ and ] instead. 27283 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27284 if test "x$has_forbidden_chars" != x; then 27285 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27286 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27287 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27288 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27289 # Going to short mode and back again did indeed matter. Since short mode is 27290 # case insensitive, let's make it lowercase to improve readability. 27291 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27292 # Now convert it back to Unix-stile (cygpath) 27293 input_path=`$CYGPATH -u "$shortmode_path"` 27294 new_path="$input_path" 27295 fi 27296 fi 27297 27298 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27299 if test "x$test_cygdrive_prefix" = x; then 27300 # As a simple fix, exclude /usr/bin since it's not a real path. 27301 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27302 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27303 # a path prefixed by /cygdrive for fixpath to work. 27304 new_path="$CYGWIN_ROOT_PATH$input_path" 27305 fi 27306 fi 27307 27308 # remove trailing .exe if any 27309 new_path="${new_path/%.exe/}" 27310 27311 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27312 27313 # First separate the path from the arguments. This will split at the first 27314 # space. 27315 complete="$STRIP" 27316 path="${complete%% *}" 27317 tmp="$complete EOL" 27318 arguments="${tmp#* }" 27319 27320 # Input might be given as Windows format, start by converting to 27321 # unix format. 27322 new_path="$path" 27323 27324 windows_path="$new_path" 27325 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27326 unix_path=`$CYGPATH -u "$windows_path"` 27327 new_path="$unix_path" 27328 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27329 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27330 new_path="$unix_path" 27331 fi 27332 27333 27334 # Now try to locate executable using which 27335 new_path=`$WHICH "$new_path" 2> /dev/null` 27336 27337 if test "x$new_path" = x; then 27338 # Oops. Which didn't find the executable. 27339 # The splitting of arguments from the executable at a space might have been incorrect, 27340 # since paths with space are more likely in Windows. Give it another try with the whole 27341 # argument. 27342 path="$complete" 27343 arguments="EOL" 27344 new_path="$path" 27345 27346 windows_path="$new_path" 27347 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27348 unix_path=`$CYGPATH -u "$windows_path"` 27349 new_path="$unix_path" 27350 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27351 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27352 new_path="$unix_path" 27353 fi 27354 27355 27356 new_path=`$WHICH "$new_path" 2> /dev/null` 27357 27358 if test "x$new_path" = x; then 27359 # It's still not found. Now this is an unrecoverable error. 27360 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27361 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27362 has_space=`$ECHO "$complete" | $GREP " "` 27363 if test "x$has_space" != x; then 27364 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27365 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27366 fi 27367 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27368 fi 27369 fi 27370 27371 # Now new_path has a complete unix path to the binary 27372 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27373 # Keep paths in /bin as-is, but remove trailing .exe if any 27374 new_path="${new_path/%.exe/}" 27375 # Do not save /bin paths to all_fixpath_prefixes! 27376 else 27377 # Not in mixed or Windows style, start by that. 27378 new_path=`cmd //c echo $new_path` 27379 27380 input_path="$new_path" 27381 # Check if we need to convert this using DOS-style short mode. If the path 27382 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27383 # take no chances and rewrite it. 27384 # Note: m4 eats our [], so we need to use [ and ] instead. 27385 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27386 if test "x$has_forbidden_chars" != x; then 27387 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27388 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27389 fi 27390 27391 # Output is in $new_path 27392 27393 windows_path="$new_path" 27394 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27395 unix_path=`$CYGPATH -u "$windows_path"` 27396 new_path="$unix_path" 27397 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27398 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27399 new_path="$unix_path" 27400 fi 27401 27402 # remove trailing .exe if any 27403 new_path="${new_path/%.exe/}" 27404 27405 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27406 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27407 fi 27408 27409 else 27410 # We're on a posix platform. Hooray! :) 27411 # First separate the path from the arguments. This will split at the first 27412 # space. 27413 complete="$STRIP" 27414 path="${complete%% *}" 27415 tmp="$complete EOL" 27416 arguments="${tmp#* }" 27417 27418 # Cannot rely on the command "which" here since it doesn't always work. 27419 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27420 if test -z "$is_absolute_path"; then 27421 # Path to executable is not absolute. Find it. 27422 IFS_save="$IFS" 27423 IFS=: 27424 for p in $PATH; do 27425 if test -f "$p/$path" && test -x "$p/$path"; then 27426 new_path="$p/$path" 27427 break 27428 fi 27429 done 27430 IFS="$IFS_save" 27431 else 27432 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 27433 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} 27434 new_path="$path" 27435 fi 27436 27437 if test "x$new_path" = x; then 27438 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27439 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27440 has_space=`$ECHO "$complete" | $GREP " "` 27441 if test "x$has_space" != x; then 27442 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27443 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27444 fi 27445 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27446 fi 27447 fi 27448 27449 # Now join together the path and the arguments once again 27450 if test "x$arguments" != xEOL; then 27451 new_complete="$new_path ${arguments% *}" 27452 else 27453 new_complete="$new_path" 27454 fi 27455 27456 if test "x$complete" != "x$new_complete"; then 27457 STRIP="$new_complete" 27458 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 27459 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} 27460 fi 27461 27462 fi 27463 27464 # objcopy is used for moving debug symbols to separate files when 27465 # full debug symbols are enabled. 27466 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then 27467 if test -n "$ac_tool_prefix"; then 27468 for ac_prog in gobjcopy objcopy 27469 do 27470 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 27471 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 27472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27473 $as_echo_n "checking for $ac_word... " >&6; } 27474 if ${ac_cv_prog_OBJCOPY+:} false; then : 27475 $as_echo_n "(cached) " >&6 27476 else 27477 if test -n "$OBJCOPY"; then 27478 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. 27479 else 27480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27481 for as_dir in $PATH 27482 do 27483 IFS=$as_save_IFS 27484 test -z "$as_dir" && as_dir=. 27485 for ac_exec_ext in '' $ac_executable_extensions; do 27486 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27487 ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" 27488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27489 break 2 27490 fi 27491 done 27492 done 27493 IFS=$as_save_IFS 27494 27495 fi 27496 fi 27497 OBJCOPY=$ac_cv_prog_OBJCOPY 27498 if test -n "$OBJCOPY"; then 27499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 27500 $as_echo "$OBJCOPY" >&6; } 27501 else 27502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27503 $as_echo "no" >&6; } 27504 fi 27505 27506 27507 test -n "$OBJCOPY" && break 27508 done 27509 fi 27510 if test -z "$OBJCOPY"; then 27511 ac_ct_OBJCOPY=$OBJCOPY 27512 for ac_prog in gobjcopy objcopy 27513 do 27514 # Extract the first word of "$ac_prog", so it can be a program name with args. 27515 set dummy $ac_prog; ac_word=$2 27516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27517 $as_echo_n "checking for $ac_word... " >&6; } 27518 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then : 27519 $as_echo_n "(cached) " >&6 27520 else 27521 if test -n "$ac_ct_OBJCOPY"; then 27522 ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. 27523 else 27524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27525 for as_dir in $PATH 27526 do 27527 IFS=$as_save_IFS 27528 test -z "$as_dir" && as_dir=. 27529 for ac_exec_ext in '' $ac_executable_extensions; do 27530 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27531 ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" 27532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27533 break 2 27534 fi 27535 done 27536 done 27537 IFS=$as_save_IFS 27538 27539 fi 27540 fi 27541 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY 27542 if test -n "$ac_ct_OBJCOPY"; then 27543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 27544 $as_echo "$ac_ct_OBJCOPY" >&6; } 27545 else 27546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27547 $as_echo "no" >&6; } 27548 fi 27549 27550 27551 test -n "$ac_ct_OBJCOPY" && break 27552 done 27553 27554 if test "x$ac_ct_OBJCOPY" = x; then 27555 OBJCOPY="" 27556 else 27557 case $cross_compiling:$ac_tool_warned in 27558 yes:) 27559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27560 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27561 ac_tool_warned=yes ;; 27562 esac 27563 OBJCOPY=$ac_ct_OBJCOPY 27564 fi 27565 fi 27566 27567 # Only call fixup if objcopy was found. 27568 if test -n "$OBJCOPY"; then 27569 27570 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27571 27572 # First separate the path from the arguments. This will split at the first 27573 # space. 27574 complete="$OBJCOPY" 27575 path="${complete%% *}" 27576 tmp="$complete EOL" 27577 arguments="${tmp#* }" 27578 27579 # Input might be given as Windows format, start by converting to 27580 # unix format. 27581 new_path=`$CYGPATH -u "$path"` 27582 27583 # Now try to locate executable using which 27584 new_path=`$WHICH "$new_path" 2> /dev/null` 27585 # bat and cmd files are not always considered executable in cygwin causing which 27586 # to not find them 27587 if test "x$new_path" = x \ 27588 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27589 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27590 new_path=`$CYGPATH -u "$path"` 27591 fi 27592 if test "x$new_path" = x; then 27593 # Oops. Which didn't find the executable. 27594 # The splitting of arguments from the executable at a space might have been incorrect, 27595 # since paths with space are more likely in Windows. Give it another try with the whole 27596 # argument. 27597 path="$complete" 27598 arguments="EOL" 27599 new_path=`$CYGPATH -u "$path"` 27600 new_path=`$WHICH "$new_path" 2> /dev/null` 27601 # bat and cmd files are not always considered executable in cygwin causing which 27602 # to not find them 27603 if test "x$new_path" = x \ 27604 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27605 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27606 new_path=`$CYGPATH -u "$path"` 27607 fi 27608 if test "x$new_path" = x; then 27609 # It's still not found. Now this is an unrecoverable error. 27610 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27611 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27612 has_space=`$ECHO "$complete" | $GREP " "` 27613 if test "x$has_space" != x; then 27614 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27615 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27616 fi 27617 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27618 fi 27619 fi 27620 27621 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27622 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27623 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27624 # "foo.exe" is OK but "foo" is an error. 27625 # 27626 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27627 # It is also a way to make sure we got the proper file name for the real test later on. 27628 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27629 if test "x$test_shortpath" = x; then 27630 # Short path failed, file does not exist as specified. 27631 # Try adding .exe or .cmd 27632 if test -f "${new_path}.exe"; then 27633 input_to_shortpath="${new_path}.exe" 27634 elif test -f "${new_path}.cmd"; then 27635 input_to_shortpath="${new_path}.cmd" 27636 else 27637 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5 27638 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;} 27639 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27640 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27641 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27642 fi 27643 else 27644 input_to_shortpath="$new_path" 27645 fi 27646 27647 # Call helper function which possibly converts this using DOS-style short mode. 27648 # If so, the updated path is stored in $new_path. 27649 new_path="$input_to_shortpath" 27650 27651 input_path="$input_to_shortpath" 27652 # Check if we need to convert this using DOS-style short mode. If the path 27653 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27654 # take no chances and rewrite it. 27655 # Note: m4 eats our [], so we need to use [ and ] instead. 27656 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27657 if test "x$has_forbidden_chars" != x; then 27658 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27659 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27660 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27661 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27662 # Going to short mode and back again did indeed matter. Since short mode is 27663 # case insensitive, let's make it lowercase to improve readability. 27664 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27665 # Now convert it back to Unix-stile (cygpath) 27666 input_path=`$CYGPATH -u "$shortmode_path"` 27667 new_path="$input_path" 27668 fi 27669 fi 27670 27671 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27672 if test "x$test_cygdrive_prefix" = x; then 27673 # As a simple fix, exclude /usr/bin since it's not a real path. 27674 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27675 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27676 # a path prefixed by /cygdrive for fixpath to work. 27677 new_path="$CYGWIN_ROOT_PATH$input_path" 27678 fi 27679 fi 27680 27681 # remove trailing .exe if any 27682 new_path="${new_path/%.exe/}" 27683 27684 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27685 27686 # First separate the path from the arguments. This will split at the first 27687 # space. 27688 complete="$OBJCOPY" 27689 path="${complete%% *}" 27690 tmp="$complete EOL" 27691 arguments="${tmp#* }" 27692 27693 # Input might be given as Windows format, start by converting to 27694 # unix format. 27695 new_path="$path" 27696 27697 windows_path="$new_path" 27698 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27699 unix_path=`$CYGPATH -u "$windows_path"` 27700 new_path="$unix_path" 27701 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27702 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27703 new_path="$unix_path" 27704 fi 27705 27706 27707 # Now try to locate executable using which 27708 new_path=`$WHICH "$new_path" 2> /dev/null` 27709 27710 if test "x$new_path" = x; then 27711 # Oops. Which didn't find the executable. 27712 # The splitting of arguments from the executable at a space might have been incorrect, 27713 # since paths with space are more likely in Windows. Give it another try with the whole 27714 # argument. 27715 path="$complete" 27716 arguments="EOL" 27717 new_path="$path" 27718 27719 windows_path="$new_path" 27720 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27721 unix_path=`$CYGPATH -u "$windows_path"` 27722 new_path="$unix_path" 27723 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27724 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27725 new_path="$unix_path" 27726 fi 27727 27728 27729 new_path=`$WHICH "$new_path" 2> /dev/null` 27730 27731 if test "x$new_path" = x; then 27732 # It's still not found. Now this is an unrecoverable error. 27733 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27734 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27735 has_space=`$ECHO "$complete" | $GREP " "` 27736 if test "x$has_space" != x; then 27737 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27738 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27739 fi 27740 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27741 fi 27742 fi 27743 27744 # Now new_path has a complete unix path to the binary 27745 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27746 # Keep paths in /bin as-is, but remove trailing .exe if any 27747 new_path="${new_path/%.exe/}" 27748 # Do not save /bin paths to all_fixpath_prefixes! 27749 else 27750 # Not in mixed or Windows style, start by that. 27751 new_path=`cmd //c echo $new_path` 27752 27753 input_path="$new_path" 27754 # Check if we need to convert this using DOS-style short mode. If the path 27755 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27756 # take no chances and rewrite it. 27757 # Note: m4 eats our [], so we need to use [ and ] instead. 27758 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27759 if test "x$has_forbidden_chars" != x; then 27760 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27761 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27762 fi 27763 27764 # Output is in $new_path 27765 27766 windows_path="$new_path" 27767 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27768 unix_path=`$CYGPATH -u "$windows_path"` 27769 new_path="$unix_path" 27770 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27771 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27772 new_path="$unix_path" 27773 fi 27774 27775 # remove trailing .exe if any 27776 new_path="${new_path/%.exe/}" 27777 27778 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27779 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27780 fi 27781 27782 else 27783 # We're on a posix platform. Hooray! :) 27784 # First separate the path from the arguments. This will split at the first 27785 # space. 27786 complete="$OBJCOPY" 27787 path="${complete%% *}" 27788 tmp="$complete EOL" 27789 arguments="${tmp#* }" 27790 27791 # Cannot rely on the command "which" here since it doesn't always work. 27792 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27793 if test -z "$is_absolute_path"; then 27794 # Path to executable is not absolute. Find it. 27795 IFS_save="$IFS" 27796 IFS=: 27797 for p in $PATH; do 27798 if test -f "$p/$path" && test -x "$p/$path"; then 27799 new_path="$p/$path" 27800 break 27801 fi 27802 done 27803 IFS="$IFS_save" 27804 else 27805 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5 27806 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;} 27807 new_path="$path" 27808 fi 27809 27810 if test "x$new_path" = x; then 27811 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27812 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27813 has_space=`$ECHO "$complete" | $GREP " "` 27814 if test "x$has_space" != x; then 27815 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27816 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27817 fi 27818 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27819 fi 27820 fi 27821 27822 # Now join together the path and the arguments once again 27823 if test "x$arguments" != xEOL; then 27824 new_complete="$new_path ${arguments% *}" 27825 else 27826 new_complete="$new_path" 27827 fi 27828 27829 if test "x$complete" != "x$new_complete"; then 27830 OBJCOPY="$new_complete" 27831 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5 27832 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;} 27833 fi 27834 27835 fi 27836 fi 27837 27838 if test -n "$ac_tool_prefix"; then 27839 for ac_prog in gobjdump objdump 27840 do 27841 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 27842 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 27843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27844 $as_echo_n "checking for $ac_word... " >&6; } 27845 if ${ac_cv_prog_OBJDUMP+:} false; then : 27846 $as_echo_n "(cached) " >&6 27847 else 27848 if test -n "$OBJDUMP"; then 27849 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. 27850 else 27851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27852 for as_dir in $PATH 27853 do 27854 IFS=$as_save_IFS 27855 test -z "$as_dir" && as_dir=. 27856 for ac_exec_ext in '' $ac_executable_extensions; do 27857 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27858 ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" 27859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27860 break 2 27861 fi 27862 done 27863 done 27864 IFS=$as_save_IFS 27865 27866 fi 27867 fi 27868 OBJDUMP=$ac_cv_prog_OBJDUMP 27869 if test -n "$OBJDUMP"; then 27870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 27871 $as_echo "$OBJDUMP" >&6; } 27872 else 27873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27874 $as_echo "no" >&6; } 27875 fi 27876 27877 27878 test -n "$OBJDUMP" && break 27879 done 27880 fi 27881 if test -z "$OBJDUMP"; then 27882 ac_ct_OBJDUMP=$OBJDUMP 27883 for ac_prog in gobjdump objdump 27884 do 27885 # Extract the first word of "$ac_prog", so it can be a program name with args. 27886 set dummy $ac_prog; ac_word=$2 27887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27888 $as_echo_n "checking for $ac_word... " >&6; } 27889 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : 27890 $as_echo_n "(cached) " >&6 27891 else 27892 if test -n "$ac_ct_OBJDUMP"; then 27893 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. 27894 else 27895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27896 for as_dir in $PATH 27897 do 27898 IFS=$as_save_IFS 27899 test -z "$as_dir" && as_dir=. 27900 for ac_exec_ext in '' $ac_executable_extensions; do 27901 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27902 ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" 27903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27904 break 2 27905 fi 27906 done 27907 done 27908 IFS=$as_save_IFS 27909 27910 fi 27911 fi 27912 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP 27913 if test -n "$ac_ct_OBJDUMP"; then 27914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 27915 $as_echo "$ac_ct_OBJDUMP" >&6; } 27916 else 27917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27918 $as_echo "no" >&6; } 27919 fi 27920 27921 27922 test -n "$ac_ct_OBJDUMP" && break 27923 done 27924 27925 if test "x$ac_ct_OBJDUMP" = x; then 27926 OBJDUMP="" 27927 else 27928 case $cross_compiling:$ac_tool_warned in 27929 yes:) 27930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27931 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27932 ac_tool_warned=yes ;; 27933 esac 27934 OBJDUMP=$ac_ct_OBJDUMP 27935 fi 27936 fi 27937 27938 if test "x$OBJDUMP" != x; then 27939 # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing. 27940 27941 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27942 27943 # First separate the path from the arguments. This will split at the first 27944 # space. 27945 complete="$OBJDUMP" 27946 path="${complete%% *}" 27947 tmp="$complete EOL" 27948 arguments="${tmp#* }" 27949 27950 # Input might be given as Windows format, start by converting to 27951 # unix format. 27952 new_path=`$CYGPATH -u "$path"` 27953 27954 # Now try to locate executable using which 27955 new_path=`$WHICH "$new_path" 2> /dev/null` 27956 # bat and cmd files are not always considered executable in cygwin causing which 27957 # to not find them 27958 if test "x$new_path" = x \ 27959 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27960 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27961 new_path=`$CYGPATH -u "$path"` 27962 fi 27963 if test "x$new_path" = x; then 27964 # Oops. Which didn't find the executable. 27965 # The splitting of arguments from the executable at a space might have been incorrect, 27966 # since paths with space are more likely in Windows. Give it another try with the whole 27967 # argument. 27968 path="$complete" 27969 arguments="EOL" 27970 new_path=`$CYGPATH -u "$path"` 27971 new_path=`$WHICH "$new_path" 2> /dev/null` 27972 # bat and cmd files are not always considered executable in cygwin causing which 27973 # to not find them 27974 if test "x$new_path" = x \ 27975 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27976 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27977 new_path=`$CYGPATH -u "$path"` 27978 fi 27979 if test "x$new_path" = x; then 27980 # It's still not found. Now this is an unrecoverable error. 27981 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 27982 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 27983 has_space=`$ECHO "$complete" | $GREP " "` 27984 if test "x$has_space" != x; then 27985 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27987 fi 27988 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27989 fi 27990 fi 27991 27992 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27993 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27994 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27995 # "foo.exe" is OK but "foo" is an error. 27996 # 27997 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27998 # It is also a way to make sure we got the proper file name for the real test later on. 27999 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 28000 if test "x$test_shortpath" = x; then 28001 # Short path failed, file does not exist as specified. 28002 # Try adding .exe or .cmd 28003 if test -f "${new_path}.exe"; then 28004 input_to_shortpath="${new_path}.exe" 28005 elif test -f "${new_path}.cmd"; then 28006 input_to_shortpath="${new_path}.cmd" 28007 else 28008 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5 28009 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;} 28010 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 28011 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 28012 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 28013 fi 28014 else 28015 input_to_shortpath="$new_path" 28016 fi 28017 28018 # Call helper function which possibly converts this using DOS-style short mode. 28019 # If so, the updated path is stored in $new_path. 28020 new_path="$input_to_shortpath" 28021 28022 input_path="$input_to_shortpath" 28023 # Check if we need to convert this using DOS-style short mode. If the path 28024 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28025 # take no chances and rewrite it. 28026 # Note: m4 eats our [], so we need to use [ and ] instead. 28027 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 28028 if test "x$has_forbidden_chars" != x; then 28029 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28030 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 28031 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 28032 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 28033 # Going to short mode and back again did indeed matter. Since short mode is 28034 # case insensitive, let's make it lowercase to improve readability. 28035 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28036 # Now convert it back to Unix-stile (cygpath) 28037 input_path=`$CYGPATH -u "$shortmode_path"` 28038 new_path="$input_path" 28039 fi 28040 fi 28041 28042 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 28043 if test "x$test_cygdrive_prefix" = x; then 28044 # As a simple fix, exclude /usr/bin since it's not a real path. 28045 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 28046 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 28047 # a path prefixed by /cygdrive for fixpath to work. 28048 new_path="$CYGWIN_ROOT_PATH$input_path" 28049 fi 28050 fi 28051 28052 # remove trailing .exe if any 28053 new_path="${new_path/%.exe/}" 28054 28055 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28056 28057 # First separate the path from the arguments. This will split at the first 28058 # space. 28059 complete="$OBJDUMP" 28060 path="${complete%% *}" 28061 tmp="$complete EOL" 28062 arguments="${tmp#* }" 28063 28064 # Input might be given as Windows format, start by converting to 28065 # unix format. 28066 new_path="$path" 28067 28068 windows_path="$new_path" 28069 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28070 unix_path=`$CYGPATH -u "$windows_path"` 28071 new_path="$unix_path" 28072 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28073 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28074 new_path="$unix_path" 28075 fi 28076 28077 28078 # Now try to locate executable using which 28079 new_path=`$WHICH "$new_path" 2> /dev/null` 28080 28081 if test "x$new_path" = x; then 28082 # Oops. Which didn't find the executable. 28083 # The splitting of arguments from the executable at a space might have been incorrect, 28084 # since paths with space are more likely in Windows. Give it another try with the whole 28085 # argument. 28086 path="$complete" 28087 arguments="EOL" 28088 new_path="$path" 28089 28090 windows_path="$new_path" 28091 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28092 unix_path=`$CYGPATH -u "$windows_path"` 28093 new_path="$unix_path" 28094 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28095 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28096 new_path="$unix_path" 28097 fi 28098 28099 28100 new_path=`$WHICH "$new_path" 2> /dev/null` 28101 28102 if test "x$new_path" = x; then 28103 # It's still not found. Now this is an unrecoverable error. 28104 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 28105 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 28106 has_space=`$ECHO "$complete" | $GREP " "` 28107 if test "x$has_space" != x; then 28108 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28109 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28110 fi 28111 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 28112 fi 28113 fi 28114 28115 # Now new_path has a complete unix path to the binary 28116 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 28117 # Keep paths in /bin as-is, but remove trailing .exe if any 28118 new_path="${new_path/%.exe/}" 28119 # Do not save /bin paths to all_fixpath_prefixes! 28120 else 28121 # Not in mixed or Windows style, start by that. 28122 new_path=`cmd //c echo $new_path` 28123 28124 input_path="$new_path" 28125 # Check if we need to convert this using DOS-style short mode. If the path 28126 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28127 # take no chances and rewrite it. 28128 # Note: m4 eats our [], so we need to use [ and ] instead. 28129 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 28130 if test "x$has_forbidden_chars" != x; then 28131 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28132 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28133 fi 28134 28135 # Output is in $new_path 28136 28137 windows_path="$new_path" 28138 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28139 unix_path=`$CYGPATH -u "$windows_path"` 28140 new_path="$unix_path" 28141 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28142 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28143 new_path="$unix_path" 28144 fi 28145 28146 # remove trailing .exe if any 28147 new_path="${new_path/%.exe/}" 28148 28149 # Save the first 10 bytes of this path to the storage, so fixpath can work. 28150 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 28151 fi 28152 28153 else 28154 # We're on a posix platform. Hooray! :) 28155 # First separate the path from the arguments. This will split at the first 28156 # space. 28157 complete="$OBJDUMP" 28158 path="${complete%% *}" 28159 tmp="$complete EOL" 28160 arguments="${tmp#* }" 28161 28162 # Cannot rely on the command "which" here since it doesn't always work. 28163 is_absolute_path=`$ECHO "$path" | $GREP ^/` 28164 if test -z "$is_absolute_path"; then 28165 # Path to executable is not absolute. Find it. 28166 IFS_save="$IFS" 28167 IFS=: 28168 for p in $PATH; do 28169 if test -f "$p/$path" && test -x "$p/$path"; then 28170 new_path="$p/$path" 28171 break 28172 fi 28173 done 28174 IFS="$IFS_save" 28175 else 28176 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5 28177 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;} 28178 new_path="$path" 28179 fi 28180 28181 if test "x$new_path" = x; then 28182 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 28183 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 28184 has_space=`$ECHO "$complete" | $GREP " "` 28185 if test "x$has_space" != x; then 28186 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 28187 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 28188 fi 28189 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 28190 fi 28191 fi 28192 28193 # Now join together the path and the arguments once again 28194 if test "x$arguments" != xEOL; then 28195 new_complete="$new_path ${arguments% *}" 28196 else 28197 new_complete="$new_path" 28198 fi 28199 28200 if test "x$complete" != "x$new_complete"; then 28201 OBJDUMP="$new_complete" 28202 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 28203 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} 28204 fi 28205 28206 fi 28207 28208 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 28209 # Extract the first word of "lipo", so it can be a program name with args. 28210 set dummy lipo; ac_word=$2 28211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 28212 $as_echo_n "checking for $ac_word... " >&6; } 28213 if ${ac_cv_path_LIPO+:} false; then : 28214 $as_echo_n "(cached) " >&6 28215 else 28216 case $LIPO in 28217 [\\/]* | ?:[\\/]*) 28218 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. 28219 ;; 28220 *) 28221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 28222 for as_dir in $PATH 28223 do 28224 IFS=$as_save_IFS 28225 test -z "$as_dir" && as_dir=. 28226 for ac_exec_ext in '' $ac_executable_extensions; do 28227 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 28228 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" 28229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 28230 break 2 28231 fi 28232 done 28233 done 28234 IFS=$as_save_IFS 28235 28236 ;; 28237 esac 28238 fi 28239 LIPO=$ac_cv_path_LIPO 28240 if test -n "$LIPO"; then 28241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 28242 $as_echo "$LIPO" >&6; } 28243 else 28244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 28245 $as_echo "no" >&6; } 28246 fi 28247 28248 28249 28250 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28251 28252 # First separate the path from the arguments. This will split at the first 28253 # space. 28254 complete="$LIPO" 28255 path="${complete%% *}" 28256 tmp="$complete EOL" 28257 arguments="${tmp#* }" 28258 28259 # Input might be given as Windows format, start by converting to 28260 # unix format. 28261 new_path=`$CYGPATH -u "$path"` 28262 28263 # Now try to locate executable using which 28264 new_path=`$WHICH "$new_path" 2> /dev/null` 28265 # bat and cmd files are not always considered executable in cygwin causing which 28266 # to not find them 28267 if test "x$new_path" = x \ 28268 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 28269 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 28270 new_path=`$CYGPATH -u "$path"` 28271 fi 28272 if test "x$new_path" = x; then 28273 # Oops. Which didn't find the executable. 28274 # The splitting of arguments from the executable at a space might have been incorrect, 28275 # since paths with space are more likely in Windows. Give it another try with the whole 28276 # argument. 28277 path="$complete" 28278 arguments="EOL" 28279 new_path=`$CYGPATH -u "$path"` 28280 new_path=`$WHICH "$new_path" 2> /dev/null` 28281 # bat and cmd files are not always considered executable in cygwin causing which 28282 # to not find them 28283 if test "x$new_path" = x \ 28284 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 28285 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 28286 new_path=`$CYGPATH -u "$path"` 28287 fi 28288 if test "x$new_path" = x; then 28289 # It's still not found. Now this is an unrecoverable error. 28290 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28291 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28292 has_space=`$ECHO "$complete" | $GREP " "` 28293 if test "x$has_space" != x; then 28294 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28296 fi 28297 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28298 fi 28299 fi 28300 28301 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 28302 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 28303 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 28304 # "foo.exe" is OK but "foo" is an error. 28305 # 28306 # This test is therefore slightly more accurate than "test -f" to check for file precense. 28307 # It is also a way to make sure we got the proper file name for the real test later on. 28308 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 28309 if test "x$test_shortpath" = x; then 28310 # Short path failed, file does not exist as specified. 28311 # Try adding .exe or .cmd 28312 if test -f "${new_path}.exe"; then 28313 input_to_shortpath="${new_path}.exe" 28314 elif test -f "${new_path}.cmd"; then 28315 input_to_shortpath="${new_path}.cmd" 28316 else 28317 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5 28318 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;} 28319 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 28320 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 28321 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28322 fi 28323 else 28324 input_to_shortpath="$new_path" 28325 fi 28326 28327 # Call helper function which possibly converts this using DOS-style short mode. 28328 # If so, the updated path is stored in $new_path. 28329 new_path="$input_to_shortpath" 28330 28331 input_path="$input_to_shortpath" 28332 # Check if we need to convert this using DOS-style short mode. If the path 28333 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28334 # take no chances and rewrite it. 28335 # Note: m4 eats our [], so we need to use [ and ] instead. 28336 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 28337 if test "x$has_forbidden_chars" != x; then 28338 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28339 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 28340 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 28341 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 28342 # Going to short mode and back again did indeed matter. Since short mode is 28343 # case insensitive, let's make it lowercase to improve readability. 28344 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28345 # Now convert it back to Unix-stile (cygpath) 28346 input_path=`$CYGPATH -u "$shortmode_path"` 28347 new_path="$input_path" 28348 fi 28349 fi 28350 28351 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 28352 if test "x$test_cygdrive_prefix" = x; then 28353 # As a simple fix, exclude /usr/bin since it's not a real path. 28354 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 28355 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 28356 # a path prefixed by /cygdrive for fixpath to work. 28357 new_path="$CYGWIN_ROOT_PATH$input_path" 28358 fi 28359 fi 28360 28361 # remove trailing .exe if any 28362 new_path="${new_path/%.exe/}" 28363 28364 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28365 28366 # First separate the path from the arguments. This will split at the first 28367 # space. 28368 complete="$LIPO" 28369 path="${complete%% *}" 28370 tmp="$complete EOL" 28371 arguments="${tmp#* }" 28372 28373 # Input might be given as Windows format, start by converting to 28374 # unix format. 28375 new_path="$path" 28376 28377 windows_path="$new_path" 28378 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28379 unix_path=`$CYGPATH -u "$windows_path"` 28380 new_path="$unix_path" 28381 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28382 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28383 new_path="$unix_path" 28384 fi 28385 28386 28387 # Now try to locate executable using which 28388 new_path=`$WHICH "$new_path" 2> /dev/null` 28389 28390 if test "x$new_path" = x; then 28391 # Oops. Which didn't find the executable. 28392 # The splitting of arguments from the executable at a space might have been incorrect, 28393 # since paths with space are more likely in Windows. Give it another try with the whole 28394 # argument. 28395 path="$complete" 28396 arguments="EOL" 28397 new_path="$path" 28398 28399 windows_path="$new_path" 28400 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28401 unix_path=`$CYGPATH -u "$windows_path"` 28402 new_path="$unix_path" 28403 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28404 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28405 new_path="$unix_path" 28406 fi 28407 28408 28409 new_path=`$WHICH "$new_path" 2> /dev/null` 28410 28411 if test "x$new_path" = x; then 28412 # It's still not found. Now this is an unrecoverable error. 28413 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28414 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28415 has_space=`$ECHO "$complete" | $GREP " "` 28416 if test "x$has_space" != x; then 28417 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28418 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28419 fi 28420 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28421 fi 28422 fi 28423 28424 # Now new_path has a complete unix path to the binary 28425 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 28426 # Keep paths in /bin as-is, but remove trailing .exe if any 28427 new_path="${new_path/%.exe/}" 28428 # Do not save /bin paths to all_fixpath_prefixes! 28429 else 28430 # Not in mixed or Windows style, start by that. 28431 new_path=`cmd //c echo $new_path` 28432 28433 input_path="$new_path" 28434 # Check if we need to convert this using DOS-style short mode. If the path 28435 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28436 # take no chances and rewrite it. 28437 # Note: m4 eats our [], so we need to use [ and ] instead. 28438 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 28439 if test "x$has_forbidden_chars" != x; then 28440 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28441 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28442 fi 28443 28444 # Output is in $new_path 28445 28446 windows_path="$new_path" 28447 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28448 unix_path=`$CYGPATH -u "$windows_path"` 28449 new_path="$unix_path" 28450 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28451 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28452 new_path="$unix_path" 28453 fi 28454 28455 # remove trailing .exe if any 28456 new_path="${new_path/%.exe/}" 28457 28458 # Save the first 10 bytes of this path to the storage, so fixpath can work. 28459 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 28460 fi 28461 28462 else 28463 # We're on a posix platform. Hooray! :) 28464 # First separate the path from the arguments. This will split at the first 28465 # space. 28466 complete="$LIPO" 28467 path="${complete%% *}" 28468 tmp="$complete EOL" 28469 arguments="${tmp#* }" 28470 28471 # Cannot rely on the command "which" here since it doesn't always work. 28472 is_absolute_path=`$ECHO "$path" | $GREP ^/` 28473 if test -z "$is_absolute_path"; then 28474 # Path to executable is not absolute. Find it. 28475 IFS_save="$IFS" 28476 IFS=: 28477 for p in $PATH; do 28478 if test -f "$p/$path" && test -x "$p/$path"; then 28479 new_path="$p/$path" 28480 break 28481 fi 28482 done 28483 IFS="$IFS_save" 28484 else 28485 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5 28486 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;} 28487 new_path="$path" 28488 fi 28489 28490 if test "x$new_path" = x; then 28491 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28492 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28493 has_space=`$ECHO "$complete" | $GREP " "` 28494 if test "x$has_space" != x; then 28495 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 28496 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 28497 fi 28498 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28499 fi 28500 fi 28501 28502 # Now join together the path and the arguments once again 28503 if test "x$arguments" != xEOL; then 28504 new_complete="$new_path ${arguments% *}" 28505 else 28506 new_complete="$new_path" 28507 fi 28508 28509 if test "x$complete" != "x$new_complete"; then 28510 LIPO="$new_complete" 28511 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 28512 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} 28513 fi 28514 28515 fi 28516 28517 28518 28519 # Restore old path without tools dir 28520 PATH="$OLD_PATH" 28521 28522 28523 # FIXME: Currently we must test this after paths but before flags. Fix! 28524 28525 # And we can test some aspects on the target using configure macros. 28526 28527 28528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 28529 $as_echo_n "checking for ANSI C header files... " >&6; } 28530 if ${ac_cv_header_stdc+:} false; then : 28531 $as_echo_n "(cached) " >&6 28532 else 28533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28534 /* end confdefs.h. */ 28535 #include <stdlib.h> 28536 #include <stdarg.h> 28537 #include <string.h> 28538 #include <float.h> 28539 28540 int 28541 main () 28542 { 28543 28544 ; 28545 return 0; 28546 } 28547 _ACEOF 28548 if ac_fn_cxx_try_compile "$LINENO"; then : 28549 ac_cv_header_stdc=yes 28550 else 28551 ac_cv_header_stdc=no 28552 fi 28553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28554 28555 if test $ac_cv_header_stdc = yes; then 28556 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 28557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28558 /* end confdefs.h. */ 28559 #include <string.h> 28560 28561 _ACEOF 28562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28563 $EGREP "memchr" >/dev/null 2>&1; then : 28564 28565 else 28566 ac_cv_header_stdc=no 28567 fi 28568 rm -f conftest* 28569 28570 fi 28571 28572 if test $ac_cv_header_stdc = yes; then 28573 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 28574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28575 /* end confdefs.h. */ 28576 #include <stdlib.h> 28577 28578 _ACEOF 28579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28580 $EGREP "free" >/dev/null 2>&1; then : 28581 28582 else 28583 ac_cv_header_stdc=no 28584 fi 28585 rm -f conftest* 28586 28587 fi 28588 28589 if test $ac_cv_header_stdc = yes; then 28590 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 28591 if test "$cross_compiling" = yes; then : 28592 : 28593 else 28594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28595 /* end confdefs.h. */ 28596 #include <ctype.h> 28597 #include <stdlib.h> 28598 #if ((' ' & 0x0FF) == 0x020) 28599 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 28600 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 28601 #else 28602 # define ISLOWER(c) \ 28603 (('a' <= (c) && (c) <= 'i') \ 28604 || ('j' <= (c) && (c) <= 'r') \ 28605 || ('s' <= (c) && (c) <= 'z')) 28606 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 28607 #endif 28608 28609 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 28610 int 28611 main () 28612 { 28613 int i; 28614 for (i = 0; i < 256; i++) 28615 if (XOR (islower (i), ISLOWER (i)) 28616 || toupper (i) != TOUPPER (i)) 28617 return 2; 28618 return 0; 28619 } 28620 _ACEOF 28621 if ac_fn_cxx_try_run "$LINENO"; then : 28622 28623 else 28624 ac_cv_header_stdc=no 28625 fi 28626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28627 conftest.$ac_objext conftest.beam conftest.$ac_ext 28628 fi 28629 28630 fi 28631 fi 28632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 28633 $as_echo "$ac_cv_header_stdc" >&6; } 28634 if test $ac_cv_header_stdc = yes; then 28635 28636 $as_echo "#define STDC_HEADERS 1" >>confdefs.h 28637 28638 fi 28639 28640 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 28641 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 28642 inttypes.h stdint.h unistd.h 28643 do : 28644 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 28645 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 28646 " 28647 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 28648 cat >>confdefs.h <<_ACEOF 28649 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 28650 _ACEOF 28651 28652 fi 28653 28654 done 28655 28656 28657 28658 ############################################################################### 28659 # 28660 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. 28661 # (The JVM can use 32 or 64 bit Java pointers but that decision 28662 # is made at runtime.) 28663 # 28664 28665 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 28666 # Always specify -m flags on Solaris 28667 28668 # keep track of c/cxx flags that we added outselves... 28669 # to prevent emitting warning... 28670 ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28671 ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28672 ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28673 28674 CFLAGS="${CFLAGS}${ADDED_CFLAGS}" 28675 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" 28676 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" 28677 28678 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" 28679 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" 28680 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" 28681 28682 elif test "x$COMPILE_TYPE" = xreduced; then 28683 if test "x$OPENJDK_TARGET_OS" != xwindows; then 28684 # Specify -m if running reduced on other Posix platforms 28685 28686 # keep track of c/cxx flags that we added outselves... 28687 # to prevent emitting warning... 28688 ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28689 ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28690 ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28691 28692 CFLAGS="${CFLAGS}${ADDED_CFLAGS}" 28693 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" 28694 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" 28695 28696 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" 28697 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" 28698 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" 28699 28700 fi 28701 fi 28702 28703 # Make compilation sanity check 28704 for ac_header in stdio.h 28705 do : 28706 ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" 28707 if test "x$ac_cv_header_stdio_h" = xyes; then : 28708 cat >>confdefs.h <<_ACEOF 28709 #define HAVE_STDIO_H 1 28710 _ACEOF 28711 28712 else 28713 28714 { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5 28715 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;} 28716 if test "x$COMPILE_TYPE" = xreduced; then 28717 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5 28718 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;} 28719 elif test "x$COMPILE_TYPE" = xcross; then 28720 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5 28721 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;} 28722 fi 28723 as_fn_error $? "Cannot continue." "$LINENO" 5 28724 28725 fi 28726 28727 done 28728 28729 28730 # The cast to long int works around a bug in the HP C Compiler 28731 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 28732 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 28733 # This bug is HP SR number 8606223364. 28734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5 28735 $as_echo_n "checking size of int *... " >&6; } 28736 if ${ac_cv_sizeof_int_p+:} false; then : 28737 $as_echo_n "(cached) " >&6 28738 else 28739 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then : 28740 28741 else 28742 if test "$ac_cv_type_int_p" = yes; then 28743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 28744 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 28745 as_fn_error 77 "cannot compute sizeof (int *) 28746 See \`config.log' for more details" "$LINENO" 5; } 28747 else 28748 ac_cv_sizeof_int_p=0 28749 fi 28750 fi 28751 28752 fi 28753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5 28754 $as_echo "$ac_cv_sizeof_int_p" >&6; } 28755 28756 28757 28758 cat >>confdefs.h <<_ACEOF 28759 #define SIZEOF_INT_P $ac_cv_sizeof_int_p 28760 _ACEOF 28761 28762 28763 28764 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then 28765 # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html 28766 SIZEOF_INT_P="$ac_cv_sizeof_int_p" 28767 fi 28768 28769 if test "x$SIZEOF_INT_P" = x; then 28770 # The test failed, lets stick to the assumed value. 28771 { $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 28772 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;} 28773 else 28774 TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P` 28775 28776 if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then 28777 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 28778 fi 28779 fi 28780 28781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5 28782 $as_echo_n "checking for target address size... " >&6; } 28783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5 28784 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; } 28785 28786 28787 ############################################################################### 28788 # 28789 # Is the target little of big endian? 28790 # 28791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 28792 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } 28793 if ${ac_cv_c_bigendian+:} false; then : 28794 $as_echo_n "(cached) " >&6 28795 else 28796 ac_cv_c_bigendian=unknown 28797 # See if we're dealing with a universal compiler. 28798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28799 /* end confdefs.h. */ 28800 #ifndef __APPLE_CC__ 28801 not a universal capable compiler 28802 #endif 28803 typedef int dummy; 28804 28805 _ACEOF 28806 if ac_fn_cxx_try_compile "$LINENO"; then : 28807 28808 # Check for potential -arch flags. It is not universal unless 28809 # there are at least two -arch flags with different values. 28810 ac_arch= 28811 ac_prev= 28812 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 28813 if test -n "$ac_prev"; then 28814 case $ac_word in 28815 i?86 | x86_64 | ppc | ppc64) 28816 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 28817 ac_arch=$ac_word 28818 else 28819 ac_cv_c_bigendian=universal 28820 break 28821 fi 28822 ;; 28823 esac 28824 ac_prev= 28825 elif test "x$ac_word" = "x-arch"; then 28826 ac_prev=arch 28827 fi 28828 done 28829 fi 28830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28831 if test $ac_cv_c_bigendian = unknown; then 28832 # See if sys/param.h defines the BYTE_ORDER macro. 28833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28834 /* end confdefs.h. */ 28835 #include <sys/types.h> 28836 #include <sys/param.h> 28837 28838 int 28839 main () 28840 { 28841 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 28842 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 28843 && LITTLE_ENDIAN) 28844 bogus endian macros 28845 #endif 28846 28847 ; 28848 return 0; 28849 } 28850 _ACEOF 28851 if ac_fn_cxx_try_compile "$LINENO"; then : 28852 # It does; now see whether it defined to BIG_ENDIAN or not. 28853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28854 /* end confdefs.h. */ 28855 #include <sys/types.h> 28856 #include <sys/param.h> 28857 28858 int 28859 main () 28860 { 28861 #if BYTE_ORDER != BIG_ENDIAN 28862 not big endian 28863 #endif 28864 28865 ; 28866 return 0; 28867 } 28868 _ACEOF 28869 if ac_fn_cxx_try_compile "$LINENO"; then : 28870 ac_cv_c_bigendian=yes 28871 else 28872 ac_cv_c_bigendian=no 28873 fi 28874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28875 fi 28876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28877 fi 28878 if test $ac_cv_c_bigendian = unknown; then 28879 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 28880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28881 /* end confdefs.h. */ 28882 #include <limits.h> 28883 28884 int 28885 main () 28886 { 28887 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 28888 bogus endian macros 28889 #endif 28890 28891 ; 28892 return 0; 28893 } 28894 _ACEOF 28895 if ac_fn_cxx_try_compile "$LINENO"; then : 28896 # It does; now see whether it defined to _BIG_ENDIAN or not. 28897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28898 /* end confdefs.h. */ 28899 #include <limits.h> 28900 28901 int 28902 main () 28903 { 28904 #ifndef _BIG_ENDIAN 28905 not big endian 28906 #endif 28907 28908 ; 28909 return 0; 28910 } 28911 _ACEOF 28912 if ac_fn_cxx_try_compile "$LINENO"; then : 28913 ac_cv_c_bigendian=yes 28914 else 28915 ac_cv_c_bigendian=no 28916 fi 28917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28918 fi 28919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28920 fi 28921 if test $ac_cv_c_bigendian = unknown; then 28922 # Compile a test program. 28923 if test "$cross_compiling" = yes; then : 28924 # Try to guess by grepping values from an object file. 28925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28926 /* end confdefs.h. */ 28927 short int ascii_mm[] = 28928 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 28929 short int ascii_ii[] = 28930 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 28931 int use_ascii (int i) { 28932 return ascii_mm[i] + ascii_ii[i]; 28933 } 28934 short int ebcdic_ii[] = 28935 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 28936 short int ebcdic_mm[] = 28937 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 28938 int use_ebcdic (int i) { 28939 return ebcdic_mm[i] + ebcdic_ii[i]; 28940 } 28941 extern int foo; 28942 28943 int 28944 main () 28945 { 28946 return use_ascii (foo) == use_ebcdic (foo); 28947 ; 28948 return 0; 28949 } 28950 _ACEOF 28951 if ac_fn_cxx_try_compile "$LINENO"; then : 28952 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 28953 ac_cv_c_bigendian=yes 28954 fi 28955 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 28956 if test "$ac_cv_c_bigendian" = unknown; then 28957 ac_cv_c_bigendian=no 28958 else 28959 # finding both strings is unlikely to happen, but who knows? 28960 ac_cv_c_bigendian=unknown 28961 fi 28962 fi 28963 fi 28964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28965 else 28966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28967 /* end confdefs.h. */ 28968 $ac_includes_default 28969 int 28970 main () 28971 { 28972 28973 /* Are we little or big endian? From Harbison&Steele. */ 28974 union 28975 { 28976 long int l; 28977 char c[sizeof (long int)]; 28978 } u; 28979 u.l = 1; 28980 return u.c[sizeof (long int) - 1] == 1; 28981 28982 ; 28983 return 0; 28984 } 28985 _ACEOF 28986 if ac_fn_cxx_try_run "$LINENO"; then : 28987 ac_cv_c_bigendian=no 28988 else 28989 ac_cv_c_bigendian=yes 28990 fi 28991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28992 conftest.$ac_objext conftest.beam conftest.$ac_ext 28993 fi 28994 28995 fi 28996 fi 28997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 28998 $as_echo "$ac_cv_c_bigendian" >&6; } 28999 case $ac_cv_c_bigendian in #( 29000 yes) 29001 ENDIAN="big";; #( 29002 no) 29003 ENDIAN="little" ;; #( 29004 universal) 29005 ENDIAN="universal_endianness" 29006 ;; #( 29007 *) 29008 ENDIAN="unknown" ;; 29009 esac 29010 29011 29012 if test "x$ENDIAN" = xuniversal_endianness; then 29013 as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5 29014 fi 29015 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then 29016 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 29017 fi 29018 29019 29020 # Configure flags for the tools 29021 29022 29023 ############################################################################### 29024 # 29025 # How to compile shared libraries. 29026 # 29027 29028 if test "x$GCC" = xyes; then 29029 COMPILER_NAME=gcc 29030 PICFLAG="-fPIC" 29031 LIBRARY_PREFIX=lib 29032 SHARED_LIBRARY='lib$1.so' 29033 STATIC_LIBRARY='lib$1.a' 29034 SHARED_LIBRARY_FLAGS="-shared" 29035 SHARED_LIBRARY_SUFFIX='.so' 29036 STATIC_LIBRARY_SUFFIX='.a' 29037 OBJ_SUFFIX='.o' 29038 EXE_SUFFIX='' 29039 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1' 29040 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1' 29041 C_FLAG_REORDER='' 29042 CXX_FLAG_REORDER='' 29043 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1' 29044 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1' 29045 LD="$CC" 29046 LDEXE="$CC" 29047 LDCXX="$CXX" 29048 LDEXECXX="$CXX" 29049 POST_STRIP_CMD="$STRIP -g" 29050 29051 # Linking is different on MacOSX 29052 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29053 # Might change in the future to clang. 29054 COMPILER_NAME=gcc 29055 SHARED_LIBRARY='lib$1.dylib' 29056 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" 29057 SHARED_LIBRARY_SUFFIX='.dylib' 29058 EXE_SUFFIX='' 29059 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1' 29060 SET_SHARED_LIBRARY_MAPFILE='' 29061 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' 29062 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 29063 POST_STRIP_CMD="$STRIP -S" 29064 fi 29065 else 29066 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29067 # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler 29068 COMPILER_NAME=ossc 29069 PICFLAG="-KPIC" 29070 LIBRARY_PREFIX=lib 29071 SHARED_LIBRARY='lib$1.so' 29072 STATIC_LIBRARY='lib$1.a' 29073 SHARED_LIBRARY_FLAGS="-G" 29074 SHARED_LIBRARY_SUFFIX='.so' 29075 STATIC_LIBRARY_SUFFIX='.a' 29076 OBJ_SUFFIX='.o' 29077 EXE_SUFFIX='' 29078 SET_SHARED_LIBRARY_NAME='' 29079 SET_SHARED_LIBRARY_MAPFILE='-M$1' 29080 C_FLAG_REORDER='-xF' 29081 CXX_FLAG_REORDER='-xF' 29082 SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1' 29083 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 29084 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" 29085 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" 29086 CFLAGS_JDKLIB_EXTRA='-xstrconst' 29087 POST_STRIP_CMD="$STRIP -x" 29088 POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" 29089 fi 29090 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29091 # If it is not gcc, then assume it is the MS Visual Studio compiler 29092 COMPILER_NAME=cl 29093 PICFLAG="" 29094 LIBRARY_PREFIX= 29095 SHARED_LIBRARY='$1.dll' 29096 STATIC_LIBRARY='$1.lib' 29097 SHARED_LIBRARY_FLAGS="-LD" 29098 SHARED_LIBRARY_SUFFIX='.dll' 29099 STATIC_LIBRARY_SUFFIX='.lib' 29100 OBJ_SUFFIX='.obj' 29101 EXE_SUFFIX='.exe' 29102 SET_SHARED_LIBRARY_NAME='' 29103 SET_SHARED_LIBRARY_MAPFILE='' 29104 SET_SHARED_LIBRARY_ORIGIN='' 29105 SET_EXECUTABLE_ORIGIN='' 29106 fi 29107 fi 29108 29109 29110 29111 29112 29113 29114 29115 29116 29117 29118 29119 29120 29121 29122 29123 29124 29125 29126 29127 # The (cross) compiler is now configured, we can now test capabilities 29128 # of the target platform. 29129 29130 29131 29132 ############################################################################### 29133 # 29134 # Setup the opt flags for different compilers 29135 # and different operating systems. 29136 # 29137 29138 # 29139 # NOTE: check for -mstackrealign needs to be below potential addition of -m32 29140 # 29141 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then 29142 # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. 29143 # While waiting for a better solution, the current workaround is to use -mstackrealign. 29144 CFLAGS="$CFLAGS -mstackrealign" 29145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5 29146 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; } 29147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29148 /* end confdefs.h. */ 29149 int main() { return 0; } 29150 _ACEOF 29151 if ac_fn_cxx_try_link "$LINENO"; then : 29152 29153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 29154 $as_echo "yes" >&6; } 29155 29156 else 29157 29158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 29159 $as_echo "no" >&6; } 29160 as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5 29161 29162 fi 29163 rm -f core conftest.err conftest.$ac_objext \ 29164 conftest$ac_exeext conftest.$ac_ext 29165 fi 29166 29167 C_FLAG_DEPS="-MMD -MF" 29168 CXX_FLAG_DEPS="-MMD -MF" 29169 29170 case $COMPILER_TYPE in 29171 CC ) 29172 case $COMPILER_NAME in 29173 gcc ) 29174 case $OPENJDK_TARGET_OS in 29175 macosx ) 29176 # On MacOSX we optimize for size, something 29177 # we should do for all platforms? 29178 C_O_FLAG_HI="-Os" 29179 C_O_FLAG_NORM="-Os" 29180 C_O_FLAG_NONE="" 29181 ;; 29182 *) 29183 C_O_FLAG_HI="-O3" 29184 C_O_FLAG_NORM="-O2" 29185 C_O_FLAG_NONE="-O0" 29186 ;; 29187 esac 29188 CXX_O_FLAG_HI="$C_O_FLAG_HI" 29189 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 29190 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 29191 CFLAGS_DEBUG_SYMBOLS="-g" 29192 CXXFLAGS_DEBUG_SYMBOLS="-g" 29193 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then 29194 CFLAGS_DEBUG_SYMBOLS="-g1" 29195 CXXFLAGS_DEBUG_SYMBOLS="-g1" 29196 fi 29197 ;; 29198 ossc ) 29199 # 29200 # Forte has different names for this with their C++ compiler... 29201 # 29202 C_FLAG_DEPS="-xMMD -xMF" 29203 CXX_FLAG_DEPS="-xMMD -xMF" 29204 29205 # Extra options used with HIGHEST 29206 # 29207 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be 29208 # done with care, there are some assumptions below that need to 29209 # be understood about the use of pointers, and IEEE behavior. 29210 # 29211 # Use non-standard floating point mode (not IEEE 754) 29212 CC_HIGHEST="$CC_HIGHEST -fns" 29213 # Do some simplification of floating point arithmetic (not IEEE 754) 29214 CC_HIGHEST="$CC_HIGHEST -fsimple" 29215 # Use single precision floating point with 'float' 29216 CC_HIGHEST="$CC_HIGHEST -fsingle" 29217 # Assume memory references via basic pointer types do not alias 29218 # (Source with excessing pointer casting and data access with mixed 29219 # pointer types are not recommended) 29220 CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" 29221 # Use intrinsic or inline versions for math/std functions 29222 # (If you expect perfect errno behavior, do not use this) 29223 CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all" 29224 # Loop data dependency optimizations (need -xO3 or higher) 29225 CC_HIGHEST="$CC_HIGHEST -xdepend" 29226 # Pointer parameters to functions do not overlap 29227 # (Similar to -xalias_level=basic usage, but less obvious sometimes. 29228 # If you pass in multiple pointers to the same data, do not use this) 29229 CC_HIGHEST="$CC_HIGHEST -xrestrict" 29230 # Inline some library routines 29231 # (If you expect perfect errno behavior, do not use this) 29232 CC_HIGHEST="$CC_HIGHEST -xlibmil" 29233 # Use optimized math routines 29234 # (If you expect perfect errno behavior, do not use this) 29235 # Can cause undefined external on Solaris 8 X86 on __sincos, removing for now 29236 #CC_HIGHEST="$CC_HIGHEST -xlibmopt" 29237 29238 if test "x$OPENJDK_TARGET_CPU" = xsparc; then 29239 CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" 29240 CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" 29241 fi 29242 29243 case $OPENJDK_TARGET_CPU_ARCH in 29244 x86) 29245 C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr" 29246 C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr" 29247 C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr" 29248 C_O_FLAG_NONE="-xregs=no%frameptr" 29249 CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr" 29250 CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr" 29251 CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr" 29252 CXX_O_FLAG_NONE="-xregs=no%frameptr" 29253 if test "x$OPENJDK_TARGET_CPU" = xx86; then 29254 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium" 29255 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium" 29256 fi 29257 ;; 29258 sparc) 29259 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 29260 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 29261 C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 29262 C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" 29263 C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" 29264 C_O_FLAG_NONE="" 29265 CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 29266 CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 29267 CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 29268 CXX_O_FLAG_NONE="" 29269 ;; 29270 esac 29271 29272 CFLAGS_DEBUG_SYMBOLS="-g -xs" 29273 CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" 29274 esac 29275 ;; 29276 CL ) 29277 C_O_FLAG_HIGHEST="-O2" 29278 C_O_FLAG_HI="-O1" 29279 C_O_FLAG_NORM="-O1" 29280 C_O_FLAG_NONE="-Od" 29281 CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" 29282 CXX_O_FLAG_HI="$C_O_FLAG_HI" 29283 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 29284 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 29285 ;; 29286 esac 29287 29288 if test -z "$C_O_FLAG_HIGHEST"; then 29289 C_O_FLAG_HIGHEST="$C_O_FLAG_HI" 29290 fi 29291 29292 if test -z "$CXX_O_FLAG_HIGHEST"; then 29293 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" 29294 fi 29295 29296 29297 29298 29299 29300 29301 29302 29303 29304 29305 29306 29307 29308 29309 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then 29310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5 29311 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;} 29312 fi 29313 29314 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then 29315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5 29316 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;} 29317 fi 29318 29319 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then 29320 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5 29321 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;} 29322 fi 29323 29324 29325 # Check whether --with-extra-cflags was given. 29326 if test "${with_extra_cflags+set}" = set; then : 29327 withval=$with_extra_cflags; 29328 fi 29329 29330 29331 29332 # Check whether --with-extra-cxxflags was given. 29333 if test "${with_extra_cxxflags+set}" = set; then : 29334 withval=$with_extra_cxxflags; 29335 fi 29336 29337 29338 29339 # Check whether --with-extra-ldflags was given. 29340 if test "${with_extra_ldflags+set}" = set; then : 29341 withval=$with_extra_ldflags; 29342 fi 29343 29344 29345 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" 29346 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" 29347 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" 29348 29349 # Hotspot needs these set in their legacy form 29350 LEGACY_EXTRA_CFLAGS=$with_extra_cflags 29351 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags 29352 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags 29353 29354 29355 29356 29357 29358 ############################################################################### 29359 # 29360 # Now setup the CFLAGS and LDFLAGS for the JDK build. 29361 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. 29362 # 29363 case $COMPILER_NAME in 29364 gcc ) 29365 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ 29366 -pipe \ 29367 -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" 29368 case $OPENJDK_TARGET_CPU_ARCH in 29369 arm ) 29370 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing 29371 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 29372 ;; 29373 ppc ) 29374 # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing 29375 ;; 29376 * ) 29377 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" 29378 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 29379 ;; 29380 esac 29381 ;; 29382 ossc ) 29383 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" 29384 case $OPENJDK_TARGET_CPU_ARCH in 29385 x86 ) 29386 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" 29387 CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" 29388 ;; 29389 esac 29390 29391 CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal" 29392 CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib" 29393 29394 LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext" 29395 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" 29396 ;; 29397 cl ) 29398 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ 29399 -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ 29400 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ 29401 -DWIN32 -DIAL" 29402 case $OPENJDK_TARGET_CPU in 29403 x86 ) 29404 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" 29405 ;; 29406 x86_64 ) 29407 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" 29408 ;; 29409 esac 29410 ;; 29411 esac 29412 29413 ############################################################################### 29414 29415 # Adjust flags according to debug level. 29416 case $DEBUG_LEVEL in 29417 fastdebug ) 29418 CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS" 29419 CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS" 29420 C_O_FLAG_HI="$C_O_FLAG_NORM" 29421 C_O_FLAG_NORM="$C_O_FLAG_NORM" 29422 CXX_O_FLAG_HI="$CXX_O_FLAG_NORM" 29423 CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM" 29424 JAVAC_FLAGS="$JAVAC_FLAGS -g" 29425 ;; 29426 slowdebug ) 29427 CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS" 29428 CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS" 29429 C_O_FLAG_HI="$C_O_FLAG_NONE" 29430 C_O_FLAG_NORM="$C_O_FLAG_NONE" 29431 CXX_O_FLAG_HI="$CXX_O_FLAG_NONE" 29432 CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" 29433 JAVAC_FLAGS="$JAVAC_FLAGS -g" 29434 ;; 29435 esac 29436 29437 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" 29438 29439 # The package path is used only on macosx? 29440 PACKAGE_PATH=/opt/local 29441 29442 29443 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then 29444 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the 29445 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN 29446 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). 29447 # Note: -Dmacro is the same as #define macro 1 29448 # -Dmacro= is the same as #define macro 29449 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29450 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN=" 29451 else 29452 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" 29453 fi 29454 else 29455 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" 29456 fi 29457 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29458 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" 29459 fi 29460 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29461 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" 29462 fi 29463 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29464 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" 29465 fi 29466 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29467 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" 29468 # Setting these parameters makes it an error to link to macosx APIs that are 29469 # newer than the given OS version and makes the linked binaries compatible even 29470 # if built on a newer version of the OS. 29471 # The expected format is X.Y.Z 29472 MACOSX_VERSION_MIN=10.7.0 29473 29474 # The macro takes the version with no dots, ex: 1070 29475 # Let the flags variables get resolved in make for easier override on make 29476 # command line. 29477 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" 29478 LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" 29479 fi 29480 if test "x$OPENJDK_TARGET_OS" = xbsd; then 29481 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" 29482 fi 29483 if test "x$DEBUG_LEVEL" = xrelease; then 29484 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" 29485 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29486 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" 29487 fi 29488 else 29489 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" 29490 fi 29491 29492 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" 29493 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" 29494 29495 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ 29496 -I${JDK_OUTPUTDIR}/include \ 29497 -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ 29498 -I${JDK_TOPDIR}/src/share/javavm/export \ 29499 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \ 29500 -I${JDK_TOPDIR}/src/share/native/common \ 29501 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common" 29502 29503 # The shared libraries are compiled using the picflag. 29504 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" 29505 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA " 29506 29507 # Executable flags 29508 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" 29509 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" 29510 29511 # Now this is odd. The JDK native libraries have to link against libjvm.so 29512 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server. 29513 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library 29514 # is identical for client and server? Yes. Which is picked at runtime (client or server)? 29515 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following 29516 # libraries will link to whatever is in memory. Yuck. 29517 # 29518 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. 29519 if test "x$COMPILER_NAME" = xcl; then 29520 LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" 29521 if test "x$OPENJDK_TARGET_CPU" = xx86; then 29522 LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" 29523 fi 29524 # TODO: make -debug optional "--disable-full-debug-symbols" 29525 LDFLAGS_JDK="$LDFLAGS_JDK -debug" 29526 LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib" 29527 LDFLAGS_JDKLIB_SUFFIX="" 29528 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 29529 LDFLAGS_STACK_SIZE=1048576 29530 else 29531 LDFLAGS_STACK_SIZE=327680 29532 fi 29533 LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" 29534 else 29535 if test "x$COMPILER_NAME" = xgcc; then 29536 # If this is a --hash-style=gnu system, use --hash-style=both, why? 29537 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` 29538 if test -n "$HAS_GNU_HASH"; then 29539 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " 29540 fi 29541 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29542 # And since we now know that the linker is gnu, then add -z defs, to forbid 29543 # undefined symbols in object files. 29544 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" 29545 if test "x$DEBUG_LEVEL" = "xrelease"; then 29546 # When building release libraries, tell the linker optimize them. 29547 # Should this be supplied to the OSS linker as well? 29548 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1" 29549 fi 29550 fi 29551 fi 29552 LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \ 29553 -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}" 29554 29555 # On some platforms (mac) the linker warns about non existing -L dirs. 29556 # Add server first if available. Linking aginst client does not always produce the same results. 29557 # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1. 29558 # Default to server for other variants. 29559 if test "x$JVM_VARIANT_SERVER" = xtrue; then 29560 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 29561 elif test "x$JVM_VARIANT_CLIENT" = xtrue; then 29562 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client" 29563 elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 29564 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal" 29565 else 29566 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 29567 fi 29568 29569 LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm" 29570 if test "x$COMPILER_NAME" = xossc; then 29571 LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" 29572 fi 29573 29574 LDFLAGS_JDKEXE="${LDFLAGS_JDK}" 29575 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29576 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined" 29577 fi 29578 fi 29579 29580 29581 29582 29583 29584 29585 29586 29587 29588 29589 29590 29591 29592 29593 29594 # Some Zero and Shark settings. 29595 # ZERO_ARCHFLAG tells the compiler which mode to build for 29596 case "${OPENJDK_TARGET_CPU}" in 29597 s390) 29598 ZERO_ARCHFLAG="-m31" 29599 ;; 29600 *) 29601 ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}" 29602 esac 29603 29604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5 29605 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; } 29606 supports=yes 29607 29608 saved_cflags="$CFLAGS" 29609 CFLAGS="$CFLAGS $ZERO_ARCHFLAG" 29610 ac_ext=c 29611 ac_cpp='$CPP $CPPFLAGS' 29612 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29613 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29614 ac_compiler_gnu=$ac_cv_c_compiler_gnu 29615 29616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29617 /* end confdefs.h. */ 29618 29619 int i; 29620 29621 _ACEOF 29622 if ac_fn_c_try_compile "$LINENO"; then : 29623 29624 else 29625 supports=no 29626 fi 29627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29628 ac_ext=cpp 29629 ac_cpp='$CXXCPP $CPPFLAGS' 29630 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29631 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29632 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29633 29634 CFLAGS="$saved_cflags" 29635 29636 saved_cxxflags="$CXXFLAGS" 29637 CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG" 29638 ac_ext=cpp 29639 ac_cpp='$CXXCPP $CPPFLAGS' 29640 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29641 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29642 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29643 29644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29645 /* end confdefs.h. */ 29646 29647 int i; 29648 29649 _ACEOF 29650 if ac_fn_cxx_try_compile "$LINENO"; then : 29651 29652 else 29653 supports=no 29654 fi 29655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29656 ac_ext=cpp 29657 ac_cpp='$CXXCPP $CPPFLAGS' 29658 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29659 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29660 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29661 29662 CXXFLAGS="$saved_cxxflags" 29663 29664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 29665 $as_echo "$supports" >&6; } 29666 if test "x$supports" = "xyes" ; then 29667 : 29668 else 29669 ZERO_ARCHFLAG="" 29670 fi 29671 29672 29673 29674 # Check that the compiler supports -mX flags 29675 # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does 29676 29677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5 29678 $as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; } 29679 supports=yes 29680 29681 saved_cflags="$CFLAGS" 29682 CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}" 29683 ac_ext=c 29684 ac_cpp='$CPP $CPPFLAGS' 29685 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29686 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29687 ac_compiler_gnu=$ac_cv_c_compiler_gnu 29688 29689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29690 /* end confdefs.h. */ 29691 29692 int i; 29693 29694 _ACEOF 29695 if ac_fn_c_try_compile "$LINENO"; then : 29696 29697 else 29698 supports=no 29699 fi 29700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29701 ac_ext=cpp 29702 ac_cpp='$CXXCPP $CPPFLAGS' 29703 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29704 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29705 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29706 29707 CFLAGS="$saved_cflags" 29708 29709 saved_cxxflags="$CXXFLAGS" 29710 CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}" 29711 ac_ext=cpp 29712 ac_cpp='$CXXCPP $CPPFLAGS' 29713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29716 29717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29718 /* end confdefs.h. */ 29719 29720 int i; 29721 29722 _ACEOF 29723 if ac_fn_cxx_try_compile "$LINENO"; then : 29724 29725 else 29726 supports=no 29727 fi 29728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29729 ac_ext=cpp 29730 ac_cpp='$CXXCPP $CPPFLAGS' 29731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 29732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 29733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 29734 29735 CXXFLAGS="$saved_cxxflags" 29736 29737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5 29738 $as_echo "$supports" >&6; } 29739 if test "x$supports" = "xyes" ; then 29740 COMPILER_SUPPORTS_TARGET_BITS_FLAG=true 29741 else 29742 COMPILER_SUPPORTS_TARGET_BITS_FLAG=false 29743 fi 29744 29745 29746 29747 29748 # Setup debug symbols (need objcopy from the toolchain for that) 29749 29750 # 29751 # ENABLE_DEBUG_SYMBOLS 29752 # This must be done after the toolchain is setup, since we're looking at objcopy. 29753 # 29754 # Check whether --enable-debug-symbols was given. 29755 if test "${enable_debug_symbols+set}" = set; then : 29756 enableval=$enable_debug_symbols; 29757 fi 29758 29759 29760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5 29761 $as_echo_n "checking if we should generate debug symbols... " >&6; } 29762 29763 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then 29764 # explicit enabling of enable-debug-symbols and can't find objcopy 29765 # this is an error 29766 as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5 29767 fi 29768 29769 if test "x$enable_debug_symbols" = "xyes"; then 29770 ENABLE_DEBUG_SYMBOLS=true 29771 elif test "x$enable_debug_symbols" = "xno"; then 29772 ENABLE_DEBUG_SYMBOLS=false 29773 else 29774 # default on macosx is false 29775 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29776 ENABLE_DEBUG_SYMBOLS=false 29777 # Default is on if objcopy is found, otherwise off 29778 elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then 29779 ENABLE_DEBUG_SYMBOLS=true 29780 else 29781 ENABLE_DEBUG_SYMBOLS=false 29782 fi 29783 fi 29784 29785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5 29786 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; } 29787 29788 # 29789 # ZIP_DEBUGINFO_FILES 29790 # 29791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5 29792 $as_echo_n "checking if we should zip debug-info files... " >&6; } 29793 # Check whether --enable-zip-debug-info was given. 29794 if test "${enable_zip_debug_info+set}" = set; then : 29795 enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}" 29796 else 29797 enable_zip_debug_info="yes" 29798 fi 29799 29800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5 29801 $as_echo "${enable_zip_debug_info}" >&6; } 29802 29803 if test "x${enable_zip_debug_info}" = "xno"; then 29804 ZIP_DEBUGINFO_FILES=false 29805 else 29806 ZIP_DEBUGINFO_FILES=true 29807 fi 29808 29809 29810 29811 29812 29813 29814 29815 ############################################################################### 29816 # 29817 # Check dependencies for external and internal libraries. 29818 # 29819 ############################################################################### 29820 29821 29822 29823 ############################################################################### 29824 # 29825 # OS specific settings that we never will need to probe. 29826 # 29827 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5 29829 $as_echo_n "checking what is not needed on Linux?... " >&6; } 29830 PULSE_NOT_NEEDED=yes 29831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5 29832 $as_echo "pulse" >&6; } 29833 fi 29834 29835 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5 29837 $as_echo_n "checking what is not needed on Solaris?... " >&6; } 29838 ALSA_NOT_NEEDED=yes 29839 PULSE_NOT_NEEDED=yes 29840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 29841 $as_echo "alsa pulse" >&6; } 29842 fi 29843 29844 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5 29846 $as_echo_n "checking what is not needed on Windows?... " >&6; } 29847 CUPS_NOT_NEEDED=yes 29848 ALSA_NOT_NEEDED=yes 29849 PULSE_NOT_NEEDED=yes 29850 X11_NOT_NEEDED=yes 29851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5 29852 $as_echo "alsa cups pulse x11" >&6; } 29853 fi 29854 29855 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5 29857 $as_echo_n "checking what is not needed on MacOSX?... " >&6; } 29858 ALSA_NOT_NEEDED=yes 29859 PULSE_NOT_NEEDED=yes 29860 X11_NOT_NEEDED=yes 29861 FREETYPE2_NOT_NEEDED=yes 29862 # If the java runtime framework is disabled, then we need X11. 29863 # This will be adjusted below. 29864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5 29865 $as_echo "alsa pulse x11" >&6; } 29866 fi 29867 29868 if test "x$OPENJDK_TARGET_OS" = xbsd; then 29869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5 29870 $as_echo_n "checking what is not needed on bsd?... " >&6; } 29871 ALSA_NOT_NEEDED=yes 29872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5 29873 $as_echo "alsa" >&6; } 29874 fi 29875 29876 if test "x$OPENJDK" = "xfalse"; then 29877 FREETYPE2_NOT_NEEDED=yes 29878 fi 29879 29880 if test "x$SUPPORT_HEADFUL" = xno; then 29881 X11_NOT_NEEDED=yes 29882 fi 29883 29884 ############################################################################### 29885 # 29886 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM 29887 # that uses this API. 29888 # 29889 # Check whether --enable-macosx-runtime-support was given. 29890 if test "${enable_macosx_runtime_support+set}" = set; then : 29891 enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}" 29892 else 29893 MACOSX_RUNTIME_SUPPORT="no" 29894 fi 29895 29896 29897 USE_MACOSX_RUNTIME_SUPPORT=no 29898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5 29899 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; } 29900 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 29901 if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then 29902 MACOSX_RUNTIME_SUPPORT=yes 29903 USE_MACOSX_RUNTIME_SUPPORT=yes 29904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5 29905 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; } 29906 else 29907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5 29908 $as_echo "yes, but explicitly disabled." >&6; } 29909 fi 29910 else 29911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 29912 $as_echo "no" >&6; } 29913 fi 29914 29915 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then 29916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5 29917 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; } 29918 X11_NOT_NEEDED= 29919 FREETYPE2_NOT_NEEDED= 29920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 29921 $as_echo "alsa pulse" >&6; } 29922 fi 29923 29924 29925 29926 ############################################################################### 29927 # 29928 # Check for X Windows 29929 # 29930 29931 # Check if the user has specified sysroot, but not --x-includes or --x-libraries. 29932 # Make a simple check for the libraries at the sysroot, and setup --x-includes and 29933 # --x-libraries for the sysroot, if that seems to be correct. 29934 if test "x$SYS_ROOT" != "x/"; then 29935 if test "x$x_includes" = xNONE; then 29936 if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then 29937 x_includes="$SYS_ROOT/usr/X11R6/include" 29938 elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then 29939 x_includes="$SYS_ROOT/usr/include" 29940 fi 29941 fi 29942 if test "x$x_libraries" = xNONE; then 29943 if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then 29944 x_libraries="$SYS_ROOT/usr/X11R6/lib" 29945 elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 29946 x_libraries="$SYS_ROOT/usr/lib64" 29947 elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then 29948 x_libraries="$SYS_ROOT/usr/lib" 29949 fi 29950 fi 29951 fi 29952 29953 # Now let autoconf do it's magic 29954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 29955 $as_echo_n "checking for X... " >&6; } 29956 29957 29958 # Check whether --with-x was given. 29959 if test "${with_x+set}" = set; then : 29960 withval=$with_x; 29961 fi 29962 29963 # $have_x is `yes', `no', `disabled', or empty when we do not yet know. 29964 if test "x$with_x" = xno; then 29965 # The user explicitly disabled X. 29966 have_x=disabled 29967 else 29968 case $x_includes,$x_libraries in #( 29969 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( 29970 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : 29971 $as_echo_n "(cached) " >&6 29972 else 29973 # One or both of the vars are not set, and there is no cached value. 29974 ac_x_includes=no ac_x_libraries=no 29975 rm -f -r conftest.dir 29976 if mkdir conftest.dir; then 29977 cd conftest.dir 29978 cat >Imakefile <<'_ACEOF' 29979 incroot: 29980 @echo incroot='${INCROOT}' 29981 usrlibdir: 29982 @echo usrlibdir='${USRLIBDIR}' 29983 libdir: 29984 @echo libdir='${LIBDIR}' 29985 _ACEOF 29986 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then 29987 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 29988 for ac_var in incroot usrlibdir libdir; do 29989 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" 29990 done 29991 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. 29992 for ac_extension in a so sl dylib la dll; do 29993 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && 29994 test -f "$ac_im_libdir/libX11.$ac_extension"; then 29995 ac_im_usrlibdir=$ac_im_libdir; break 29996 fi 29997 done 29998 # Screen out bogus values from the imake configuration. They are 29999 # bogus both because they are the default anyway, and because 30000 # using them would break gcc on systems where it needs fixed includes. 30001 case $ac_im_incroot in 30002 /usr/include) ac_x_includes= ;; 30003 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; 30004 esac 30005 case $ac_im_usrlibdir in 30006 /usr/lib | /usr/lib64 | /lib | /lib64) ;; 30007 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; 30008 esac 30009 fi 30010 cd .. 30011 rm -f -r conftest.dir 30012 fi 30013 30014 # Standard set of common directories for X headers. 30015 # Check X11 before X11Rn because it is often a symlink to the current release. 30016 ac_x_header_dirs=' 30017 /usr/X11/include 30018 /usr/X11R7/include 30019 /usr/X11R6/include 30020 /usr/X11R5/include 30021 /usr/X11R4/include 30022 30023 /usr/include/X11 30024 /usr/include/X11R7 30025 /usr/include/X11R6 30026 /usr/include/X11R5 30027 /usr/include/X11R4 30028 30029 /usr/local/X11/include 30030 /usr/local/X11R7/include 30031 /usr/local/X11R6/include 30032 /usr/local/X11R5/include 30033 /usr/local/X11R4/include 30034 30035 /usr/local/include/X11 30036 /usr/local/include/X11R7 30037 /usr/local/include/X11R6 30038 /usr/local/include/X11R5 30039 /usr/local/include/X11R4 30040 30041 /usr/X386/include 30042 /usr/x386/include 30043 /usr/XFree86/include/X11 30044 30045 /usr/include 30046 /usr/local/include 30047 /usr/unsupported/include 30048 /usr/athena/include 30049 /usr/local/x11r5/include 30050 /usr/lpp/Xamples/include 30051 30052 /usr/openwin/include 30053 /usr/openwin/share/include' 30054 30055 if test "$ac_x_includes" = no; then 30056 # Guess where to find include files, by looking for Xlib.h. 30057 # First, try using that file with no special directory specified. 30058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30059 /* end confdefs.h. */ 30060 #include <X11/Xlib.h> 30061 _ACEOF 30062 if ac_fn_cxx_try_cpp "$LINENO"; then : 30063 # We can compile using X headers with no special include directory. 30064 ac_x_includes= 30065 else 30066 for ac_dir in $ac_x_header_dirs; do 30067 if test -r "$ac_dir/X11/Xlib.h"; then 30068 ac_x_includes=$ac_dir 30069 break 30070 fi 30071 done 30072 fi 30073 rm -f conftest.err conftest.i conftest.$ac_ext 30074 fi # $ac_x_includes = no 30075 30076 if test "$ac_x_libraries" = no; then 30077 # Check for the libraries. 30078 # See if we find them without any special options. 30079 # Don't add to $LIBS permanently. 30080 ac_save_LIBS=$LIBS 30081 LIBS="-lX11 $LIBS" 30082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30083 /* end confdefs.h. */ 30084 #include <X11/Xlib.h> 30085 int 30086 main () 30087 { 30088 XrmInitialize () 30089 ; 30090 return 0; 30091 } 30092 _ACEOF 30093 if ac_fn_cxx_try_link "$LINENO"; then : 30094 LIBS=$ac_save_LIBS 30095 # We can link X programs with no special library path. 30096 ac_x_libraries= 30097 else 30098 LIBS=$ac_save_LIBS 30099 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` 30100 do 30101 # Don't even attempt the hair of trying to link an X program! 30102 for ac_extension in a so sl dylib la dll; do 30103 if test -r "$ac_dir/libX11.$ac_extension"; then 30104 ac_x_libraries=$ac_dir 30105 break 2 30106 fi 30107 done 30108 done 30109 fi 30110 rm -f core conftest.err conftest.$ac_objext \ 30111 conftest$ac_exeext conftest.$ac_ext 30112 fi # $ac_x_libraries = no 30113 30114 case $ac_x_includes,$ac_x_libraries in #( 30115 no,* | *,no | *\'*) 30116 # Didn't find X, or a directory has "'" in its name. 30117 ac_cv_have_x="have_x=no";; #( 30118 *) 30119 # Record where we found X for the cache. 30120 ac_cv_have_x="have_x=yes\ 30121 ac_x_includes='$ac_x_includes'\ 30122 ac_x_libraries='$ac_x_libraries'" 30123 esac 30124 fi 30125 ;; #( 30126 *) have_x=yes;; 30127 esac 30128 eval "$ac_cv_have_x" 30129 fi # $with_x != no 30130 30131 if test "$have_x" != yes; then 30132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 30133 $as_echo "$have_x" >&6; } 30134 no_x=yes 30135 else 30136 # If each of the values was on the command line, it overrides each guess. 30137 test "x$x_includes" = xNONE && x_includes=$ac_x_includes 30138 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries 30139 # Update the cache value to reflect the command line values. 30140 ac_cv_have_x="have_x=yes\ 30141 ac_x_includes='$x_includes'\ 30142 ac_x_libraries='$x_libraries'" 30143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 30144 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } 30145 fi 30146 30147 if test "$no_x" = yes; then 30148 # Not all programs may use this symbol, but it does not hurt to define it. 30149 30150 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h 30151 30152 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= 30153 else 30154 if test -n "$x_includes"; then 30155 X_CFLAGS="$X_CFLAGS -I$x_includes" 30156 fi 30157 30158 # It would also be nice to do this for all -L options, not just this one. 30159 if test -n "$x_libraries"; then 30160 X_LIBS="$X_LIBS -L$x_libraries" 30161 # For Solaris; some versions of Sun CC require a space after -R and 30162 # others require no space. Words are not sufficient . . . . 30163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 30164 $as_echo_n "checking whether -R must be followed by a space... " >&6; } 30165 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" 30166 ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag 30167 ac_cxx_werror_flag=yes 30168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30169 /* end confdefs.h. */ 30170 30171 int 30172 main () 30173 { 30174 30175 ; 30176 return 0; 30177 } 30178 _ACEOF 30179 if ac_fn_cxx_try_link "$LINENO"; then : 30180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30181 $as_echo "no" >&6; } 30182 X_LIBS="$X_LIBS -R$x_libraries" 30183 else 30184 LIBS="$ac_xsave_LIBS -R $x_libraries" 30185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30186 /* end confdefs.h. */ 30187 30188 int 30189 main () 30190 { 30191 30192 ; 30193 return 0; 30194 } 30195 _ACEOF 30196 if ac_fn_cxx_try_link "$LINENO"; then : 30197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 30198 $as_echo "yes" >&6; } 30199 X_LIBS="$X_LIBS -R $x_libraries" 30200 else 30201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 30202 $as_echo "neither works" >&6; } 30203 fi 30204 rm -f core conftest.err conftest.$ac_objext \ 30205 conftest$ac_exeext conftest.$ac_ext 30206 fi 30207 rm -f core conftest.err conftest.$ac_objext \ 30208 conftest$ac_exeext conftest.$ac_ext 30209 ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag 30210 LIBS=$ac_xsave_LIBS 30211 fi 30212 30213 # Check for system-dependent libraries X programs must link with. 30214 # Do this before checking for the system-independent R6 libraries 30215 # (-lICE), since we may need -lsocket or whatever for X linking. 30216 30217 if test "$ISC" = yes; then 30218 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" 30219 else 30220 # Martyn Johnson says this is needed for Ultrix, if the X 30221 # libraries were built with DECnet support. And Karl Berry says 30222 # the Alpha needs dnet_stub (dnet does not exist). 30223 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" 30224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30225 /* end confdefs.h. */ 30226 30227 /* Override any GCC internal prototype to avoid an error. 30228 Use char because int might match the return type of a GCC 30229 builtin and then its argument prototype would still apply. */ 30230 #ifdef __cplusplus 30231 extern "C" 30232 #endif 30233 char XOpenDisplay (); 30234 int 30235 main () 30236 { 30237 return XOpenDisplay (); 30238 ; 30239 return 0; 30240 } 30241 _ACEOF 30242 if ac_fn_cxx_try_link "$LINENO"; then : 30243 30244 else 30245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 30246 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } 30247 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : 30248 $as_echo_n "(cached) " >&6 30249 else 30250 ac_check_lib_save_LIBS=$LIBS 30251 LIBS="-ldnet $LIBS" 30252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30253 /* end confdefs.h. */ 30254 30255 /* Override any GCC internal prototype to avoid an error. 30256 Use char because int might match the return type of a GCC 30257 builtin and then its argument prototype would still apply. */ 30258 #ifdef __cplusplus 30259 extern "C" 30260 #endif 30261 char dnet_ntoa (); 30262 int 30263 main () 30264 { 30265 return dnet_ntoa (); 30266 ; 30267 return 0; 30268 } 30269 _ACEOF 30270 if ac_fn_cxx_try_link "$LINENO"; then : 30271 ac_cv_lib_dnet_dnet_ntoa=yes 30272 else 30273 ac_cv_lib_dnet_dnet_ntoa=no 30274 fi 30275 rm -f core conftest.err conftest.$ac_objext \ 30276 conftest$ac_exeext conftest.$ac_ext 30277 LIBS=$ac_check_lib_save_LIBS 30278 fi 30279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 30280 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } 30281 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : 30282 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" 30283 fi 30284 30285 if test $ac_cv_lib_dnet_dnet_ntoa = no; then 30286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 30287 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } 30288 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : 30289 $as_echo_n "(cached) " >&6 30290 else 30291 ac_check_lib_save_LIBS=$LIBS 30292 LIBS="-ldnet_stub $LIBS" 30293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30294 /* end confdefs.h. */ 30295 30296 /* Override any GCC internal prototype to avoid an error. 30297 Use char because int might match the return type of a GCC 30298 builtin and then its argument prototype would still apply. */ 30299 #ifdef __cplusplus 30300 extern "C" 30301 #endif 30302 char dnet_ntoa (); 30303 int 30304 main () 30305 { 30306 return dnet_ntoa (); 30307 ; 30308 return 0; 30309 } 30310 _ACEOF 30311 if ac_fn_cxx_try_link "$LINENO"; then : 30312 ac_cv_lib_dnet_stub_dnet_ntoa=yes 30313 else 30314 ac_cv_lib_dnet_stub_dnet_ntoa=no 30315 fi 30316 rm -f core conftest.err conftest.$ac_objext \ 30317 conftest$ac_exeext conftest.$ac_ext 30318 LIBS=$ac_check_lib_save_LIBS 30319 fi 30320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 30321 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } 30322 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : 30323 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" 30324 fi 30325 30326 fi 30327 fi 30328 rm -f core conftest.err conftest.$ac_objext \ 30329 conftest$ac_exeext conftest.$ac_ext 30330 LIBS="$ac_xsave_LIBS" 30331 30332 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, 30333 # to get the SysV transport functions. 30334 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) 30335 # needs -lnsl. 30336 # The nsl library prevents programs from opening the X display 30337 # on Irix 5.2, according to T.E. Dickey. 30338 # The functions gethostbyname, getservbyname, and inet_addr are 30339 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. 30340 ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" 30341 if test "x$ac_cv_func_gethostbyname" = xyes; then : 30342 30343 fi 30344 30345 if test $ac_cv_func_gethostbyname = no; then 30346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 30347 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } 30348 if ${ac_cv_lib_nsl_gethostbyname+:} false; then : 30349 $as_echo_n "(cached) " >&6 30350 else 30351 ac_check_lib_save_LIBS=$LIBS 30352 LIBS="-lnsl $LIBS" 30353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30354 /* end confdefs.h. */ 30355 30356 /* Override any GCC internal prototype to avoid an error. 30357 Use char because int might match the return type of a GCC 30358 builtin and then its argument prototype would still apply. */ 30359 #ifdef __cplusplus 30360 extern "C" 30361 #endif 30362 char gethostbyname (); 30363 int 30364 main () 30365 { 30366 return gethostbyname (); 30367 ; 30368 return 0; 30369 } 30370 _ACEOF 30371 if ac_fn_cxx_try_link "$LINENO"; then : 30372 ac_cv_lib_nsl_gethostbyname=yes 30373 else 30374 ac_cv_lib_nsl_gethostbyname=no 30375 fi 30376 rm -f core conftest.err conftest.$ac_objext \ 30377 conftest$ac_exeext conftest.$ac_ext 30378 LIBS=$ac_check_lib_save_LIBS 30379 fi 30380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 30381 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } 30382 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : 30383 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" 30384 fi 30385 30386 if test $ac_cv_lib_nsl_gethostbyname = no; then 30387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 30388 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } 30389 if ${ac_cv_lib_bsd_gethostbyname+:} false; then : 30390 $as_echo_n "(cached) " >&6 30391 else 30392 ac_check_lib_save_LIBS=$LIBS 30393 LIBS="-lbsd $LIBS" 30394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30395 /* end confdefs.h. */ 30396 30397 /* Override any GCC internal prototype to avoid an error. 30398 Use char because int might match the return type of a GCC 30399 builtin and then its argument prototype would still apply. */ 30400 #ifdef __cplusplus 30401 extern "C" 30402 #endif 30403 char gethostbyname (); 30404 int 30405 main () 30406 { 30407 return gethostbyname (); 30408 ; 30409 return 0; 30410 } 30411 _ACEOF 30412 if ac_fn_cxx_try_link "$LINENO"; then : 30413 ac_cv_lib_bsd_gethostbyname=yes 30414 else 30415 ac_cv_lib_bsd_gethostbyname=no 30416 fi 30417 rm -f core conftest.err conftest.$ac_objext \ 30418 conftest$ac_exeext conftest.$ac_ext 30419 LIBS=$ac_check_lib_save_LIBS 30420 fi 30421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 30422 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } 30423 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : 30424 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" 30425 fi 30426 30427 fi 30428 fi 30429 30430 # lieder@skyler.mavd.honeywell.com says without -lsocket, 30431 # socket/setsockopt and other routines are undefined under SCO ODT 30432 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary 30433 # on later versions), says Simon Leinen: it contains gethostby* 30434 # variants that don't use the name server (or something). -lsocket 30435 # must be given before -lnsl if both are needed. We assume that 30436 # if connect needs -lnsl, so does gethostbyname. 30437 ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" 30438 if test "x$ac_cv_func_connect" = xyes; then : 30439 30440 fi 30441 30442 if test $ac_cv_func_connect = no; then 30443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 30444 $as_echo_n "checking for connect in -lsocket... " >&6; } 30445 if ${ac_cv_lib_socket_connect+:} false; then : 30446 $as_echo_n "(cached) " >&6 30447 else 30448 ac_check_lib_save_LIBS=$LIBS 30449 LIBS="-lsocket $X_EXTRA_LIBS $LIBS" 30450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30451 /* end confdefs.h. */ 30452 30453 /* Override any GCC internal prototype to avoid an error. 30454 Use char because int might match the return type of a GCC 30455 builtin and then its argument prototype would still apply. */ 30456 #ifdef __cplusplus 30457 extern "C" 30458 #endif 30459 char connect (); 30460 int 30461 main () 30462 { 30463 return connect (); 30464 ; 30465 return 0; 30466 } 30467 _ACEOF 30468 if ac_fn_cxx_try_link "$LINENO"; then : 30469 ac_cv_lib_socket_connect=yes 30470 else 30471 ac_cv_lib_socket_connect=no 30472 fi 30473 rm -f core conftest.err conftest.$ac_objext \ 30474 conftest$ac_exeext conftest.$ac_ext 30475 LIBS=$ac_check_lib_save_LIBS 30476 fi 30477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 30478 $as_echo "$ac_cv_lib_socket_connect" >&6; } 30479 if test "x$ac_cv_lib_socket_connect" = xyes; then : 30480 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" 30481 fi 30482 30483 fi 30484 30485 # Guillermo Gomez says -lposix is necessary on A/UX. 30486 ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" 30487 if test "x$ac_cv_func_remove" = xyes; then : 30488 30489 fi 30490 30491 if test $ac_cv_func_remove = no; then 30492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 30493 $as_echo_n "checking for remove in -lposix... " >&6; } 30494 if ${ac_cv_lib_posix_remove+:} false; then : 30495 $as_echo_n "(cached) " >&6 30496 else 30497 ac_check_lib_save_LIBS=$LIBS 30498 LIBS="-lposix $LIBS" 30499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30500 /* end confdefs.h. */ 30501 30502 /* Override any GCC internal prototype to avoid an error. 30503 Use char because int might match the return type of a GCC 30504 builtin and then its argument prototype would still apply. */ 30505 #ifdef __cplusplus 30506 extern "C" 30507 #endif 30508 char remove (); 30509 int 30510 main () 30511 { 30512 return remove (); 30513 ; 30514 return 0; 30515 } 30516 _ACEOF 30517 if ac_fn_cxx_try_link "$LINENO"; then : 30518 ac_cv_lib_posix_remove=yes 30519 else 30520 ac_cv_lib_posix_remove=no 30521 fi 30522 rm -f core conftest.err conftest.$ac_objext \ 30523 conftest$ac_exeext conftest.$ac_ext 30524 LIBS=$ac_check_lib_save_LIBS 30525 fi 30526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 30527 $as_echo "$ac_cv_lib_posix_remove" >&6; } 30528 if test "x$ac_cv_lib_posix_remove" = xyes; then : 30529 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" 30530 fi 30531 30532 fi 30533 30534 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. 30535 ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" 30536 if test "x$ac_cv_func_shmat" = xyes; then : 30537 30538 fi 30539 30540 if test $ac_cv_func_shmat = no; then 30541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 30542 $as_echo_n "checking for shmat in -lipc... " >&6; } 30543 if ${ac_cv_lib_ipc_shmat+:} false; then : 30544 $as_echo_n "(cached) " >&6 30545 else 30546 ac_check_lib_save_LIBS=$LIBS 30547 LIBS="-lipc $LIBS" 30548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30549 /* end confdefs.h. */ 30550 30551 /* Override any GCC internal prototype to avoid an error. 30552 Use char because int might match the return type of a GCC 30553 builtin and then its argument prototype would still apply. */ 30554 #ifdef __cplusplus 30555 extern "C" 30556 #endif 30557 char shmat (); 30558 int 30559 main () 30560 { 30561 return shmat (); 30562 ; 30563 return 0; 30564 } 30565 _ACEOF 30566 if ac_fn_cxx_try_link "$LINENO"; then : 30567 ac_cv_lib_ipc_shmat=yes 30568 else 30569 ac_cv_lib_ipc_shmat=no 30570 fi 30571 rm -f core conftest.err conftest.$ac_objext \ 30572 conftest$ac_exeext conftest.$ac_ext 30573 LIBS=$ac_check_lib_save_LIBS 30574 fi 30575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 30576 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } 30577 if test "x$ac_cv_lib_ipc_shmat" = xyes; then : 30578 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" 30579 fi 30580 30581 fi 30582 fi 30583 30584 # Check for libraries that X11R6 Xt/Xaw programs need. 30585 ac_save_LDFLAGS=$LDFLAGS 30586 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" 30587 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to 30588 # check for ICE first), but we must link in the order -lSM -lICE or 30589 # we get undefined symbols. So assume we have SM if we have ICE. 30590 # These have to be linked with before -lX11, unlike the other 30591 # libraries we check for below, so use a different variable. 30592 # John Interrante, Karl Berry 30593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 30594 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } 30595 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : 30596 $as_echo_n "(cached) " >&6 30597 else 30598 ac_check_lib_save_LIBS=$LIBS 30599 LIBS="-lICE $X_EXTRA_LIBS $LIBS" 30600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30601 /* end confdefs.h. */ 30602 30603 /* Override any GCC internal prototype to avoid an error. 30604 Use char because int might match the return type of a GCC 30605 builtin and then its argument prototype would still apply. */ 30606 #ifdef __cplusplus 30607 extern "C" 30608 #endif 30609 char IceConnectionNumber (); 30610 int 30611 main () 30612 { 30613 return IceConnectionNumber (); 30614 ; 30615 return 0; 30616 } 30617 _ACEOF 30618 if ac_fn_cxx_try_link "$LINENO"; then : 30619 ac_cv_lib_ICE_IceConnectionNumber=yes 30620 else 30621 ac_cv_lib_ICE_IceConnectionNumber=no 30622 fi 30623 rm -f core conftest.err conftest.$ac_objext \ 30624 conftest$ac_exeext conftest.$ac_ext 30625 LIBS=$ac_check_lib_save_LIBS 30626 fi 30627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 30628 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } 30629 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : 30630 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" 30631 fi 30632 30633 LDFLAGS=$ac_save_LDFLAGS 30634 30635 fi 30636 30637 30638 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling 30639 # this doesn't make sense so we remove it. 30640 if test "x$COMPILE_TYPE" = xcross; then 30641 X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'` 30642 fi 30643 30644 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 30645 30646 # Print a helpful message on how to acquire the necessary build dependency. 30647 # x11 is the help tag: freetyp2, cups, pulse, alsa etc 30648 MISSING_DEPENDENCY=x11 30649 PKGHANDLER_COMMAND= 30650 30651 case $PKGHANDLER in 30652 apt-get) 30653 apt_help $MISSING_DEPENDENCY ;; 30654 yum) 30655 yum_help $MISSING_DEPENDENCY ;; 30656 port) 30657 port_help $MISSING_DEPENDENCY ;; 30658 pkgutil) 30659 pkgutil_help $MISSING_DEPENDENCY ;; 30660 pkgadd) 30661 pkgadd_help $MISSING_DEPENDENCY ;; 30662 * ) 30663 break ;; 30664 esac 30665 30666 if test "x$PKGHANDLER_COMMAND" != x; then 30667 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30668 fi 30669 30670 as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5 30671 fi 30672 30673 # Some of the old makefiles require a setting of OPENWIN_HOME 30674 # Since the X11R6 directory has disappeared on later Linuxes, 30675 # we need to probe for it. 30676 if test "x$OPENJDK_TARGET_OS" = xlinux; then 30677 if test -d "$SYS_ROOT/usr/X11R6"; then 30678 OPENWIN_HOME="$SYS_ROOT/usr/X11R6" 30679 elif test -d "$SYS_ROOT/usr/include/X11"; then 30680 OPENWIN_HOME="$SYS_ROOT/usr" 30681 fi 30682 fi 30683 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 30684 OPENWIN_HOME="/usr/openwin" 30685 fi 30686 30687 30688 30689 # 30690 # Weird Sol10 something check...TODO change to try compile 30691 # 30692 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then 30693 if test "`uname -r`" = "5.10"; then 30694 if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then 30695 X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" 30696 fi 30697 fi 30698 fi 30699 30700 ac_ext=c 30701 ac_cpp='$CPP $CPPFLAGS' 30702 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 30703 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 30704 ac_compiler_gnu=$ac_cv_c_compiler_gnu 30705 30706 OLD_CFLAGS="$CFLAGS" 30707 CFLAGS="$CFLAGS $X_CFLAGS" 30708 30709 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 30710 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h 30711 do : 30712 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 30713 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h> 30714 # include <X11/Xutil.h> 30715 30716 " 30717 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 30718 cat >>confdefs.h <<_ACEOF 30719 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 30720 _ACEOF 30721 X11_A_OK=yes 30722 else 30723 X11_A_OK=no; break 30724 fi 30725 30726 done 30727 30728 30729 CFLAGS="$OLD_CFLAGS" 30730 ac_ext=cpp 30731 ac_cpp='$CXXCPP $CPPFLAGS' 30732 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 30733 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 30734 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 30735 30736 30737 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 30738 30739 # Print a helpful message on how to acquire the necessary build dependency. 30740 # x11 is the help tag: freetyp2, cups, pulse, alsa etc 30741 MISSING_DEPENDENCY=x11 30742 PKGHANDLER_COMMAND= 30743 30744 case $PKGHANDLER in 30745 apt-get) 30746 apt_help $MISSING_DEPENDENCY ;; 30747 yum) 30748 yum_help $MISSING_DEPENDENCY ;; 30749 port) 30750 port_help $MISSING_DEPENDENCY ;; 30751 pkgutil) 30752 pkgutil_help $MISSING_DEPENDENCY ;; 30753 pkgadd) 30754 pkgadd_help $MISSING_DEPENDENCY ;; 30755 * ) 30756 break ;; 30757 esac 30758 30759 if test "x$PKGHANDLER_COMMAND" != x; then 30760 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30761 fi 30762 30763 as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5 30764 fi 30765 30766 30767 30768 30769 30770 30771 ############################################################################### 30772 # 30773 # The common unix printing system cups is used to print from java. 30774 # 30775 30776 # Check whether --with-cups was given. 30777 if test "${with_cups+set}" = set; then : 30778 withval=$with_cups; 30779 fi 30780 30781 30782 # Check whether --with-cups-include was given. 30783 if test "${with_cups_include+set}" = set; then : 30784 withval=$with_cups_include; 30785 fi 30786 30787 30788 if test "x$CUPS_NOT_NEEDED" = xyes; then 30789 if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then 30790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5 30791 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;} 30792 fi 30793 CUPS_CFLAGS= 30794 else 30795 CUPS_FOUND=no 30796 30797 if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then 30798 as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5 30799 fi 30800 30801 if test "x${with_cups}" != x; then 30802 CUPS_CFLAGS="-I${with_cups}/include" 30803 CUPS_FOUND=yes 30804 fi 30805 if test "x${with_cups_include}" != x; then 30806 CUPS_CFLAGS="-I${with_cups_include}" 30807 CUPS_FOUND=yes 30808 fi 30809 if test "x$CUPS_FOUND" = xno; then 30810 30811 30812 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 30813 # Source the builddeps file again, to make sure it uses the latest variables! 30814 . $builddepsfile 30815 # Look for a target and build machine specific resource! 30816 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 30817 if test "x$resource" = x; then 30818 # Ok, lets instead look for a target specific resource 30819 eval resource=\${builddep_cups_TARGET_${rewritten_target_var}} 30820 fi 30821 if test "x$resource" = x; then 30822 # Ok, lets instead look for a build specific resource 30823 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}} 30824 fi 30825 if test "x$resource" = x; then 30826 # Ok, lets instead look for a generic resource 30827 # (The cups comes from M4 and not the shell, thus no need for eval here.) 30828 resource=${builddep_cups} 30829 fi 30830 if test "x$resource" != x; then 30831 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5 30832 $as_echo "$as_me: Using builddeps $resource for cups" >&6;} 30833 # If the resource in the builddeps.conf file is an existing directory, 30834 # for example /java/linux/cups 30835 if test -d ${resource}; then 30836 depdir=${resource} 30837 else 30838 30839 # cups is for example mymodule 30840 # $resource is for example libs/general/libmymod_1_2_3.zip 30841 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 30842 # $with_builddeps_dir is for example /localhome/builddeps 30843 # depdir is the name of the variable into which we store the depdir, eg MYMOD 30844 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 30845 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 30846 filename=`basename $resource` 30847 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 30848 filebase=${filename%%.*} 30849 extension=${filename#*.} 30850 installdir=$with_builddeps_dir/$filebase 30851 if test ! -f $installdir/$filename.unpacked; then 30852 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5 30853 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;} 30854 if test ! -d $installdir; then 30855 mkdir -p $installdir 30856 fi 30857 if test ! -d $installdir; then 30858 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 30859 fi 30860 tmpfile=`mktemp $installdir/cups.XXXXXXXXX` 30861 touch $tmpfile 30862 if test ! -f $tmpfile; then 30863 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 30864 fi 30865 30866 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 30867 # $tmpfile is the local file name for the downloaded file. 30868 VALID_TOOL=no 30869 if test "x$BDEPS_FTP" = xwget; then 30870 VALID_TOOL=yes 30871 wget -O $tmpfile $with_builddeps_server/$resource 30872 fi 30873 if test "x$BDEPS_FTP" = xlftp; then 30874 VALID_TOOL=yes 30875 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 30876 fi 30877 if test "x$BDEPS_FTP" = xftp; then 30878 VALID_TOOL=yes 30879 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 30880 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 30881 FTPUSERPWD=${FTPSERVER%%@*} 30882 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 30883 FTPUSER=${userpwd%%:*} 30884 FTPPWD=${userpwd#*@} 30885 FTPSERVER=${FTPSERVER#*@} 30886 else 30887 FTPUSER=ftp 30888 FTPPWD=ftp 30889 fi 30890 # the "pass" command does not work on some 30891 # ftp clients (read ftp.exe) but if it works, 30892 # passive mode is better! 30893 (\ 30894 echo "user $FTPUSER $FTPPWD" ;\ 30895 echo "pass" ;\ 30896 echo "bin" ;\ 30897 echo "get $FTPPATH $tmpfile" ;\ 30898 ) | ftp -in $FTPSERVER 30899 fi 30900 if test "x$VALID_TOOL" != xyes; then 30901 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 30902 fi 30903 30904 mv $tmpfile $installdir/$filename 30905 if test ! -s $installdir/$filename; then 30906 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 30907 fi 30908 case "$extension" in 30909 zip) echo "Unzipping $installdir/$filename..." 30910 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 30911 ;; 30912 tar.gz) echo "Untaring $installdir/$filename..." 30913 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30914 ;; 30915 tgz) echo "Untaring $installdir/$filename..." 30916 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30917 ;; 30918 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 30919 ;; 30920 esac 30921 fi 30922 if test -f $installdir/$filename.unpacked; then 30923 depdir=$installdir 30924 fi 30925 30926 fi 30927 # Source the builddeps file again, because in the previous command, the depdir 30928 # was updated to point at the current build dependency install directory. 30929 . $builddepsfile 30930 # Now extract variables from the builddeps.conf files. 30931 theroot=${builddep_cups_ROOT} 30932 thecflags=${builddep_cups_CFLAGS} 30933 thelibs=${builddep_cups_LIBS} 30934 if test "x$depdir" = x; then 30935 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5 30936 fi 30937 CUPS=$depdir 30938 if test "x$theroot" != x; then 30939 CUPS="$theroot" 30940 fi 30941 if test "x$thecflags" != x; then 30942 CUPS_CFLAGS="$thecflags" 30943 fi 30944 if test "x$thelibs" != x; then 30945 CUPS_LIBS="$thelibs" 30946 fi 30947 CUPS_FOUND=yes 30948 30949 fi 30950 30951 fi 30952 30953 fi 30954 if test "x$CUPS_FOUND" = xno; then 30955 # Are the cups headers installed in the default /usr/include location? 30956 for ac_header in cups/cups.h cups/ppd.h 30957 do : 30958 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 30959 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 30960 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 30961 cat >>confdefs.h <<_ACEOF 30962 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 30963 _ACEOF 30964 CUPS_FOUND=yes 30965 CUPS_CFLAGS= 30966 DEFAULT_CUPS=yes 30967 fi 30968 30969 done 30970 30971 fi 30972 if test "x$CUPS_FOUND" = xno; then 30973 # Getting nervous now? Lets poke around for standard Solaris third-party 30974 # package installation locations. 30975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5 30976 $as_echo_n "checking for cups headers... " >&6; } 30977 if test -s /opt/sfw/cups/include/cups/cups.h; then 30978 # An SFW package seems to be installed! 30979 CUPS_FOUND=yes 30980 CUPS_CFLAGS="-I/opt/sfw/cups/include" 30981 elif test -s /opt/csw/include/cups/cups.h; then 30982 # A CSW package seems to be installed! 30983 CUPS_FOUND=yes 30984 CUPS_CFLAGS="-I/opt/csw/include" 30985 fi 30986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 30987 $as_echo "$CUPS_FOUND" >&6; } 30988 fi 30989 if test "x$CUPS_FOUND" = xno; then 30990 30991 # Print a helpful message on how to acquire the necessary build dependency. 30992 # cups is the help tag: freetyp2, cups, pulse, alsa etc 30993 MISSING_DEPENDENCY=cups 30994 PKGHANDLER_COMMAND= 30995 30996 case $PKGHANDLER in 30997 apt-get) 30998 apt_help $MISSING_DEPENDENCY ;; 30999 yum) 31000 yum_help $MISSING_DEPENDENCY ;; 31001 port) 31002 port_help $MISSING_DEPENDENCY ;; 31003 pkgutil) 31004 pkgutil_help $MISSING_DEPENDENCY ;; 31005 pkgadd) 31006 pkgadd_help $MISSING_DEPENDENCY ;; 31007 * ) 31008 break ;; 31009 esac 31010 31011 if test "x$PKGHANDLER_COMMAND" != x; then 31012 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 31013 fi 31014 31015 as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5 31016 fi 31017 fi 31018 31019 31020 31021 31022 31023 31024 ############################################################################### 31025 # 31026 # The ICU LayoutEngine library is used to select the best glyphs to display 31027 # 31028 31029 31030 # Check whether --with-icu-le was given. 31031 if test "${with_icu_le+set}" = set; then : 31032 withval=$with_icu_le; 31033 fi 31034 31035 31036 # default is bundled 31037 DEFAULT_ICU_LE=bundled 31038 31039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which icu-le to use" >&5 31040 $as_echo_n "checking for which icu-le to use... " >&6; } 31041 31042 # 31043 # if user didn't specify, use DEFAULT_ICU_LE 31044 # 31045 31046 if test "x${with_icu_le}" = "x"; then 31047 with_icu_le=${DEFAULT_ICU_LE} 31048 fi 31049 31050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_icu_le}" >&5 31051 $as_echo "${with_icu_le}" >&6; } 31052 31053 if test "x${with_icu_le}" = "xbundled"; then 31054 USE_EXTERNAL_ICU_LE=false 31055 else 31056 31057 pkg_failed=no 31058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU_LE" >&5 31059 $as_echo_n "checking for ICU_LE... " >&6; } 31060 31061 if test -n "$ICU_LE_CFLAGS"; then 31062 pkg_cv_ICU_LE_CFLAGS="$ICU_LE_CFLAGS" 31063 elif test -n "$PKG_CONFIG"; then 31064 if test -n "$PKG_CONFIG" && \ 31065 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-le\""; } >&5 31066 ($PKG_CONFIG --exists --print-errors "icu-le") 2>&5 31067 ac_status=$? 31068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31069 test $ac_status = 0; }; then 31070 pkg_cv_ICU_LE_CFLAGS=`$PKG_CONFIG --cflags "icu-le" 2>/dev/null` 31071 else 31072 pkg_failed=yes 31073 fi 31074 else 31075 pkg_failed=untried 31076 fi 31077 if test -n "$ICU_LE_LIBS"; then 31078 pkg_cv_ICU_LE_LIBS="$ICU_LE_LIBS" 31079 elif test -n "$PKG_CONFIG"; then 31080 if test -n "$PKG_CONFIG" && \ 31081 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-le\""; } >&5 31082 ($PKG_CONFIG --exists --print-errors "icu-le") 2>&5 31083 ac_status=$? 31084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31085 test $ac_status = 0; }; then 31086 pkg_cv_ICU_LE_LIBS=`$PKG_CONFIG --libs "icu-le" 2>/dev/null` 31087 else 31088 pkg_failed=yes 31089 fi 31090 else 31091 pkg_failed=untried 31092 fi 31093 31094 31095 31096 if test $pkg_failed = yes; then 31097 31098 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 31099 _pkg_short_errors_supported=yes 31100 else 31101 _pkg_short_errors_supported=no 31102 fi 31103 if test $_pkg_short_errors_supported = yes; then 31104 ICU_LE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "icu-le" 2>&1` 31105 else 31106 ICU_LE_PKG_ERRORS=`$PKG_CONFIG --print-errors "icu-le" 2>&1` 31107 fi 31108 # Put the nasty error message in config.log where it belongs 31109 echo "$ICU_LE_PKG_ERRORS" >&5 31110 31111 as_fn_error $? "Package requirements (icu-le) were not met: 31112 31113 $ICU_LE_PKG_ERRORS 31114 31115 Consider adjusting the PKG_CONFIG_PATH environment variable if you 31116 installed software in a non-standard prefix. 31117 31118 Alternatively, you may set the environment variables ICU_LE_CFLAGS 31119 and ICU_LE_LIBS to avoid the need to call pkg-config. 31120 See the pkg-config man page for more details. 31121 " "$LINENO" 5 31122 elif test $pkg_failed = untried; then 31123 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 31124 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 31125 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 31126 is in your PATH or set the PKG_CONFIG environment variable to the full 31127 path to pkg-config. 31128 31129 Alternatively, you may set the environment variables ICU_LE_CFLAGS 31130 and ICU_LE_LIBS to avoid the need to call pkg-config. 31131 See the pkg-config man page for more details. 31132 31133 To get pkg-config, see <http://pkg-config.freedesktop.org/>. 31134 See \`config.log' for more details" "$LINENO" 5; } 31135 else 31136 ICU_LE_CFLAGS=$pkg_cv_ICU_LE_CFLAGS 31137 ICU_LE_LIBS=$pkg_cv_ICU_LE_LIBS 31138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 31139 $as_echo "yes" >&6; } 31140 : 31141 fi 31142 USE_EXTERNAL_ICU_LE=true 31143 fi 31144 31145 31146 31147 31148 31149 31150 31151 31152 ############################################################################### 31153 # 31154 # The ubiquitous freetype2 library is used to render fonts. 31155 # 31156 31157 # Check whether --with-freetype was given. 31158 if test "${with_freetype+set}" = set; then : 31159 withval=$with_freetype; 31160 fi 31161 31162 31163 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree 31164 USING_SYSTEM_FT_LIB=false 31165 31166 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then 31167 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 31168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5 31169 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;} 31170 fi 31171 FREETYPE2_CFLAGS= 31172 FREETYPE2_LIBS= 31173 FREETYPE2_LIB_PATH= 31174 else 31175 FREETYPE2_FOUND=no 31176 31177 if test "x$with_freetype" != x; then 31178 31179 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31180 31181 # Input might be given as Windows format, start by converting to 31182 # unix format. 31183 path="$with_freetype" 31184 new_path=`$CYGPATH -u "$path"` 31185 31186 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 31187 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 31188 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 31189 # "foo.exe" is OK but "foo" is an error. 31190 # 31191 # This test is therefore slightly more accurate than "test -f" to check for file precense. 31192 # It is also a way to make sure we got the proper file name for the real test later on. 31193 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 31194 if test "x$test_shortpath" = x; then 31195 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 31196 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 31197 as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5 31198 fi 31199 31200 # Call helper function which possibly converts this using DOS-style short mode. 31201 # If so, the updated path is stored in $new_path. 31202 31203 input_path="$new_path" 31204 # Check if we need to convert this using DOS-style short mode. If the path 31205 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31206 # take no chances and rewrite it. 31207 # Note: m4 eats our [], so we need to use [ and ] instead. 31208 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 31209 if test "x$has_forbidden_chars" != x; then 31210 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31211 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 31212 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 31213 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 31214 # Going to short mode and back again did indeed matter. Since short mode is 31215 # case insensitive, let's make it lowercase to improve readability. 31216 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31217 # Now convert it back to Unix-stile (cygpath) 31218 input_path=`$CYGPATH -u "$shortmode_path"` 31219 new_path="$input_path" 31220 fi 31221 fi 31222 31223 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 31224 if test "x$test_cygdrive_prefix" = x; then 31225 # As a simple fix, exclude /usr/bin since it's not a real path. 31226 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 31227 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 31228 # a path prefixed by /cygdrive for fixpath to work. 31229 new_path="$CYGWIN_ROOT_PATH$input_path" 31230 fi 31231 fi 31232 31233 31234 if test "x$path" != "x$new_path"; then 31235 with_freetype="$new_path" 31236 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 31237 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 31238 fi 31239 31240 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31241 31242 path="$with_freetype" 31243 has_colon=`$ECHO $path | $GREP ^.:` 31244 new_path="$path" 31245 if test "x$has_colon" = x; then 31246 # Not in mixed or Windows style, start by that. 31247 new_path=`cmd //c echo $path` 31248 fi 31249 31250 31251 input_path="$new_path" 31252 # Check if we need to convert this using DOS-style short mode. If the path 31253 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31254 # take no chances and rewrite it. 31255 # Note: m4 eats our [], so we need to use [ and ] instead. 31256 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 31257 if test "x$has_forbidden_chars" != x; then 31258 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31259 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31260 fi 31261 31262 31263 windows_path="$new_path" 31264 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31265 unix_path=`$CYGPATH -u "$windows_path"` 31266 new_path="$unix_path" 31267 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31268 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 31269 new_path="$unix_path" 31270 fi 31271 31272 if test "x$path" != "x$new_path"; then 31273 with_freetype="$new_path" 31274 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 31275 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 31276 fi 31277 31278 # Save the first 10 bytes of this path to the storage, so fixpath can work. 31279 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 31280 31281 else 31282 # We're on a posix platform. Hooray! :) 31283 path="$with_freetype" 31284 has_space=`$ECHO "$path" | $GREP " "` 31285 if test "x$has_space" != x; then 31286 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 31287 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 31288 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 31289 fi 31290 31291 # Use eval to expand a potential ~ 31292 eval path="$path" 31293 if test ! -f "$path" && test ! -d "$path"; then 31294 as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5 31295 fi 31296 31297 with_freetype="`cd "$path"; $THEPWDCMD -L`" 31298 fi 31299 31300 FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" 31301 FREETYPE2_LIB_PATH="$with_freetype/lib" 31302 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then 31303 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype" 31304 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64" 31305 fi 31306 if test "x$OPENJDK_TARGET_OS" = xwindows; then 31307 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" 31308 fi 31309 FREETYPE2_CFLAGS="-I$with_freetype/include" 31310 if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then 31311 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" 31312 fi 31313 FREETYPE2_FOUND=yes 31314 if test "x$FREETYPE2_FOUND" = xyes; then 31315 # Verify that the directories exist 31316 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then 31317 as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5 31318 fi 31319 # List the contents of the lib. 31320 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` 31321 if test "x$FREETYPELIB" = x; then 31322 as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5 31323 fi 31324 # Check one h-file 31325 if ! test -s "$with_freetype/include/ft2build.h"; then 31326 as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5 31327 fi 31328 fi 31329 fi 31330 if test "x$FREETYPE2_FOUND" = xno; then 31331 31332 31333 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 31334 # Source the builddeps file again, to make sure it uses the latest variables! 31335 . $builddepsfile 31336 # Look for a target and build machine specific resource! 31337 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 31338 if test "x$resource" = x; then 31339 # Ok, lets instead look for a target specific resource 31340 eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}} 31341 fi 31342 if test "x$resource" = x; then 31343 # Ok, lets instead look for a build specific resource 31344 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}} 31345 fi 31346 if test "x$resource" = x; then 31347 # Ok, lets instead look for a generic resource 31348 # (The freetype2 comes from M4 and not the shell, thus no need for eval here.) 31349 resource=${builddep_freetype2} 31350 fi 31351 if test "x$resource" != x; then 31352 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5 31353 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;} 31354 # If the resource in the builddeps.conf file is an existing directory, 31355 # for example /java/linux/cups 31356 if test -d ${resource}; then 31357 depdir=${resource} 31358 else 31359 31360 # freetype2 is for example mymodule 31361 # $resource is for example libs/general/libmymod_1_2_3.zip 31362 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 31363 # $with_builddeps_dir is for example /localhome/builddeps 31364 # depdir is the name of the variable into which we store the depdir, eg MYMOD 31365 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 31366 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 31367 filename=`basename $resource` 31368 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 31369 filebase=${filename%%.*} 31370 extension=${filename#*.} 31371 installdir=$with_builddeps_dir/$filebase 31372 if test ! -f $installdir/$filename.unpacked; then 31373 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5 31374 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;} 31375 if test ! -d $installdir; then 31376 mkdir -p $installdir 31377 fi 31378 if test ! -d $installdir; then 31379 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 31380 fi 31381 tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX` 31382 touch $tmpfile 31383 if test ! -f $tmpfile; then 31384 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 31385 fi 31386 31387 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 31388 # $tmpfile is the local file name for the downloaded file. 31389 VALID_TOOL=no 31390 if test "x$BDEPS_FTP" = xwget; then 31391 VALID_TOOL=yes 31392 wget -O $tmpfile $with_builddeps_server/$resource 31393 fi 31394 if test "x$BDEPS_FTP" = xlftp; then 31395 VALID_TOOL=yes 31396 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 31397 fi 31398 if test "x$BDEPS_FTP" = xftp; then 31399 VALID_TOOL=yes 31400 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 31401 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 31402 FTPUSERPWD=${FTPSERVER%%@*} 31403 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 31404 FTPUSER=${userpwd%%:*} 31405 FTPPWD=${userpwd#*@} 31406 FTPSERVER=${FTPSERVER#*@} 31407 else 31408 FTPUSER=ftp 31409 FTPPWD=ftp 31410 fi 31411 # the "pass" command does not work on some 31412 # ftp clients (read ftp.exe) but if it works, 31413 # passive mode is better! 31414 (\ 31415 echo "user $FTPUSER $FTPPWD" ;\ 31416 echo "pass" ;\ 31417 echo "bin" ;\ 31418 echo "get $FTPPATH $tmpfile" ;\ 31419 ) | ftp -in $FTPSERVER 31420 fi 31421 if test "x$VALID_TOOL" != xyes; then 31422 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 31423 fi 31424 31425 mv $tmpfile $installdir/$filename 31426 if test ! -s $installdir/$filename; then 31427 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 31428 fi 31429 case "$extension" in 31430 zip) echo "Unzipping $installdir/$filename..." 31431 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 31432 ;; 31433 tar.gz) echo "Untaring $installdir/$filename..." 31434 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31435 ;; 31436 tgz) echo "Untaring $installdir/$filename..." 31437 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31438 ;; 31439 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 31440 ;; 31441 esac 31442 fi 31443 if test -f $installdir/$filename.unpacked; then 31444 depdir=$installdir 31445 fi 31446 31447 fi 31448 # Source the builddeps file again, because in the previous command, the depdir 31449 # was updated to point at the current build dependency install directory. 31450 . $builddepsfile 31451 # Now extract variables from the builddeps.conf files. 31452 theroot=${builddep_freetype2_ROOT} 31453 thecflags=${builddep_freetype2_CFLAGS} 31454 thelibs=${builddep_freetype2_LIBS} 31455 if test "x$depdir" = x; then 31456 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5 31457 fi 31458 FREETYPE2=$depdir 31459 if test "x$theroot" != x; then 31460 FREETYPE2="$theroot" 31461 fi 31462 if test "x$thecflags" != x; then 31463 FREETYPE2_CFLAGS="$thecflags" 31464 fi 31465 if test "x$thelibs" != x; then 31466 FREETYPE2_LIBS="$thelibs" 31467 fi 31468 FREETYPE2_FOUND=yes 31469 else FREETYPE2_FOUND=no 31470 31471 fi 31472 else FREETYPE2_FOUND=no 31473 31474 fi 31475 31476 USING_SYSTEM_FT_LIB=true 31477 fi 31478 if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then 31479 FREETYPELOCATION="$PROGRAMFILES/GnuWin32" 31480 31481 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31482 31483 # Input might be given as Windows format, start by converting to 31484 # unix format. 31485 path="$FREETYPELOCATION" 31486 new_path=`$CYGPATH -u "$path"` 31487 31488 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 31489 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 31490 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 31491 # "foo.exe" is OK but "foo" is an error. 31492 # 31493 # This test is therefore slightly more accurate than "test -f" to check for file precense. 31494 # It is also a way to make sure we got the proper file name for the real test later on. 31495 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 31496 if test "x$test_shortpath" = x; then 31497 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 31498 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 31499 as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5 31500 fi 31501 31502 # Call helper function which possibly converts this using DOS-style short mode. 31503 # If so, the updated path is stored in $new_path. 31504 31505 input_path="$new_path" 31506 # Check if we need to convert this using DOS-style short mode. If the path 31507 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31508 # take no chances and rewrite it. 31509 # Note: m4 eats our [], so we need to use [ and ] instead. 31510 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 31511 if test "x$has_forbidden_chars" != x; then 31512 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31513 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 31514 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 31515 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 31516 # Going to short mode and back again did indeed matter. Since short mode is 31517 # case insensitive, let's make it lowercase to improve readability. 31518 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31519 # Now convert it back to Unix-stile (cygpath) 31520 input_path=`$CYGPATH -u "$shortmode_path"` 31521 new_path="$input_path" 31522 fi 31523 fi 31524 31525 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 31526 if test "x$test_cygdrive_prefix" = x; then 31527 # As a simple fix, exclude /usr/bin since it's not a real path. 31528 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 31529 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 31530 # a path prefixed by /cygdrive for fixpath to work. 31531 new_path="$CYGWIN_ROOT_PATH$input_path" 31532 fi 31533 fi 31534 31535 31536 if test "x$path" != "x$new_path"; then 31537 FREETYPELOCATION="$new_path" 31538 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 31539 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 31540 fi 31541 31542 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31543 31544 path="$FREETYPELOCATION" 31545 has_colon=`$ECHO $path | $GREP ^.:` 31546 new_path="$path" 31547 if test "x$has_colon" = x; then 31548 # Not in mixed or Windows style, start by that. 31549 new_path=`cmd //c echo $path` 31550 fi 31551 31552 31553 input_path="$new_path" 31554 # Check if we need to convert this using DOS-style short mode. If the path 31555 # contains just simple characters, use it. Otherwise (spaces, weird characters), 31556 # take no chances and rewrite it. 31557 # Note: m4 eats our [], so we need to use [ and ] instead. 31558 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 31559 if test "x$has_forbidden_chars" != x; then 31560 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 31561 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 31562 fi 31563 31564 31565 windows_path="$new_path" 31566 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 31567 unix_path=`$CYGPATH -u "$windows_path"` 31568 new_path="$unix_path" 31569 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 31570 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 31571 new_path="$unix_path" 31572 fi 31573 31574 if test "x$path" != "x$new_path"; then 31575 FREETYPELOCATION="$new_path" 31576 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 31577 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 31578 fi 31579 31580 # Save the first 10 bytes of this path to the storage, so fixpath can work. 31581 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 31582 31583 else 31584 # We're on a posix platform. Hooray! :) 31585 path="$FREETYPELOCATION" 31586 has_space=`$ECHO "$path" | $GREP " "` 31587 if test "x$has_space" != x; then 31588 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 31589 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 31590 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 31591 fi 31592 31593 # Use eval to expand a potential ~ 31594 eval path="$path" 31595 if test ! -f "$path" && test ! -d "$path"; then 31596 as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5 31597 fi 31598 31599 FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`" 31600 fi 31601 31602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5 31603 $as_echo_n "checking for freetype in some standard windows locations... " >&6; } 31604 if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then 31605 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include" 31606 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib" 31607 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib" 31608 if ! test -s "$FREETYPE2_LIBS"; then 31609 as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5 31610 fi 31611 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then 31612 as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5 31613 fi 31614 USING_SYSTEM_FT_LIB=true 31615 FREETYPE2_FOUND=yes 31616 fi 31617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 31618 $as_echo "$FREETYPE2_FOUND" >&6; } 31619 fi 31620 if test "x$FREETYPE2_FOUND" = xno; then 31621 31622 pkg_failed=no 31623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5 31624 $as_echo_n "checking for FREETYPE2... " >&6; } 31625 31626 if test -n "$FREETYPE2_CFLAGS"; then 31627 pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS" 31628 elif test -n "$PKG_CONFIG"; then 31629 if test -n "$PKG_CONFIG" && \ 31630 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 31631 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 31632 ac_status=$? 31633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31634 test $ac_status = 0; }; then 31635 pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` 31636 else 31637 pkg_failed=yes 31638 fi 31639 else 31640 pkg_failed=untried 31641 fi 31642 if test -n "$FREETYPE2_LIBS"; then 31643 pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS" 31644 elif test -n "$PKG_CONFIG"; then 31645 if test -n "$PKG_CONFIG" && \ 31646 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 31647 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 31648 ac_status=$? 31649 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31650 test $ac_status = 0; }; then 31651 pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` 31652 else 31653 pkg_failed=yes 31654 fi 31655 else 31656 pkg_failed=untried 31657 fi 31658 31659 31660 31661 if test $pkg_failed = yes; then 31662 31663 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 31664 _pkg_short_errors_supported=yes 31665 else 31666 _pkg_short_errors_supported=no 31667 fi 31668 if test $_pkg_short_errors_supported = yes; then 31669 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1` 31670 else 31671 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1` 31672 fi 31673 # Put the nasty error message in config.log where it belongs 31674 echo "$FREETYPE2_PKG_ERRORS" >&5 31675 31676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 31677 $as_echo "no" >&6; } 31678 FREETYPE2_FOUND=no 31679 elif test $pkg_failed = untried; then 31680 FREETYPE2_FOUND=no 31681 else 31682 FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS 31683 FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS 31684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 31685 $as_echo "yes" >&6; } 31686 FREETYPE2_FOUND=yes 31687 fi 31688 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. 31689 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` 31690 USING_SYSTEM_FT_LIB=true 31691 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 31692 if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 31693 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'` 31694 fi 31695 fi 31696 if test "x$FREETYPE2_FOUND" = xno; then 31697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5 31698 $as_echo_n "checking for freetype in some standard locations... " >&6; } 31699 31700 if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then 31701 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include" 31702 DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype" 31703 fi 31704 if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then 31705 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2" 31706 DEFAULT_FREETYPE_LIBS="-lfreetype" 31707 fi 31708 31709 PREV_CXXCFLAGS="$CXXFLAGS" 31710 PREV_LDFLAGS="$LDFLAGS" 31711 CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" 31712 LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" 31713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31714 /* end confdefs.h. */ 31715 #include<ft2build.h> 31716 #include FT_FREETYPE_H 31717 int main() { return 0; } 31718 31719 _ACEOF 31720 if ac_fn_cxx_try_link "$LINENO"; then : 31721 31722 # Yes, the default cflags and libs did the trick. 31723 FREETYPE2_FOUND=yes 31724 FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" 31725 FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" 31726 31727 else 31728 31729 FREETYPE2_FOUND=no 31730 31731 fi 31732 rm -f core conftest.err conftest.$ac_objext \ 31733 conftest$ac_exeext conftest.$ac_ext 31734 CXXCFLAGS="$PREV_CXXFLAGS" 31735 LDFLAGS="$PREV_LDFLAGS" 31736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 31737 $as_echo "$FREETYPE2_FOUND" >&6; } 31738 USING_SYSTEM_FT_LIB=true 31739 fi 31740 if test "x$FREETYPE2_FOUND" = xno; then 31741 31742 # Print a helpful message on how to acquire the necessary build dependency. 31743 # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc 31744 MISSING_DEPENDENCY=freetype2 31745 PKGHANDLER_COMMAND= 31746 31747 case $PKGHANDLER in 31748 apt-get) 31749 apt_help $MISSING_DEPENDENCY ;; 31750 yum) 31751 yum_help $MISSING_DEPENDENCY ;; 31752 port) 31753 port_help $MISSING_DEPENDENCY ;; 31754 pkgutil) 31755 pkgutil_help $MISSING_DEPENDENCY ;; 31756 pkgadd) 31757 pkgadd_help $MISSING_DEPENDENCY ;; 31758 * ) 31759 break ;; 31760 esac 31761 31762 if test "x$PKGHANDLER_COMMAND" != x; then 31763 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 31764 fi 31765 31766 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 31767 fi 31768 31769 if test "x$OPENJDK_TARGET_OS" != xwindows; then 31770 # AC_CHECK_LIB does not support use of cl.exe 31771 PREV_LDFLAGS="$LDFLAGS" 31772 LDFLAGS="$FREETYPE2_LIBS" 31773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5 31774 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; } 31775 if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then : 31776 $as_echo_n "(cached) " >&6 31777 else 31778 ac_check_lib_save_LIBS=$LIBS 31779 LIBS="-lfreetype $LIBS" 31780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31781 /* end confdefs.h. */ 31782 31783 /* Override any GCC internal prototype to avoid an error. 31784 Use char because int might match the return type of a GCC 31785 builtin and then its argument prototype would still apply. */ 31786 #ifdef __cplusplus 31787 extern "C" 31788 #endif 31789 char FT_Init_FreeType (); 31790 int 31791 main () 31792 { 31793 return FT_Init_FreeType (); 31794 ; 31795 return 0; 31796 } 31797 _ACEOF 31798 if ac_fn_cxx_try_link "$LINENO"; then : 31799 ac_cv_lib_freetype_FT_Init_FreeType=yes 31800 else 31801 ac_cv_lib_freetype_FT_Init_FreeType=no 31802 fi 31803 rm -f core conftest.err conftest.$ac_objext \ 31804 conftest$ac_exeext conftest.$ac_ext 31805 LIBS=$ac_check_lib_save_LIBS 31806 fi 31807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 31808 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; } 31809 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then : 31810 FREETYPE2_FOUND=true 31811 else 31812 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 31813 fi 31814 31815 LDFLAGS="$PREV_LDFLAGS" 31816 fi 31817 fi 31818 31819 31820 31821 31822 31823 31824 31825 31826 31827 ############################################################################### 31828 # 31829 # Check for alsa headers and libraries. Used on Linux/GNU systems. 31830 # 31831 31832 # Check whether --with-alsa was given. 31833 if test "${with_alsa+set}" = set; then : 31834 withval=$with_alsa; 31835 fi 31836 31837 31838 # Check whether --with-alsa-include was given. 31839 if test "${with_alsa_include+set}" = set; then : 31840 withval=$with_alsa_include; 31841 fi 31842 31843 31844 # Check whether --with-alsa-lib was given. 31845 if test "${with_alsa_lib+set}" = set; then : 31846 withval=$with_alsa_lib; 31847 fi 31848 31849 31850 if test "x$ALSA_NOT_NEEDED" = xyes; then 31851 if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then 31852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5 31853 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;} 31854 fi 31855 ALSA_CFLAGS= 31856 ALSA_LIBS= 31857 else 31858 ALSA_FOUND=no 31859 31860 if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then 31861 as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5 31862 fi 31863 31864 if test "x${with_alsa}" != x; then 31865 ALSA_LIBS="-L${with_alsa}/lib -lalsa" 31866 ALSA_CFLAGS="-I${with_alsa}/include" 31867 ALSA_FOUND=yes 31868 fi 31869 if test "x${with_alsa_include}" != x; then 31870 ALSA_CFLAGS="-I${with_alsa_include}" 31871 ALSA_FOUND=yes 31872 fi 31873 if test "x${with_alsa_lib}" != x; then 31874 ALSA_LIBS="-L${with_alsa_lib} -lalsa" 31875 ALSA_FOUND=yes 31876 fi 31877 if test "x$ALSA_FOUND" = xno; then 31878 31879 31880 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 31881 # Source the builddeps file again, to make sure it uses the latest variables! 31882 . $builddepsfile 31883 # Look for a target and build machine specific resource! 31884 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 31885 if test "x$resource" = x; then 31886 # Ok, lets instead look for a target specific resource 31887 eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}} 31888 fi 31889 if test "x$resource" = x; then 31890 # Ok, lets instead look for a build specific resource 31891 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}} 31892 fi 31893 if test "x$resource" = x; then 31894 # Ok, lets instead look for a generic resource 31895 # (The alsa comes from M4 and not the shell, thus no need for eval here.) 31896 resource=${builddep_alsa} 31897 fi 31898 if test "x$resource" != x; then 31899 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5 31900 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;} 31901 # If the resource in the builddeps.conf file is an existing directory, 31902 # for example /java/linux/cups 31903 if test -d ${resource}; then 31904 depdir=${resource} 31905 else 31906 31907 # alsa is for example mymodule 31908 # $resource is for example libs/general/libmymod_1_2_3.zip 31909 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 31910 # $with_builddeps_dir is for example /localhome/builddeps 31911 # depdir is the name of the variable into which we store the depdir, eg MYMOD 31912 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 31913 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 31914 filename=`basename $resource` 31915 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 31916 filebase=${filename%%.*} 31917 extension=${filename#*.} 31918 installdir=$with_builddeps_dir/$filebase 31919 if test ! -f $installdir/$filename.unpacked; then 31920 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5 31921 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;} 31922 if test ! -d $installdir; then 31923 mkdir -p $installdir 31924 fi 31925 if test ! -d $installdir; then 31926 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 31927 fi 31928 tmpfile=`mktemp $installdir/alsa.XXXXXXXXX` 31929 touch $tmpfile 31930 if test ! -f $tmpfile; then 31931 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 31932 fi 31933 31934 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 31935 # $tmpfile is the local file name for the downloaded file. 31936 VALID_TOOL=no 31937 if test "x$BDEPS_FTP" = xwget; then 31938 VALID_TOOL=yes 31939 wget -O $tmpfile $with_builddeps_server/$resource 31940 fi 31941 if test "x$BDEPS_FTP" = xlftp; then 31942 VALID_TOOL=yes 31943 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 31944 fi 31945 if test "x$BDEPS_FTP" = xftp; then 31946 VALID_TOOL=yes 31947 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 31948 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 31949 FTPUSERPWD=${FTPSERVER%%@*} 31950 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 31951 FTPUSER=${userpwd%%:*} 31952 FTPPWD=${userpwd#*@} 31953 FTPSERVER=${FTPSERVER#*@} 31954 else 31955 FTPUSER=ftp 31956 FTPPWD=ftp 31957 fi 31958 # the "pass" command does not work on some 31959 # ftp clients (read ftp.exe) but if it works, 31960 # passive mode is better! 31961 (\ 31962 echo "user $FTPUSER $FTPPWD" ;\ 31963 echo "pass" ;\ 31964 echo "bin" ;\ 31965 echo "get $FTPPATH $tmpfile" ;\ 31966 ) | ftp -in $FTPSERVER 31967 fi 31968 if test "x$VALID_TOOL" != xyes; then 31969 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 31970 fi 31971 31972 mv $tmpfile $installdir/$filename 31973 if test ! -s $installdir/$filename; then 31974 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 31975 fi 31976 case "$extension" in 31977 zip) echo "Unzipping $installdir/$filename..." 31978 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 31979 ;; 31980 tar.gz) echo "Untaring $installdir/$filename..." 31981 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31982 ;; 31983 tgz) echo "Untaring $installdir/$filename..." 31984 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31985 ;; 31986 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 31987 ;; 31988 esac 31989 fi 31990 if test -f $installdir/$filename.unpacked; then 31991 depdir=$installdir 31992 fi 31993 31994 fi 31995 # Source the builddeps file again, because in the previous command, the depdir 31996 # was updated to point at the current build dependency install directory. 31997 . $builddepsfile 31998 # Now extract variables from the builddeps.conf files. 31999 theroot=${builddep_alsa_ROOT} 32000 thecflags=${builddep_alsa_CFLAGS} 32001 thelibs=${builddep_alsa_LIBS} 32002 if test "x$depdir" = x; then 32003 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5 32004 fi 32005 ALSA=$depdir 32006 if test "x$theroot" != x; then 32007 ALSA="$theroot" 32008 fi 32009 if test "x$thecflags" != x; then 32010 ALSA_CFLAGS="$thecflags" 32011 fi 32012 if test "x$thelibs" != x; then 32013 ALSA_LIBS="$thelibs" 32014 fi 32015 ALSA_FOUND=yes 32016 else ALSA_FOUND=no 32017 32018 fi 32019 else ALSA_FOUND=no 32020 32021 fi 32022 32023 fi 32024 if test "x$ALSA_FOUND" = xno; then 32025 32026 pkg_failed=no 32027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5 32028 $as_echo_n "checking for ALSA... " >&6; } 32029 32030 if test -n "$ALSA_CFLAGS"; then 32031 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" 32032 elif test -n "$PKG_CONFIG"; then 32033 if test -n "$PKG_CONFIG" && \ 32034 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 32035 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 32036 ac_status=$? 32037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32038 test $ac_status = 0; }; then 32039 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` 32040 else 32041 pkg_failed=yes 32042 fi 32043 else 32044 pkg_failed=untried 32045 fi 32046 if test -n "$ALSA_LIBS"; then 32047 pkg_cv_ALSA_LIBS="$ALSA_LIBS" 32048 elif test -n "$PKG_CONFIG"; then 32049 if test -n "$PKG_CONFIG" && \ 32050 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 32051 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 32052 ac_status=$? 32053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32054 test $ac_status = 0; }; then 32055 pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` 32056 else 32057 pkg_failed=yes 32058 fi 32059 else 32060 pkg_failed=untried 32061 fi 32062 32063 32064 32065 if test $pkg_failed = yes; then 32066 32067 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 32068 _pkg_short_errors_supported=yes 32069 else 32070 _pkg_short_errors_supported=no 32071 fi 32072 if test $_pkg_short_errors_supported = yes; then 32073 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1` 32074 else 32075 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1` 32076 fi 32077 # Put the nasty error message in config.log where it belongs 32078 echo "$ALSA_PKG_ERRORS" >&5 32079 32080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32081 $as_echo "no" >&6; } 32082 ALSA_FOUND=no 32083 elif test $pkg_failed = untried; then 32084 ALSA_FOUND=no 32085 else 32086 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS 32087 ALSA_LIBS=$pkg_cv_ALSA_LIBS 32088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32089 $as_echo "yes" >&6; } 32090 ALSA_FOUND=yes 32091 fi 32092 fi 32093 if test "x$ALSA_FOUND" = xno; then 32094 for ac_header in alsa/asoundlib.h 32095 do : 32096 ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default" 32097 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then : 32098 cat >>confdefs.h <<_ACEOF 32099 #define HAVE_ALSA_ASOUNDLIB_H 1 32100 _ACEOF 32101 ALSA_FOUND=yes 32102 ALSA_CFLAGS=-Iignoreme 32103 ALSA_LIBS=-lasound 32104 DEFAULT_ALSA=yes 32105 else 32106 ALSA_FOUND=no 32107 fi 32108 32109 done 32110 32111 fi 32112 if test "x$ALSA_FOUND" = xno; then 32113 32114 # Print a helpful message on how to acquire the necessary build dependency. 32115 # alsa is the help tag: freetyp2, cups, pulse, alsa etc 32116 MISSING_DEPENDENCY=alsa 32117 PKGHANDLER_COMMAND= 32118 32119 case $PKGHANDLER in 32120 apt-get) 32121 apt_help $MISSING_DEPENDENCY ;; 32122 yum) 32123 yum_help $MISSING_DEPENDENCY ;; 32124 port) 32125 port_help $MISSING_DEPENDENCY ;; 32126 pkgutil) 32127 pkgutil_help $MISSING_DEPENDENCY ;; 32128 pkgadd) 32129 pkgadd_help $MISSING_DEPENDENCY ;; 32130 * ) 32131 break ;; 32132 esac 32133 32134 if test "x$PKGHANDLER_COMMAND" != x; then 32135 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 32136 fi 32137 32138 as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5 32139 fi 32140 fi 32141 32142 32143 32144 32145 32146 32147 32148 ############################################################################### 32149 # 32150 # Check for the jpeg library 32151 # 32152 32153 USE_EXTERNAL_LIBJPEG=true 32154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 32155 $as_echo_n "checking for main in -ljpeg... " >&6; } 32156 if ${ac_cv_lib_jpeg_main+:} false; then : 32157 $as_echo_n "(cached) " >&6 32158 else 32159 ac_check_lib_save_LIBS=$LIBS 32160 LIBS="-ljpeg $LIBS" 32161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32162 /* end confdefs.h. */ 32163 32164 32165 int 32166 main () 32167 { 32168 return main (); 32169 ; 32170 return 0; 32171 } 32172 _ACEOF 32173 if ac_fn_cxx_try_link "$LINENO"; then : 32174 ac_cv_lib_jpeg_main=yes 32175 else 32176 ac_cv_lib_jpeg_main=no 32177 fi 32178 rm -f core conftest.err conftest.$ac_objext \ 32179 conftest$ac_exeext conftest.$ac_ext 32180 LIBS=$ac_check_lib_save_LIBS 32181 fi 32182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5 32183 $as_echo "$ac_cv_lib_jpeg_main" >&6; } 32184 if test "x$ac_cv_lib_jpeg_main" = xyes; then : 32185 cat >>confdefs.h <<_ACEOF 32186 #define HAVE_LIBJPEG 1 32187 _ACEOF 32188 32189 LIBS="-ljpeg $LIBS" 32190 32191 else 32192 USE_EXTERNAL_LIBJPEG=false 32193 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5 32194 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;} 32195 32196 fi 32197 32198 32199 32200 ############################################################################### 32201 # 32202 # Check for the gif library 32203 # 32204 32205 32206 # Check whether --with-giflib was given. 32207 if test "${with_giflib+set}" = set; then : 32208 withval=$with_giflib; 32209 fi 32210 32211 32212 32213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5 32214 $as_echo_n "checking for which giflib to use... " >&6; } 32215 32216 # default is bundled 32217 DEFAULT_GIFLIB=bundled 32218 32219 # 32220 # if user didn't specify, use DEFAULT_GIFLIB 32221 # 32222 if test "x${with_giflib}" = "x"; then 32223 with_giflib=${DEFAULT_GIFLIB} 32224 fi 32225 32226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5 32227 $as_echo "${with_giflib}" >&6; } 32228 32229 if test "x${with_giflib}" = "xbundled"; then 32230 USE_EXTERNAL_LIBGIF=false 32231 elif test "x${with_giflib}" = "xsystem"; then 32232 ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" 32233 if test "x$ac_cv_header_gif_lib_h" = xyes; then : 32234 32235 else 32236 as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5 32237 fi 32238 32239 32240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5 32241 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; } 32242 if ${ac_cv_lib_gif_DGifGetCode+:} false; then : 32243 $as_echo_n "(cached) " >&6 32244 else 32245 ac_check_lib_save_LIBS=$LIBS 32246 LIBS="-lgif $LIBS" 32247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32248 /* end confdefs.h. */ 32249 32250 /* Override any GCC internal prototype to avoid an error. 32251 Use char because int might match the return type of a GCC 32252 builtin and then its argument prototype would still apply. */ 32253 #ifdef __cplusplus 32254 extern "C" 32255 #endif 32256 char DGifGetCode (); 32257 int 32258 main () 32259 { 32260 return DGifGetCode (); 32261 ; 32262 return 0; 32263 } 32264 _ACEOF 32265 if ac_fn_cxx_try_link "$LINENO"; then : 32266 ac_cv_lib_gif_DGifGetCode=yes 32267 else 32268 ac_cv_lib_gif_DGifGetCode=no 32269 fi 32270 rm -f core conftest.err conftest.$ac_objext \ 32271 conftest$ac_exeext conftest.$ac_ext 32272 LIBS=$ac_check_lib_save_LIBS 32273 fi 32274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5 32275 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; } 32276 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then : 32277 cat >>confdefs.h <<_ACEOF 32278 #define HAVE_LIBGIF 1 32279 _ACEOF 32280 32281 LIBS="-lgif $LIBS" 32282 32283 else 32284 as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5 32285 fi 32286 32287 32288 USE_EXTERNAL_LIBGIF=true 32289 else 32290 as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5 32291 fi 32292 32293 32294 ############################################################################### 32295 # 32296 # Check for the zlib library 32297 # 32298 32299 32300 # Check whether --with-zlib was given. 32301 if test "${with_zlib+set}" = set; then : 32302 withval=$with_zlib; 32303 fi 32304 32305 32306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 32307 $as_echo_n "checking for compress in -lz... " >&6; } 32308 if ${ac_cv_lib_z_compress+:} false; then : 32309 $as_echo_n "(cached) " >&6 32310 else 32311 ac_check_lib_save_LIBS=$LIBS 32312 LIBS="-lz $LIBS" 32313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32314 /* end confdefs.h. */ 32315 32316 /* Override any GCC internal prototype to avoid an error. 32317 Use char because int might match the return type of a GCC 32318 builtin and then its argument prototype would still apply. */ 32319 #ifdef __cplusplus 32320 extern "C" 32321 #endif 32322 char compress (); 32323 int 32324 main () 32325 { 32326 return compress (); 32327 ; 32328 return 0; 32329 } 32330 _ACEOF 32331 if ac_fn_cxx_try_link "$LINENO"; then : 32332 ac_cv_lib_z_compress=yes 32333 else 32334 ac_cv_lib_z_compress=no 32335 fi 32336 rm -f core conftest.err conftest.$ac_objext \ 32337 conftest$ac_exeext conftest.$ac_ext 32338 LIBS=$ac_check_lib_save_LIBS 32339 fi 32340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 32341 $as_echo "$ac_cv_lib_z_compress" >&6; } 32342 if test "x$ac_cv_lib_z_compress" = xyes; then : 32343 ZLIB_FOUND=yes 32344 else 32345 ZLIB_FOUND=no 32346 fi 32347 32348 32349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5 32350 $as_echo_n "checking for which zlib to use... " >&6; } 32351 32352 DEFAULT_ZLIB=bundled 32353 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 32354 # 32355 # On macosx default is system...on others default is 32356 # 32357 DEFAULT_ZLIB=system 32358 fi 32359 32360 if test "x${ZLIB_FOUND}" != "xyes"; then 32361 # 32362 # If we don't find any system...set default to bundled 32363 # 32364 DEFAULT_ZLIB=bundled 32365 fi 32366 32367 # 32368 # If user didn't specify, use DEFAULT_ZLIB 32369 # 32370 if test "x${with_zlib}" = "x"; then 32371 with_zlib=${DEFAULT_ZLIB} 32372 fi 32373 32374 if test "x${with_zlib}" = "xbundled"; then 32375 USE_EXTERNAL_LIBZ=false 32376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5 32377 $as_echo "bundled" >&6; } 32378 elif test "x${with_zlib}" = "xsystem"; then 32379 if test "x${ZLIB_FOUND}" = "xyes"; then 32380 USE_EXTERNAL_LIBZ=true 32381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 32382 $as_echo "system" >&6; } 32383 else 32384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5 32385 $as_echo "system not found" >&6; } 32386 as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5 32387 fi 32388 else 32389 as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5 32390 fi 32391 32392 32393 32394 ############################################################################### 32395 LIBZIP_CAN_USE_MMAP=true 32396 32397 32398 32399 ############################################################################### 32400 # 32401 # Check if altzone exists in time.h 32402 # 32403 32404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32405 /* end confdefs.h. */ 32406 #include <time.h> 32407 int 32408 main () 32409 { 32410 return (int)altzone; 32411 ; 32412 return 0; 32413 } 32414 _ACEOF 32415 if ac_fn_cxx_try_link "$LINENO"; then : 32416 has_altzone=yes 32417 else 32418 has_altzone=no 32419 fi 32420 rm -f core conftest.err conftest.$ac_objext \ 32421 conftest$ac_exeext conftest.$ac_ext 32422 if test "x$has_altzone" = xyes; then 32423 32424 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h 32425 32426 fi 32427 32428 ############################################################################### 32429 # 32430 # Check the maths library 32431 # 32432 32433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 32434 $as_echo_n "checking for cos in -lm... " >&6; } 32435 if ${ac_cv_lib_m_cos+:} false; then : 32436 $as_echo_n "(cached) " >&6 32437 else 32438 ac_check_lib_save_LIBS=$LIBS 32439 LIBS="-lm $LIBS" 32440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32441 /* end confdefs.h. */ 32442 32443 /* Override any GCC internal prototype to avoid an error. 32444 Use char because int might match the return type of a GCC 32445 builtin and then its argument prototype would still apply. */ 32446 #ifdef __cplusplus 32447 extern "C" 32448 #endif 32449 char cos (); 32450 int 32451 main () 32452 { 32453 return cos (); 32454 ; 32455 return 0; 32456 } 32457 _ACEOF 32458 if ac_fn_cxx_try_link "$LINENO"; then : 32459 ac_cv_lib_m_cos=yes 32460 else 32461 ac_cv_lib_m_cos=no 32462 fi 32463 rm -f core conftest.err conftest.$ac_objext \ 32464 conftest$ac_exeext conftest.$ac_ext 32465 LIBS=$ac_check_lib_save_LIBS 32466 fi 32467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 32468 $as_echo "$ac_cv_lib_m_cos" >&6; } 32469 if test "x$ac_cv_lib_m_cos" = xyes; then : 32470 cat >>confdefs.h <<_ACEOF 32471 #define HAVE_LIBM 1 32472 _ACEOF 32473 32474 LIBS="-lm $LIBS" 32475 32476 else 32477 32478 { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5 32479 $as_echo "$as_me: Maths library was not found" >&6;} 32480 32481 fi 32482 32483 32484 32485 ############################################################################### 32486 # 32487 # Check for libdl.so 32488 32489 save_LIBS="$LIBS" 32490 LIBS="" 32491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 32492 $as_echo_n "checking for dlopen in -ldl... " >&6; } 32493 if ${ac_cv_lib_dl_dlopen+:} false; then : 32494 $as_echo_n "(cached) " >&6 32495 else 32496 ac_check_lib_save_LIBS=$LIBS 32497 LIBS="-ldl $LIBS" 32498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32499 /* end confdefs.h. */ 32500 32501 /* Override any GCC internal prototype to avoid an error. 32502 Use char because int might match the return type of a GCC 32503 builtin and then its argument prototype would still apply. */ 32504 #ifdef __cplusplus 32505 extern "C" 32506 #endif 32507 char dlopen (); 32508 int 32509 main () 32510 { 32511 return dlopen (); 32512 ; 32513 return 0; 32514 } 32515 _ACEOF 32516 if ac_fn_cxx_try_link "$LINENO"; then : 32517 ac_cv_lib_dl_dlopen=yes 32518 else 32519 ac_cv_lib_dl_dlopen=no 32520 fi 32521 rm -f core conftest.err conftest.$ac_objext \ 32522 conftest$ac_exeext conftest.$ac_ext 32523 LIBS=$ac_check_lib_save_LIBS 32524 fi 32525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 32526 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } 32527 if test "x$ac_cv_lib_dl_dlopen" = xyes; then : 32528 cat >>confdefs.h <<_ACEOF 32529 #define HAVE_LIBDL 1 32530 _ACEOF 32531 32532 LIBS="-ldl $LIBS" 32533 32534 fi 32535 32536 LIBDL="$LIBS" 32537 32538 LIBS="$save_LIBS" 32539 32540 32541 32542 ############################################################################### 32543 # 32544 # statically link libstdc++ before C++ ABI is stablized on Linux unless 32545 # dynamic build is configured on command line. 32546 # 32547 32548 # Check whether --with-stdc++lib was given. 32549 if test "${with_stdc__lib+set}" = set; then : 32550 withval=$with_stdc__lib; 32551 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ 32552 && test "x$with_stdc__lib" != xdefault; then 32553 as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5 32554 fi 32555 32556 else 32557 with_stdc__lib=default 32558 32559 fi 32560 32561 32562 if test "x$OPENJDK_TARGET_OS" = xlinux; then 32563 # Test if -lstdc++ works. 32564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5 32565 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; } 32566 ac_ext=cpp 32567 ac_cpp='$CXXCPP $CPPFLAGS' 32568 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32569 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32570 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32571 32572 OLD_CXXFLAGS="$CXXFLAGS" 32573 CXXFLAGS="$CXXFLAGS -lstdc++" 32574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32575 /* end confdefs.h. */ 32576 32577 int 32578 main () 32579 { 32580 return 0; 32581 ; 32582 return 0; 32583 } 32584 _ACEOF 32585 if ac_fn_cxx_try_link "$LINENO"; then : 32586 has_dynamic_libstdcxx=yes 32587 else 32588 has_dynamic_libstdcxx=no 32589 fi 32590 rm -f core conftest.err conftest.$ac_objext \ 32591 conftest$ac_exeext conftest.$ac_ext 32592 CXXFLAGS="$OLD_CXXFLAGS" 32593 ac_ext=cpp 32594 ac_cpp='$CXXCPP $CPPFLAGS' 32595 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32596 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32597 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32598 32599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5 32600 $as_echo "$has_dynamic_libstdcxx" >&6; } 32601 32602 # Test if stdc++ can be linked statically. 32603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5 32604 $as_echo_n "checking if static link of stdc++ is possible... " >&6; } 32605 STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" 32606 ac_ext=cpp 32607 ac_cpp='$CXXCPP $CPPFLAGS' 32608 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32609 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32610 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32611 32612 OLD_LIBS="$LIBS" 32613 OLD_CXX="$CXX" 32614 LIBS="$STATIC_STDCXX_FLAGS" 32615 CXX="$CC" 32616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32617 /* end confdefs.h. */ 32618 32619 int 32620 main () 32621 { 32622 return 0; 32623 ; 32624 return 0; 32625 } 32626 _ACEOF 32627 if ac_fn_cxx_try_link "$LINENO"; then : 32628 has_static_libstdcxx=yes 32629 else 32630 has_static_libstdcxx=no 32631 fi 32632 rm -f core conftest.err conftest.$ac_objext \ 32633 conftest$ac_exeext conftest.$ac_ext 32634 LIBS="$OLD_LIBS" 32635 CXX="$OLD_CXX" 32636 ac_ext=cpp 32637 ac_cpp='$CXXCPP $CPPFLAGS' 32638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32641 32642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5 32643 $as_echo "$has_static_libstdcxx" >&6; } 32644 32645 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then 32646 as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5 32647 fi 32648 32649 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then 32650 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5 32651 fi 32652 32653 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then 32654 as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5 32655 fi 32656 32657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5 32658 $as_echo_n "checking how to link with libstdc++... " >&6; } 32659 # If dynamic was requested, it's available since it would fail above otherwise. 32660 # If dynamic wasn't requested, go with static unless it isn't available. 32661 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32662 LIBCXX="$LIBCXX -lstdc++" 32663 LDCXX="$CXX" 32664 STATIC_CXX_SETTING="STATIC_CXX=false" 32665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5 32666 $as_echo "dynamic" >&6; } 32667 else 32668 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" 32669 LDCXX="$CC" 32670 STATIC_CXX_SETTING="STATIC_CXX=true" 32671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 32672 $as_echo "static" >&6; } 32673 fi 32674 fi 32675 32676 32677 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32678 # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS 32679 32680 pkg_failed=no 32681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5 32682 $as_echo_n "checking for LIBFFI... " >&6; } 32683 32684 if test -n "$LIBFFI_CFLAGS"; then 32685 pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS" 32686 elif test -n "$PKG_CONFIG"; then 32687 if test -n "$PKG_CONFIG" && \ 32688 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 32689 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 32690 ac_status=$? 32691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32692 test $ac_status = 0; }; then 32693 pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null` 32694 else 32695 pkg_failed=yes 32696 fi 32697 else 32698 pkg_failed=untried 32699 fi 32700 if test -n "$LIBFFI_LIBS"; then 32701 pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS" 32702 elif test -n "$PKG_CONFIG"; then 32703 if test -n "$PKG_CONFIG" && \ 32704 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 32705 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 32706 ac_status=$? 32707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32708 test $ac_status = 0; }; then 32709 pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null` 32710 else 32711 pkg_failed=yes 32712 fi 32713 else 32714 pkg_failed=untried 32715 fi 32716 32717 32718 32719 if test $pkg_failed = yes; then 32720 32721 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 32722 _pkg_short_errors_supported=yes 32723 else 32724 _pkg_short_errors_supported=no 32725 fi 32726 if test $_pkg_short_errors_supported = yes; then 32727 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1` 32728 else 32729 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1` 32730 fi 32731 # Put the nasty error message in config.log where it belongs 32732 echo "$LIBFFI_PKG_ERRORS" >&5 32733 32734 as_fn_error $? "Package requirements (libffi) were not met: 32735 32736 $LIBFFI_PKG_ERRORS 32737 32738 Consider adjusting the PKG_CONFIG_PATH environment variable if you 32739 installed software in a non-standard prefix. 32740 32741 Alternatively, you may set the environment variables LIBFFI_CFLAGS 32742 and LIBFFI_LIBS to avoid the need to call pkg-config. 32743 See the pkg-config man page for more details. 32744 " "$LINENO" 5 32745 elif test $pkg_failed = untried; then 32746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 32747 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 32748 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 32749 is in your PATH or set the PKG_CONFIG environment variable to the full 32750 path to pkg-config. 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 32756 To get pkg-config, see <http://pkg-config.freedesktop.org/>. 32757 See \`config.log' for more details" "$LINENO" 5; } 32758 else 32759 LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS 32760 LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS 32761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32762 $as_echo "yes" >&6; } 32763 : 32764 fi 32765 32766 fi 32767 32768 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32769 # Extract the first word of "llvm-config", so it can be a program name with args. 32770 set dummy llvm-config; ac_word=$2 32771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 32772 $as_echo_n "checking for $ac_word... " >&6; } 32773 if ${ac_cv_prog_LLVM_CONFIG+:} false; then : 32774 $as_echo_n "(cached) " >&6 32775 else 32776 if test -n "$LLVM_CONFIG"; then 32777 ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test. 32778 else 32779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 32780 for as_dir in $PATH 32781 do 32782 IFS=$as_save_IFS 32783 test -z "$as_dir" && as_dir=. 32784 for ac_exec_ext in '' $ac_executable_extensions; do 32785 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 32786 ac_cv_prog_LLVM_CONFIG="llvm-config" 32787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 32788 break 2 32789 fi 32790 done 32791 done 32792 IFS=$as_save_IFS 32793 32794 fi 32795 fi 32796 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG 32797 if test -n "$LLVM_CONFIG"; then 32798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5 32799 $as_echo "$LLVM_CONFIG" >&6; } 32800 else 32801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32802 $as_echo "no" >&6; } 32803 fi 32804 32805 32806 32807 if test "x$LLVM_CONFIG" != xllvm-config; then 32808 as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5 32809 fi 32810 32811 llvm_components="jit mcjit engine nativecodegen native" 32812 unset LLVM_CFLAGS 32813 for flag in $("$LLVM_CONFIG" --cxxflags); do 32814 if echo "${flag}" | grep -q '^-[ID]'; then 32815 if test "${flag}" != "-D_DEBUG" ; then 32816 if test "${LLVM_CFLAGS}" != "" ; then 32817 LLVM_CFLAGS="${LLVM_CFLAGS} " 32818 fi 32819 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" 32820 fi 32821 fi 32822 done 32823 llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') 32824 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" 32825 32826 unset LLVM_LDFLAGS 32827 for flag in $("${LLVM_CONFIG}" --ldflags); do 32828 if echo "${flag}" | grep -q '^-L'; then 32829 if test "${LLVM_LDFLAGS}" != ""; then 32830 LLVM_LDFLAGS="${LLVM_LDFLAGS} " 32831 fi 32832 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" 32833 fi 32834 done 32835 32836 unset LLVM_LIBS 32837 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do 32838 if echo "${flag}" | grep -q '^-l'; then 32839 if test "${LLVM_LIBS}" != ""; then 32840 LLVM_LIBS="${LLVM_LIBS} " 32841 fi 32842 LLVM_LIBS="${LLVM_LIBS}${flag}" 32843 fi 32844 done 32845 32846 32847 32848 32849 fi 32850 32851 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) 32852 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then 32853 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" 32854 fi 32855 32856 # TODO better (platform agnostic) test 32857 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then 32858 LIBCXX="-lstdc++" 32859 fi 32860 32861 32862 32863 32864 32865 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper 32866 32867 # When using cygwin or msys, we need a wrapper binary that renames 32868 # /cygdrive/c/ arguments into c:/ arguments and peeks into 32869 # @files and rewrites these too! This wrapper binary is 32870 # called fixpath. 32871 FIXPATH= 32872 if test "x$OPENJDK_BUILD_OS" = xwindows; then 32873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5 32874 $as_echo_n "checking if fixpath can be created... " >&6; } 32875 FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" 32876 FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe" 32877 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 32878 FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC` 32879 FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN` 32880 # Important to keep the .exe suffix on Cygwin for Hotspot makefiles 32881 FIXPATH="$OUTPUT_ROOT/fixpath.exe -c" 32882 elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then 32883 FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC` 32884 FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN` 32885 32886 # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line 32887 # @ was chosen as separator to minimize risk of other tools messing around with it 32888 all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq` 32889 fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` 32890 32891 FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list" 32892 fi 32893 rm -f $OUTPUT_ROOT/fixpath* 32894 cd $OUTPUT_ROOT 32895 $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1 32896 cd $CURDIR 32897 32898 if test ! -x $OUTPUT_ROOT/fixpath.exe; then 32899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32900 $as_echo "no" >&6; } 32901 cat $OUTPUT_ROOT/fixpath1.log 32902 as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5 32903 fi 32904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32905 $as_echo "yes" >&6; } 32906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5 32907 $as_echo_n "checking if fixpath.exe works... " >&6; } 32908 cd $OUTPUT_ROOT 32909 $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 32910 cd $CURDIR 32911 if test ! -x $OUTPUT_ROOT/fixpath2.exe; then 32912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32913 $as_echo "no" >&6; } 32914 cat $OUTPUT_ROOT/fixpath2.log 32915 as_fn_error $? "fixpath did not work!" "$LINENO" 5 32916 fi 32917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32918 $as_echo "yes" >&6; } 32919 rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj 32920 fi 32921 32922 32923 32924 32925 ############################################################################### 32926 # 32927 # We need to do some final tweaking, when everything else is done. 32928 # 32929 ############################################################################### 32930 32931 32932 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" 32933 32934 32935 # The name of the Service Agent jar. 32936 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" 32937 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 32938 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" 32939 fi 32940 32941 32942 32943 32944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5 32945 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; } 32946 32947 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then 32948 ENABLE_INTREE_EC=yes 32949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32950 $as_echo "yes" >&6; } 32951 else 32952 ENABLE_INTREE_EC=no 32953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32954 $as_echo "no" >&6; } 32955 fi 32956 32957 32958 32959 32960 ############################################################################### 32961 # 32962 # Configure parts of the build that only affect the build performance, 32963 # not the result. 32964 # 32965 ############################################################################### 32966 32967 32968 # How many cores do we have on this build system? 32969 32970 # Check whether --with-num-cores was given. 32971 if test "${with_num_cores+set}" = set; then : 32972 withval=$with_num_cores; 32973 fi 32974 32975 if test "x$with_num_cores" = x; then 32976 # The number of cores were not specified, try to probe them. 32977 32978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5 32979 $as_echo_n "checking for number of cores... " >&6; } 32980 NUM_CORES=1 32981 FOUND_CORES=no 32982 32983 if test -f /proc/cpuinfo; then 32984 # Looks like a Linux (or cygwin) system 32985 NUM_CORES=`cat /proc/cpuinfo | grep -c processor` 32986 FOUND_CORES=yes 32987 elif test -x /usr/sbin/psrinfo; then 32988 # Looks like a Solaris system 32989 NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line` 32990 FOUND_CORES=yes 32991 elif test -x /usr/sbin/system_profiler; then 32992 # Looks like a MacOSX system 32993 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'` 32994 FOUND_CORES=yes 32995 elif test -n "$NUMBER_OF_PROCESSORS"; then 32996 # On windows, look in the env 32997 NUM_CORES=$NUMBER_OF_PROCESSORS 32998 FOUND_CORES=yes 32999 fi 33000 33001 if test "x$FOUND_CORES" = xyes; then 33002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5 33003 $as_echo "$NUM_CORES" >&6; } 33004 else 33005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5 33006 $as_echo "could not detect number of cores, defaulting to 1" >&6; } 33007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5 33008 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;} 33009 fi 33010 33011 33012 else 33013 NUM_CORES=$with_num_cores 33014 fi 33015 33016 33017 33018 # How much memory do we have on this build system? 33019 33020 # Check whether --with-memory-size was given. 33021 if test "${with_memory_size+set}" = set; then : 33022 withval=$with_memory_size; 33023 fi 33024 33025 if test "x$with_memory_size" = x; then 33026 # The memory size was not specified, try to probe it. 33027 33028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5 33029 $as_echo_n "checking for memory size... " >&6; } 33030 # Default to 1024 MB 33031 MEMORY_SIZE=1024 33032 FOUND_MEM=no 33033 33034 if test -f /proc/meminfo; then 33035 # Looks like a Linux (or cygwin) system 33036 MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'` 33037 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024` 33038 FOUND_MEM=yes 33039 elif test -x /usr/sbin/prtconf; then 33040 # Looks like a Solaris system 33041 MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'` 33042 FOUND_MEM=yes 33043 elif test -x /usr/sbin/system_profiler; then 33044 # Looks like a MacOSX system 33045 MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'` 33046 MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024` 33047 FOUND_MEM=yes 33048 elif test "x$OPENJDK_BUILD_OS" = xwindows; then 33049 # Windows, but without cygwin 33050 MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-` 33051 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024` 33052 FOUND_MEM=yes 33053 fi 33054 33055 if test "x$FOUND_MEM" = xyes; then 33056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5 33057 $as_echo "$MEMORY_SIZE MB" >&6; } 33058 else 33059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5 33060 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; } 33061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5 33062 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;} 33063 fi 33064 33065 else 33066 MEMORY_SIZE=$with_memory_size 33067 fi 33068 33069 33070 33071 # Provide a decent default number of parallel jobs for make depending on 33072 # number of cores, amount of memory and machine architecture. 33073 33074 # Check whether --with-jobs was given. 33075 if test "${with_jobs+set}" = set; then : 33076 withval=$with_jobs; 33077 fi 33078 33079 if test "x$with_jobs" = x; then 33080 # Number of jobs was not specified, calculate. 33081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5 33082 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; } 33083 # Approximate memory in GB, rounding up a bit. 33084 memory_gb=`expr $MEMORY_SIZE / 1100` 33085 # Pick the lowest of memory in gb and number of cores. 33086 if test "$memory_gb" -lt "$NUM_CORES"; then 33087 JOBS="$memory_gb" 33088 else 33089 JOBS="$NUM_CORES" 33090 # On bigger machines, leave some room for other processes to run 33091 if test "$JOBS" -gt "4"; then 33092 JOBS=`expr $JOBS '*' 90 / 100` 33093 fi 33094 fi 33095 # Cap number of jobs to 16 33096 if test "$JOBS" -gt "16"; then 33097 JOBS=16 33098 fi 33099 if test "$JOBS" -eq "0"; then 33100 JOBS=1 33101 fi 33102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5 33103 $as_echo "$JOBS" >&6; } 33104 else 33105 JOBS=$with_jobs 33106 fi 33107 33108 33109 33110 # Setup smart javac (after cores and memory have been setup) 33111 33112 33113 # Check whether --with-sjavac-server-java was given. 33114 if test "${with_sjavac_server_java+set}" = set; then : 33115 withval=$with_sjavac_server_java; 33116 fi 33117 33118 33119 if test "x$with_sjavac_server_java" != x; then 33120 SJAVAC_SERVER_JAVA="$with_sjavac_server_java" 33121 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""` 33122 if test "x$FOUND_VERSION" = x; then 33123 as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5 33124 fi 33125 else 33126 SJAVAC_SERVER_JAVA="" 33127 # Hotspot specific options. 33128 33129 $ECHO "Check if jvm arg is ok: -verbosegc" >&5 33130 $ECHO "Command: $JAVA -verbosegc -version" >&5 33131 OUTPUT=`$JAVA -verbosegc -version 2>&1` 33132 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33133 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33134 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33135 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc" 33136 JVM_ARG_OK=true 33137 else 33138 $ECHO "Arg failed:" >&5 33139 $ECHO "$OUTPUT" >&5 33140 JVM_ARG_OK=false 33141 fi 33142 33143 # JRockit specific options. 33144 33145 $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5 33146 $ECHO "Command: $JAVA -Xverbose:gc -version" >&5 33147 OUTPUT=`$JAVA -Xverbose:gc -version 2>&1` 33148 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33149 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33150 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33151 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc" 33152 JVM_ARG_OK=true 33153 else 33154 $ECHO "Arg failed:" >&5 33155 $ECHO "$OUTPUT" >&5 33156 JVM_ARG_OK=false 33157 fi 33158 33159 SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA" 33160 fi 33161 33162 33163 if test "$MEMORY_SIZE" -gt "2500"; then 33164 33165 $ECHO "Check if jvm arg is ok: -d64" >&5 33166 $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5 33167 OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1` 33168 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33169 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33170 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33171 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" 33172 JVM_ARG_OK=true 33173 else 33174 $ECHO "Arg failed:" >&5 33175 $ECHO "$OUTPUT" >&5 33176 JVM_ARG_OK=false 33177 fi 33178 33179 if test "$JVM_ARG_OK" = true; then 33180 JVM_64BIT=true 33181 JVM_ARG_OK=false 33182 fi 33183 fi 33184 33185 if test "$JVM_64BIT" = true; then 33186 if test "$MEMORY_SIZE" -gt "17000"; then 33187 33188 $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5 33189 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5 33190 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1` 33191 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33192 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33193 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33194 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G" 33195 JVM_ARG_OK=true 33196 else 33197 $ECHO "Arg failed:" >&5 33198 $ECHO "$OUTPUT" >&5 33199 JVM_ARG_OK=false 33200 fi 33201 33202 fi 33203 if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then 33204 33205 $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5 33206 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5 33207 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1` 33208 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33209 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33210 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33211 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G" 33212 JVM_ARG_OK=true 33213 else 33214 $ECHO "Arg failed:" >&5 33215 $ECHO "$OUTPUT" >&5 33216 JVM_ARG_OK=false 33217 fi 33218 33219 fi 33220 if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then 33221 33222 $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5 33223 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5 33224 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1` 33225 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33226 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33227 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33228 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G" 33229 JVM_ARG_OK=true 33230 else 33231 $ECHO "Arg failed:" >&5 33232 $ECHO "$OUTPUT" >&5 33233 JVM_ARG_OK=false 33234 fi 33235 33236 fi 33237 if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then 33238 33239 $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5 33240 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5 33241 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1` 33242 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33243 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33244 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33245 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M" 33246 JVM_ARG_OK=true 33247 else 33248 $ECHO "Arg failed:" >&5 33249 $ECHO "$OUTPUT" >&5 33250 JVM_ARG_OK=false 33251 fi 33252 33253 fi 33254 fi 33255 if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then 33256 33257 $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5 33258 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5 33259 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1` 33260 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33261 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33262 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33263 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M" 33264 JVM_ARG_OK=true 33265 else 33266 $ECHO "Arg failed:" >&5 33267 $ECHO "$OUTPUT" >&5 33268 JVM_ARG_OK=false 33269 fi 33270 33271 fi 33272 if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then 33273 33274 $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5 33275 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5 33276 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1` 33277 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33278 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33279 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33280 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M" 33281 JVM_ARG_OK=true 33282 else 33283 $ECHO "Arg failed:" >&5 33284 $ECHO "$OUTPUT" >&5 33285 JVM_ARG_OK=false 33286 fi 33287 33288 fi 33289 if test "$JVM_ARG_OK" = false; then 33290 33291 $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5 33292 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5 33293 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1` 33294 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` 33295 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` 33296 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 33297 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M" 33298 JVM_ARG_OK=true 33299 else 33300 $ECHO "Arg failed:" >&5 33301 $ECHO "$OUTPUT" >&5 33302 JVM_ARG_OK=false 33303 fi 33304 33305 fi 33306 33307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5 33308 $as_echo_n "checking whether to use sjavac... " >&6; } 33309 # Check whether --enable-sjavac was given. 33310 if test "${enable_sjavac+set}" = set; then : 33311 enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}" 33312 else 33313 ENABLE_SJAVAC='no' 33314 fi 33315 33316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5 33317 $as_echo "$ENABLE_SJAVAC" >&6; } 33318 33319 33320 if test "x$ENABLE_SJAVAC" = xyes; then 33321 SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers" 33322 else 33323 SJAVAC_SERVER_DIR= 33324 fi 33325 33326 33327 33328 33329 # Can the C/C++ compiler use precompiled headers? 33330 33331 33332 ############################################################################### 33333 # 33334 # Can the C/C++ compiler use precompiled headers? 33335 # 33336 # Check whether --enable-precompiled-headers was given. 33337 if test "${enable_precompiled_headers+set}" = set; then : 33338 enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers} 33339 else 33340 ENABLE_PRECOMPH=yes 33341 fi 33342 33343 33344 USE_PRECOMPILED_HEADER=1 33345 if test "x$ENABLE_PRECOMPH" = xno; then 33346 USE_PRECOMPILED_HEADER=0 33347 fi 33348 33349 if test "x$ENABLE_PRECOMPH" = xyes; then 33350 # Check that the compiler actually supports precomp headers. 33351 if test "x$GCC" = xyes; then 33352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5 33353 $as_echo_n "checking that precompiled headers work... " >&6; } 33354 echo "int alfa();" > conftest.h 33355 $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5 33356 if test ! -f conftest.hpp.gch; then 33357 USE_PRECOMPILED_HEADER=0 33358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 33359 $as_echo "no" >&6; } 33360 else 33361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 33362 $as_echo "yes" >&6; } 33363 fi 33364 rm -f conftest.h conftest.hpp.gch 33365 fi 33366 fi 33367 33368 33369 33370 33371 # Setup use of ccache, if available 33372 33373 # Check whether --enable-ccache was given. 33374 if test "${enable_ccache+set}" = set; then : 33375 enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache} 33376 else 33377 ENABLE_CCACHE=yes 33378 fi 33379 33380 if test "x$ENABLE_CCACHE" = xyes; then 33381 OLD_PATH="$PATH" 33382 if test "x$TOOLS_DIR" != x; then 33383 PATH=$TOOLS_DIR:$PATH 33384 fi 33385 # Extract the first word of "ccache", so it can be a program name with args. 33386 set dummy ccache; ac_word=$2 33387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 33388 $as_echo_n "checking for $ac_word... " >&6; } 33389 if ${ac_cv_path_CCACHE+:} false; then : 33390 $as_echo_n "(cached) " >&6 33391 else 33392 case $CCACHE in 33393 [\\/]* | ?:[\\/]*) 33394 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path. 33395 ;; 33396 *) 33397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 33398 for as_dir in $PATH 33399 do 33400 IFS=$as_save_IFS 33401 test -z "$as_dir" && as_dir=. 33402 for ac_exec_ext in '' $ac_executable_extensions; do 33403 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 33404 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" 33405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 33406 break 2 33407 fi 33408 done 33409 done 33410 IFS=$as_save_IFS 33411 33412 ;; 33413 esac 33414 fi 33415 CCACHE=$ac_cv_path_CCACHE 33416 if test -n "$CCACHE"; then 33417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5 33418 $as_echo "$CCACHE" >&6; } 33419 else 33420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 33421 $as_echo "no" >&6; } 33422 fi 33423 33424 33425 PATH="$OLD_PATH" 33426 else 33427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5 33428 $as_echo_n "checking for ccache... " >&6; } 33429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5 33430 $as_echo "explicitly disabled" >&6; } 33431 CCACHE= 33432 fi 33433 33434 33435 33436 # Check whether --with-ccache-dir was given. 33437 if test "${with_ccache_dir+set}" = set; then : 33438 withval=$with_ccache_dir; 33439 fi 33440 33441 33442 if test "x$with_ccache_dir" != x; then 33443 # When using a non home ccache directory, assume the use is to share ccache files 33444 # with other users. Thus change the umask. 33445 SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002" 33446 fi 33447 CCACHE_FOUND="" 33448 if test "x$CCACHE" != x; then 33449 33450 if test "x$CCACHE" != x; then 33451 CCACHE_FOUND="true" 33452 # Only use ccache if it is 3.1.4 or later, which supports 33453 # precompiled headers. 33454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5 33455 $as_echo_n "checking if ccache supports precompiled headers... " >&6; } 33456 HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null` 33457 if test "x$HAS_GOOD_CCACHE" = x; then 33458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5 33459 $as_echo "no, disabling ccache" >&6; } 33460 CCACHE= 33461 else 33462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 33463 $as_echo "yes" >&6; } 33464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5 33465 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; } 33466 PUSHED_FLAGS="$CXXFLAGS" 33467 CXXFLAGS="-fpch-preprocess $CXXFLAGS" 33468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 33469 /* end confdefs.h. */ 33470 33471 int 33472 main () 33473 { 33474 33475 ; 33476 return 0; 33477 } 33478 _ACEOF 33479 if ac_fn_cxx_try_compile "$LINENO"; then : 33480 CC_KNOWS_CCACHE_TRICK=yes 33481 else 33482 CC_KNOWS_CCACHE_TRICK=no 33483 fi 33484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 33485 CXXFLAGS="$PUSHED_FLAGS" 33486 if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then 33487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 33488 $as_echo "yes" >&6; } 33489 else 33490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5 33491 $as_echo "no, disabling ccaching of precompiled headers" >&6; } 33492 CCACHE= 33493 fi 33494 fi 33495 fi 33496 33497 if test "x$CCACHE" != x; then 33498 CCACHE_SLOPPINESS=time_macros 33499 CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" 33500 CCACHE_FLAGS=-fpch-preprocess 33501 33502 if test "x$SET_CCACHE_DIR" != x; then 33503 mkdir -p $CCACHE_DIR > /dev/null 2>&1 33504 chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 33505 fi 33506 fi 33507 33508 fi 33509 33510 33511 ############################################################################### 33512 # 33513 # And now the finish... 33514 # 33515 ############################################################################### 33516 33517 # Check for some common pitfalls 33518 33519 if test x"$OPENJDK_BUILD_OS" = xwindows; then 33520 file_to_test="$SRC_ROOT/LICENSE" 33521 if test `$STAT -c '%a' "$file_to_test"` -lt 400; then 33522 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 33523 fi 33524 fi 33525 33526 33527 33528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5 33529 $as_echo_n "checking if build directory is on local disk... " >&6; } 33530 33531 # df -l lists only local disks; if the given directory is not found then 33532 # a non-zero exit code is given 33533 if test "x$DF" = x; then 33534 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 33535 # msys does not have df; use Windows "net use" instead. 33536 IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:` 33537 if test "x$IS_NETWORK_DISK" = x; then 33538 OUTPUT_DIR_IS_LOCAL="yes" 33539 else 33540 OUTPUT_DIR_IS_LOCAL="no" 33541 fi 33542 else 33543 # No df here, say it's local 33544 OUTPUT_DIR_IS_LOCAL="yes" 33545 fi 33546 else 33547 if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then 33548 OUTPUT_DIR_IS_LOCAL="yes" 33549 else 33550 OUTPUT_DIR_IS_LOCAL="no" 33551 fi 33552 fi 33553 33554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5 33555 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; } 33556 33557 33558 33559 # Check if the user has any old-style ALT_ variables set. 33560 FOUND_ALT_VARIABLES=`env | grep ^ALT_` 33561 33562 # Before generating output files, test if they exist. If they do, this is a reconfigure. 33563 # Since we can't properly handle the dependencies for this, warn the user about the situation 33564 if test -e $OUTPUT_ROOT/spec.gmk; then 33565 IS_RECONFIGURE=yes 33566 else 33567 IS_RECONFIGURE=no 33568 fi 33569 33570 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then 33571 HIDE_PERFORMANCE_HINTS=yes 33572 else 33573 HIDE_PERFORMANCE_HINTS=no 33574 # Hide it the next time around... 33575 $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1 33576 fi 33577 33578 33579 33580 # At the end, call the custom hook. (Dummy macro if no custom sources available) 33581 33582 33583 # We're messing a bit with internal autoconf variables to put the config.status 33584 # in the output directory instead of the current directory. 33585 CONFIG_STATUS="$OUTPUT_ROOT/config.status" 33586 # Create the actual output files. Now the main work of configure is done. 33587 cat >confcache <<\_ACEOF 33588 # This file is a shell script that caches the results of configure 33589 # tests run on this system so they can be shared between configure 33590 # scripts and configure runs, see configure's option --config-cache. 33591 # It is not useful on other systems. If it contains results you don't 33592 # want to keep, you may remove or edit it. 33593 # 33594 # config.status only pays attention to the cache file if you give it 33595 # the --recheck option to rerun configure. 33596 # 33597 # `ac_cv_env_foo' variables (set or unset) will be overridden when 33598 # loading this file, other *unset* `ac_cv_foo' will be assigned the 33599 # following values. 33600 33601 _ACEOF 33602 33603 # The following way of writing the cache mishandles newlines in values, 33604 # but we know of no workaround that is simple, portable, and efficient. 33605 # So, we kill variables containing newlines. 33606 # Ultrix sh set writes to stderr and can't be redirected directly, 33607 # and sets the high bit in the cache file unless we assign to the vars. 33608 ( 33609 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 33610 eval ac_val=\$$ac_var 33611 case $ac_val in #( 33612 *${as_nl}*) 33613 case $ac_var in #( 33614 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 33615 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 33616 esac 33617 case $ac_var in #( 33618 _ | IFS | as_nl) ;; #( 33619 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 33620 *) { eval $ac_var=; unset $ac_var;} ;; 33621 esac ;; 33622 esac 33623 done 33624 33625 (set) 2>&1 | 33626 case $as_nl`(ac_space=' '; set) 2>&1` in #( 33627 *${as_nl}ac_space=\ *) 33628 # `set' does not quote correctly, so add quotes: double-quote 33629 # substitution turns \\\\ into \\, and sed turns \\ into \. 33630 sed -n \ 33631 "s/'/'\\\\''/g; 33632 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 33633 ;; #( 33634 *) 33635 # `set' quotes correctly as required by POSIX, so do not add quotes. 33636 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 33637 ;; 33638 esac | 33639 sort 33640 ) | 33641 sed ' 33642 /^ac_cv_env_/b end 33643 t clear 33644 :clear 33645 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 33646 t end 33647 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 33648 :end' >>confcache 33649 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 33650 if test -w "$cache_file"; then 33651 if test "x$cache_file" != "x/dev/null"; then 33652 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 33653 $as_echo "$as_me: updating cache $cache_file" >&6;} 33654 if test ! -f "$cache_file" || test -h "$cache_file"; then 33655 cat confcache >"$cache_file" 33656 else 33657 case $cache_file in #( 33658 */* | ?:*) 33659 mv -f confcache "$cache_file"$$ && 33660 mv -f "$cache_file"$$ "$cache_file" ;; #( 33661 *) 33662 mv -f confcache "$cache_file" ;; 33663 esac 33664 fi 33665 fi 33666 else 33667 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 33668 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 33669 fi 33670 fi 33671 rm -f confcache 33672 33673 test "x$prefix" = xNONE && prefix=$ac_default_prefix 33674 # Let make expand exec_prefix. 33675 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 33676 33677 DEFS=-DHAVE_CONFIG_H 33678 33679 ac_libobjs= 33680 ac_ltlibobjs= 33681 U= 33682 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 33683 # 1. Remove the extension, and $U if already installed. 33684 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 33685 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 33686 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 33687 # will be set to the directory where LIBOBJS objects are built. 33688 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 33689 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 33690 done 33691 LIBOBJS=$ac_libobjs 33692 33693 LTLIBOBJS=$ac_ltlibobjs 33694 33695 33696 33697 : "${CONFIG_STATUS=./config.status}" 33698 ac_write_fail=0 33699 ac_clean_files_save=$ac_clean_files 33700 ac_clean_files="$ac_clean_files $CONFIG_STATUS" 33701 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 33702 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 33703 as_write_fail=0 33704 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 33705 #! $SHELL 33706 # Generated by $as_me. 33707 # Run this file to recreate the current configuration. 33708 # Compiler output produced by configure, useful for debugging 33709 # configure, is in config.log if it exists. 33710 33711 debug=false 33712 ac_cs_recheck=false 33713 ac_cs_silent=false 33714 33715 SHELL=\${CONFIG_SHELL-$SHELL} 33716 export SHELL 33717 _ASEOF 33718 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 33719 ## -------------------- ## 33720 ## M4sh Initialization. ## 33721 ## -------------------- ## 33722 33723 # Be more Bourne compatible 33724 DUALCASE=1; export DUALCASE # for MKS sh 33725 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 33726 emulate sh 33727 NULLCMD=: 33728 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 33729 # is contrary to our usage. Disable this feature. 33730 alias -g '${1+"$@"}'='"$@"' 33731 setopt NO_GLOB_SUBST 33732 else 33733 case `(set -o) 2>/dev/null` in #( 33734 *posix*) : 33735 set -o posix ;; #( 33736 *) : 33737 ;; 33738 esac 33739 fi 33740 33741 33742 as_nl=' 33743 ' 33744 export as_nl 33745 # Printing a long string crashes Solaris 7 /usr/bin/printf. 33746 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 33747 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 33748 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 33749 # Prefer a ksh shell builtin over an external printf program on Solaris, 33750 # but without wasting forks for bash or zsh. 33751 if test -z "$BASH_VERSION$ZSH_VERSION" \ 33752 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 33753 as_echo='print -r --' 33754 as_echo_n='print -rn --' 33755 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 33756 as_echo='printf %s\n' 33757 as_echo_n='printf %s' 33758 else 33759 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 33760 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 33761 as_echo_n='/usr/ucb/echo -n' 33762 else 33763 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 33764 as_echo_n_body='eval 33765 arg=$1; 33766 case $arg in #( 33767 *"$as_nl"*) 33768 expr "X$arg" : "X\\(.*\\)$as_nl"; 33769 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 33770 esac; 33771 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 33772 ' 33773 export as_echo_n_body 33774 as_echo_n='sh -c $as_echo_n_body as_echo' 33775 fi 33776 export as_echo_body 33777 as_echo='sh -c $as_echo_body as_echo' 33778 fi 33779 33780 # The user is always right. 33781 if test "${PATH_SEPARATOR+set}" != set; then 33782 PATH_SEPARATOR=: 33783 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 33784 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 33785 PATH_SEPARATOR=';' 33786 } 33787 fi 33788 33789 33790 # IFS 33791 # We need space, tab and new line, in precisely that order. Quoting is 33792 # there to prevent editors from complaining about space-tab. 33793 # (If _AS_PATH_WALK were called with IFS unset, it would disable word 33794 # splitting by setting IFS to empty value.) 33795 IFS=" "" $as_nl" 33796 33797 # Find who we are. Look in the path if we contain no directory separator. 33798 as_myself= 33799 case $0 in #(( 33800 *[\\/]* ) as_myself=$0 ;; 33801 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 33802 for as_dir in $PATH 33803 do 33804 IFS=$as_save_IFS 33805 test -z "$as_dir" && as_dir=. 33806 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 33807 done 33808 IFS=$as_save_IFS 33809 33810 ;; 33811 esac 33812 # We did not find ourselves, most probably we were run as `sh COMMAND' 33813 # in which case we are not to be found in the path. 33814 if test "x$as_myself" = x; then 33815 as_myself=$0 33816 fi 33817 if test ! -f "$as_myself"; then 33818 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 33819 exit 1 33820 fi 33821 33822 # Unset variables that we do not need and which cause bugs (e.g. in 33823 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 33824 # suppresses any "Segmentation fault" message there. '((' could 33825 # trigger a bug in pdksh 5.2.14. 33826 for as_var in BASH_ENV ENV MAIL MAILPATH 33827 do eval test x\${$as_var+set} = xset \ 33828 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 33829 done 33830 PS1='$ ' 33831 PS2='> ' 33832 PS4='+ ' 33833 33834 # NLS nuisances. 33835 LC_ALL=C 33836 export LC_ALL 33837 LANGUAGE=C 33838 export LANGUAGE 33839 33840 # CDPATH. 33841 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 33842 33843 33844 # as_fn_error STATUS ERROR [LINENO LOG_FD] 33845 # ---------------------------------------- 33846 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 33847 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 33848 # script with STATUS, using 1 if that was 0. 33849 as_fn_error () 33850 { 33851 as_status=$1; test $as_status -eq 0 && as_status=1 33852 if test "$4"; then 33853 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 33854 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 33855 fi 33856 $as_echo "$as_me: error: $2" >&2 33857 as_fn_exit $as_status 33858 } # as_fn_error 33859 33860 33861 # as_fn_set_status STATUS 33862 # ----------------------- 33863 # Set $? to STATUS, without forking. 33864 as_fn_set_status () 33865 { 33866 return $1 33867 } # as_fn_set_status 33868 33869 # as_fn_exit STATUS 33870 # ----------------- 33871 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 33872 as_fn_exit () 33873 { 33874 set +e 33875 as_fn_set_status $1 33876 exit $1 33877 } # as_fn_exit 33878 33879 # as_fn_unset VAR 33880 # --------------- 33881 # Portably unset VAR. 33882 as_fn_unset () 33883 { 33884 { eval $1=; unset $1;} 33885 } 33886 as_unset=as_fn_unset 33887 # as_fn_append VAR VALUE 33888 # ---------------------- 33889 # Append the text in VALUE to the end of the definition contained in VAR. Take 33890 # advantage of any shell optimizations that allow amortized linear growth over 33891 # repeated appends, instead of the typical quadratic growth present in naive 33892 # implementations. 33893 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 33894 eval 'as_fn_append () 33895 { 33896 eval $1+=\$2 33897 }' 33898 else 33899 as_fn_append () 33900 { 33901 eval $1=\$$1\$2 33902 } 33903 fi # as_fn_append 33904 33905 # as_fn_arith ARG... 33906 # ------------------ 33907 # Perform arithmetic evaluation on the ARGs, and store the result in the 33908 # global $as_val. Take advantage of shells that can avoid forks. The arguments 33909 # must be portable across $(()) and expr. 33910 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 33911 eval 'as_fn_arith () 33912 { 33913 as_val=$(( $* )) 33914 }' 33915 else 33916 as_fn_arith () 33917 { 33918 as_val=`expr "$@" || test $? -eq 1` 33919 } 33920 fi # as_fn_arith 33921 33922 33923 if expr a : '\(a\)' >/dev/null 2>&1 && 33924 test "X`expr 00001 : '.*\(...\)'`" = X001; then 33925 as_expr=expr 33926 else 33927 as_expr=false 33928 fi 33929 33930 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 33931 as_basename=basename 33932 else 33933 as_basename=false 33934 fi 33935 33936 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 33937 as_dirname=dirname 33938 else 33939 as_dirname=false 33940 fi 33941 33942 as_me=`$as_basename -- "$0" || 33943 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 33944 X"$0" : 'X\(//\)$' \| \ 33945 X"$0" : 'X\(/\)' \| . 2>/dev/null || 33946 $as_echo X/"$0" | 33947 sed '/^.*\/\([^/][^/]*\)\/*$/{ 33948 s//\1/ 33949 q 33950 } 33951 /^X\/\(\/\/\)$/{ 33952 s//\1/ 33953 q 33954 } 33955 /^X\/\(\/\).*/{ 33956 s//\1/ 33957 q 33958 } 33959 s/.*/./; q'` 33960 33961 # Avoid depending upon Character Ranges. 33962 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 33963 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 33964 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 33965 as_cr_digits='0123456789' 33966 as_cr_alnum=$as_cr_Letters$as_cr_digits 33967 33968 ECHO_C= ECHO_N= ECHO_T= 33969 case `echo -n x` in #((((( 33970 -n*) 33971 case `echo 'xy\c'` in 33972 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 33973 xy) ECHO_C='\c';; 33974 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 33975 ECHO_T=' ';; 33976 esac;; 33977 *) 33978 ECHO_N='-n';; 33979 esac 33980 33981 rm -f conf$$ conf$$.exe conf$$.file 33982 if test -d conf$$.dir; then 33983 rm -f conf$$.dir/conf$$.file 33984 else 33985 rm -f conf$$.dir 33986 mkdir conf$$.dir 2>/dev/null 33987 fi 33988 if (echo >conf$$.file) 2>/dev/null; then 33989 if ln -s conf$$.file conf$$ 2>/dev/null; then 33990 as_ln_s='ln -s' 33991 # ... but there are two gotchas: 33992 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 33993 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 33994 # In both cases, we have to default to `cp -p'. 33995 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 33996 as_ln_s='cp -p' 33997 elif ln conf$$.file conf$$ 2>/dev/null; then 33998 as_ln_s=ln 33999 else 34000 as_ln_s='cp -p' 34001 fi 34002 else 34003 as_ln_s='cp -p' 34004 fi 34005 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 34006 rmdir conf$$.dir 2>/dev/null 34007 34008 34009 # as_fn_mkdir_p 34010 # ------------- 34011 # Create "$as_dir" as a directory, including parents if necessary. 34012 as_fn_mkdir_p () 34013 { 34014 34015 case $as_dir in #( 34016 -*) as_dir=./$as_dir;; 34017 esac 34018 test -d "$as_dir" || eval $as_mkdir_p || { 34019 as_dirs= 34020 while :; do 34021 case $as_dir in #( 34022 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 34023 *) as_qdir=$as_dir;; 34024 esac 34025 as_dirs="'$as_qdir' $as_dirs" 34026 as_dir=`$as_dirname -- "$as_dir" || 34027 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 34028 X"$as_dir" : 'X\(//\)[^/]' \| \ 34029 X"$as_dir" : 'X\(//\)$' \| \ 34030 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 34031 $as_echo X"$as_dir" | 34032 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 34033 s//\1/ 34034 q 34035 } 34036 /^X\(\/\/\)[^/].*/{ 34037 s//\1/ 34038 q 34039 } 34040 /^X\(\/\/\)$/{ 34041 s//\1/ 34042 q 34043 } 34044 /^X\(\/\).*/{ 34045 s//\1/ 34046 q 34047 } 34048 s/.*/./; q'` 34049 test -d "$as_dir" && break 34050 done 34051 test -z "$as_dirs" || eval "mkdir $as_dirs" 34052 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 34053 34054 34055 } # as_fn_mkdir_p 34056 if mkdir -p . 2>/dev/null; then 34057 as_mkdir_p='mkdir -p "$as_dir"' 34058 else 34059 test -d ./-p && rmdir ./-p 34060 as_mkdir_p=false 34061 fi 34062 34063 if test -x / >/dev/null 2>&1; then 34064 as_test_x='test -x' 34065 else 34066 if ls -dL / >/dev/null 2>&1; then 34067 as_ls_L_option=L 34068 else 34069 as_ls_L_option= 34070 fi 34071 as_test_x=' 34072 eval sh -c '\'' 34073 if test -d "$1"; then 34074 test -d "$1/."; 34075 else 34076 case $1 in #( 34077 -*)set "./$1";; 34078 esac; 34079 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 34080 ???[sx]*):;;*)false;;esac;fi 34081 '\'' sh 34082 ' 34083 fi 34084 as_executable_p=$as_test_x 34085 34086 # Sed expression to map a string onto a valid CPP name. 34087 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 34088 34089 # Sed expression to map a string onto a valid variable name. 34090 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 34091 34092 34093 exec 6>&1 34094 ## ----------------------------------- ## 34095 ## Main body of $CONFIG_STATUS script. ## 34096 ## ----------------------------------- ## 34097 _ASEOF 34098 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 34099 34100 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34101 # Save the log message, to keep $0 and so on meaningful, and to 34102 # report actual input values of CONFIG_FILES etc. instead of their 34103 # values after options handling. 34104 ac_log=" 34105 This file was extended by OpenJDK $as_me jdk8, which was 34106 generated by GNU Autoconf 2.68. Invocation command line was 34107 34108 CONFIG_FILES = $CONFIG_FILES 34109 CONFIG_HEADERS = $CONFIG_HEADERS 34110 CONFIG_LINKS = $CONFIG_LINKS 34111 CONFIG_COMMANDS = $CONFIG_COMMANDS 34112 $ $0 $@ 34113 34114 on `(hostname || uname -n) 2>/dev/null | sed 1q` 34115 " 34116 34117 _ACEOF 34118 34119 case $ac_config_files in *" 34120 "*) set x $ac_config_files; shift; ac_config_files=$*;; 34121 esac 34122 34123 case $ac_config_headers in *" 34124 "*) set x $ac_config_headers; shift; ac_config_headers=$*;; 34125 esac 34126 34127 34128 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34129 # Files that config.status was made for. 34130 config_files="$ac_config_files" 34131 config_headers="$ac_config_headers" 34132 34133 _ACEOF 34134 34135 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34136 ac_cs_usage="\ 34137 \`$as_me' instantiates files and other configuration actions 34138 from templates according to the current configuration. Unless the files 34139 and actions are specified as TAGs, all are instantiated by default. 34140 34141 Usage: $0 [OPTION]... [TAG]... 34142 34143 -h, --help print this help, then exit 34144 -V, --version print version number and configuration settings, then exit 34145 --config print configuration, then exit 34146 -q, --quiet, --silent 34147 do not print progress messages 34148 -d, --debug don't remove temporary files 34149 --recheck update $as_me by reconfiguring in the same conditions 34150 --file=FILE[:TEMPLATE] 34151 instantiate the configuration file FILE 34152 --header=FILE[:TEMPLATE] 34153 instantiate the configuration header FILE 34154 34155 Configuration files: 34156 $config_files 34157 34158 Configuration headers: 34159 $config_headers 34160 34161 Report bugs to <build-dev@openjdk.java.net>. 34162 OpenJDK home page: <http://openjdk.java.net>." 34163 34164 _ACEOF 34165 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34166 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 34167 ac_cs_version="\\ 34168 OpenJDK config.status jdk8 34169 configured by $0, generated by GNU Autoconf 2.68, 34170 with options \\"\$ac_cs_config\\" 34171 34172 Copyright (C) 2010 Free Software Foundation, Inc. 34173 This config.status script is free software; the Free Software Foundation 34174 gives unlimited permission to copy, distribute and modify it." 34175 34176 ac_pwd='$ac_pwd' 34177 srcdir='$srcdir' 34178 AWK='$AWK' 34179 test -n "\$AWK" || AWK=awk 34180 _ACEOF 34181 34182 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34183 # The default lists apply if the user does not specify any file. 34184 ac_need_defaults=: 34185 while test $# != 0 34186 do 34187 case $1 in 34188 --*=?*) 34189 ac_option=`expr "X$1" : 'X\([^=]*\)='` 34190 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 34191 ac_shift=: 34192 ;; 34193 --*=) 34194 ac_option=`expr "X$1" : 'X\([^=]*\)='` 34195 ac_optarg= 34196 ac_shift=: 34197 ;; 34198 *) 34199 ac_option=$1 34200 ac_optarg=$2 34201 ac_shift=shift 34202 ;; 34203 esac 34204 34205 case $ac_option in 34206 # Handling of the options. 34207 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 34208 ac_cs_recheck=: ;; 34209 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 34210 $as_echo "$ac_cs_version"; exit ;; 34211 --config | --confi | --conf | --con | --co | --c ) 34212 $as_echo "$ac_cs_config"; exit ;; 34213 --debug | --debu | --deb | --de | --d | -d ) 34214 debug=: ;; 34215 --file | --fil | --fi | --f ) 34216 $ac_shift 34217 case $ac_optarg in 34218 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 34219 '') as_fn_error $? "missing file argument" ;; 34220 esac 34221 as_fn_append CONFIG_FILES " '$ac_optarg'" 34222 ac_need_defaults=false;; 34223 --header | --heade | --head | --hea ) 34224 $ac_shift 34225 case $ac_optarg in 34226 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 34227 esac 34228 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 34229 ac_need_defaults=false;; 34230 --he | --h) 34231 # Conflict between --help and --header 34232 as_fn_error $? "ambiguous option: \`$1' 34233 Try \`$0 --help' for more information.";; 34234 --help | --hel | -h ) 34235 $as_echo "$ac_cs_usage"; exit ;; 34236 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 34237 | -silent | --silent | --silen | --sile | --sil | --si | --s) 34238 ac_cs_silent=: ;; 34239 34240 # This is an error. 34241 -*) as_fn_error $? "unrecognized option: \`$1' 34242 Try \`$0 --help' for more information." ;; 34243 34244 *) as_fn_append ac_config_targets " $1" 34245 ac_need_defaults=false ;; 34246 34247 esac 34248 shift 34249 done 34250 34251 ac_configure_extra_args= 34252 34253 if $ac_cs_silent; then 34254 exec 6>/dev/null 34255 ac_configure_extra_args="$ac_configure_extra_args --silent" 34256 fi 34257 34258 _ACEOF 34259 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34260 if \$ac_cs_recheck; then 34261 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 34262 shift 34263 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 34264 CONFIG_SHELL='$SHELL' 34265 export CONFIG_SHELL 34266 exec "\$@" 34267 fi 34268 34269 _ACEOF 34270 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34271 exec 5>>config.log 34272 { 34273 echo 34274 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 34275 ## Running $as_me. ## 34276 _ASBOX 34277 $as_echo "$ac_log" 34278 } >&5 34279 34280 _ACEOF 34281 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34282 _ACEOF 34283 34284 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34285 34286 # Handling of arguments. 34287 for ac_config_target in $ac_config_targets 34288 do 34289 case $ac_config_target in 34290 "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;; 34291 "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;; 34292 "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;; 34293 "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;; 34294 "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;; 34295 "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;; 34296 "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;; 34297 34298 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 34299 esac 34300 done 34301 34302 34303 # If the user did not use the arguments to specify the items to instantiate, 34304 # then the envvar interface is used. Set only those that are not. 34305 # We use the long form for the default assignment because of an extremely 34306 # bizarre bug on SunOS 4.1.3. 34307 if $ac_need_defaults; then 34308 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 34309 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 34310 fi 34311 34312 # Have a temporary directory for convenience. Make it in the build tree 34313 # simply because there is no reason against having it here, and in addition, 34314 # creating and moving files from /tmp can sometimes cause problems. 34315 # Hook for its removal unless debugging. 34316 # Note that there is a small window in which the directory will not be cleaned: 34317 # after its creation but before its name has been assigned to `$tmp'. 34318 $debug || 34319 { 34320 tmp= ac_tmp= 34321 trap 'exit_status=$? 34322 : "${ac_tmp:=$tmp}" 34323 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 34324 ' 0 34325 trap 'as_fn_exit 1' 1 2 13 15 34326 } 34327 # Create a (secure) tmp directory for tmp files. 34328 34329 { 34330 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 34331 test -d "$tmp" 34332 } || 34333 { 34334 tmp=./conf$$-$RANDOM 34335 (umask 077 && mkdir "$tmp") 34336 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 34337 ac_tmp=$tmp 34338 34339 # Set up the scripts for CONFIG_FILES section. 34340 # No need to generate them if there are no CONFIG_FILES. 34341 # This happens for instance with `./config.status config.h'. 34342 if test -n "$CONFIG_FILES"; then 34343 34344 34345 ac_cr=`echo X | tr X '\015'` 34346 # On cygwin, bash can eat \r inside `` if the user requested igncr. 34347 # But we know of no other shell where ac_cr would be empty at this 34348 # point, so we can use a bashism as a fallback. 34349 if test "x$ac_cr" = x; then 34350 eval ac_cr=\$\'\\r\' 34351 fi 34352 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 34353 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 34354 ac_cs_awk_cr='\\r' 34355 else 34356 ac_cs_awk_cr=$ac_cr 34357 fi 34358 34359 echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 34360 _ACEOF 34361 34362 34363 { 34364 echo "cat >conf$$subs.awk <<_ACEOF" && 34365 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 34366 echo "_ACEOF" 34367 } >conf$$subs.sh || 34368 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 34369 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 34370 ac_delim='%!_!# ' 34371 for ac_last_try in false false false false false :; do 34372 . ./conf$$subs.sh || 34373 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 34374 34375 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 34376 if test $ac_delim_n = $ac_delim_num; then 34377 break 34378 elif $ac_last_try; then 34379 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 34380 else 34381 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 34382 fi 34383 done 34384 rm -f conf$$subs.sh 34385 34386 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34387 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 34388 _ACEOF 34389 sed -n ' 34390 h 34391 s/^/S["/; s/!.*/"]=/ 34392 p 34393 g 34394 s/^[^!]*!// 34395 :repl 34396 t repl 34397 s/'"$ac_delim"'$// 34398 t delim 34399 :nl 34400 h 34401 s/\(.\{148\}\)..*/\1/ 34402 t more1 34403 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 34404 p 34405 n 34406 b repl 34407 :more1 34408 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 34409 p 34410 g 34411 s/.\{148\}// 34412 t nl 34413 :delim 34414 h 34415 s/\(.\{148\}\)..*/\1/ 34416 t more2 34417 s/["\\]/\\&/g; s/^/"/; s/$/"/ 34418 p 34419 b 34420 :more2 34421 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 34422 p 34423 g 34424 s/.\{148\}// 34425 t delim 34426 ' <conf$$subs.awk | sed ' 34427 /^[^""]/{ 34428 N 34429 s/\n// 34430 } 34431 ' >>$CONFIG_STATUS || ac_write_fail=1 34432 rm -f conf$$subs.awk 34433 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34434 _ACAWK 34435 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 34436 for (key in S) S_is_set[key] = 1 34437 FS = "" 34438 34439 } 34440 { 34441 line = $ 0 34442 nfields = split(line, field, "@") 34443 substed = 0 34444 len = length(field[1]) 34445 for (i = 2; i < nfields; i++) { 34446 key = field[i] 34447 keylen = length(key) 34448 if (S_is_set[key]) { 34449 value = S[key] 34450 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 34451 len += length(value) + length(field[++i]) 34452 substed = 1 34453 } else 34454 len += 1 + keylen 34455 } 34456 34457 print line 34458 } 34459 34460 _ACAWK 34461 _ACEOF 34462 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34463 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 34464 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 34465 else 34466 cat 34467 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 34468 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 34469 _ACEOF 34470 34471 # VPATH may cause trouble with some makes, so we remove sole $(srcdir), 34472 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 34473 # trailing colons and then remove the whole line if VPATH becomes empty 34474 # (actually we leave an empty line to preserve line numbers). 34475 if test "x$srcdir" = x.; then 34476 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 34477 h 34478 s/// 34479 s/^/:/ 34480 s/[ ]*$/:/ 34481 s/:\$(srcdir):/:/g 34482 s/:\${srcdir}:/:/g 34483 s/:@srcdir@:/:/g 34484 s/^:*// 34485 s/:*$// 34486 x 34487 s/\(=[ ]*\).*/\1/ 34488 G 34489 s/\n// 34490 s/^[^=]*=[ ]*$// 34491 }' 34492 fi 34493 34494 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34495 fi # test -n "$CONFIG_FILES" 34496 34497 # Set up the scripts for CONFIG_HEADERS section. 34498 # No need to generate them if there are no CONFIG_HEADERS. 34499 # This happens for instance with `./config.status Makefile'. 34500 if test -n "$CONFIG_HEADERS"; then 34501 cat >"$ac_tmp/defines.awk" <<\_ACAWK || 34502 BEGIN { 34503 _ACEOF 34504 34505 # Transform confdefs.h into an awk script `defines.awk', embedded as 34506 # here-document in config.status, that substitutes the proper values into 34507 # config.h.in to produce config.h. 34508 34509 # Create a delimiter string that does not exist in confdefs.h, to ease 34510 # handling of long lines. 34511 ac_delim='%!_!# ' 34512 for ac_last_try in false false :; do 34513 ac_tt=`sed -n "/$ac_delim/p" confdefs.h` 34514 if test -z "$ac_tt"; then 34515 break 34516 elif $ac_last_try; then 34517 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 34518 else 34519 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 34520 fi 34521 done 34522 34523 # For the awk script, D is an array of macro values keyed by name, 34524 # likewise P contains macro parameters if any. Preserve backslash 34525 # newline sequences. 34526 34527 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 34528 sed -n ' 34529 s/.\{148\}/&'"$ac_delim"'/g 34530 t rset 34531 :rset 34532 s/^[ ]*#[ ]*define[ ][ ]*/ / 34533 t def 34534 d 34535 :def 34536 s/\\$// 34537 t bsnl 34538 s/["\\]/\\&/g 34539 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 34540 D["\1"]=" \3"/p 34541 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 34542 d 34543 :bsnl 34544 s/["\\]/\\&/g 34545 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 34546 D["\1"]=" \3\\\\\\n"\\/p 34547 t cont 34548 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 34549 t cont 34550 d 34551 :cont 34552 n 34553 s/.\{148\}/&'"$ac_delim"'/g 34554 t clear 34555 :clear 34556 s/\\$// 34557 t bsnlc 34558 s/["\\]/\\&/g; s/^/"/; s/$/"/p 34559 d 34560 :bsnlc 34561 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 34562 b cont 34563 ' <confdefs.h | sed ' 34564 s/'"$ac_delim"'/"\\\ 34565 "/g' >>$CONFIG_STATUS || ac_write_fail=1 34566 34567 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34568 for (key in D) D_is_set[key] = 1 34569 FS = "" 34570 } 34571 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 34572 line = \$ 0 34573 split(line, arg, " ") 34574 if (arg[1] == "#") { 34575 defundef = arg[2] 34576 mac1 = arg[3] 34577 } else { 34578 defundef = substr(arg[1], 2) 34579 mac1 = arg[2] 34580 } 34581 split(mac1, mac2, "(") #) 34582 macro = mac2[1] 34583 prefix = substr(line, 1, index(line, defundef) - 1) 34584 if (D_is_set[macro]) { 34585 # Preserve the white space surrounding the "#". 34586 print prefix "define", macro P[macro] D[macro] 34587 next 34588 } else { 34589 # Replace #undef with comments. This is necessary, for example, 34590 # in the case of _POSIX_SOURCE, which is predefined and required 34591 # on some systems where configure will not decide to define it. 34592 if (defundef == "undef") { 34593 print "/*", prefix defundef, macro, "*/" 34594 next 34595 } 34596 } 34597 } 34598 { print } 34599 _ACAWK 34600 _ACEOF 34601 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34602 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 34603 fi # test -n "$CONFIG_HEADERS" 34604 34605 34606 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " 34607 shift 34608 for ac_tag 34609 do 34610 case $ac_tag in 34611 :[FHLC]) ac_mode=$ac_tag; continue;; 34612 esac 34613 case $ac_mode$ac_tag in 34614 :[FHL]*:*);; 34615 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 34616 :[FH]-) ac_tag=-:-;; 34617 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 34618 esac 34619 ac_save_IFS=$IFS 34620 IFS=: 34621 set x $ac_tag 34622 IFS=$ac_save_IFS 34623 shift 34624 ac_file=$1 34625 shift 34626 34627 case $ac_mode in 34628 :L) ac_source=$1;; 34629 :[FH]) 34630 ac_file_inputs= 34631 for ac_f 34632 do 34633 case $ac_f in 34634 -) ac_f="$ac_tmp/stdin";; 34635 *) # Look for the file first in the build tree, then in the source tree 34636 # (if the path is not absolute). The absolute path cannot be DOS-style, 34637 # because $ac_f cannot contain `:'. 34638 test -f "$ac_f" || 34639 case $ac_f in 34640 [\\/$]*) false;; 34641 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 34642 esac || 34643 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 34644 esac 34645 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 34646 as_fn_append ac_file_inputs " '$ac_f'" 34647 done 34648 34649 # Let's still pretend it is `configure' which instantiates (i.e., don't 34650 # use $as_me), people would be surprised to read: 34651 # /* config.h. Generated by config.status. */ 34652 configure_input='Generated from '` 34653 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 34654 `' by configure.' 34655 if test x"$ac_file" != x-; then 34656 configure_input="$ac_file. $configure_input" 34657 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 34658 $as_echo "$as_me: creating $ac_file" >&6;} 34659 fi 34660 # Neutralize special characters interpreted by sed in replacement strings. 34661 case $configure_input in #( 34662 *\&* | *\|* | *\\* ) 34663 ac_sed_conf_input=`$as_echo "$configure_input" | 34664 sed 's/[\\\\&|]/\\\\&/g'`;; #( 34665 *) ac_sed_conf_input=$configure_input;; 34666 esac 34667 34668 case $ac_tag in 34669 *:-:* | *:-) cat >"$ac_tmp/stdin" \ 34670 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 34671 esac 34672 ;; 34673 esac 34674 34675 ac_dir=`$as_dirname -- "$ac_file" || 34676 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 34677 X"$ac_file" : 'X\(//\)[^/]' \| \ 34678 X"$ac_file" : 'X\(//\)$' \| \ 34679 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 34680 $as_echo X"$ac_file" | 34681 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 34682 s//\1/ 34683 q 34684 } 34685 /^X\(\/\/\)[^/].*/{ 34686 s//\1/ 34687 q 34688 } 34689 /^X\(\/\/\)$/{ 34690 s//\1/ 34691 q 34692 } 34693 /^X\(\/\).*/{ 34694 s//\1/ 34695 q 34696 } 34697 s/.*/./; q'` 34698 as_dir="$ac_dir"; as_fn_mkdir_p 34699 ac_builddir=. 34700 34701 case "$ac_dir" in 34702 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 34703 *) 34704 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 34705 # A ".." for each directory in $ac_dir_suffix. 34706 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 34707 case $ac_top_builddir_sub in 34708 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 34709 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 34710 esac ;; 34711 esac 34712 ac_abs_top_builddir=$ac_pwd 34713 ac_abs_builddir=$ac_pwd$ac_dir_suffix 34714 # for backward compatibility: 34715 ac_top_builddir=$ac_top_build_prefix 34716 34717 case $srcdir in 34718 .) # We are building in place. 34719 ac_srcdir=. 34720 ac_top_srcdir=$ac_top_builddir_sub 34721 ac_abs_top_srcdir=$ac_pwd ;; 34722 [\\/]* | ?:[\\/]* ) # Absolute name. 34723 ac_srcdir=$srcdir$ac_dir_suffix; 34724 ac_top_srcdir=$srcdir 34725 ac_abs_top_srcdir=$srcdir ;; 34726 *) # Relative name. 34727 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 34728 ac_top_srcdir=$ac_top_build_prefix$srcdir 34729 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 34730 esac 34731 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 34732 34733 34734 case $ac_mode in 34735 :F) 34736 # 34737 # CONFIG_FILE 34738 # 34739 34740 _ACEOF 34741 34742 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34743 # If the template does not know about datarootdir, expand it. 34744 # FIXME: This hack should be removed a few years after 2.60. 34745 ac_datarootdir_hack=; ac_datarootdir_seen= 34746 ac_sed_dataroot=' 34747 /datarootdir/ { 34748 p 34749 q 34750 } 34751 /@datadir@/p 34752 /@docdir@/p 34753 /@infodir@/p 34754 /@localedir@/p 34755 /@mandir@/p' 34756 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 34757 *datarootdir*) ac_datarootdir_seen=yes;; 34758 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 34759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 34760 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 34761 _ACEOF 34762 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34763 ac_datarootdir_hack=' 34764 s&@datadir@&$datadir&g 34765 s&@docdir@&$docdir&g 34766 s&@infodir@&$infodir&g 34767 s&@localedir@&$localedir&g 34768 s&@mandir@&$mandir&g 34769 s&\\\${datarootdir}&$datarootdir&g' ;; 34770 esac 34771 _ACEOF 34772 34773 # Neutralize VPATH when `$srcdir' = `.'. 34774 # Shell code in configure.ac might set extrasub. 34775 # FIXME: do we really want to maintain this feature? 34776 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34777 ac_sed_extra="$ac_vpsub 34778 $extrasub 34779 _ACEOF 34780 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34781 :t 34782 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 34783 s|@configure_input@|$ac_sed_conf_input|;t t 34784 s&@top_builddir@&$ac_top_builddir_sub&;t t 34785 s&@top_build_prefix@&$ac_top_build_prefix&;t t 34786 s&@srcdir@&$ac_srcdir&;t t 34787 s&@abs_srcdir@&$ac_abs_srcdir&;t t 34788 s&@top_srcdir@&$ac_top_srcdir&;t t 34789 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 34790 s&@builddir@&$ac_builddir&;t t 34791 s&@abs_builddir@&$ac_abs_builddir&;t t 34792 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 34793 $ac_datarootdir_hack 34794 " 34795 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 34796 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34797 34798 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 34799 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 34800 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 34801 "$ac_tmp/out"`; test -z "$ac_out"; } && 34802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 34803 which seems to be undefined. Please make sure it is defined" >&5 34804 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 34805 which seems to be undefined. Please make sure it is defined" >&2;} 34806 34807 rm -f "$ac_tmp/stdin" 34808 case $ac_file in 34809 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 34810 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 34811 esac \ 34812 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34813 ;; 34814 :H) 34815 # 34816 # CONFIG_HEADER 34817 # 34818 if test x"$ac_file" != x-; then 34819 { 34820 $as_echo "/* $configure_input */" \ 34821 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" 34822 } >"$ac_tmp/config.h" \ 34823 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34824 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then 34825 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 34826 $as_echo "$as_me: $ac_file is unchanged" >&6;} 34827 else 34828 rm -f "$ac_file" 34829 mv "$ac_tmp/config.h" "$ac_file" \ 34830 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34831 fi 34832 else 34833 $as_echo "/* $configure_input */" \ 34834 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ 34835 || as_fn_error $? "could not create -" "$LINENO" 5 34836 fi 34837 ;; 34838 34839 34840 esac 34841 34842 done # for ac_tag 34843 34844 34845 as_fn_exit 0 34846 _ACEOF 34847 ac_clean_files=$ac_clean_files_save 34848 34849 test $ac_write_fail = 0 || 34850 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 34851 34852 34853 # configure is writing to config.log, and then calls config.status. 34854 # config.status does its own redirection, appending to config.log. 34855 # Unfortunately, on DOS this fails, as config.log is still kept open 34856 # by configure, so config.status won't be able to write to it; its 34857 # output is simply discarded. So we exec the FD to /dev/null, 34858 # effectively closing config.log, so it can be properly (re)opened and 34859 # appended to by config.status. When coming back to configure, we 34860 # need to make the FD available again. 34861 if test "$no_create" != yes; then 34862 ac_cs_success=: 34863 ac_config_status_args= 34864 test "$silent" = yes && 34865 ac_config_status_args="$ac_config_status_args --quiet" 34866 exec 5>/dev/null 34867 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 34868 exec 5>>config.log 34869 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 34870 # would make configure fail if this is the last instruction. 34871 $ac_cs_success || as_fn_exit 1 34872 fi 34873 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 34874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 34875 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 34876 fi 34877 34878 34879 # Make the compare script executable 34880 $CHMOD +x $OUTPUT_ROOT/compare.sh 34881 34882 # Finally output some useful information to the user 34883 34884 # Finally output some useful information to the user 34885 34886 if test "x$CCACHE_FOUND" != x; then 34887 if test "x$HAS_GOOD_CCACHE" = x; then 34888 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" 34889 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." 34890 else 34891 CCACHE_STATUS="installed and in use" 34892 fi 34893 else 34894 if test "x$GCC" = xyes; then 34895 CCACHE_STATUS="not installed (consider installing)" 34896 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." 34897 else 34898 CCACHE_STATUS="not available for your system" 34899 fi 34900 fi 34901 34902 printf "\n" 34903 printf "====================================================\n" 34904 printf "A new configuration has been successfully created in\n" 34905 printf "$OUTPUT_ROOT\n" 34906 if test "x$CONFIGURE_COMMAND_LINE" != x; then 34907 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" 34908 else 34909 printf "using default settings.\n" 34910 fi 34911 34912 printf "\n" 34913 printf "Configuration summary:\n" 34914 printf "* Debug level: $DEBUG_LEVEL\n" 34915 printf "* JDK variant: $JDK_VARIANT\n" 34916 printf "* JVM variants: $with_jvm_variants\n" 34917 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" 34918 34919 printf "\n" 34920 printf "Tools summary:\n" 34921 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 34922 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" 34923 fi 34924 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" 34925 printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" 34926 printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" 34927 34928 printf "\n" 34929 printf "Build performance summary:\n" 34930 printf "* Cores to use: $JOBS\n" 34931 printf "* Memory limit: $MEMORY_SIZE MB\n" 34932 printf "* ccache status: $CCACHE_STATUS\n" 34933 printf "\n" 34934 34935 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then 34936 printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" 34937 printf "$CCACHE_HELP_MSG\n" 34938 34939 # Print a helpful message on how to acquire the necessary build dependency. 34940 # ccache is the help tag: freetyp2, cups, pulse, alsa etc 34941 MISSING_DEPENDENCY=ccache 34942 PKGHANDLER_COMMAND= 34943 34944 case $PKGHANDLER in 34945 apt-get) 34946 apt_help $MISSING_DEPENDENCY ;; 34947 yum) 34948 yum_help $MISSING_DEPENDENCY ;; 34949 port) 34950 port_help $MISSING_DEPENDENCY ;; 34951 pkgutil) 34952 pkgutil_help $MISSING_DEPENDENCY ;; 34953 pkgadd) 34954 pkgadd_help $MISSING_DEPENDENCY ;; 34955 * ) 34956 break ;; 34957 esac 34958 34959 if test "x$PKGHANDLER_COMMAND" != x; then 34960 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 34961 fi 34962 34963 printf "$HELP_MSG\n" 34964 printf "\n" 34965 fi 34966 34967 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then 34968 printf "NOTE: You have requested to build more than one version of the JVM, which\n" 34969 printf "will result in longer build times.\n" 34970 printf "\n" 34971 fi 34972 34973 if test "x$FOUND_ALT_VARIABLES" != "x"; then 34974 printf "WARNING: You have old-style ALT_ environment variables set.\n" 34975 printf "These are not respected, and will be ignored. It is recommended\n" 34976 printf "that you clean your environment. The following variables are set:\n" 34977 printf "$FOUND_ALT_VARIABLES\n" 34978 printf "\n" 34979 fi 34980 34981 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then 34982 printf "WARNING: Your build output directory is not on a local disk.\n" 34983 printf "This will severely degrade build performance!\n" 34984 printf "It is recommended that you create an output directory on a local disk,\n" 34985 printf "and run the configure script again from that directory.\n" 34986 printf "\n" 34987 fi 34988 34989 if test "x$IS_RECONFIGURE" = "xyes"; then 34990 printf "WARNING: The result of this configuration has overridden an older\n" 34991 printf "configuration. You *should* run 'make clean' to make sure you get a\n" 34992 printf "proper build. Failure to do so might result in strange build problems.\n" 34993 printf "\n" 34994 fi 34995