1 #! /bin/sh 2 # Guess values for system-dependent variables and create Makefiles. 3 # Generated by GNU Autoconf 2.67 for OpenJDK jdk8. 4 # 5 # Report bugs to <build-dev@openjdk.java.net>. 6 # 7 # 8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software 10 # Foundation, Inc. 11 # 12 # 13 # This configure script is free software; the Free Software Foundation 14 # gives unlimited permission to copy, distribute and modify it. 15 ## -------------------- ## 16 ## M4sh Initialization. ## 17 ## -------------------- ## 18 19 # Be more Bourne compatible 20 DUALCASE=1; export DUALCASE # for MKS sh 21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 22 emulate sh 23 NULLCMD=: 24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 25 # is contrary to our usage. Disable this feature. 26 alias -g '${1+"$@"}'='"$@"' 27 setopt NO_GLOB_SUBST 28 else 29 case `(set -o) 2>/dev/null` in #( 30 *posix*) : 31 set -o posix ;; #( 32 *) : 33 ;; 34 esac 35 fi 36 37 38 as_nl=' 39 ' 40 export as_nl 41 # Printing a long string crashes Solaris 7 /usr/bin/printf. 42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 45 # Prefer a ksh shell builtin over an external printf program on Solaris, 46 # but without wasting forks for bash or zsh. 47 if test -z "$BASH_VERSION$ZSH_VERSION" \ 48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 49 as_echo='print -r --' 50 as_echo_n='print -rn --' 51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 52 as_echo='printf %s\n' 53 as_echo_n='printf %s' 54 else 55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 57 as_echo_n='/usr/ucb/echo -n' 58 else 59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 60 as_echo_n_body='eval 61 arg=$1; 62 case $arg in #( 63 *"$as_nl"*) 64 expr "X$arg" : "X\\(.*\\)$as_nl"; 65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 66 esac; 67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 68 ' 69 export as_echo_n_body 70 as_echo_n='sh -c $as_echo_n_body as_echo' 71 fi 72 export as_echo_body 73 as_echo='sh -c $as_echo_body as_echo' 74 fi 75 76 # The user is always right. 77 if test "${PATH_SEPARATOR+set}" != set; then 78 PATH_SEPARATOR=: 79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 81 PATH_SEPARATOR=';' 82 } 83 fi 84 85 86 # IFS 87 # We need space, tab and new line, in precisely that order. Quoting is 88 # there to prevent editors from complaining about space-tab. 89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word 90 # splitting by setting IFS to empty value.) 91 IFS=" "" $as_nl" 92 93 # Find who we are. Look in the path if we contain no directory separator. 94 case $0 in #(( 95 *[\\/]* ) as_myself=$0 ;; 96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 97 for as_dir in $PATH 98 do 99 IFS=$as_save_IFS 100 test -z "$as_dir" && as_dir=. 101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 102 done 103 IFS=$as_save_IFS 104 105 ;; 106 esac 107 # We did not find ourselves, most probably we were run as `sh COMMAND' 108 # in which case we are not to be found in the path. 109 if test "x$as_myself" = x; then 110 as_myself=$0 111 fi 112 if test ! -f "$as_myself"; then 113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 114 exit 1 115 fi 116 117 # Unset variables that we do not need and which cause bugs (e.g. in 118 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 119 # suppresses any "Segmentation fault" message there. '((' could 120 # trigger a bug in pdksh 5.2.14. 121 for as_var in BASH_ENV ENV MAIL MAILPATH 122 do eval test x\${$as_var+set} = xset \ 123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 124 done 125 PS1='$ ' 126 PS2='> ' 127 PS4='+ ' 128 129 # NLS nuisances. 130 LC_ALL=C 131 export LC_ALL 132 LANGUAGE=C 133 export LANGUAGE 134 135 # CDPATH. 136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 137 138 if test "x$CONFIG_SHELL" = x; then 139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 140 emulate sh 141 NULLCMD=: 142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 143 # is contrary to our usage. Disable this feature. 144 alias -g '\${1+\"\$@\"}'='\"\$@\"' 145 setopt NO_GLOB_SUBST 146 else 147 case \`(set -o) 2>/dev/null\` in #( 148 *posix*) : 149 set -o posix ;; #( 150 *) : 151 ;; 152 esac 153 fi 154 " 155 as_required="as_fn_return () { (exit \$1); } 156 as_fn_success () { as_fn_return 0; } 157 as_fn_failure () { as_fn_return 1; } 158 as_fn_ret_success () { return 0; } 159 as_fn_ret_failure () { return 1; } 160 161 exitcode=0 162 as_fn_success || { exitcode=1; echo as_fn_success failed.; } 163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 167 168 else 169 exitcode=1; echo positional parameters were not saved. 170 fi 171 test x\$exitcode = x0 || exit 1" 172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 176 test \$(( 1 + 1 )) = 2 || exit 1" 177 if (eval "$as_required") 2>/dev/null; then : 178 as_have_required=yes 179 else 180 as_have_required=no 181 fi 182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 183 184 else 185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 186 as_found=false 187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 188 do 189 IFS=$as_save_IFS 190 test -z "$as_dir" && as_dir=. 191 as_found=: 192 case $as_dir in #( 193 /*) 194 for as_base in sh bash ksh sh5; do 195 # Try only shells that exist, to save several forks. 196 as_shell=$as_dir/$as_base 197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 199 CONFIG_SHELL=$as_shell as_have_required=yes 200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 201 break 2 202 fi 203 fi 204 done;; 205 esac 206 as_found=false 207 done 208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 210 CONFIG_SHELL=$SHELL as_have_required=yes 211 fi; } 212 IFS=$as_save_IFS 213 214 215 if test "x$CONFIG_SHELL" != x; then : 216 # We cannot yet assume a decent shell, so we have to provide a 217 # neutralization value for shells without unset; and this also 218 # works around shells that cannot unset nonexistent variables. 219 BASH_ENV=/dev/null 220 ENV=/dev/null 221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 222 export CONFIG_SHELL 223 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} 224 fi 225 226 if test x$as_have_required = xno; then : 227 $as_echo "$0: This script requires a shell more modern than all" 228 $as_echo "$0: the shells that I found on your system." 229 if test x${ZSH_VERSION+set} = xset ; then 230 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 231 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 232 else 233 $as_echo "$0: Please tell bug-autoconf@gnu.org and 234 $0: build-dev@openjdk.java.net about your system, including 235 $0: any error possibly output before this message. Then 236 $0: install a modern shell, or manually run the script 237 $0: under such a shell if you do have one." 238 fi 239 exit 1 240 fi 241 fi 242 fi 243 SHELL=${CONFIG_SHELL-/bin/sh} 244 export SHELL 245 # Unset more variables known to interfere with behavior of common tools. 246 CLICOLOR_FORCE= GREP_OPTIONS= 247 unset CLICOLOR_FORCE GREP_OPTIONS 248 249 ## --------------------- ## 250 ## M4sh Shell Functions. ## 251 ## --------------------- ## 252 # as_fn_unset VAR 253 # --------------- 254 # Portably unset VAR. 255 as_fn_unset () 256 { 257 { eval $1=; unset $1;} 258 } 259 as_unset=as_fn_unset 260 261 # as_fn_set_status STATUS 262 # ----------------------- 263 # Set $? to STATUS, without forking. 264 as_fn_set_status () 265 { 266 return $1 267 } # as_fn_set_status 268 269 # as_fn_exit STATUS 270 # ----------------- 271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 272 as_fn_exit () 273 { 274 set +e 275 as_fn_set_status $1 276 exit $1 277 } # as_fn_exit 278 279 # as_fn_mkdir_p 280 # ------------- 281 # Create "$as_dir" as a directory, including parents if necessary. 282 as_fn_mkdir_p () 283 { 284 285 case $as_dir in #( 286 -*) as_dir=./$as_dir;; 287 esac 288 test -d "$as_dir" || eval $as_mkdir_p || { 289 as_dirs= 290 while :; do 291 case $as_dir in #( 292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 293 *) as_qdir=$as_dir;; 294 esac 295 as_dirs="'$as_qdir' $as_dirs" 296 as_dir=`$as_dirname -- "$as_dir" || 297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 298 X"$as_dir" : 'X\(//\)[^/]' \| \ 299 X"$as_dir" : 'X\(//\)$' \| \ 300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 301 $as_echo X"$as_dir" | 302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 303 s//\1/ 304 q 305 } 306 /^X\(\/\/\)[^/].*/{ 307 s//\1/ 308 q 309 } 310 /^X\(\/\/\)$/{ 311 s//\1/ 312 q 313 } 314 /^X\(\/\).*/{ 315 s//\1/ 316 q 317 } 318 s/.*/./; q'` 319 test -d "$as_dir" && break 320 done 321 test -z "$as_dirs" || eval "mkdir $as_dirs" 322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 323 324 325 } # as_fn_mkdir_p 326 # as_fn_append VAR VALUE 327 # ---------------------- 328 # Append the text in VALUE to the end of the definition contained in VAR. Take 329 # advantage of any shell optimizations that allow amortized linear growth over 330 # repeated appends, instead of the typical quadratic growth present in naive 331 # implementations. 332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 333 eval 'as_fn_append () 334 { 335 eval $1+=\$2 336 }' 337 else 338 as_fn_append () 339 { 340 eval $1=\$$1\$2 341 } 342 fi # as_fn_append 343 344 # as_fn_arith ARG... 345 # ------------------ 346 # Perform arithmetic evaluation on the ARGs, and store the result in the 347 # global $as_val. Take advantage of shells that can avoid forks. The arguments 348 # must be portable across $(()) and expr. 349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 350 eval 'as_fn_arith () 351 { 352 as_val=$(( $* )) 353 }' 354 else 355 as_fn_arith () 356 { 357 as_val=`expr "$@" || test $? -eq 1` 358 } 359 fi # as_fn_arith 360 361 362 # as_fn_error STATUS ERROR [LINENO LOG_FD] 363 # ---------------------------------------- 364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 366 # script with STATUS, using 1 if that was 0. 367 as_fn_error () 368 { 369 as_status=$1; test $as_status -eq 0 && as_status=1 370 if test "$4"; then 371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 373 fi 374 $as_echo "$as_me: error: $2" >&2 375 as_fn_exit $as_status 376 } # as_fn_error 377 378 if expr a : '\(a\)' >/dev/null 2>&1 && 379 test "X`expr 00001 : '.*\(...\)'`" = X001; then 380 as_expr=expr 381 else 382 as_expr=false 383 fi 384 385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 386 as_basename=basename 387 else 388 as_basename=false 389 fi 390 391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 392 as_dirname=dirname 393 else 394 as_dirname=false 395 fi 396 397 as_me=`$as_basename -- "$0" || 398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 399 X"$0" : 'X\(//\)$' \| \ 400 X"$0" : 'X\(/\)' \| . 2>/dev/null || 401 $as_echo X/"$0" | 402 sed '/^.*\/\([^/][^/]*\)\/*$/{ 403 s//\1/ 404 q 405 } 406 /^X\/\(\/\/\)$/{ 407 s//\1/ 408 q 409 } 410 /^X\/\(\/\).*/{ 411 s//\1/ 412 q 413 } 414 s/.*/./; q'` 415 416 # Avoid depending upon Character Ranges. 417 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 420 as_cr_digits='0123456789' 421 as_cr_alnum=$as_cr_Letters$as_cr_digits 422 423 424 as_lineno_1=$LINENO as_lineno_1a=$LINENO 425 as_lineno_2=$LINENO as_lineno_2a=$LINENO 426 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 427 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 428 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 429 sed -n ' 430 p 431 /[$]LINENO/= 432 ' <$as_myself | 433 sed ' 434 s/[$]LINENO.*/&-/ 435 t lineno 436 b 437 :lineno 438 N 439 :loop 440 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 441 t loop 442 s/-\n.*// 443 ' >$as_me.lineno && 444 chmod +x "$as_me.lineno" || 445 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 446 447 # Don't try to exec as it changes $[0], causing all sort of problems 448 # (the dirname of $[0] is not the place where we might find the 449 # original and so on. Autoconf is especially sensitive to this). 450 . "./$as_me.lineno" 451 # Exit status is that of the last command. 452 exit 453 } 454 455 ECHO_C= ECHO_N= ECHO_T= 456 case `echo -n x` in #((((( 457 -n*) 458 case `echo 'xy\c'` in 459 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 460 xy) ECHO_C='\c';; 461 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 462 ECHO_T=' ';; 463 esac;; 464 *) 465 ECHO_N='-n';; 466 esac 467 468 rm -f conf$$ conf$$.exe conf$$.file 469 if test -d conf$$.dir; then 470 rm -f conf$$.dir/conf$$.file 471 else 472 rm -f conf$$.dir 473 mkdir conf$$.dir 2>/dev/null 474 fi 475 if (echo >conf$$.file) 2>/dev/null; then 476 if ln -s conf$$.file conf$$ 2>/dev/null; then 477 as_ln_s='ln -s' 478 # ... but there are two gotchas: 479 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 480 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 481 # In both cases, we have to default to `cp -p'. 482 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 483 as_ln_s='cp -p' 484 elif ln conf$$.file conf$$ 2>/dev/null; then 485 as_ln_s=ln 486 else 487 as_ln_s='cp -p' 488 fi 489 else 490 as_ln_s='cp -p' 491 fi 492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 493 rmdir conf$$.dir 2>/dev/null 494 495 if mkdir -p . 2>/dev/null; then 496 as_mkdir_p='mkdir -p "$as_dir"' 497 else 498 test -d ./-p && rmdir ./-p 499 as_mkdir_p=false 500 fi 501 502 if test -x / >/dev/null 2>&1; then 503 as_test_x='test -x' 504 else 505 if ls -dL / >/dev/null 2>&1; then 506 as_ls_L_option=L 507 else 508 as_ls_L_option= 509 fi 510 as_test_x=' 511 eval sh -c '\'' 512 if test -d "$1"; then 513 test -d "$1/."; 514 else 515 case $1 in #( 516 -*)set "./$1";; 517 esac; 518 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 519 ???[sx]*):;;*)false;;esac;fi 520 '\'' sh 521 ' 522 fi 523 as_executable_p=$as_test_x 524 525 # Sed expression to map a string onto a valid CPP name. 526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 527 528 # Sed expression to map a string onto a valid variable name. 529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 530 531 532 test -n "$DJDIR" || exec 7<&0 </dev/null 533 exec 6>&1 534 535 # Name of the host. 536 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 537 # so uname gets run too. 538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 539 540 # 541 # Initializations. 542 # 543 ac_default_prefix=/usr/local 544 ac_clean_files= 545 ac_config_libobj_dir=. 546 LIBOBJS= 547 cross_compiling=no 548 subdirs= 549 MFLAGS= 550 MAKEFLAGS= 551 552 # Identity of this package. 553 PACKAGE_NAME='OpenJDK' 554 PACKAGE_TARNAME='openjdk' 555 PACKAGE_VERSION='jdk8' 556 PACKAGE_STRING='OpenJDK jdk8' 557 PACKAGE_BUGREPORT='build-dev@openjdk.java.net' 558 PACKAGE_URL='http://openjdk.java.net' 559 560 # Factoring default headers for most tests. 561 ac_includes_default="\ 562 #include <stdio.h> 563 #ifdef HAVE_SYS_TYPES_H 564 # include <sys/types.h> 565 #endif 566 #ifdef HAVE_SYS_STAT_H 567 # include <sys/stat.h> 568 #endif 569 #ifdef STDC_HEADERS 570 # include <stdlib.h> 571 # include <stddef.h> 572 #else 573 # ifdef HAVE_STDLIB_H 574 # include <stdlib.h> 575 # endif 576 #endif 577 #ifdef HAVE_STRING_H 578 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H 579 # include <memory.h> 580 # endif 581 # include <string.h> 582 #endif 583 #ifdef HAVE_STRINGS_H 584 # include <strings.h> 585 #endif 586 #ifdef HAVE_INTTYPES_H 587 # include <inttypes.h> 588 #endif 589 #ifdef HAVE_STDINT_H 590 # include <stdint.h> 591 #endif 592 #ifdef HAVE_UNISTD_H 593 # include <unistd.h> 594 #endif" 595 596 ac_subst_vars='LTLIBOBJS 597 LIBOBJS 598 CCACHE 599 USE_PRECOMPILED_HEADER 600 SJAVAC_SERVER_DIR 601 ENABLE_SJAVAC 602 SJAVAC_SERVER_CORES 603 SJAVAC_SERVER_JAVA 604 JOBS 605 MEMORY_SIZE 606 NUM_CORES 607 ENABLE_INTREE_EC 608 SALIB_NAME 609 HOTSPOT_MAKE_ARGS 610 FIXPATH 611 LIBCXX 612 LLVM_LIBS 613 LLVM_LDFLAGS 614 LLVM_CFLAGS 615 LLVM_CONFIG 616 LIBFFI_LIBS 617 LIBFFI_CFLAGS 618 STATIC_CXX_SETTING 619 LIBDL 620 LIBM 621 LIBZIP_CAN_USE_MMAP 622 USE_EXTERNAL_LIBZ 623 USE_EXTERNAL_LIBGIF 624 USE_EXTERNAL_LIBJPEG 625 ALSA_LIBS 626 ALSA_CFLAGS 627 FREETYPE2_LIB_PATH 628 USING_SYSTEM_FT_LIB 629 FREETYPE2_LIBS 630 FREETYPE2_CFLAGS 631 CUPS_CFLAGS 632 OPENWIN_HOME 633 X_EXTRA_LIBS 634 X_LIBS 635 X_PRE_LIBS 636 X_CFLAGS 637 XMKMF 638 CXXFLAGS_DEBUG_SYMBOLS 639 CFLAGS_DEBUG_SYMBOLS 640 ZIP_DEBUGINFO_FILES 641 ENABLE_DEBUG_SYMBOLS 642 LDFLAGS_CXX_JDK 643 LDFLAGS_JDKEXE_SUFFIX 644 LDFLAGS_JDKLIB_SUFFIX 645 LDFLAGS_JDKEXE 646 LDFLAGS_JDKLIB 647 CXXFLAGS_JDKEXE 648 CXXFLAGS_JDKLIB 649 CFLAGS_JDKEXE 650 CFLAGS_JDKLIB 651 MACOSX_VERSION_MIN 652 PACKAGE_PATH 653 LEGACY_EXTRA_LDFLAGS 654 LEGACY_EXTRA_CXXFLAGS 655 LEGACY_EXTRA_CFLAGS 656 CXX_FLAG_DEPS 657 C_FLAG_DEPS 658 CXX_O_FLAG_NONE 659 CXX_O_FLAG_NORM 660 CXX_O_FLAG_HI 661 CXX_O_FLAG_HIGHEST 662 C_O_FLAG_NONE 663 C_O_FLAG_NORM 664 C_O_FLAG_HI 665 C_O_FLAG_HIGHEST 666 POST_MCS_CMD 667 POST_STRIP_CMD 668 SET_EXECUTABLE_ORIGIN 669 SET_SHARED_LIBRARY_ORIGIN 670 CXX_FLAG_REORDER 671 C_FLAG_REORDER 672 SET_SHARED_LIBRARY_MAPFILE 673 SET_SHARED_LIBRARY_NAME 674 SHARED_LIBRARY_FLAGS 675 EXE_SUFFIX 676 STATIC_LIBRARY_SUFFIX 677 SHARED_LIBRARY_SUFFIX 678 LIBRARY_PREFIX 679 STATIC_LIBRARY 680 SHARED_LIBRARY 681 OBJ_SUFFIX 682 LIPO 683 ac_ct_OBJDUMP 684 OBJDUMP 685 ac_ct_OBJCOPY 686 OBJCOPY 687 MCS 688 STRIP 689 GNM 690 NM 691 AS 692 CXXCPP 693 CPP 694 COMPILER_TYPE 695 RC_FLAGS 696 DUMPBIN 697 WINAR 698 HOTSPOT_RC 699 HOTSPOT_MT 700 RC 701 MT 702 WINLD 703 HOTSPOT_LD 704 HOTSPOT_CXX 705 ARFLAGS 706 AR 707 LDEXECXX 708 LDCXX 709 LDEXE 710 LD 711 ac_ct_OBJC 712 OBJCFLAGS 713 OBJC 714 ac_ct_CXX 715 CXXFLAGS 716 CXX 717 ac_ct_PROPER_COMPILER_CXX 718 PROPER_COMPILER_CXX 719 POTENTIAL_CXX 720 TOOLS_DIR_CXX 721 OBJEXT 722 EXEEXT 723 ac_ct_CC 724 CPPFLAGS 725 LDFLAGS 726 CFLAGS 727 CC 728 ac_ct_PROPER_COMPILER_CC 729 PROPER_COMPILER_CC 730 POTENTIAL_CC 731 TOOLS_DIR_CC 732 BUILD_LD 733 BUILD_CXX 734 BUILD_CC 735 MSVCR_DLL 736 DXSDK_INCLUDE_PATH 737 DXSDK_LIB_PATH 738 VS_PATH 739 VS_LIB 740 VS_INCLUDE 741 CYGWIN_LINK 742 AR_OUT_OPTION 743 LD_OUT_OPTION 744 EXE_OUT_OPTION 745 CC_OUT_OPTION 746 BUILD_HOTSPOT 747 HOTSPOT_DIST 748 BUILD_OUTPUT 749 OVERRIDE_SRC_ROOT 750 ADD_SRC_ROOT 751 JDK_TOPDIR 752 NASHORN_TOPDIR 753 HOTSPOT_TOPDIR 754 JAXWS_TOPDIR 755 JAXP_TOPDIR 756 CORBA_TOPDIR 757 LANGTOOLS_TOPDIR 758 BOOT_JDK_JVMARGS 759 JAVAC_FLAGS 760 BOOT_JDK_SOURCETARGET 761 BOOT_JDK 762 BOOT_TOOLSJAR 763 BOOT_RTJAR 764 JAVA_CHECK 765 JAVAC_CHECK 766 COOKED_BUILD_NUMBER 767 JDK_VERSION 768 COPYRIGHT_YEAR 769 MACOSX_BUNDLE_ID_BASE 770 MACOSX_BUNDLE_NAME_BASE 771 COMPANY_NAME 772 JDK_RC_PLATFORM_NAME 773 PRODUCT_SUFFIX 774 PRODUCT_NAME 775 LAUNCHER_NAME 776 MILESTONE 777 JDK_BUILD_NUMBER 778 JDK_UPDATE_VERSION 779 JDK_MICRO_VERSION 780 JDK_MINOR_VERSION 781 JDK_MAJOR_VERSION 782 USER_RELEASE_SUFFIX 783 COMPRESS_JARS 784 UNLIMITED_CRYPTO 785 CACERTS_FILE 786 TEST_IN_BUILD 787 BUILD_HEADLESS 788 SUPPORT_HEADFUL 789 SUPPORT_HEADLESS 790 BDEPS_FTP 791 BDEPS_UNZIP 792 OS_VERSION_MICRO 793 OS_VERSION_MINOR 794 OS_VERSION_MAJOR 795 PKG_CONFIG 796 XATTR 797 TIME 798 STAT 799 HG 800 READELF 801 OTOOL 802 LDD 803 ZIP 804 UNZIP 805 FIND_DELETE 806 MAKE 807 CHECK_TOOLSDIR_MAKE 808 CHECK_TOOLSDIR_GMAKE 809 CHECK_MAKE 810 CHECK_GMAKE 811 PKGHANDLER 812 OUTPUT_ROOT 813 CONF_NAME 814 SPEC 815 BUILD_VARIANT_RELEASE 816 DEBUG_CLASSFILES 817 FASTDEBUG 818 VARIANT 819 DEBUG_LEVEL 820 MACOSX_UNIVERSAL 821 INCLUDE_SA 822 JVM_VARIANT_ZEROSHARK 823 JVM_VARIANT_ZERO 824 JVM_VARIANT_KERNEL 825 JVM_VARIANT_MINIMAL1 826 JVM_VARIANT_CLIENT 827 JVM_VARIANT_SERVER 828 JVM_VARIANTS 829 JDK_VARIANT 830 SET_OPENJDK 831 BUILD_LOG_WRAPPER 832 BUILD_LOG_PREVIOUS 833 BUILD_LOG 834 SYS_ROOT 835 PATH_SEP 836 SRC_ROOT 837 ZERO_ARCHDEF 838 ZERO_ARCHFLAG 839 DEFINE_CROSS_COMPILE_ARCH 840 LP64 841 OPENJDK_TARGET_OS_API_DIR 842 OPENJDK_TARGET_CPU_JLI_CFLAGS 843 OPENJDK_TARGET_CPU_OSARCH 844 OPENJDK_TARGET_CPU_ISADIR 845 OPENJDK_TARGET_CPU_LIBDIR 846 OPENJDK_TARGET_CPU_LEGACY_LIB 847 OPENJDK_TARGET_CPU_LEGACY 848 REQUIRED_OS_VERSION 849 REQUIRED_OS_NAME 850 COMPILE_TYPE 851 OPENJDK_TARGET_CPU_ENDIAN 852 OPENJDK_TARGET_CPU_BITS 853 OPENJDK_TARGET_CPU_ARCH 854 OPENJDK_TARGET_CPU 855 OPENJDK_TARGET_OS_API 856 OPENJDK_TARGET_OS 857 OPENJDK_BUILD_CPU_ENDIAN 858 OPENJDK_BUILD_CPU_BITS 859 OPENJDK_BUILD_CPU_ARCH 860 OPENJDK_BUILD_CPU 861 OPENJDK_BUILD_OS_API 862 OPENJDK_BUILD_OS 863 OPENJDK_BUILD_AUTOCONF_NAME 864 OPENJDK_TARGET_AUTOCONF_NAME 865 target_os 866 target_vendor 867 target_cpu 868 target 869 host_os 870 host_vendor 871 host_cpu 872 host 873 build_os 874 build_vendor 875 build_cpu 876 build 877 SETFILE 878 DF 879 READLINK 880 CYGPATH 881 NAWK 882 SED 883 FGREP 884 EGREP 885 GREP 886 AWK 887 XARGS 888 WHICH 889 WC 890 UNIQ 891 UNAME 892 TR 893 TOUCH 894 TEE 895 TAR 896 TAIL 897 SORT 898 SH 899 RM 900 THEPWDCMD 901 PRINTF 902 MV 903 MKTEMP 904 MKDIR 905 LS 906 LN 907 HEAD 908 FIND 909 FILE 910 EXPR 911 ECHO 912 DIRNAME 913 DIFF 914 DATE 915 CUT 916 CPIO 917 CP 918 COMM 919 CMP 920 CHMOD 921 CAT 922 BASH 923 BASENAME 924 DATE_WHEN_CONFIGURED 925 CONFIGURE_COMMAND_LINE 926 CUSTOM_MAKE_DIR 927 target_alias 928 host_alias 929 build_alias 930 LIBS 931 ECHO_T 932 ECHO_N 933 ECHO_C 934 DEFS 935 mandir 936 localedir 937 libdir 938 psdir 939 pdfdir 940 dvidir 941 htmldir 942 infodir 943 docdir 944 oldincludedir 945 includedir 946 localstatedir 947 sharedstatedir 948 sysconfdir 949 datadir 950 datarootdir 951 libexecdir 952 sbindir 953 bindir 954 program_transform_name 955 prefix 956 exec_prefix 957 PACKAGE_URL 958 PACKAGE_BUGREPORT 959 PACKAGE_STRING 960 PACKAGE_VERSION 961 PACKAGE_TARNAME 962 PACKAGE_NAME 963 PATH_SEPARATOR 964 SHELL' 965 ac_subst_files='' 966 ac_user_opts=' 967 enable_option_checking 968 with_custom_make_dir 969 with_target_bits 970 with_sys_root 971 with_tools_dir 972 with_devkit 973 enable_openjdk_only 974 with_jdk_variant 975 with_jvm_variants 976 enable_debug 977 with_debug_level 978 with_conf_name 979 with_builddeps_conf 980 with_builddeps_server 981 with_builddeps_dir 982 with_builddeps_group 983 enable_headful 984 enable_hotspot_test_in_build 985 with_cacerts_file 986 enable_unlimited_crypto 987 with_milestone 988 with_build_number 989 with_user_release_suffix 990 with_boot_jdk 991 with_boot_jdk_jvmargs 992 with_add_source_root 993 with_override_source_root 994 with_adds_and_overrides 995 with_override_langtools 996 with_override_corba 997 with_override_jaxp 998 with_override_jaxws 999 with_override_hotspot 1000 with_override_jdk 1001 with_import_hotspot 1002 with_msvcr_dll 1003 with_dxsdk 1004 with_dxsdk_lib 1005 with_dxsdk_include 1006 with_extra_cflags 1007 with_extra_cxxflags 1008 with_extra_ldflags 1009 enable_debug_symbols 1010 enable_zip_debug_info 1011 enable_macosx_runtime_support 1012 with_x 1013 with_cups 1014 with_cups_include 1015 with_freetype 1016 with_alsa 1017 with_alsa_include 1018 with_alsa_lib 1019 with_giflib 1020 with_zlib 1021 with_stdc__lib 1022 with_num_cores 1023 with_memory_size 1024 with_jobs 1025 with_sjavac_server_java 1026 with_sjavac_server_cores 1027 enable_sjavac 1028 enable_precompiled_headers 1029 enable_ccache 1030 with_ccache_dir 1031 ' 1032 ac_precious_vars='build_alias 1033 host_alias 1034 target_alias 1035 PKG_CONFIG 1036 CC 1037 CFLAGS 1038 LDFLAGS 1039 LIBS 1040 CPPFLAGS 1041 CXX 1042 CXXFLAGS 1043 CCC 1044 OBJC 1045 OBJCFLAGS 1046 CPP 1047 CXXCPP 1048 XMKMF 1049 FREETYPE2_CFLAGS 1050 FREETYPE2_LIBS 1051 ALSA_CFLAGS 1052 ALSA_LIBS 1053 LIBFFI_CFLAGS 1054 LIBFFI_LIBS' 1055 1056 1057 # Initialize some variables set by options. 1058 ac_init_help= 1059 ac_init_version=false 1060 ac_unrecognized_opts= 1061 ac_unrecognized_sep= 1062 # The variables have the same names as the options, with 1063 # dashes changed to underlines. 1064 cache_file=/dev/null 1065 exec_prefix=NONE 1066 no_create= 1067 no_recursion= 1068 prefix=NONE 1069 program_prefix=NONE 1070 program_suffix=NONE 1071 program_transform_name=s,x,x, 1072 silent= 1073 site= 1074 srcdir= 1075 verbose= 1076 x_includes=NONE 1077 x_libraries=NONE 1078 1079 # Installation directory options. 1080 # These are left unexpanded so users can "make install exec_prefix=/foo" 1081 # and all the variables that are supposed to be based on exec_prefix 1082 # by default will actually change. 1083 # Use braces instead of parens because sh, perl, etc. also accept them. 1084 # (The list follows the same order as the GNU Coding Standards.) 1085 bindir='${exec_prefix}/bin' 1086 sbindir='${exec_prefix}/sbin' 1087 libexecdir='${exec_prefix}/libexec' 1088 datarootdir='${prefix}/share' 1089 datadir='${datarootdir}' 1090 sysconfdir='${prefix}/etc' 1091 sharedstatedir='${prefix}/com' 1092 localstatedir='${prefix}/var' 1093 includedir='${prefix}/include' 1094 oldincludedir='/usr/include' 1095 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 1096 infodir='${datarootdir}/info' 1097 htmldir='${docdir}' 1098 dvidir='${docdir}' 1099 pdfdir='${docdir}' 1100 psdir='${docdir}' 1101 libdir='${exec_prefix}/lib' 1102 localedir='${datarootdir}/locale' 1103 mandir='${datarootdir}/man' 1104 1105 ac_prev= 1106 ac_dashdash= 1107 for ac_option 1108 do 1109 # If the previous option needs an argument, assign it. 1110 if test -n "$ac_prev"; then 1111 eval $ac_prev=\$ac_option 1112 ac_prev= 1113 continue 1114 fi 1115 1116 case $ac_option in 1117 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 1118 *=) ac_optarg= ;; 1119 *) ac_optarg=yes ;; 1120 esac 1121 1122 # Accept the important Cygnus configure options, so we can diagnose typos. 1123 1124 case $ac_dashdash$ac_option in 1125 --) 1126 ac_dashdash=yes ;; 1127 1128 -bindir | --bindir | --bindi | --bind | --bin | --bi) 1129 ac_prev=bindir ;; 1130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 1131 bindir=$ac_optarg ;; 1132 1133 -build | --build | --buil | --bui | --bu) 1134 ac_prev=build_alias ;; 1135 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 1136 build_alias=$ac_optarg ;; 1137 1138 -cache-file | --cache-file | --cache-fil | --cache-fi \ 1139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 1140 ac_prev=cache_file ;; 1141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 1142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 1143 cache_file=$ac_optarg ;; 1144 1145 --config-cache | -C) 1146 cache_file=config.cache ;; 1147 1148 -datadir | --datadir | --datadi | --datad) 1149 ac_prev=datadir ;; 1150 -datadir=* | --datadir=* | --datadi=* | --datad=*) 1151 datadir=$ac_optarg ;; 1152 1153 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 1154 | --dataroo | --dataro | --datar) 1155 ac_prev=datarootdir ;; 1156 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 1157 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 1158 datarootdir=$ac_optarg ;; 1159 1160 -disable-* | --disable-*) 1161 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 1162 # Reject names that are not valid shell variable names. 1163 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1164 as_fn_error $? "invalid feature name: $ac_useropt" 1165 ac_useropt_orig=$ac_useropt 1166 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1167 case $ac_user_opts in 1168 *" 1169 "enable_$ac_useropt" 1170 "*) ;; 1171 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 1172 ac_unrecognized_sep=', ';; 1173 esac 1174 eval enable_$ac_useropt=no ;; 1175 1176 -docdir | --docdir | --docdi | --doc | --do) 1177 ac_prev=docdir ;; 1178 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 1179 docdir=$ac_optarg ;; 1180 1181 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 1182 ac_prev=dvidir ;; 1183 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 1184 dvidir=$ac_optarg ;; 1185 1186 -enable-* | --enable-*) 1187 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 1188 # Reject names that are not valid shell variable names. 1189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1190 as_fn_error $? "invalid feature name: $ac_useropt" 1191 ac_useropt_orig=$ac_useropt 1192 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1193 case $ac_user_opts in 1194 *" 1195 "enable_$ac_useropt" 1196 "*) ;; 1197 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 1198 ac_unrecognized_sep=', ';; 1199 esac 1200 eval enable_$ac_useropt=\$ac_optarg ;; 1201 1202 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 1203 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 1204 | --exec | --exe | --ex) 1205 ac_prev=exec_prefix ;; 1206 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 1207 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 1208 | --exec=* | --exe=* | --ex=*) 1209 exec_prefix=$ac_optarg ;; 1210 1211 -gas | --gas | --ga | --g) 1212 # Obsolete; use --with-gas. 1213 with_gas=yes ;; 1214 1215 -help | --help | --hel | --he | -h) 1216 ac_init_help=long ;; 1217 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 1218 ac_init_help=recursive ;; 1219 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 1220 ac_init_help=short ;; 1221 1222 -host | --host | --hos | --ho) 1223 ac_prev=host_alias ;; 1224 -host=* | --host=* | --hos=* | --ho=*) 1225 host_alias=$ac_optarg ;; 1226 1227 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 1228 ac_prev=htmldir ;; 1229 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 1230 | --ht=*) 1231 htmldir=$ac_optarg ;; 1232 1233 -includedir | --includedir | --includedi | --included | --include \ 1234 | --includ | --inclu | --incl | --inc) 1235 ac_prev=includedir ;; 1236 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 1237 | --includ=* | --inclu=* | --incl=* | --inc=*) 1238 includedir=$ac_optarg ;; 1239 1240 -infodir | --infodir | --infodi | --infod | --info | --inf) 1241 ac_prev=infodir ;; 1242 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 1243 infodir=$ac_optarg ;; 1244 1245 -libdir | --libdir | --libdi | --libd) 1246 ac_prev=libdir ;; 1247 -libdir=* | --libdir=* | --libdi=* | --libd=*) 1248 libdir=$ac_optarg ;; 1249 1250 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 1251 | --libexe | --libex | --libe) 1252 ac_prev=libexecdir ;; 1253 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 1254 | --libexe=* | --libex=* | --libe=*) 1255 libexecdir=$ac_optarg ;; 1256 1257 -localedir | --localedir | --localedi | --localed | --locale) 1258 ac_prev=localedir ;; 1259 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 1260 localedir=$ac_optarg ;; 1261 1262 -localstatedir | --localstatedir | --localstatedi | --localstated \ 1263 | --localstate | --localstat | --localsta | --localst | --locals) 1264 ac_prev=localstatedir ;; 1265 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 1266 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 1267 localstatedir=$ac_optarg ;; 1268 1269 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 1270 ac_prev=mandir ;; 1271 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 1272 mandir=$ac_optarg ;; 1273 1274 -nfp | --nfp | --nf) 1275 # Obsolete; use --without-fp. 1276 with_fp=no ;; 1277 1278 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 1279 | --no-cr | --no-c | -n) 1280 no_create=yes ;; 1281 1282 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 1283 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 1284 no_recursion=yes ;; 1285 1286 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 1287 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 1288 | --oldin | --oldi | --old | --ol | --o) 1289 ac_prev=oldincludedir ;; 1290 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 1291 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 1292 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 1293 oldincludedir=$ac_optarg ;; 1294 1295 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 1296 ac_prev=prefix ;; 1297 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 1298 prefix=$ac_optarg ;; 1299 1300 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 1301 | --program-pre | --program-pr | --program-p) 1302 ac_prev=program_prefix ;; 1303 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 1304 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 1305 program_prefix=$ac_optarg ;; 1306 1307 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 1308 | --program-suf | --program-su | --program-s) 1309 ac_prev=program_suffix ;; 1310 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 1311 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 1312 program_suffix=$ac_optarg ;; 1313 1314 -program-transform-name | --program-transform-name \ 1315 | --program-transform-nam | --program-transform-na \ 1316 | --program-transform-n | --program-transform- \ 1317 | --program-transform | --program-transfor \ 1318 | --program-transfo | --program-transf \ 1319 | --program-trans | --program-tran \ 1320 | --progr-tra | --program-tr | --program-t) 1321 ac_prev=program_transform_name ;; 1322 -program-transform-name=* | --program-transform-name=* \ 1323 | --program-transform-nam=* | --program-transform-na=* \ 1324 | --program-transform-n=* | --program-transform-=* \ 1325 | --program-transform=* | --program-transfor=* \ 1326 | --program-transfo=* | --program-transf=* \ 1327 | --program-trans=* | --program-tran=* \ 1328 | --progr-tra=* | --program-tr=* | --program-t=*) 1329 program_transform_name=$ac_optarg ;; 1330 1331 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 1332 ac_prev=pdfdir ;; 1333 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 1334 pdfdir=$ac_optarg ;; 1335 1336 -psdir | --psdir | --psdi | --psd | --ps) 1337 ac_prev=psdir ;; 1338 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 1339 psdir=$ac_optarg ;; 1340 1341 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1342 | -silent | --silent | --silen | --sile | --sil) 1343 silent=yes ;; 1344 1345 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1346 ac_prev=sbindir ;; 1347 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 1348 | --sbi=* | --sb=*) 1349 sbindir=$ac_optarg ;; 1350 1351 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 1352 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 1353 | --sharedst | --shareds | --shared | --share | --shar \ 1354 | --sha | --sh) 1355 ac_prev=sharedstatedir ;; 1356 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 1357 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 1358 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 1359 | --sha=* | --sh=*) 1360 sharedstatedir=$ac_optarg ;; 1361 1362 -site | --site | --sit) 1363 ac_prev=site ;; 1364 -site=* | --site=* | --sit=*) 1365 site=$ac_optarg ;; 1366 1367 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 1368 ac_prev=srcdir ;; 1369 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 1370 srcdir=$ac_optarg ;; 1371 1372 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 1373 | --syscon | --sysco | --sysc | --sys | --sy) 1374 ac_prev=sysconfdir ;; 1375 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 1376 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 1377 sysconfdir=$ac_optarg ;; 1378 1379 -target | --target | --targe | --targ | --tar | --ta | --t) 1380 ac_prev=target_alias ;; 1381 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 1382 target_alias=$ac_optarg ;; 1383 1384 -v | -verbose | --verbose | --verbos | --verbo | --verb) 1385 verbose=yes ;; 1386 1387 -version | --version | --versio | --versi | --vers | -V) 1388 ac_init_version=: ;; 1389 1390 -with-* | --with-*) 1391 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1392 # Reject names that are not valid shell variable names. 1393 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1394 as_fn_error $? "invalid package name: $ac_useropt" 1395 ac_useropt_orig=$ac_useropt 1396 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1397 case $ac_user_opts in 1398 *" 1399 "with_$ac_useropt" 1400 "*) ;; 1401 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 1402 ac_unrecognized_sep=', ';; 1403 esac 1404 eval with_$ac_useropt=\$ac_optarg ;; 1405 1406 -without-* | --without-*) 1407 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1408 # Reject names that are not valid shell variable names. 1409 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1410 as_fn_error $? "invalid package name: $ac_useropt" 1411 ac_useropt_orig=$ac_useropt 1412 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1413 case $ac_user_opts in 1414 *" 1415 "with_$ac_useropt" 1416 "*) ;; 1417 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1418 ac_unrecognized_sep=', ';; 1419 esac 1420 eval with_$ac_useropt=no ;; 1421 1422 --x) 1423 # Obsolete; use --with-x. 1424 with_x=yes ;; 1425 1426 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1427 | --x-incl | --x-inc | --x-in | --x-i) 1428 ac_prev=x_includes ;; 1429 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1430 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1431 x_includes=$ac_optarg ;; 1432 1433 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1434 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1435 ac_prev=x_libraries ;; 1436 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1437 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1438 x_libraries=$ac_optarg ;; 1439 1440 -*) as_fn_error $? "unrecognized option: \`$ac_option' 1441 Try \`$0 --help' for more information" 1442 ;; 1443 1444 *=*) 1445 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1446 # Reject names that are not valid shell variable names. 1447 case $ac_envvar in #( 1448 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1449 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1450 esac 1451 eval $ac_envvar=\$ac_optarg 1452 export $ac_envvar ;; 1453 1454 *) 1455 # FIXME: should be removed in autoconf 3.0. 1456 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1457 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1458 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1459 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} 1460 ;; 1461 1462 esac 1463 done 1464 1465 if test -n "$ac_prev"; then 1466 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1467 as_fn_error $? "missing argument to $ac_option" 1468 fi 1469 1470 if test -n "$ac_unrecognized_opts"; then 1471 case $enable_option_checking in 1472 no) ;; 1473 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1474 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1475 esac 1476 fi 1477 1478 # Check all directory arguments for consistency. 1479 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1480 datadir sysconfdir sharedstatedir localstatedir includedir \ 1481 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1482 libdir localedir mandir 1483 do 1484 eval ac_val=\$$ac_var 1485 # Remove trailing slashes. 1486 case $ac_val in 1487 */ ) 1488 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1489 eval $ac_var=\$ac_val;; 1490 esac 1491 # Be sure to have absolute directory names. 1492 case $ac_val in 1493 [\\/$]* | ?:[\\/]* ) continue;; 1494 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1495 esac 1496 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1497 done 1498 1499 # There might be people who depend on the old broken behavior: `$host' 1500 # used to hold the argument of --host etc. 1501 # FIXME: To remove some day. 1502 build=$build_alias 1503 host=$host_alias 1504 target=$target_alias 1505 1506 # FIXME: To remove some day. 1507 if test "x$host_alias" != x; then 1508 if test "x$build_alias" = x; then 1509 cross_compiling=maybe 1510 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. 1511 If a cross compiler is detected then cross compile mode will be used" >&2 1512 elif test "x$build_alias" != "x$host_alias"; then 1513 cross_compiling=yes 1514 fi 1515 fi 1516 1517 ac_tool_prefix= 1518 test -n "$host_alias" && ac_tool_prefix=$host_alias- 1519 1520 test "$silent" = yes && exec 6>/dev/null 1521 1522 1523 ac_pwd=`pwd` && test -n "$ac_pwd" && 1524 ac_ls_di=`ls -di .` && 1525 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1526 as_fn_error $? "working directory cannot be determined" 1527 test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1528 as_fn_error $? "pwd does not report name of working directory" 1529 1530 1531 # Find the source files, if location was not specified. 1532 if test -z "$srcdir"; then 1533 ac_srcdir_defaulted=yes 1534 # Try the directory containing this script, then the parent directory. 1535 ac_confdir=`$as_dirname -- "$as_myself" || 1536 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1537 X"$as_myself" : 'X\(//\)[^/]' \| \ 1538 X"$as_myself" : 'X\(//\)$' \| \ 1539 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1540 $as_echo X"$as_myself" | 1541 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1542 s//\1/ 1543 q 1544 } 1545 /^X\(\/\/\)[^/].*/{ 1546 s//\1/ 1547 q 1548 } 1549 /^X\(\/\/\)$/{ 1550 s//\1/ 1551 q 1552 } 1553 /^X\(\/\).*/{ 1554 s//\1/ 1555 q 1556 } 1557 s/.*/./; q'` 1558 srcdir=$ac_confdir 1559 if test ! -r "$srcdir/$ac_unique_file"; then 1560 srcdir=.. 1561 fi 1562 else 1563 ac_srcdir_defaulted=no 1564 fi 1565 if test ! -r "$srcdir/$ac_unique_file"; then 1566 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1567 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1568 fi 1569 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1570 ac_abs_confdir=`( 1571 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1572 pwd)` 1573 # When building in place, set srcdir=. 1574 if test "$ac_abs_confdir" = "$ac_pwd"; then 1575 srcdir=. 1576 fi 1577 # Remove unnecessary trailing slashes from srcdir. 1578 # Double slashes in file names in object file debugging info 1579 # mess up M-x gdb in Emacs. 1580 case $srcdir in 1581 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1582 esac 1583 for ac_var in $ac_precious_vars; do 1584 eval ac_env_${ac_var}_set=\${${ac_var}+set} 1585 eval ac_env_${ac_var}_value=\$${ac_var} 1586 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1587 eval ac_cv_env_${ac_var}_value=\$${ac_var} 1588 done 1589 1590 # 1591 # Report the --help message. 1592 # 1593 if test "$ac_init_help" = "long"; then 1594 # Omit some internal or obsolete options to make the list less imposing. 1595 # This message is too long to be a string in the A/UX 3.1 sh. 1596 cat <<_ACEOF 1597 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems. 1598 1599 Usage: $0 [OPTION]... [VAR=VALUE]... 1600 1601 To assign environment variables (e.g., CC, CFLAGS...), specify them as 1602 VAR=VALUE. See below for descriptions of some of the useful variables. 1603 1604 Defaults for the options are specified in brackets. 1605 1606 Configuration: 1607 -h, --help display this help and exit 1608 --help=short display options specific to this package 1609 --help=recursive display the short help of all the included packages 1610 -V, --version display version information and exit 1611 -q, --quiet, --silent do not print \`checking ...' messages 1612 --cache-file=FILE cache test results in FILE [disabled] 1613 -C, --config-cache alias for \`--cache-file=config.cache' 1614 -n, --no-create do not create output files 1615 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1616 1617 Installation directories: 1618 --prefix=PREFIX install architecture-independent files in PREFIX 1619 [$ac_default_prefix] 1620 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1621 [PREFIX] 1622 1623 By default, \`make install' will install all the files in 1624 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1625 an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1626 for instance \`--prefix=\$HOME'. 1627 1628 For better control, use the options below. 1629 1630 Fine tuning of the installation directories: 1631 --bindir=DIR user executables [EPREFIX/bin] 1632 --sbindir=DIR system admin executables [EPREFIX/sbin] 1633 --libexecdir=DIR program executables [EPREFIX/libexec] 1634 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1635 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1636 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1637 --libdir=DIR object code libraries [EPREFIX/lib] 1638 --includedir=DIR C header files [PREFIX/include] 1639 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1640 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1641 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1642 --infodir=DIR info documentation [DATAROOTDIR/info] 1643 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1644 --mandir=DIR man documentation [DATAROOTDIR/man] 1645 --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk] 1646 --htmldir=DIR html documentation [DOCDIR] 1647 --dvidir=DIR dvi documentation [DOCDIR] 1648 --pdfdir=DIR pdf documentation [DOCDIR] 1649 --psdir=DIR ps documentation [DOCDIR] 1650 _ACEOF 1651 1652 cat <<\_ACEOF 1653 1654 X features: 1655 --x-includes=DIR X include files are in DIR 1656 --x-libraries=DIR X library files are in DIR 1657 1658 System types: 1659 --build=BUILD configure for building on BUILD [guessed] 1660 --host=HOST cross-compile to build programs to run on HOST [BUILD] 1661 --target=TARGET configure for building compilers for TARGET [HOST] 1662 _ACEOF 1663 fi 1664 1665 if test -n "$ac_init_help"; then 1666 case $ac_init_help in 1667 short | recursive ) echo "Configuration of OpenJDK jdk8:";; 1668 esac 1669 cat <<\_ACEOF 1670 1671 Optional Features: 1672 --disable-option-checking ignore unrecognized --enable/--with options 1673 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1674 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1675 --enable-openjdk-only suppress building custom source even if present 1676 [disabled] 1677 --enable-debug set the debug level to fastdebug (shorthand for 1678 --with-debug-level=fastdebug) [disabled] 1679 --disable-headful disable building headful support (graphical UI 1680 support) [enabled] 1681 --enable-hotspot-test-in-build 1682 run the Queens test after Hotspot build [disabled] 1683 --enable-unlimited-crypto 1684 Enable unlimited crypto policy [disabled] 1685 --disable-debug-symbols disable generation of debug symbols [enabled] 1686 --disable-zip-debug-info 1687 disable zipping of debug-info files [enabled] 1688 --disable-macosx-runtime-support 1689 disable the use of MacOSX Java runtime support 1690 framework [enabled] 1691 --enable-sjavac use sjavac to do fast incremental compiles 1692 [disabled] 1693 --disable-precompiled-headers 1694 disable using precompiled headers when compiling C++ 1695 [enabled] 1696 --disable-ccache disable using ccache to speed up recompilations 1697 [enabled] 1698 1699 Optional Packages: 1700 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1701 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1702 --with-custom-make-dir use this directory for custom build/make files 1703 --with-target-bits build 32-bit or 64-bit binaries (for platforms that 1704 support it), e.g. --with-target-bits=32 [guessed] 1705 --with-sys-root pass this sys-root to the compilers and tools (for 1706 cross-compiling) 1707 --with-tools-dir search this directory for compilers and tools (for 1708 cross-compiling) 1709 --with-devkit use this directory as base for tools-dir and 1710 sys-root (for cross-compiling) 1711 --with-jdk-variant JDK variant to build (normal) [normal] 1712 --with-jvm-variants JVM variants (separated by commas) to build (server, 1713 client, minimal1, kernel, zero, zeroshark) [server] 1714 --with-debug-level set the debug level (release, fastdebug, slowdebug) 1715 [release] 1716 --with-conf-name use this as the name of the configuration [generated 1717 from important configuration options] 1718 --with-builddeps-conf use this configuration file for the builddeps 1719 --with-builddeps-server download and use build dependencies from this server 1720 url 1721 --with-builddeps-dir store downloaded build dependencies here 1722 [/localhome/builddeps] 1723 --with-builddeps-group chgrp the downloaded build dependencies to this 1724 group 1725 --with-cacerts-file specify alternative cacerts file 1726 --with-milestone Set milestone value for build [internal] 1727 --with-build-number Set build number value for build [b00] 1728 --with-user-release-suffix 1729 Add a custom string to the version string if build 1730 number isn't set.[username_builddateb00] 1731 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed] 1732 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all 1733 invocations of the Boot JDK, overriding the default 1734 values, e.g --with-boot-jdk-jvmargs="-Xmx8G 1735 -enableassertions" 1736 --with-add-source-root for each and every source directory, look in this 1737 additional source root for the same directory; if it 1738 exists and have files in it, include it in the build 1739 --with-override-source-root 1740 for each and every source directory, look in this 1741 override source root for the same directory; if it 1742 exists, use that directory instead and ignore the 1743 directory in the original source root 1744 --with-adds-and-overrides 1745 use the subdirs 'adds' and 'overrides' in the 1746 specified directory as add-source-root and 1747 override-source-root 1748 --with-override-langtools 1749 use this langtools dir for the build 1750 --with-override-corba use this corba dir for the build 1751 --with-override-jaxp use this jaxp dir for the build 1752 --with-override-jaxws use this jaxws dir for the build 1753 --with-override-hotspot use this hotspot dir for the build 1754 --with-override-jdk use this jdk dir for the build 1755 --with-import-hotspot import hotspot binaries from this jdk image or 1756 hotspot build dist dir instead of building from 1757 source 1758 --with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows 1759 only) [probed] 1760 --with-dxsdk the DirectX SDK (Windows only) [probed] 1761 --with-dxsdk-lib the DirectX SDK lib directory (Windows only) 1762 [probed] 1763 --with-dxsdk-include the DirectX SDK include directory (Windows only) 1764 [probed] 1765 --with-extra-cflags extra flags to be used when compiling jdk c-files 1766 --with-extra-cxxflags extra flags to be used when compiling jdk c++-files 1767 --with-extra-ldflags extra flags to be used when linking jdk 1768 --with-x use the X Window System 1769 --with-cups specify prefix directory for the cups package 1770 (expecting the headers under PATH/include) 1771 --with-cups-include specify directory for the cups include files 1772 --with-freetype specify prefix directory for the freetype2 package 1773 (expecting the libraries under PATH/lib and the 1774 headers under PATH/include) 1775 --with-alsa specify prefix directory for the alsa package 1776 (expecting the libraries under PATH/lib and the 1777 headers under PATH/include) 1778 --with-alsa-include specify directory for the alsa include files 1779 --with-alsa-lib specify directory for the alsa library 1780 --with-giflib use giflib from build system or OpenJDK source 1781 (system, bundled) [bundled] 1782 --with-zlib use zlib from build system or OpenJDK source 1783 (system, bundled) [bundled] 1784 --with-stdc++lib=<static>,<dynamic>,<default> 1785 force linking of the C++ runtime on Linux to either 1786 static or dynamic, default is static with dynamic as 1787 fallback 1788 --with-num-cores number of cores in the build system, e.g. 1789 --with-num-cores=8 [probed] 1790 --with-memory-size memory (in MB) available in the build system, e.g. 1791 --with-memory-size=1024 [probed] 1792 --with-jobs number of parallel jobs to let make run [calculated 1793 based on cores and memory] 1794 --with-sjavac-server-java 1795 use this java binary for running the sjavac 1796 background server [Boot JDK java] 1797 --with-sjavac-server-cores 1798 use at most this number of concurrent threads on the 1799 sjavac server [probed] 1800 --with-ccache-dir where to store ccache files [~/.ccache] 1801 1802 Some influential environment variables: 1803 PKG_CONFIG path to pkg-config utility 1804 CC C compiler command 1805 CFLAGS C compiler flags 1806 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 1807 nonstandard directory <lib dir> 1808 LIBS libraries to pass to the linker, e.g. -l<library> 1809 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 1810 you have headers in a nonstandard directory <include dir> 1811 CXX C++ compiler command 1812 CXXFLAGS C++ compiler flags 1813 OBJC Objective C compiler command 1814 OBJCFLAGS Objective C compiler flags 1815 CPP C preprocessor 1816 CXXCPP C++ preprocessor 1817 XMKMF Path to xmkmf, Makefile generator for X Window System 1818 FREETYPE2_CFLAGS 1819 C compiler flags for FREETYPE2, overriding pkg-config 1820 FREETYPE2_LIBS 1821 linker flags for FREETYPE2, overriding pkg-config 1822 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config 1823 ALSA_LIBS linker flags for ALSA, overriding pkg-config 1824 LIBFFI_CFLAGS 1825 C compiler flags for LIBFFI, overriding pkg-config 1826 LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config 1827 1828 Use these variables to override the choices made by `configure' or to help 1829 it to find libraries and programs with nonstandard names/locations. 1830 1831 Report bugs to <build-dev@openjdk.java.net>. 1832 OpenJDK home page: <http://openjdk.java.net>. 1833 _ACEOF 1834 ac_status=$? 1835 fi 1836 1837 if test "$ac_init_help" = "recursive"; then 1838 # If there are subdirs, report their specific --help. 1839 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1840 test -d "$ac_dir" || 1841 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1842 continue 1843 ac_builddir=. 1844 1845 case "$ac_dir" in 1846 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1847 *) 1848 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1849 # A ".." for each directory in $ac_dir_suffix. 1850 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1851 case $ac_top_builddir_sub in 1852 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1853 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1854 esac ;; 1855 esac 1856 ac_abs_top_builddir=$ac_pwd 1857 ac_abs_builddir=$ac_pwd$ac_dir_suffix 1858 # for backward compatibility: 1859 ac_top_builddir=$ac_top_build_prefix 1860 1861 case $srcdir in 1862 .) # We are building in place. 1863 ac_srcdir=. 1864 ac_top_srcdir=$ac_top_builddir_sub 1865 ac_abs_top_srcdir=$ac_pwd ;; 1866 [\\/]* | ?:[\\/]* ) # Absolute name. 1867 ac_srcdir=$srcdir$ac_dir_suffix; 1868 ac_top_srcdir=$srcdir 1869 ac_abs_top_srcdir=$srcdir ;; 1870 *) # Relative name. 1871 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1872 ac_top_srcdir=$ac_top_build_prefix$srcdir 1873 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1874 esac 1875 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1876 1877 cd "$ac_dir" || { ac_status=$?; continue; } 1878 # Check for guested configure. 1879 if test -f "$ac_srcdir/configure.gnu"; then 1880 echo && 1881 $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1882 elif test -f "$ac_srcdir/configure"; then 1883 echo && 1884 $SHELL "$ac_srcdir/configure" --help=recursive 1885 else 1886 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1887 fi || ac_status=$? 1888 cd "$ac_pwd" || { ac_status=$?; break; } 1889 done 1890 fi 1891 1892 test -n "$ac_init_help" && exit $ac_status 1893 if $ac_init_version; then 1894 cat <<\_ACEOF 1895 OpenJDK configure jdk8 1896 generated by GNU Autoconf 2.67 1897 1898 Copyright (C) 2010 Free Software Foundation, Inc. 1899 This configure script is free software; the Free Software Foundation 1900 gives unlimited permission to copy, distribute and modify it. 1901 _ACEOF 1902 exit 1903 fi 1904 1905 ## ------------------------ ## 1906 ## Autoconf initialization. ## 1907 ## ------------------------ ## 1908 1909 # ac_fn_c_try_compile LINENO 1910 # -------------------------- 1911 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1912 ac_fn_c_try_compile () 1913 { 1914 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1915 rm -f conftest.$ac_objext 1916 if { { ac_try="$ac_compile" 1917 case "(($ac_try" in 1918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1919 *) ac_try_echo=$ac_try;; 1920 esac 1921 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1922 $as_echo "$ac_try_echo"; } >&5 1923 (eval "$ac_compile") 2>conftest.err 1924 ac_status=$? 1925 if test -s conftest.err; then 1926 grep -v '^ *+' conftest.err >conftest.er1 1927 cat conftest.er1 >&5 1928 mv -f conftest.er1 conftest.err 1929 fi 1930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1931 test $ac_status = 0; } && { 1932 test -z "$ac_c_werror_flag" || 1933 test ! -s conftest.err 1934 } && test -s conftest.$ac_objext; then : 1935 ac_retval=0 1936 else 1937 $as_echo "$as_me: failed program was:" >&5 1938 sed 's/^/| /' conftest.$ac_ext >&5 1939 1940 ac_retval=1 1941 fi 1942 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 1943 as_fn_set_status $ac_retval 1944 1945 } # ac_fn_c_try_compile 1946 1947 # ac_fn_cxx_try_compile LINENO 1948 # ---------------------------- 1949 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1950 ac_fn_cxx_try_compile () 1951 { 1952 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1953 rm -f conftest.$ac_objext 1954 if { { ac_try="$ac_compile" 1955 case "(($ac_try" in 1956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1957 *) ac_try_echo=$ac_try;; 1958 esac 1959 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1960 $as_echo "$ac_try_echo"; } >&5 1961 (eval "$ac_compile") 2>conftest.err 1962 ac_status=$? 1963 if test -s conftest.err; then 1964 grep -v '^ *+' conftest.err >conftest.er1 1965 cat conftest.er1 >&5 1966 mv -f conftest.er1 conftest.err 1967 fi 1968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1969 test $ac_status = 0; } && { 1970 test -z "$ac_cxx_werror_flag" || 1971 test ! -s conftest.err 1972 } && test -s conftest.$ac_objext; then : 1973 ac_retval=0 1974 else 1975 $as_echo "$as_me: failed program was:" >&5 1976 sed 's/^/| /' conftest.$ac_ext >&5 1977 1978 ac_retval=1 1979 fi 1980 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 1981 as_fn_set_status $ac_retval 1982 1983 } # ac_fn_cxx_try_compile 1984 1985 # ac_fn_objc_try_compile LINENO 1986 # ----------------------------- 1987 # Try to compile conftest.$ac_ext, and return whether this succeeded. 1988 ac_fn_objc_try_compile () 1989 { 1990 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1991 rm -f conftest.$ac_objext 1992 if { { ac_try="$ac_compile" 1993 case "(($ac_try" in 1994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1995 *) ac_try_echo=$ac_try;; 1996 esac 1997 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1998 $as_echo "$ac_try_echo"; } >&5 1999 (eval "$ac_compile") 2>conftest.err 2000 ac_status=$? 2001 if test -s conftest.err; then 2002 grep -v '^ *+' conftest.err >conftest.er1 2003 cat conftest.er1 >&5 2004 mv -f conftest.er1 conftest.err 2005 fi 2006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2007 test $ac_status = 0; } && { 2008 test -z "$ac_objc_werror_flag" || 2009 test ! -s conftest.err 2010 } && test -s conftest.$ac_objext; then : 2011 ac_retval=0 2012 else 2013 $as_echo "$as_me: failed program was:" >&5 2014 sed 's/^/| /' conftest.$ac_ext >&5 2015 2016 ac_retval=1 2017 fi 2018 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2019 as_fn_set_status $ac_retval 2020 2021 } # ac_fn_objc_try_compile 2022 2023 # ac_fn_c_try_cpp LINENO 2024 # ---------------------- 2025 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2026 ac_fn_c_try_cpp () 2027 { 2028 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2029 if { { ac_try="$ac_cpp conftest.$ac_ext" 2030 case "(($ac_try" in 2031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2032 *) ac_try_echo=$ac_try;; 2033 esac 2034 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2035 $as_echo "$ac_try_echo"; } >&5 2036 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2037 ac_status=$? 2038 if test -s conftest.err; then 2039 grep -v '^ *+' conftest.err >conftest.er1 2040 cat conftest.er1 >&5 2041 mv -f conftest.er1 conftest.err 2042 fi 2043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2044 test $ac_status = 0; } > conftest.i && { 2045 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2046 test ! -s conftest.err 2047 }; then : 2048 ac_retval=0 2049 else 2050 $as_echo "$as_me: failed program was:" >&5 2051 sed 's/^/| /' conftest.$ac_ext >&5 2052 2053 ac_retval=1 2054 fi 2055 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2056 as_fn_set_status $ac_retval 2057 2058 } # ac_fn_c_try_cpp 2059 2060 # ac_fn_cxx_try_cpp LINENO 2061 # ------------------------ 2062 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2063 ac_fn_cxx_try_cpp () 2064 { 2065 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2066 if { { ac_try="$ac_cpp conftest.$ac_ext" 2067 case "(($ac_try" in 2068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2069 *) ac_try_echo=$ac_try;; 2070 esac 2071 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2072 $as_echo "$ac_try_echo"; } >&5 2073 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2074 ac_status=$? 2075 if test -s conftest.err; then 2076 grep -v '^ *+' conftest.err >conftest.er1 2077 cat conftest.er1 >&5 2078 mv -f conftest.er1 conftest.err 2079 fi 2080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2081 test $ac_status = 0; } > conftest.i && { 2082 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || 2083 test ! -s conftest.err 2084 }; then : 2085 ac_retval=0 2086 else 2087 $as_echo "$as_me: failed program was:" >&5 2088 sed 's/^/| /' conftest.$ac_ext >&5 2089 2090 ac_retval=1 2091 fi 2092 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2093 as_fn_set_status $ac_retval 2094 2095 } # ac_fn_cxx_try_cpp 2096 2097 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES 2098 # --------------------------------------------------------- 2099 # Tests whether HEADER exists, giving a warning if it cannot be compiled using 2100 # the include files in INCLUDES and setting the cache variable VAR 2101 # accordingly. 2102 ac_fn_cxx_check_header_mongrel () 2103 { 2104 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2105 if eval "test \"\${$3+set}\"" = set; then : 2106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2107 $as_echo_n "checking for $2... " >&6; } 2108 if eval "test \"\${$3+set}\"" = set; then : 2109 $as_echo_n "(cached) " >&6 2110 fi 2111 eval ac_res=\$$3 2112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2113 $as_echo "$ac_res" >&6; } 2114 else 2115 # Is the header compilable? 2116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 2117 $as_echo_n "checking $2 usability... " >&6; } 2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2119 /* end confdefs.h. */ 2120 $4 2121 #include <$2> 2122 _ACEOF 2123 if ac_fn_cxx_try_compile "$LINENO"; then : 2124 ac_header_compiler=yes 2125 else 2126 ac_header_compiler=no 2127 fi 2128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 2130 $as_echo "$ac_header_compiler" >&6; } 2131 2132 # Is the header present? 2133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 2134 $as_echo_n "checking $2 presence... " >&6; } 2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2136 /* end confdefs.h. */ 2137 #include <$2> 2138 _ACEOF 2139 if ac_fn_cxx_try_cpp "$LINENO"; then : 2140 ac_header_preproc=yes 2141 else 2142 ac_header_preproc=no 2143 fi 2144 rm -f conftest.err conftest.i conftest.$ac_ext 2145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2146 $as_echo "$ac_header_preproc" >&6; } 2147 2148 # So? What about this header? 2149 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( 2150 yes:no: ) 2151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 2152 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} 2153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2154 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2155 ;; 2156 no:yes:* ) 2157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 2158 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} 2159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 2160 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} 2161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 2162 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} 2163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 2164 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} 2165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2166 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2167 ( $as_echo "## ----------------------------------------- ## 2168 ## Report this to build-dev@openjdk.java.net ## 2169 ## ----------------------------------------- ##" 2170 ) | sed "s/^/$as_me: WARNING: /" >&2 2171 ;; 2172 esac 2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2174 $as_echo_n "checking for $2... " >&6; } 2175 if eval "test \"\${$3+set}\"" = set; then : 2176 $as_echo_n "(cached) " >&6 2177 else 2178 eval "$3=\$ac_header_compiler" 2179 fi 2180 eval ac_res=\$$3 2181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2182 $as_echo "$ac_res" >&6; } 2183 fi 2184 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2185 2186 } # ac_fn_cxx_check_header_mongrel 2187 2188 # ac_fn_cxx_try_run LINENO 2189 # ------------------------ 2190 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes 2191 # that executables *can* be run. 2192 ac_fn_cxx_try_run () 2193 { 2194 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2195 if { { ac_try="$ac_link" 2196 case "(($ac_try" in 2197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2198 *) ac_try_echo=$ac_try;; 2199 esac 2200 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2201 $as_echo "$ac_try_echo"; } >&5 2202 (eval "$ac_link") 2>&5 2203 ac_status=$? 2204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2205 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 2206 { { case "(($ac_try" in 2207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2208 *) ac_try_echo=$ac_try;; 2209 esac 2210 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2211 $as_echo "$ac_try_echo"; } >&5 2212 (eval "$ac_try") 2>&5 2213 ac_status=$? 2214 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2215 test $ac_status = 0; }; }; then : 2216 ac_retval=0 2217 else 2218 $as_echo "$as_me: program exited with status $ac_status" >&5 2219 $as_echo "$as_me: failed program was:" >&5 2220 sed 's/^/| /' conftest.$ac_ext >&5 2221 2222 ac_retval=$ac_status 2223 fi 2224 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2225 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2226 as_fn_set_status $ac_retval 2227 2228 } # ac_fn_cxx_try_run 2229 2230 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES 2231 # --------------------------------------------------------- 2232 # Tests whether HEADER exists and can be compiled using the include files in 2233 # INCLUDES, setting the cache variable VAR accordingly. 2234 ac_fn_cxx_check_header_compile () 2235 { 2236 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2238 $as_echo_n "checking for $2... " >&6; } 2239 if eval "test \"\${$3+set}\"" = set; then : 2240 $as_echo_n "(cached) " >&6 2241 else 2242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2243 /* end confdefs.h. */ 2244 $4 2245 #include <$2> 2246 _ACEOF 2247 if ac_fn_cxx_try_compile "$LINENO"; then : 2248 eval "$3=yes" 2249 else 2250 eval "$3=no" 2251 fi 2252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2253 fi 2254 eval ac_res=\$$3 2255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2256 $as_echo "$ac_res" >&6; } 2257 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2258 2259 } # ac_fn_cxx_check_header_compile 2260 2261 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES 2262 # ---------------------------------------------- 2263 # Tries to find the compile-time value of EXPR in a program that includes 2264 # INCLUDES, setting VAR accordingly. Returns whether the value could be 2265 # computed 2266 ac_fn_cxx_compute_int () 2267 { 2268 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2269 if test "$cross_compiling" = yes; then 2270 # Depending upon the size, compute the lo and hi bounds. 2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2272 /* end confdefs.h. */ 2273 $4 2274 int 2275 main () 2276 { 2277 static int test_array [1 - 2 * !(($2) >= 0)]; 2278 test_array [0] = 0 2279 2280 ; 2281 return 0; 2282 } 2283 _ACEOF 2284 if ac_fn_cxx_try_compile "$LINENO"; then : 2285 ac_lo=0 ac_mid=0 2286 while :; do 2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2288 /* end confdefs.h. */ 2289 $4 2290 int 2291 main () 2292 { 2293 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2294 test_array [0] = 0 2295 2296 ; 2297 return 0; 2298 } 2299 _ACEOF 2300 if ac_fn_cxx_try_compile "$LINENO"; then : 2301 ac_hi=$ac_mid; break 2302 else 2303 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 2304 if test $ac_lo -le $ac_mid; then 2305 ac_lo= ac_hi= 2306 break 2307 fi 2308 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 2309 fi 2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2311 done 2312 else 2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2314 /* end confdefs.h. */ 2315 $4 2316 int 2317 main () 2318 { 2319 static int test_array [1 - 2 * !(($2) < 0)]; 2320 test_array [0] = 0 2321 2322 ; 2323 return 0; 2324 } 2325 _ACEOF 2326 if ac_fn_cxx_try_compile "$LINENO"; then : 2327 ac_hi=-1 ac_mid=-1 2328 while :; do 2329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2330 /* end confdefs.h. */ 2331 $4 2332 int 2333 main () 2334 { 2335 static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 2336 test_array [0] = 0 2337 2338 ; 2339 return 0; 2340 } 2341 _ACEOF 2342 if ac_fn_cxx_try_compile "$LINENO"; then : 2343 ac_lo=$ac_mid; break 2344 else 2345 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 2346 if test $ac_mid -le $ac_hi; then 2347 ac_lo= ac_hi= 2348 break 2349 fi 2350 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 2351 fi 2352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2353 done 2354 else 2355 ac_lo= ac_hi= 2356 fi 2357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2358 fi 2359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2360 # Binary search between lo and hi bounds. 2361 while test "x$ac_lo" != "x$ac_hi"; do 2362 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 2363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2364 /* end confdefs.h. */ 2365 $4 2366 int 2367 main () 2368 { 2369 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2370 test_array [0] = 0 2371 2372 ; 2373 return 0; 2374 } 2375 _ACEOF 2376 if ac_fn_cxx_try_compile "$LINENO"; then : 2377 ac_hi=$ac_mid 2378 else 2379 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 2380 fi 2381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2382 done 2383 case $ac_lo in #(( 2384 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 2385 '') ac_retval=1 ;; 2386 esac 2387 else 2388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2389 /* end confdefs.h. */ 2390 $4 2391 static long int longval () { return $2; } 2392 static unsigned long int ulongval () { return $2; } 2393 #include <stdio.h> 2394 #include <stdlib.h> 2395 int 2396 main () 2397 { 2398 2399 FILE *f = fopen ("conftest.val", "w"); 2400 if (! f) 2401 return 1; 2402 if (($2) < 0) 2403 { 2404 long int i = longval (); 2405 if (i != ($2)) 2406 return 1; 2407 fprintf (f, "%ld", i); 2408 } 2409 else 2410 { 2411 unsigned long int i = ulongval (); 2412 if (i != ($2)) 2413 return 1; 2414 fprintf (f, "%lu", i); 2415 } 2416 /* Do not output a trailing newline, as this causes \r\n confusion 2417 on some platforms. */ 2418 return ferror (f) || fclose (f) != 0; 2419 2420 ; 2421 return 0; 2422 } 2423 _ACEOF 2424 if ac_fn_cxx_try_run "$LINENO"; then : 2425 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 2426 else 2427 ac_retval=1 2428 fi 2429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 2430 conftest.$ac_objext conftest.beam conftest.$ac_ext 2431 rm -f conftest.val 2432 2433 fi 2434 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2435 as_fn_set_status $ac_retval 2436 2437 } # ac_fn_cxx_compute_int 2438 2439 # ac_fn_cxx_try_link LINENO 2440 # ------------------------- 2441 # Try to link conftest.$ac_ext, and return whether this succeeded. 2442 ac_fn_cxx_try_link () 2443 { 2444 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2445 rm -f conftest.$ac_objext conftest$ac_exeext 2446 if { { ac_try="$ac_link" 2447 case "(($ac_try" in 2448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2449 *) ac_try_echo=$ac_try;; 2450 esac 2451 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2452 $as_echo "$ac_try_echo"; } >&5 2453 (eval "$ac_link") 2>conftest.err 2454 ac_status=$? 2455 if test -s conftest.err; then 2456 grep -v '^ *+' conftest.err >conftest.er1 2457 cat conftest.er1 >&5 2458 mv -f conftest.er1 conftest.err 2459 fi 2460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2461 test $ac_status = 0; } && { 2462 test -z "$ac_cxx_werror_flag" || 2463 test ! -s conftest.err 2464 } && test -s conftest$ac_exeext && { 2465 test "$cross_compiling" = yes || 2466 $as_test_x conftest$ac_exeext 2467 }; then : 2468 ac_retval=0 2469 else 2470 $as_echo "$as_me: failed program was:" >&5 2471 sed 's/^/| /' conftest.$ac_ext >&5 2472 2473 ac_retval=1 2474 fi 2475 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 2476 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 2477 # interfere with the next link command; also delete a directory that is 2478 # left behind by Apple's compiler. We do this before executing the actions. 2479 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2480 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2481 as_fn_set_status $ac_retval 2482 2483 } # ac_fn_cxx_try_link 2484 2485 # ac_fn_cxx_check_func LINENO FUNC VAR 2486 # ------------------------------------ 2487 # Tests whether FUNC exists, setting the cache variable VAR accordingly 2488 ac_fn_cxx_check_func () 2489 { 2490 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2492 $as_echo_n "checking for $2... " >&6; } 2493 if eval "test \"\${$3+set}\"" = set; then : 2494 $as_echo_n "(cached) " >&6 2495 else 2496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2497 /* end confdefs.h. */ 2498 /* Define $2 to an innocuous variant, in case <limits.h> declares $2. 2499 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 2500 #define $2 innocuous_$2 2501 2502 /* System header to define __stub macros and hopefully few prototypes, 2503 which can conflict with char $2 (); below. 2504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 2505 <limits.h> exists even on freestanding compilers. */ 2506 2507 #ifdef __STDC__ 2508 # include <limits.h> 2509 #else 2510 # include <assert.h> 2511 #endif 2512 2513 #undef $2 2514 2515 /* Override any GCC internal prototype to avoid an error. 2516 Use char because int might match the return type of a GCC 2517 builtin and then its argument prototype would still apply. */ 2518 #ifdef __cplusplus 2519 extern "C" 2520 #endif 2521 char $2 (); 2522 /* The GNU C library defines this for functions which it implements 2523 to always fail with ENOSYS. Some functions are actually named 2524 something starting with __ and the normal name is an alias. */ 2525 #if defined __stub_$2 || defined __stub___$2 2526 choke me 2527 #endif 2528 2529 int 2530 main () 2531 { 2532 return $2 (); 2533 ; 2534 return 0; 2535 } 2536 _ACEOF 2537 if ac_fn_cxx_try_link "$LINENO"; then : 2538 eval "$3=yes" 2539 else 2540 eval "$3=no" 2541 fi 2542 rm -f core conftest.err conftest.$ac_objext \ 2543 conftest$ac_exeext conftest.$ac_ext 2544 fi 2545 eval ac_res=\$$3 2546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2547 $as_echo "$ac_res" >&6; } 2548 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2549 2550 } # ac_fn_cxx_check_func 2551 2552 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 2553 # ------------------------------------------------------- 2554 # Tests whether HEADER exists and can be compiled using the include files in 2555 # INCLUDES, setting the cache variable VAR accordingly. 2556 ac_fn_c_check_header_compile () 2557 { 2558 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2560 $as_echo_n "checking for $2... " >&6; } 2561 if eval "test \"\${$3+set}\"" = set; then : 2562 $as_echo_n "(cached) " >&6 2563 else 2564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2565 /* end confdefs.h. */ 2566 $4 2567 #include <$2> 2568 _ACEOF 2569 if ac_fn_c_try_compile "$LINENO"; then : 2570 eval "$3=yes" 2571 else 2572 eval "$3=no" 2573 fi 2574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2575 fi 2576 eval ac_res=\$$3 2577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2578 $as_echo "$ac_res" >&6; } 2579 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2580 2581 } # ac_fn_c_check_header_compile 2582 cat >config.log <<_ACEOF 2583 This file contains any messages produced by compilers while 2584 running configure, to aid debugging if configure makes a mistake. 2585 2586 It was created by OpenJDK $as_me jdk8, which was 2587 generated by GNU Autoconf 2.67. Invocation command line was 2588 2589 $ $0 $@ 2590 2591 _ACEOF 2592 exec 5>>config.log 2593 { 2594 cat <<_ASUNAME 2595 ## --------- ## 2596 ## Platform. ## 2597 ## --------- ## 2598 2599 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 2600 uname -m = `(uname -m) 2>/dev/null || echo unknown` 2601 uname -r = `(uname -r) 2>/dev/null || echo unknown` 2602 uname -s = `(uname -s) 2>/dev/null || echo unknown` 2603 uname -v = `(uname -v) 2>/dev/null || echo unknown` 2604 2605 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 2606 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 2607 2608 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 2609 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 2610 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 2611 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 2612 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 2613 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 2614 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 2615 2616 _ASUNAME 2617 2618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2619 for as_dir in $PATH 2620 do 2621 IFS=$as_save_IFS 2622 test -z "$as_dir" && as_dir=. 2623 $as_echo "PATH: $as_dir" 2624 done 2625 IFS=$as_save_IFS 2626 2627 } >&5 2628 2629 cat >&5 <<_ACEOF 2630 2631 2632 ## ----------- ## 2633 ## Core tests. ## 2634 ## ----------- ## 2635 2636 _ACEOF 2637 2638 2639 # Keep a trace of the command line. 2640 # Strip out --no-create and --no-recursion so they do not pile up. 2641 # Strip out --silent because we don't want to record it for future runs. 2642 # Also quote any args containing shell meta-characters. 2643 # Make two passes to allow for proper duplicate-argument suppression. 2644 ac_configure_args= 2645 ac_configure_args0= 2646 ac_configure_args1= 2647 ac_must_keep_next=false 2648 for ac_pass in 1 2 2649 do 2650 for ac_arg 2651 do 2652 case $ac_arg in 2653 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 2654 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2655 | -silent | --silent | --silen | --sile | --sil) 2656 continue ;; 2657 *\'*) 2658 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2659 esac 2660 case $ac_pass in 2661 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2662 2) 2663 as_fn_append ac_configure_args1 " '$ac_arg'" 2664 if test $ac_must_keep_next = true; then 2665 ac_must_keep_next=false # Got value, back to normal. 2666 else 2667 case $ac_arg in 2668 *=* | --config-cache | -C | -disable-* | --disable-* \ 2669 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 2670 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 2671 | -with-* | --with-* | -without-* | --without-* | --x) 2672 case "$ac_configure_args0 " in 2673 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 2674 esac 2675 ;; 2676 -* ) ac_must_keep_next=true ;; 2677 esac 2678 fi 2679 as_fn_append ac_configure_args " '$ac_arg'" 2680 ;; 2681 esac 2682 done 2683 done 2684 { ac_configure_args0=; unset ac_configure_args0;} 2685 { ac_configure_args1=; unset ac_configure_args1;} 2686 2687 # When interrupted or exit'd, cleanup temporary files, and complete 2688 # config.log. We remove comments because anyway the quotes in there 2689 # would cause problems or look ugly. 2690 # WARNING: Use '\'' to represent an apostrophe within the trap. 2691 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 2692 trap 'exit_status=$? 2693 # Save into config.log some information that might help in debugging. 2694 { 2695 echo 2696 2697 $as_echo "## ---------------- ## 2698 ## Cache variables. ## 2699 ## ---------------- ##" 2700 echo 2701 # The following way of writing the cache mishandles newlines in values, 2702 ( 2703 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 2704 eval ac_val=\$$ac_var 2705 case $ac_val in #( 2706 *${as_nl}*) 2707 case $ac_var in #( 2708 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2709 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2710 esac 2711 case $ac_var in #( 2712 _ | IFS | as_nl) ;; #( 2713 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2714 *) { eval $ac_var=; unset $ac_var;} ;; 2715 esac ;; 2716 esac 2717 done 2718 (set) 2>&1 | 2719 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 2720 *${as_nl}ac_space=\ *) 2721 sed -n \ 2722 "s/'\''/'\''\\\\'\'''\''/g; 2723 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 2724 ;; #( 2725 *) 2726 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2727 ;; 2728 esac | 2729 sort 2730 ) 2731 echo 2732 2733 $as_echo "## ----------------- ## 2734 ## Output variables. ## 2735 ## ----------------- ##" 2736 echo 2737 for ac_var in $ac_subst_vars 2738 do 2739 eval ac_val=\$$ac_var 2740 case $ac_val in 2741 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2742 esac 2743 $as_echo "$ac_var='\''$ac_val'\''" 2744 done | sort 2745 echo 2746 2747 if test -n "$ac_subst_files"; then 2748 $as_echo "## ------------------- ## 2749 ## File substitutions. ## 2750 ## ------------------- ##" 2751 echo 2752 for ac_var in $ac_subst_files 2753 do 2754 eval ac_val=\$$ac_var 2755 case $ac_val in 2756 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2757 esac 2758 $as_echo "$ac_var='\''$ac_val'\''" 2759 done | sort 2760 echo 2761 fi 2762 2763 if test -s confdefs.h; then 2764 $as_echo "## ----------- ## 2765 ## confdefs.h. ## 2766 ## ----------- ##" 2767 echo 2768 cat confdefs.h 2769 echo 2770 fi 2771 test "$ac_signal" != 0 && 2772 $as_echo "$as_me: caught signal $ac_signal" 2773 $as_echo "$as_me: exit $exit_status" 2774 } >&5 2775 rm -f core *.core core.conftest.* && 2776 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 2777 exit $exit_status 2778 ' 0 2779 for ac_signal in 1 2 13 15; do 2780 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 2781 done 2782 ac_signal=0 2783 2784 # confdefs.h avoids OS command line length limits that DEFS can exceed. 2785 rm -f -r conftest* confdefs.h 2786 2787 $as_echo "/* confdefs.h */" > confdefs.h 2788 2789 # Predefined preprocessor variables. 2790 2791 cat >>confdefs.h <<_ACEOF 2792 #define PACKAGE_NAME "$PACKAGE_NAME" 2793 _ACEOF 2794 2795 cat >>confdefs.h <<_ACEOF 2796 #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 2797 _ACEOF 2798 2799 cat >>confdefs.h <<_ACEOF 2800 #define PACKAGE_VERSION "$PACKAGE_VERSION" 2801 _ACEOF 2802 2803 cat >>confdefs.h <<_ACEOF 2804 #define PACKAGE_STRING "$PACKAGE_STRING" 2805 _ACEOF 2806 2807 cat >>confdefs.h <<_ACEOF 2808 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 2809 _ACEOF 2810 2811 cat >>confdefs.h <<_ACEOF 2812 #define PACKAGE_URL "$PACKAGE_URL" 2813 _ACEOF 2814 2815 2816 # Let the site file select an alternate cache file if it wants to. 2817 # Prefer an explicitly selected file to automatically selected ones. 2818 ac_site_file1=NONE 2819 ac_site_file2=NONE 2820 if test -n "$CONFIG_SITE"; then 2821 # We do not want a PATH search for config.site. 2822 case $CONFIG_SITE in #(( 2823 -*) ac_site_file1=./$CONFIG_SITE;; 2824 */*) ac_site_file1=$CONFIG_SITE;; 2825 *) ac_site_file1=./$CONFIG_SITE;; 2826 esac 2827 elif test "x$prefix" != xNONE; then 2828 ac_site_file1=$prefix/share/config.site 2829 ac_site_file2=$prefix/etc/config.site 2830 else 2831 ac_site_file1=$ac_default_prefix/share/config.site 2832 ac_site_file2=$ac_default_prefix/etc/config.site 2833 fi 2834 for ac_site_file in "$ac_site_file1" "$ac_site_file2" 2835 do 2836 test "x$ac_site_file" = xNONE && continue 2837 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 2838 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2839 $as_echo "$as_me: loading site script $ac_site_file" >&6;} 2840 sed 's/^/| /' "$ac_site_file" >&5 2841 . "$ac_site_file" \ 2842 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2843 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2844 as_fn_error $? "failed to load site script $ac_site_file 2845 See \`config.log' for more details" "$LINENO" 5 ; } 2846 fi 2847 done 2848 2849 if test -r "$cache_file"; then 2850 # Some versions of bash will fail to source /dev/null (special files 2851 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 2852 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 2853 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 2854 $as_echo "$as_me: loading cache $cache_file" >&6;} 2855 case $cache_file in 2856 [\\/]* | ?:[\\/]* ) . "$cache_file";; 2857 *) . "./$cache_file";; 2858 esac 2859 fi 2860 else 2861 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 2862 $as_echo "$as_me: creating cache $cache_file" >&6;} 2863 >$cache_file 2864 fi 2865 2866 # Check that the precious variables saved in the cache have kept the same 2867 # value. 2868 ac_cache_corrupted=false 2869 for ac_var in $ac_precious_vars; do 2870 eval ac_old_set=\$ac_cv_env_${ac_var}_set 2871 eval ac_new_set=\$ac_env_${ac_var}_set 2872 eval ac_old_val=\$ac_cv_env_${ac_var}_value 2873 eval ac_new_val=\$ac_env_${ac_var}_value 2874 case $ac_old_set,$ac_new_set in 2875 set,) 2876 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2877 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2878 ac_cache_corrupted=: ;; 2879 ,set) 2880 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 2881 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2882 ac_cache_corrupted=: ;; 2883 ,);; 2884 *) 2885 if test "x$ac_old_val" != "x$ac_new_val"; then 2886 # differences in whitespace do not lead to failure. 2887 ac_old_val_w=`echo x $ac_old_val` 2888 ac_new_val_w=`echo x $ac_new_val` 2889 if test "$ac_old_val_w" != "$ac_new_val_w"; then 2890 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 2891 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2892 ac_cache_corrupted=: 2893 else 2894 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 2895 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 2896 eval $ac_var=\$ac_old_val 2897 fi 2898 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 2899 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 2900 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 2901 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 2902 fi;; 2903 esac 2904 # Pass precious variables to config.status. 2905 if test "$ac_new_set" = set; then 2906 case $ac_new_val in 2907 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2908 *) ac_arg=$ac_var=$ac_new_val ;; 2909 esac 2910 case " $ac_configure_args " in 2911 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2912 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 2913 esac 2914 fi 2915 done 2916 if $ac_cache_corrupted; then 2917 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2918 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2919 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2920 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 2921 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 2922 fi 2923 ## -------------------- ## 2924 ## Main body of script. ## 2925 ## -------------------- ## 2926 2927 ac_ext=c 2928 ac_cpp='$CPP $CPPFLAGS' 2929 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2930 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2931 ac_compiler_gnu=$ac_cv_c_compiler_gnu 2932 2933 2934 2935 ac_aux_dir= 2936 for ac_dir in build-aux "$srcdir"/build-aux; do 2937 if test -f "$ac_dir/install-sh"; then 2938 ac_aux_dir=$ac_dir 2939 ac_install_sh="$ac_aux_dir/install-sh -c" 2940 break 2941 elif test -f "$ac_dir/install.sh"; then 2942 ac_aux_dir=$ac_dir 2943 ac_install_sh="$ac_aux_dir/install.sh -c" 2944 break 2945 elif test -f "$ac_dir/shtool"; then 2946 ac_aux_dir=$ac_dir 2947 ac_install_sh="$ac_aux_dir/shtool install -c" 2948 break 2949 fi 2950 done 2951 if test -z "$ac_aux_dir"; then 2952 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 2953 fi 2954 2955 # These three variables are undocumented and unsupported, 2956 # and are intended to be withdrawn in a future Autoconf release. 2957 # They can cause serious problems if a builder's source tree is in a directory 2958 # whose full name contains unusual characters. 2959 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 2960 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 2961 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 2962 2963 2964 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2965 2966 # 2967 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 2968 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2969 # 2970 # This code is free software; you can redistribute it and/or modify it 2971 # under the terms of the GNU General Public License version 2 only, as 2972 # published by the Free Software Foundation. Oracle designates this 2973 # particular file as subject to the "Classpath" exception as provided 2974 # by Oracle in the LICENSE file that accompanied this code. 2975 # 2976 # This code is distributed in the hope that it will be useful, but WITHOUT 2977 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2978 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2979 # version 2 for more details (a copy is included in the LICENSE file that 2980 # accompanied this code). 2981 # 2982 # You should have received a copy of the GNU General Public License version 2983 # 2 along with this work; if not, write to the Free Software Foundation, 2984 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2985 # 2986 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2987 # or visit www.oracle.com if you need additional information or have any 2988 # questions. 2989 # 2990 2991 # 2992 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2993 # 2994 # This program is free software; you can redistribute it and/or modify 2995 # it under the terms of the GNU General Public License as published by 2996 # the Free Software Foundation; either version 2 of the License, or 2997 # (at your option) any later version. 2998 # 2999 # This program is distributed in the hope that it will be useful, but 3000 # WITHOUT ANY WARRANTY; without even the implied warranty of 3001 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3002 # General Public License for more details. 3003 # 3004 # You should have received a copy of the GNU General Public License 3005 # along with this program; if not, write to the Free Software 3006 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 3007 # 3008 # As a special exception to the GNU General Public License, if you 3009 # distribute this file as part of a program that contains a 3010 # configuration script generated by Autoconf, you may include it under 3011 # the same distribution terms that you use for the rest of that program. 3012 3013 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) 3014 # ---------------------------------- 3015 # PKG_PROG_PKG_CONFIG 3016 3017 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 3018 # 3019 # Check to see whether a particular set of modules exists. Similar 3020 # to PKG_CHECK_MODULES(), but does not set variables or print errors. 3021 # 3022 # 3023 # Similar to PKG_CHECK_MODULES, make sure that the first instance of 3024 # this or PKG_CHECK_MODULES is called, or make sure to call 3025 # PKG_CHECK_EXISTS manually 3026 # -------------------------------------------------------------- 3027 3028 3029 3030 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 3031 # --------------------------------------------- 3032 # _PKG_CONFIG 3033 3034 # _PKG_SHORT_ERRORS_SUPPORTED 3035 # ----------------------------- 3036 # _PKG_SHORT_ERRORS_SUPPORTED 3037 3038 3039 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 3040 # [ACTION-IF-NOT-FOUND]) 3041 # 3042 # 3043 # Note that if there is a possibility the first call to 3044 # PKG_CHECK_MODULES might not happen, you should be sure to include an 3045 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 3046 # 3047 # 3048 # -------------------------------------------------------------- 3049 # PKG_CHECK_MODULES 3050 3051 3052 # Include these first... 3053 # 3054 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3055 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3056 # 3057 # This code is free software; you can redistribute it and/or modify it 3058 # under the terms of the GNU General Public License version 2 only, as 3059 # published by the Free Software Foundation. Oracle designates this 3060 # particular file as subject to the "Classpath" exception as provided 3061 # by Oracle in the LICENSE file that accompanied this code. 3062 # 3063 # This code is distributed in the hope that it will be useful, but WITHOUT 3064 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3065 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3066 # version 2 for more details (a copy is included in the LICENSE file that 3067 # accompanied this code). 3068 # 3069 # You should have received a copy of the GNU General Public License version 3070 # 2 along with this work; if not, write to the Free Software Foundation, 3071 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3072 # 3073 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3074 # or visit www.oracle.com if you need additional information or have any 3075 # questions. 3076 # 3077 3078 3079 3080 # This will make sure the given variable points to a full and proper 3081 # path. This means: 3082 # 1) There will be no spaces in the path. On posix platforms, 3083 # spaces in the path will result in an error. On Windows, 3084 # the path will be rewritten using short-style to be space-free. 3085 # 2) The path will be absolute, and it will be in unix-style (on 3086 # cygwin). 3087 # $1: The name of the variable to fix 3088 3089 3090 # This will make sure the given variable points to a executable 3091 # with a full and proper path. This means: 3092 # 1) There will be no spaces in the path. On posix platforms, 3093 # spaces in the path will result in an error. On Windows, 3094 # the path will be rewritten using short-style to be space-free. 3095 # 2) The path will be absolute, and it will be in unix-style (on 3096 # cygwin). 3097 # Any arguments given to the executable is preserved. 3098 # If the input variable does not have a directory specification, then 3099 # it need to be in the PATH. 3100 # $1: The name of the variable to fix 3101 3102 3103 3104 3105 3106 3107 # Test that variable $1 denoting a program is not empty. If empty, exit with an error. 3108 # $1: variable to check 3109 # $2: executable name to print in warning (optional) 3110 3111 3112 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY. 3113 # Arguments as AC_PATH_PROG: 3114 # $1: variable to set 3115 # $2: executable name to look for 3116 3117 3118 # Setup the most fundamental tools that relies on not much else to set up, 3119 # but is used by much of the early bootstrap code. 3120 3121 3122 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3123 3124 3125 3126 3127 3128 3129 3130 #%%% Simple tools %%% 3131 3132 # Check if we have found a usable version of make 3133 # $1: the path to a potential make binary (or empty) 3134 # $2: the description on how we found this 3135 3136 3137 # Goes looking for a usable version of GNU make. 3138 3139 3140 3141 3142 3143 3144 # Check if build directory is on local disk. If not possible to determine, 3145 # we prefer to claim it's local. 3146 # Argument 1: directory to test 3147 # Argument 2: what to do if it is on local disk 3148 # Argument 3: what to do otherwise (remote disk or failure) 3149 3150 3151 # Check that source files have basic read permissions set. This might 3152 # not be the case in cygwin in certain conditions. 3153 3154 3155 3156 3157 # 3158 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3159 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3160 # 3161 # This code is free software; you can redistribute it and/or modify it 3162 # under the terms of the GNU General Public License version 2 only, as 3163 # published by the Free Software Foundation. Oracle designates this 3164 # particular file as subject to the "Classpath" exception as provided 3165 # by Oracle in the LICENSE file that accompanied this code. 3166 # 3167 # This code is distributed in the hope that it will be useful, but WITHOUT 3168 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3169 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3170 # version 2 for more details (a copy is included in the LICENSE file that 3171 # accompanied this code). 3172 # 3173 # You should have received a copy of the GNU General Public License version 3174 # 2 along with this work; if not, write to the Free Software Foundation, 3175 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3176 # 3177 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3178 # or visit www.oracle.com if you need additional information or have any 3179 # questions. 3180 # 3181 3182 3183 3184 3185 3186 # Helper function which possibly converts a path using DOS-style short mode. 3187 # If so, the updated path is stored in $new_path. 3188 # $1: The path to check 3189 3190 3191 # Helper function which possibly converts a path using DOS-style short mode. 3192 # If so, the updated path is stored in $new_path. 3193 # $1: The path to check 3194 3195 3196 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted 3197 # and could probably be heavily simplified. However, all changes in this 3198 # area tend to need lot of testing in different scenarios, and in lack of 3199 # proper unit testing, cleaning this up has not been deemed worth the effort 3200 # at the moment. 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 # Setup basic configuration paths, and platform-specific stuff related to PATHs. 3211 3212 3213 3214 3215 # 3216 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3217 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3218 # 3219 # This code is free software; you can redistribute it and/or modify it 3220 # under the terms of the GNU General Public License version 2 only, as 3221 # published by the Free Software Foundation. Oracle designates this 3222 # particular file as subject to the "Classpath" exception as provided 3223 # by Oracle in the LICENSE file that accompanied this code. 3224 # 3225 # This code is distributed in the hope that it will be useful, but WITHOUT 3226 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3227 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3228 # version 2 for more details (a copy is included in the LICENSE file that 3229 # accompanied this code). 3230 # 3231 # You should have received a copy of the GNU General Public License version 3232 # 2 along with this work; if not, write to the Free Software Foundation, 3233 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3234 # 3235 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3236 # or visit www.oracle.com if you need additional information or have any 3237 # questions. 3238 # 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 # ... then the rest 3251 # 3252 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3253 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3254 # 3255 # This code is free software; you can redistribute it and/or modify it 3256 # under the terms of the GNU General Public License version 2 only, as 3257 # published by the Free Software Foundation. Oracle designates this 3258 # particular file as subject to the "Classpath" exception as provided 3259 # by Oracle in the LICENSE file that accompanied this code. 3260 # 3261 # This code is distributed in the hope that it will be useful, but WITHOUT 3262 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3263 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3264 # version 2 for more details (a copy is included in the LICENSE file that 3265 # accompanied this code). 3266 # 3267 # You should have received a copy of the GNU General Public License version 3268 # 2 along with this work; if not, write to the Free Software Foundation, 3269 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3270 # 3271 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3272 # or visit www.oracle.com if you need additional information or have any 3273 # questions. 3274 # 3275 3276 # Execute the check given as argument, and verify the result 3277 # If the Boot JDK was previously found, do nothing 3278 # $1 A command line (typically autoconf macro) to execute 3279 3280 3281 # Test: Is bootjdk explicitely set by command line arguments? 3282 3283 3284 # Test: Is bootjdk available from builddeps? 3285 3286 3287 # Test: Is $JAVA_HOME set? 3288 3289 3290 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK? 3291 3292 3293 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) 3294 3295 3296 # Look for a jdk in the given path. If there are multiple, try to select the newest. 3297 # If found, set BOOT_JDK and BOOT_JDK_FOUND. 3298 # $1 = Path to directory containing jdk installations. 3299 # $2 = String to append to the found JDK directory to get the proper JDK home 3300 3301 3302 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given 3303 # environmental variable as base for where to look. 3304 # $1 Name of an environmal variable, assumed to point to the Program Files directory. 3305 3306 3307 # Test: Is there a JDK installed in default, well-known locations? 3308 3309 3310 # Check that a command-line tool in the Boot JDK is correct 3311 # $1 = name of variable to assign 3312 # $2 = name of binary 3313 3314 3315 ############################################################################### 3316 # 3317 # We need a Boot JDK to bootstrap the build. 3318 # 3319 3320 3321 3322 3323 3324 # 3325 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3326 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3327 # 3328 # This code is free software; you can redistribute it and/or modify it 3329 # under the terms of the GNU General Public License version 2 only, as 3330 # published by the Free Software Foundation. Oracle designates this 3331 # particular file as subject to the "Classpath" exception as provided 3332 # by Oracle in the LICENSE file that accompanied this code. 3333 # 3334 # This code is distributed in the hope that it will be useful, but WITHOUT 3335 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3336 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3337 # version 2 for more details (a copy is included in the LICENSE file that 3338 # accompanied this code). 3339 # 3340 # You should have received a copy of the GNU General Public License version 3341 # 2 along with this work; if not, write to the Free Software Foundation, 3342 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3343 # 3344 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3345 # or visit www.oracle.com if you need additional information or have any 3346 # questions. 3347 # 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 # 3369 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3370 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3371 # 3372 # This code is free software; you can redistribute it and/or modify it 3373 # under the terms of the GNU General Public License version 2 only, as 3374 # published by the Free Software Foundation. Oracle designates this 3375 # particular file as subject to the "Classpath" exception as provided 3376 # by Oracle in the LICENSE file that accompanied this code. 3377 # 3378 # This code is distributed in the hope that it will be useful, but WITHOUT 3379 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3380 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3381 # version 2 for more details (a copy is included in the LICENSE file that 3382 # accompanied this code). 3383 # 3384 # You should have received a copy of the GNU General Public License version 3385 # 2 along with this work; if not, write to the Free Software Foundation, 3386 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3387 # 3388 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3389 # or visit www.oracle.com if you need additional information or have any 3390 # questions. 3391 # 3392 3393 3394 3395 3396 3397 cygwin_help() { 3398 case $1 in 3399 unzip) 3400 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;; 3401 zip) 3402 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;; 3403 make) 3404 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;; 3405 * ) 3406 break ;; 3407 esac 3408 } 3409 3410 apt_help() { 3411 case $1 in 3412 devkit) 3413 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; 3414 openjdk) 3415 PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; 3416 alsa) 3417 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; 3418 cups) 3419 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; 3420 freetype2) 3421 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; 3422 pulse) 3423 PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; 3424 x11) 3425 PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;; 3426 ccache) 3427 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; 3428 * ) 3429 break ;; 3430 esac 3431 } 3432 3433 yum_help() { 3434 case $1 in 3435 devkit) 3436 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; 3437 openjdk) 3438 PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; 3439 alsa) 3440 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; 3441 cups) 3442 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; 3443 freetype2) 3444 PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;; 3445 pulse) 3446 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; 3447 x11) 3448 PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;; 3449 ccache) 3450 PKGHANDLER_COMMAND="sudo yum install ccache" ;; 3451 * ) 3452 break ;; 3453 esac 3454 } 3455 3456 port_help() { 3457 PKGHANDLER_COMMAND="" 3458 } 3459 3460 pkgutil_help() { 3461 PKGHANDLER_COMMAND="" 3462 } 3463 3464 pkgadd_help() { 3465 PKGHANDLER_COMMAND="" 3466 } 3467 3468 3469 3470 # 3471 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3472 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3473 # 3474 # This code is free software; you can redistribute it and/or modify it 3475 # under the terms of the GNU General Public License version 2 only, as 3476 # published by the Free Software Foundation. Oracle designates this 3477 # particular file as subject to the "Classpath" exception as provided 3478 # by Oracle in the LICENSE file that accompanied this code. 3479 # 3480 # This code is distributed in the hope that it will be useful, but WITHOUT 3481 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3482 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3483 # version 2 for more details (a copy is included in the LICENSE file that 3484 # accompanied this code). 3485 # 3486 # You should have received a copy of the GNU General Public License version 3487 # 2 along with this work; if not, write to the Free Software Foundation, 3488 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3489 # 3490 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3491 # or visit www.oracle.com if you need additional information or have any 3492 # questions. 3493 # 3494 3495 3496 3497 3498 3499 3500 3501 3502 ############################################################################### 3503 # 3504 # Should we build only OpenJDK even if closed sources are present? 3505 # 3506 3507 3508 3509 3510 ############################################################################### 3511 # 3512 # Setup version numbers 3513 # 3514 3515 3516 3517 3518 3519 3520 # Support for customization of the build process. Some build files 3521 # will include counterparts from this location, if they exist. This allows 3522 # for a degree of customization of the build targets and the rules/recipes 3523 # to create them 3524 3525 # Check whether --with-custom-make-dir was given. 3526 if test "${with_custom_make_dir+set}" = set; then : 3527 withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir 3528 fi 3529 3530 3531 3532 # 3533 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3534 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3535 # 3536 # This code is free software; you can redistribute it and/or modify it 3537 # under the terms of the GNU General Public License version 2 only, as 3538 # published by the Free Software Foundation. Oracle designates this 3539 # particular file as subject to the "Classpath" exception as provided 3540 # by Oracle in the LICENSE file that accompanied this code. 3541 # 3542 # This code is distributed in the hope that it will be useful, but WITHOUT 3543 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3544 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3545 # version 2 for more details (a copy is included in the LICENSE file that 3546 # accompanied this code). 3547 # 3548 # You should have received a copy of the GNU General Public License version 3549 # 2 along with this work; if not, write to the Free Software Foundation, 3550 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3551 # 3552 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3553 # or visit www.oracle.com if you need additional information or have any 3554 # questions. 3555 # 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 # 3572 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3573 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3574 # 3575 # This code is free software; you can redistribute it and/or modify it 3576 # under the terms of the GNU General Public License version 2 only, as 3577 # published by the Free Software Foundation. Oracle designates this 3578 # particular file as subject to the "Classpath" exception as provided 3579 # by Oracle in the LICENSE file that accompanied this code. 3580 # 3581 # This code is distributed in the hope that it will be useful, but WITHOUT 3582 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3583 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3584 # version 2 for more details (a copy is included in the LICENSE file that 3585 # accompanied this code). 3586 # 3587 # You should have received a copy of the GNU General Public License version 3588 # 2 along with this work; if not, write to the Free Software Foundation, 3589 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3590 # 3591 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3592 # or visit www.oracle.com if you need additional information or have any 3593 # questions. 3594 # 3595 3596 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3597 # Converts autoconf style CPU name to OpenJDK style, into 3598 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. 3599 3600 3601 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3602 # Converts autoconf style OS name to OpenJDK style, into 3603 # VAR_OS and VAR_OS_API. 3604 3605 3606 # Expects $host_os $host_cpu $build_os and $build_cpu 3607 # and $with_target_bits to have been setup! 3608 # 3609 # Translate the standard triplet(quadruplet) definition 3610 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU, 3611 # OPENJDK_BUILD_OS, etc. 3612 3613 3614 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour 3615 # accordingly. Must be done after setting up build and target system, but before 3616 # doing anything else with these values. 3617 3618 3619 # Setup the legacy variables, for controlling the old makefiles. 3620 # 3621 3622 3623 3624 3625 #%%% Build and target systems %%% 3626 3627 3628 3629 3630 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS. 3631 # Add -mX to various FLAGS variables. 3632 3633 3634 3635 3636 3637 3638 # 3639 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3640 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3641 # 3642 # This code is free software; you can redistribute it and/or modify it 3643 # under the terms of the GNU General Public License version 2 only, as 3644 # published by the Free Software Foundation. Oracle designates this 3645 # particular file as subject to the "Classpath" exception as provided 3646 # by Oracle in the LICENSE file that accompanied this code. 3647 # 3648 # This code is distributed in the hope that it will be useful, but WITHOUT 3649 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3650 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3651 # version 2 for more details (a copy is included in the LICENSE file that 3652 # accompanied this code). 3653 # 3654 # You should have received a copy of the GNU General Public License version 3655 # 2 along with this work; if not, write to the Free Software Foundation, 3656 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3657 # 3658 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3659 # or visit www.oracle.com if you need additional information or have any 3660 # questions. 3661 # 3662 3663 3664 3665 3666 3667 3668 3669 3670 # 3671 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3672 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3673 # 3674 # This code is free software; you can redistribute it and/or modify it 3675 # under the terms of the GNU General Public License version 2 only, as 3676 # published by the Free Software Foundation. Oracle designates this 3677 # particular file as subject to the "Classpath" exception as provided 3678 # by Oracle in the LICENSE file that accompanied this code. 3679 # 3680 # This code is distributed in the hope that it will be useful, but WITHOUT 3681 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3682 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3683 # version 2 for more details (a copy is included in the LICENSE file that 3684 # accompanied this code). 3685 # 3686 # You should have received a copy of the GNU General Public License version 3687 # 2 along with this work; if not, write to the Free Software Foundation, 3688 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3689 # 3690 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3691 # or visit www.oracle.com if you need additional information or have any 3692 # questions. 3693 # 3694 3695 # $1 = compiler to test (CC or CXX) 3696 # $2 = human readable name of compiler (C or C++) 3697 3698 3699 3700 3701 3702 # $1 = compiler to test (CC or CXX) 3703 # $2 = human readable name of compiler (C or C++) 3704 # $3 = list of compiler names to search for 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 # 3718 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3719 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3720 # 3721 # This code is free software; you can redistribute it and/or modify it 3722 # under the terms of the GNU General Public License version 2 only, as 3723 # published by the Free Software Foundation. Oracle designates this 3724 # particular file as subject to the "Classpath" exception as provided 3725 # by Oracle in the LICENSE file that accompanied this code. 3726 # 3727 # This code is distributed in the hope that it will be useful, but WITHOUT 3728 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3729 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3730 # version 2 for more details (a copy is included in the LICENSE file that 3731 # accompanied this code). 3732 # 3733 # You should have received a copy of the GNU General Public License version 3734 # 2 along with this work; if not, write to the Free Software Foundation, 3735 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3736 # 3737 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3738 # or visit www.oracle.com if you need additional information or have any 3739 # questions. 3740 # 3741 3742 3743 3744 3745 3746 3747 3748 # Check if the VS env variables were setup prior to running configure. 3749 # If not, then find vcvarsall.bat and run it automatically, and integrate 3750 # the set env variables into the spec file. 3751 3752 3753 3754 # Setup the DXSDK paths 3755 3756 3757 3758 3759 3760 3761 # This line needs to be here, verbatim, after all includes and the dummy hook 3762 # definitions. It is replaced with custom functionality when building 3763 # custom sources. 3764 #CUSTOM_AUTOCONF_INCLUDE 3765 3766 # Do not change or remove the following line, it is needed for consistency checks: 3767 DATE_WHEN_GENERATED=1365493306 3768 3769 ############################################################################### 3770 # 3771 # Initialization / Boot-strapping 3772 # 3773 # The bootstrapping process needs to solve the "chicken or the egg" problem, 3774 # thus it jumps back and forth, each time gaining something needed later on. 3775 # 3776 ############################################################################### 3777 3778 # Basic initialization that must happen first of all 3779 3780 # Save the original command line. This is passed to us by the wrapper configure script. 3781 3782 DATE_WHEN_CONFIGURED=`LANG=C date` 3783 3784 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5 3785 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;} 3786 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5 3787 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;} 3788 3789 3790 3791 # Start with tools that do not need have cross compilation support 3792 # and can be expected to be found in the default PATH. These tools are 3793 # used by configure. Nor are these tools expected to be found in the 3794 # devkit from the builddeps server either, since they are 3795 # needed to download the devkit. 3796 3797 # First are all the simple required tools. 3798 3799 for ac_prog in basename 3800 do 3801 # Extract the first word of "$ac_prog", so it can be a program name with args. 3802 set dummy $ac_prog; ac_word=$2 3803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3804 $as_echo_n "checking for $ac_word... " >&6; } 3805 if test "${ac_cv_path_BASENAME+set}" = set; then : 3806 $as_echo_n "(cached) " >&6 3807 else 3808 case $BASENAME in 3809 [\\/]* | ?:[\\/]*) 3810 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path. 3811 ;; 3812 *) 3813 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3814 for as_dir in $PATH 3815 do 3816 IFS=$as_save_IFS 3817 test -z "$as_dir" && as_dir=. 3818 for ac_exec_ext in '' $ac_executable_extensions; do 3819 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3820 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext" 3821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3822 break 2 3823 fi 3824 done 3825 done 3826 IFS=$as_save_IFS 3827 3828 ;; 3829 esac 3830 fi 3831 BASENAME=$ac_cv_path_BASENAME 3832 if test -n "$BASENAME"; then 3833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 3834 $as_echo "$BASENAME" >&6; } 3835 else 3836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3837 $as_echo "no" >&6; } 3838 fi 3839 3840 3841 test -n "$BASENAME" && break 3842 done 3843 3844 3845 if test "x$BASENAME" = x; then 3846 if test "xbasename" = x; then 3847 PROG_NAME=basename 3848 else 3849 PROG_NAME=basename 3850 fi 3851 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3852 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3853 as_fn_error $? "Cannot continue" "$LINENO" 5 3854 fi 3855 3856 3857 3858 for ac_prog in bash 3859 do 3860 # Extract the first word of "$ac_prog", so it can be a program name with args. 3861 set dummy $ac_prog; ac_word=$2 3862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3863 $as_echo_n "checking for $ac_word... " >&6; } 3864 if test "${ac_cv_path_BASH+set}" = set; then : 3865 $as_echo_n "(cached) " >&6 3866 else 3867 case $BASH in 3868 [\\/]* | ?:[\\/]*) 3869 ac_cv_path_BASH="$BASH" # Let the user override the test with a path. 3870 ;; 3871 *) 3872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3873 for as_dir in $PATH 3874 do 3875 IFS=$as_save_IFS 3876 test -z "$as_dir" && as_dir=. 3877 for ac_exec_ext in '' $ac_executable_extensions; do 3878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3879 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" 3880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3881 break 2 3882 fi 3883 done 3884 done 3885 IFS=$as_save_IFS 3886 3887 ;; 3888 esac 3889 fi 3890 BASH=$ac_cv_path_BASH 3891 if test -n "$BASH"; then 3892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 3893 $as_echo "$BASH" >&6; } 3894 else 3895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3896 $as_echo "no" >&6; } 3897 fi 3898 3899 3900 test -n "$BASH" && break 3901 done 3902 3903 3904 if test "x$BASH" = x; then 3905 if test "xbash" = x; then 3906 PROG_NAME=bash 3907 else 3908 PROG_NAME=bash 3909 fi 3910 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3911 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3912 as_fn_error $? "Cannot continue" "$LINENO" 5 3913 fi 3914 3915 3916 3917 for ac_prog in cat 3918 do 3919 # Extract the first word of "$ac_prog", so it can be a program name with args. 3920 set dummy $ac_prog; ac_word=$2 3921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3922 $as_echo_n "checking for $ac_word... " >&6; } 3923 if test "${ac_cv_path_CAT+set}" = set; then : 3924 $as_echo_n "(cached) " >&6 3925 else 3926 case $CAT in 3927 [\\/]* | ?:[\\/]*) 3928 ac_cv_path_CAT="$CAT" # Let the user override the test with a path. 3929 ;; 3930 *) 3931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3932 for as_dir in $PATH 3933 do 3934 IFS=$as_save_IFS 3935 test -z "$as_dir" && as_dir=. 3936 for ac_exec_ext in '' $ac_executable_extensions; do 3937 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3938 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" 3939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3940 break 2 3941 fi 3942 done 3943 done 3944 IFS=$as_save_IFS 3945 3946 ;; 3947 esac 3948 fi 3949 CAT=$ac_cv_path_CAT 3950 if test -n "$CAT"; then 3951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5 3952 $as_echo "$CAT" >&6; } 3953 else 3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3955 $as_echo "no" >&6; } 3956 fi 3957 3958 3959 test -n "$CAT" && break 3960 done 3961 3962 3963 if test "x$CAT" = x; then 3964 if test "xcat" = x; then 3965 PROG_NAME=cat 3966 else 3967 PROG_NAME=cat 3968 fi 3969 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 3970 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 3971 as_fn_error $? "Cannot continue" "$LINENO" 5 3972 fi 3973 3974 3975 3976 for ac_prog in chmod 3977 do 3978 # Extract the first word of "$ac_prog", so it can be a program name with args. 3979 set dummy $ac_prog; ac_word=$2 3980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3981 $as_echo_n "checking for $ac_word... " >&6; } 3982 if test "${ac_cv_path_CHMOD+set}" = set; then : 3983 $as_echo_n "(cached) " >&6 3984 else 3985 case $CHMOD in 3986 [\\/]* | ?:[\\/]*) 3987 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. 3988 ;; 3989 *) 3990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3991 for as_dir in $PATH 3992 do 3993 IFS=$as_save_IFS 3994 test -z "$as_dir" && as_dir=. 3995 for ac_exec_ext in '' $ac_executable_extensions; do 3996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3997 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext" 3998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3999 break 2 4000 fi 4001 done 4002 done 4003 IFS=$as_save_IFS 4004 4005 ;; 4006 esac 4007 fi 4008 CHMOD=$ac_cv_path_CHMOD 4009 if test -n "$CHMOD"; then 4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5 4011 $as_echo "$CHMOD" >&6; } 4012 else 4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4014 $as_echo "no" >&6; } 4015 fi 4016 4017 4018 test -n "$CHMOD" && break 4019 done 4020 4021 4022 if test "x$CHMOD" = x; then 4023 if test "xchmod" = x; then 4024 PROG_NAME=chmod 4025 else 4026 PROG_NAME=chmod 4027 fi 4028 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4029 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4030 as_fn_error $? "Cannot continue" "$LINENO" 5 4031 fi 4032 4033 4034 4035 for ac_prog in cmp 4036 do 4037 # Extract the first word of "$ac_prog", so it can be a program name with args. 4038 set dummy $ac_prog; ac_word=$2 4039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4040 $as_echo_n "checking for $ac_word... " >&6; } 4041 if test "${ac_cv_path_CMP+set}" = set; then : 4042 $as_echo_n "(cached) " >&6 4043 else 4044 case $CMP in 4045 [\\/]* | ?:[\\/]*) 4046 ac_cv_path_CMP="$CMP" # Let the user override the test with a path. 4047 ;; 4048 *) 4049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4050 for as_dir in $PATH 4051 do 4052 IFS=$as_save_IFS 4053 test -z "$as_dir" && as_dir=. 4054 for ac_exec_ext in '' $ac_executable_extensions; do 4055 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4056 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" 4057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4058 break 2 4059 fi 4060 done 4061 done 4062 IFS=$as_save_IFS 4063 4064 ;; 4065 esac 4066 fi 4067 CMP=$ac_cv_path_CMP 4068 if test -n "$CMP"; then 4069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5 4070 $as_echo "$CMP" >&6; } 4071 else 4072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4073 $as_echo "no" >&6; } 4074 fi 4075 4076 4077 test -n "$CMP" && break 4078 done 4079 4080 4081 if test "x$CMP" = x; then 4082 if test "xcmp" = x; then 4083 PROG_NAME=cmp 4084 else 4085 PROG_NAME=cmp 4086 fi 4087 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4088 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4089 as_fn_error $? "Cannot continue" "$LINENO" 5 4090 fi 4091 4092 4093 4094 for ac_prog in comm 4095 do 4096 # Extract the first word of "$ac_prog", so it can be a program name with args. 4097 set dummy $ac_prog; ac_word=$2 4098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4099 $as_echo_n "checking for $ac_word... " >&6; } 4100 if test "${ac_cv_path_COMM+set}" = set; then : 4101 $as_echo_n "(cached) " >&6 4102 else 4103 case $COMM in 4104 [\\/]* | ?:[\\/]*) 4105 ac_cv_path_COMM="$COMM" # Let the user override the test with a path. 4106 ;; 4107 *) 4108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4109 for as_dir in $PATH 4110 do 4111 IFS=$as_save_IFS 4112 test -z "$as_dir" && as_dir=. 4113 for ac_exec_ext in '' $ac_executable_extensions; do 4114 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4115 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext" 4116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4117 break 2 4118 fi 4119 done 4120 done 4121 IFS=$as_save_IFS 4122 4123 ;; 4124 esac 4125 fi 4126 COMM=$ac_cv_path_COMM 4127 if test -n "$COMM"; then 4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5 4129 $as_echo "$COMM" >&6; } 4130 else 4131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4132 $as_echo "no" >&6; } 4133 fi 4134 4135 4136 test -n "$COMM" && break 4137 done 4138 4139 4140 if test "x$COMM" = x; then 4141 if test "xcomm" = x; then 4142 PROG_NAME=comm 4143 else 4144 PROG_NAME=comm 4145 fi 4146 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4147 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4148 as_fn_error $? "Cannot continue" "$LINENO" 5 4149 fi 4150 4151 4152 4153 for ac_prog in cp 4154 do 4155 # Extract the first word of "$ac_prog", so it can be a program name with args. 4156 set dummy $ac_prog; ac_word=$2 4157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4158 $as_echo_n "checking for $ac_word... " >&6; } 4159 if test "${ac_cv_path_CP+set}" = set; then : 4160 $as_echo_n "(cached) " >&6 4161 else 4162 case $CP in 4163 [\\/]* | ?:[\\/]*) 4164 ac_cv_path_CP="$CP" # Let the user override the test with a path. 4165 ;; 4166 *) 4167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4168 for as_dir in $PATH 4169 do 4170 IFS=$as_save_IFS 4171 test -z "$as_dir" && as_dir=. 4172 for ac_exec_ext in '' $ac_executable_extensions; do 4173 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4174 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" 4175 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4176 break 2 4177 fi 4178 done 4179 done 4180 IFS=$as_save_IFS 4181 4182 ;; 4183 esac 4184 fi 4185 CP=$ac_cv_path_CP 4186 if test -n "$CP"; then 4187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 4188 $as_echo "$CP" >&6; } 4189 else 4190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4191 $as_echo "no" >&6; } 4192 fi 4193 4194 4195 test -n "$CP" && break 4196 done 4197 4198 4199 if test "x$CP" = x; then 4200 if test "xcp" = x; then 4201 PROG_NAME=cp 4202 else 4203 PROG_NAME=cp 4204 fi 4205 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4206 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4207 as_fn_error $? "Cannot continue" "$LINENO" 5 4208 fi 4209 4210 4211 4212 for ac_prog in cpio 4213 do 4214 # Extract the first word of "$ac_prog", so it can be a program name with args. 4215 set dummy $ac_prog; ac_word=$2 4216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4217 $as_echo_n "checking for $ac_word... " >&6; } 4218 if test "${ac_cv_path_CPIO+set}" = set; then : 4219 $as_echo_n "(cached) " >&6 4220 else 4221 case $CPIO in 4222 [\\/]* | ?:[\\/]*) 4223 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path. 4224 ;; 4225 *) 4226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4227 for as_dir in $PATH 4228 do 4229 IFS=$as_save_IFS 4230 test -z "$as_dir" && as_dir=. 4231 for ac_exec_ext in '' $ac_executable_extensions; do 4232 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4233 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext" 4234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4235 break 2 4236 fi 4237 done 4238 done 4239 IFS=$as_save_IFS 4240 4241 ;; 4242 esac 4243 fi 4244 CPIO=$ac_cv_path_CPIO 4245 if test -n "$CPIO"; then 4246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5 4247 $as_echo "$CPIO" >&6; } 4248 else 4249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4250 $as_echo "no" >&6; } 4251 fi 4252 4253 4254 test -n "$CPIO" && break 4255 done 4256 4257 4258 if test "x$CPIO" = x; then 4259 if test "xcpio" = x; then 4260 PROG_NAME=cpio 4261 else 4262 PROG_NAME=cpio 4263 fi 4264 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4265 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4266 as_fn_error $? "Cannot continue" "$LINENO" 5 4267 fi 4268 4269 4270 4271 for ac_prog in cut 4272 do 4273 # Extract the first word of "$ac_prog", so it can be a program name with args. 4274 set dummy $ac_prog; ac_word=$2 4275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4276 $as_echo_n "checking for $ac_word... " >&6; } 4277 if test "${ac_cv_path_CUT+set}" = set; then : 4278 $as_echo_n "(cached) " >&6 4279 else 4280 case $CUT in 4281 [\\/]* | ?:[\\/]*) 4282 ac_cv_path_CUT="$CUT" # Let the user override the test with a path. 4283 ;; 4284 *) 4285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4286 for as_dir in $PATH 4287 do 4288 IFS=$as_save_IFS 4289 test -z "$as_dir" && as_dir=. 4290 for ac_exec_ext in '' $ac_executable_extensions; do 4291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4292 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext" 4293 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4294 break 2 4295 fi 4296 done 4297 done 4298 IFS=$as_save_IFS 4299 4300 ;; 4301 esac 4302 fi 4303 CUT=$ac_cv_path_CUT 4304 if test -n "$CUT"; then 4305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5 4306 $as_echo "$CUT" >&6; } 4307 else 4308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4309 $as_echo "no" >&6; } 4310 fi 4311 4312 4313 test -n "$CUT" && break 4314 done 4315 4316 4317 if test "x$CUT" = x; then 4318 if test "xcut" = x; then 4319 PROG_NAME=cut 4320 else 4321 PROG_NAME=cut 4322 fi 4323 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4324 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4325 as_fn_error $? "Cannot continue" "$LINENO" 5 4326 fi 4327 4328 4329 4330 for ac_prog in date 4331 do 4332 # Extract the first word of "$ac_prog", so it can be a program name with args. 4333 set dummy $ac_prog; ac_word=$2 4334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4335 $as_echo_n "checking for $ac_word... " >&6; } 4336 if test "${ac_cv_path_DATE+set}" = set; then : 4337 $as_echo_n "(cached) " >&6 4338 else 4339 case $DATE in 4340 [\\/]* | ?:[\\/]*) 4341 ac_cv_path_DATE="$DATE" # Let the user override the test with a path. 4342 ;; 4343 *) 4344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4345 for as_dir in $PATH 4346 do 4347 IFS=$as_save_IFS 4348 test -z "$as_dir" && as_dir=. 4349 for ac_exec_ext in '' $ac_executable_extensions; do 4350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4351 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext" 4352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4353 break 2 4354 fi 4355 done 4356 done 4357 IFS=$as_save_IFS 4358 4359 ;; 4360 esac 4361 fi 4362 DATE=$ac_cv_path_DATE 4363 if test -n "$DATE"; then 4364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5 4365 $as_echo "$DATE" >&6; } 4366 else 4367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4368 $as_echo "no" >&6; } 4369 fi 4370 4371 4372 test -n "$DATE" && break 4373 done 4374 4375 4376 if test "x$DATE" = x; then 4377 if test "xdate" = x; then 4378 PROG_NAME=date 4379 else 4380 PROG_NAME=date 4381 fi 4382 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4383 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4384 as_fn_error $? "Cannot continue" "$LINENO" 5 4385 fi 4386 4387 4388 4389 for ac_prog in gdiff diff 4390 do 4391 # Extract the first word of "$ac_prog", so it can be a program name with args. 4392 set dummy $ac_prog; ac_word=$2 4393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4394 $as_echo_n "checking for $ac_word... " >&6; } 4395 if test "${ac_cv_path_DIFF+set}" = set; then : 4396 $as_echo_n "(cached) " >&6 4397 else 4398 case $DIFF in 4399 [\\/]* | ?:[\\/]*) 4400 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. 4401 ;; 4402 *) 4403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4404 for as_dir in $PATH 4405 do 4406 IFS=$as_save_IFS 4407 test -z "$as_dir" && as_dir=. 4408 for ac_exec_ext in '' $ac_executable_extensions; do 4409 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4410 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" 4411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4412 break 2 4413 fi 4414 done 4415 done 4416 IFS=$as_save_IFS 4417 4418 ;; 4419 esac 4420 fi 4421 DIFF=$ac_cv_path_DIFF 4422 if test -n "$DIFF"; then 4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 4424 $as_echo "$DIFF" >&6; } 4425 else 4426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4427 $as_echo "no" >&6; } 4428 fi 4429 4430 4431 test -n "$DIFF" && break 4432 done 4433 4434 4435 if test "x$DIFF" = x; then 4436 if test "xgdiff diff" = x; then 4437 PROG_NAME=diff 4438 else 4439 PROG_NAME=gdiff diff 4440 fi 4441 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4442 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4443 as_fn_error $? "Cannot continue" "$LINENO" 5 4444 fi 4445 4446 4447 4448 for ac_prog in dirname 4449 do 4450 # Extract the first word of "$ac_prog", so it can be a program name with args. 4451 set dummy $ac_prog; ac_word=$2 4452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4453 $as_echo_n "checking for $ac_word... " >&6; } 4454 if test "${ac_cv_path_DIRNAME+set}" = set; then : 4455 $as_echo_n "(cached) " >&6 4456 else 4457 case $DIRNAME in 4458 [\\/]* | ?:[\\/]*) 4459 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path. 4460 ;; 4461 *) 4462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4463 for as_dir in $PATH 4464 do 4465 IFS=$as_save_IFS 4466 test -z "$as_dir" && as_dir=. 4467 for ac_exec_ext in '' $ac_executable_extensions; do 4468 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4469 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext" 4470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4471 break 2 4472 fi 4473 done 4474 done 4475 IFS=$as_save_IFS 4476 4477 ;; 4478 esac 4479 fi 4480 DIRNAME=$ac_cv_path_DIRNAME 4481 if test -n "$DIRNAME"; then 4482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5 4483 $as_echo "$DIRNAME" >&6; } 4484 else 4485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4486 $as_echo "no" >&6; } 4487 fi 4488 4489 4490 test -n "$DIRNAME" && break 4491 done 4492 4493 4494 if test "x$DIRNAME" = x; then 4495 if test "xdirname" = x; then 4496 PROG_NAME=dirname 4497 else 4498 PROG_NAME=dirname 4499 fi 4500 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4501 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4502 as_fn_error $? "Cannot continue" "$LINENO" 5 4503 fi 4504 4505 4506 4507 for ac_prog in echo 4508 do 4509 # Extract the first word of "$ac_prog", so it can be a program name with args. 4510 set dummy $ac_prog; ac_word=$2 4511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4512 $as_echo_n "checking for $ac_word... " >&6; } 4513 if test "${ac_cv_path_ECHO+set}" = set; then : 4514 $as_echo_n "(cached) " >&6 4515 else 4516 case $ECHO in 4517 [\\/]* | ?:[\\/]*) 4518 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path. 4519 ;; 4520 *) 4521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4522 for as_dir in $PATH 4523 do 4524 IFS=$as_save_IFS 4525 test -z "$as_dir" && as_dir=. 4526 for ac_exec_ext in '' $ac_executable_extensions; do 4527 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4528 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" 4529 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4530 break 2 4531 fi 4532 done 4533 done 4534 IFS=$as_save_IFS 4535 4536 ;; 4537 esac 4538 fi 4539 ECHO=$ac_cv_path_ECHO 4540 if test -n "$ECHO"; then 4541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5 4542 $as_echo "$ECHO" >&6; } 4543 else 4544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4545 $as_echo "no" >&6; } 4546 fi 4547 4548 4549 test -n "$ECHO" && break 4550 done 4551 4552 4553 if test "x$ECHO" = x; then 4554 if test "xecho" = x; then 4555 PROG_NAME=echo 4556 else 4557 PROG_NAME=echo 4558 fi 4559 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4560 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4561 as_fn_error $? "Cannot continue" "$LINENO" 5 4562 fi 4563 4564 4565 4566 for ac_prog in expr 4567 do 4568 # Extract the first word of "$ac_prog", so it can be a program name with args. 4569 set dummy $ac_prog; ac_word=$2 4570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4571 $as_echo_n "checking for $ac_word... " >&6; } 4572 if test "${ac_cv_path_EXPR+set}" = set; then : 4573 $as_echo_n "(cached) " >&6 4574 else 4575 case $EXPR in 4576 [\\/]* | ?:[\\/]*) 4577 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path. 4578 ;; 4579 *) 4580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4581 for as_dir in $PATH 4582 do 4583 IFS=$as_save_IFS 4584 test -z "$as_dir" && as_dir=. 4585 for ac_exec_ext in '' $ac_executable_extensions; do 4586 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4587 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext" 4588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4589 break 2 4590 fi 4591 done 4592 done 4593 IFS=$as_save_IFS 4594 4595 ;; 4596 esac 4597 fi 4598 EXPR=$ac_cv_path_EXPR 4599 if test -n "$EXPR"; then 4600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5 4601 $as_echo "$EXPR" >&6; } 4602 else 4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4604 $as_echo "no" >&6; } 4605 fi 4606 4607 4608 test -n "$EXPR" && break 4609 done 4610 4611 4612 if test "x$EXPR" = x; then 4613 if test "xexpr" = x; then 4614 PROG_NAME=expr 4615 else 4616 PROG_NAME=expr 4617 fi 4618 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4619 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4620 as_fn_error $? "Cannot continue" "$LINENO" 5 4621 fi 4622 4623 4624 4625 for ac_prog in file 4626 do 4627 # Extract the first word of "$ac_prog", so it can be a program name with args. 4628 set dummy $ac_prog; ac_word=$2 4629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4630 $as_echo_n "checking for $ac_word... " >&6; } 4631 if test "${ac_cv_path_FILE+set}" = set; then : 4632 $as_echo_n "(cached) " >&6 4633 else 4634 case $FILE in 4635 [\\/]* | ?:[\\/]*) 4636 ac_cv_path_FILE="$FILE" # Let the user override the test with a path. 4637 ;; 4638 *) 4639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4640 for as_dir in $PATH 4641 do 4642 IFS=$as_save_IFS 4643 test -z "$as_dir" && as_dir=. 4644 for ac_exec_ext in '' $ac_executable_extensions; do 4645 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4646 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext" 4647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4648 break 2 4649 fi 4650 done 4651 done 4652 IFS=$as_save_IFS 4653 4654 ;; 4655 esac 4656 fi 4657 FILE=$ac_cv_path_FILE 4658 if test -n "$FILE"; then 4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5 4660 $as_echo "$FILE" >&6; } 4661 else 4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4663 $as_echo "no" >&6; } 4664 fi 4665 4666 4667 test -n "$FILE" && break 4668 done 4669 4670 4671 if test "x$FILE" = x; then 4672 if test "xfile" = x; then 4673 PROG_NAME=file 4674 else 4675 PROG_NAME=file 4676 fi 4677 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4678 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4679 as_fn_error $? "Cannot continue" "$LINENO" 5 4680 fi 4681 4682 4683 4684 for ac_prog in find 4685 do 4686 # Extract the first word of "$ac_prog", so it can be a program name with args. 4687 set dummy $ac_prog; ac_word=$2 4688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4689 $as_echo_n "checking for $ac_word... " >&6; } 4690 if test "${ac_cv_path_FIND+set}" = set; then : 4691 $as_echo_n "(cached) " >&6 4692 else 4693 case $FIND in 4694 [\\/]* | ?:[\\/]*) 4695 ac_cv_path_FIND="$FIND" # Let the user override the test with a path. 4696 ;; 4697 *) 4698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4699 for as_dir in $PATH 4700 do 4701 IFS=$as_save_IFS 4702 test -z "$as_dir" && as_dir=. 4703 for ac_exec_ext in '' $ac_executable_extensions; do 4704 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4705 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" 4706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4707 break 2 4708 fi 4709 done 4710 done 4711 IFS=$as_save_IFS 4712 4713 ;; 4714 esac 4715 fi 4716 FIND=$ac_cv_path_FIND 4717 if test -n "$FIND"; then 4718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 4719 $as_echo "$FIND" >&6; } 4720 else 4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4722 $as_echo "no" >&6; } 4723 fi 4724 4725 4726 test -n "$FIND" && break 4727 done 4728 4729 4730 if test "x$FIND" = x; then 4731 if test "xfind" = x; then 4732 PROG_NAME=find 4733 else 4734 PROG_NAME=find 4735 fi 4736 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4737 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4738 as_fn_error $? "Cannot continue" "$LINENO" 5 4739 fi 4740 4741 4742 4743 for ac_prog in head 4744 do 4745 # Extract the first word of "$ac_prog", so it can be a program name with args. 4746 set dummy $ac_prog; ac_word=$2 4747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4748 $as_echo_n "checking for $ac_word... " >&6; } 4749 if test "${ac_cv_path_HEAD+set}" = set; then : 4750 $as_echo_n "(cached) " >&6 4751 else 4752 case $HEAD in 4753 [\\/]* | ?:[\\/]*) 4754 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path. 4755 ;; 4756 *) 4757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4758 for as_dir in $PATH 4759 do 4760 IFS=$as_save_IFS 4761 test -z "$as_dir" && as_dir=. 4762 for ac_exec_ext in '' $ac_executable_extensions; do 4763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4764 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext" 4765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4766 break 2 4767 fi 4768 done 4769 done 4770 IFS=$as_save_IFS 4771 4772 ;; 4773 esac 4774 fi 4775 HEAD=$ac_cv_path_HEAD 4776 if test -n "$HEAD"; then 4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5 4778 $as_echo "$HEAD" >&6; } 4779 else 4780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4781 $as_echo "no" >&6; } 4782 fi 4783 4784 4785 test -n "$HEAD" && break 4786 done 4787 4788 4789 if test "x$HEAD" = x; then 4790 if test "xhead" = x; then 4791 PROG_NAME=head 4792 else 4793 PROG_NAME=head 4794 fi 4795 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4796 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4797 as_fn_error $? "Cannot continue" "$LINENO" 5 4798 fi 4799 4800 4801 4802 for ac_prog in ln 4803 do 4804 # Extract the first word of "$ac_prog", so it can be a program name with args. 4805 set dummy $ac_prog; ac_word=$2 4806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4807 $as_echo_n "checking for $ac_word... " >&6; } 4808 if test "${ac_cv_path_LN+set}" = set; then : 4809 $as_echo_n "(cached) " >&6 4810 else 4811 case $LN in 4812 [\\/]* | ?:[\\/]*) 4813 ac_cv_path_LN="$LN" # Let the user override the test with a path. 4814 ;; 4815 *) 4816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4817 for as_dir in $PATH 4818 do 4819 IFS=$as_save_IFS 4820 test -z "$as_dir" && as_dir=. 4821 for ac_exec_ext in '' $ac_executable_extensions; do 4822 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4823 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext" 4824 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4825 break 2 4826 fi 4827 done 4828 done 4829 IFS=$as_save_IFS 4830 4831 ;; 4832 esac 4833 fi 4834 LN=$ac_cv_path_LN 4835 if test -n "$LN"; then 4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5 4837 $as_echo "$LN" >&6; } 4838 else 4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4840 $as_echo "no" >&6; } 4841 fi 4842 4843 4844 test -n "$LN" && break 4845 done 4846 4847 4848 if test "x$LN" = x; then 4849 if test "xln" = x; then 4850 PROG_NAME=ln 4851 else 4852 PROG_NAME=ln 4853 fi 4854 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4855 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4856 as_fn_error $? "Cannot continue" "$LINENO" 5 4857 fi 4858 4859 4860 4861 for ac_prog in ls 4862 do 4863 # Extract the first word of "$ac_prog", so it can be a program name with args. 4864 set dummy $ac_prog; ac_word=$2 4865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4866 $as_echo_n "checking for $ac_word... " >&6; } 4867 if test "${ac_cv_path_LS+set}" = set; then : 4868 $as_echo_n "(cached) " >&6 4869 else 4870 case $LS in 4871 [\\/]* | ?:[\\/]*) 4872 ac_cv_path_LS="$LS" # Let the user override the test with a path. 4873 ;; 4874 *) 4875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4876 for as_dir in $PATH 4877 do 4878 IFS=$as_save_IFS 4879 test -z "$as_dir" && as_dir=. 4880 for ac_exec_ext in '' $ac_executable_extensions; do 4881 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4882 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext" 4883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4884 break 2 4885 fi 4886 done 4887 done 4888 IFS=$as_save_IFS 4889 4890 ;; 4891 esac 4892 fi 4893 LS=$ac_cv_path_LS 4894 if test -n "$LS"; then 4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5 4896 $as_echo "$LS" >&6; } 4897 else 4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4899 $as_echo "no" >&6; } 4900 fi 4901 4902 4903 test -n "$LS" && break 4904 done 4905 4906 4907 if test "x$LS" = x; then 4908 if test "xls" = x; then 4909 PROG_NAME=ls 4910 else 4911 PROG_NAME=ls 4912 fi 4913 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4914 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4915 as_fn_error $? "Cannot continue" "$LINENO" 5 4916 fi 4917 4918 4919 4920 for ac_prog in mkdir 4921 do 4922 # Extract the first word of "$ac_prog", so it can be a program name with args. 4923 set dummy $ac_prog; ac_word=$2 4924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4925 $as_echo_n "checking for $ac_word... " >&6; } 4926 if test "${ac_cv_path_MKDIR+set}" = set; then : 4927 $as_echo_n "(cached) " >&6 4928 else 4929 case $MKDIR in 4930 [\\/]* | ?:[\\/]*) 4931 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. 4932 ;; 4933 *) 4934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4935 for as_dir in $PATH 4936 do 4937 IFS=$as_save_IFS 4938 test -z "$as_dir" && as_dir=. 4939 for ac_exec_ext in '' $ac_executable_extensions; do 4940 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4941 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" 4942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4943 break 2 4944 fi 4945 done 4946 done 4947 IFS=$as_save_IFS 4948 4949 ;; 4950 esac 4951 fi 4952 MKDIR=$ac_cv_path_MKDIR 4953 if test -n "$MKDIR"; then 4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 4955 $as_echo "$MKDIR" >&6; } 4956 else 4957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4958 $as_echo "no" >&6; } 4959 fi 4960 4961 4962 test -n "$MKDIR" && break 4963 done 4964 4965 4966 if test "x$MKDIR" = x; then 4967 if test "xmkdir" = x; then 4968 PROG_NAME=mkdir 4969 else 4970 PROG_NAME=mkdir 4971 fi 4972 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 4973 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 4974 as_fn_error $? "Cannot continue" "$LINENO" 5 4975 fi 4976 4977 4978 4979 for ac_prog in mktemp 4980 do 4981 # Extract the first word of "$ac_prog", so it can be a program name with args. 4982 set dummy $ac_prog; ac_word=$2 4983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4984 $as_echo_n "checking for $ac_word... " >&6; } 4985 if test "${ac_cv_path_MKTEMP+set}" = set; then : 4986 $as_echo_n "(cached) " >&6 4987 else 4988 case $MKTEMP in 4989 [\\/]* | ?:[\\/]*) 4990 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path. 4991 ;; 4992 *) 4993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4994 for as_dir in $PATH 4995 do 4996 IFS=$as_save_IFS 4997 test -z "$as_dir" && as_dir=. 4998 for ac_exec_ext in '' $ac_executable_extensions; do 4999 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5000 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext" 5001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5002 break 2 5003 fi 5004 done 5005 done 5006 IFS=$as_save_IFS 5007 5008 ;; 5009 esac 5010 fi 5011 MKTEMP=$ac_cv_path_MKTEMP 5012 if test -n "$MKTEMP"; then 5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5 5014 $as_echo "$MKTEMP" >&6; } 5015 else 5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5017 $as_echo "no" >&6; } 5018 fi 5019 5020 5021 test -n "$MKTEMP" && break 5022 done 5023 5024 5025 if test "x$MKTEMP" = x; then 5026 if test "xmktemp" = x; then 5027 PROG_NAME=mktemp 5028 else 5029 PROG_NAME=mktemp 5030 fi 5031 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5032 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5033 as_fn_error $? "Cannot continue" "$LINENO" 5 5034 fi 5035 5036 5037 5038 for ac_prog in mv 5039 do 5040 # Extract the first word of "$ac_prog", so it can be a program name with args. 5041 set dummy $ac_prog; ac_word=$2 5042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5043 $as_echo_n "checking for $ac_word... " >&6; } 5044 if test "${ac_cv_path_MV+set}" = set; then : 5045 $as_echo_n "(cached) " >&6 5046 else 5047 case $MV in 5048 [\\/]* | ?:[\\/]*) 5049 ac_cv_path_MV="$MV" # Let the user override the test with a path. 5050 ;; 5051 *) 5052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5053 for as_dir in $PATH 5054 do 5055 IFS=$as_save_IFS 5056 test -z "$as_dir" && as_dir=. 5057 for ac_exec_ext in '' $ac_executable_extensions; do 5058 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5059 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" 5060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5061 break 2 5062 fi 5063 done 5064 done 5065 IFS=$as_save_IFS 5066 5067 ;; 5068 esac 5069 fi 5070 MV=$ac_cv_path_MV 5071 if test -n "$MV"; then 5072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5 5073 $as_echo "$MV" >&6; } 5074 else 5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5076 $as_echo "no" >&6; } 5077 fi 5078 5079 5080 test -n "$MV" && break 5081 done 5082 5083 5084 if test "x$MV" = x; then 5085 if test "xmv" = x; then 5086 PROG_NAME=mv 5087 else 5088 PROG_NAME=mv 5089 fi 5090 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5091 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5092 as_fn_error $? "Cannot continue" "$LINENO" 5 5093 fi 5094 5095 5096 5097 for ac_prog in printf 5098 do 5099 # Extract the first word of "$ac_prog", so it can be a program name with args. 5100 set dummy $ac_prog; ac_word=$2 5101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5102 $as_echo_n "checking for $ac_word... " >&6; } 5103 if test "${ac_cv_path_PRINTF+set}" = set; then : 5104 $as_echo_n "(cached) " >&6 5105 else 5106 case $PRINTF in 5107 [\\/]* | ?:[\\/]*) 5108 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path. 5109 ;; 5110 *) 5111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5112 for as_dir in $PATH 5113 do 5114 IFS=$as_save_IFS 5115 test -z "$as_dir" && as_dir=. 5116 for ac_exec_ext in '' $ac_executable_extensions; do 5117 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5118 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext" 5119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5120 break 2 5121 fi 5122 done 5123 done 5124 IFS=$as_save_IFS 5125 5126 ;; 5127 esac 5128 fi 5129 PRINTF=$ac_cv_path_PRINTF 5130 if test -n "$PRINTF"; then 5131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5 5132 $as_echo "$PRINTF" >&6; } 5133 else 5134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5135 $as_echo "no" >&6; } 5136 fi 5137 5138 5139 test -n "$PRINTF" && break 5140 done 5141 5142 5143 if test "x$PRINTF" = x; then 5144 if test "xprintf" = x; then 5145 PROG_NAME=printf 5146 else 5147 PROG_NAME=printf 5148 fi 5149 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5150 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5151 as_fn_error $? "Cannot continue" "$LINENO" 5 5152 fi 5153 5154 5155 5156 for ac_prog in pwd 5157 do 5158 # Extract the first word of "$ac_prog", so it can be a program name with args. 5159 set dummy $ac_prog; ac_word=$2 5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5161 $as_echo_n "checking for $ac_word... " >&6; } 5162 if test "${ac_cv_path_THEPWDCMD+set}" = set; then : 5163 $as_echo_n "(cached) " >&6 5164 else 5165 case $THEPWDCMD in 5166 [\\/]* | ?:[\\/]*) 5167 ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path. 5168 ;; 5169 *) 5170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5171 for as_dir in $PATH 5172 do 5173 IFS=$as_save_IFS 5174 test -z "$as_dir" && as_dir=. 5175 for ac_exec_ext in '' $ac_executable_extensions; do 5176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5177 ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext" 5178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5179 break 2 5180 fi 5181 done 5182 done 5183 IFS=$as_save_IFS 5184 5185 ;; 5186 esac 5187 fi 5188 THEPWDCMD=$ac_cv_path_THEPWDCMD 5189 if test -n "$THEPWDCMD"; then 5190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5 5191 $as_echo "$THEPWDCMD" >&6; } 5192 else 5193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5194 $as_echo "no" >&6; } 5195 fi 5196 5197 5198 test -n "$THEPWDCMD" && break 5199 done 5200 5201 5202 if test "x$THEPWDCMD" = x; then 5203 if test "xpwd" = x; then 5204 PROG_NAME=thepwdcmd 5205 else 5206 PROG_NAME=pwd 5207 fi 5208 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5209 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5210 as_fn_error $? "Cannot continue" "$LINENO" 5 5211 fi 5212 5213 5214 5215 for ac_prog in rm 5216 do 5217 # Extract the first word of "$ac_prog", so it can be a program name with args. 5218 set dummy $ac_prog; ac_word=$2 5219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5220 $as_echo_n "checking for $ac_word... " >&6; } 5221 if test "${ac_cv_path_RM+set}" = set; then : 5222 $as_echo_n "(cached) " >&6 5223 else 5224 case $RM in 5225 [\\/]* | ?:[\\/]*) 5226 ac_cv_path_RM="$RM" # Let the user override the test with a path. 5227 ;; 5228 *) 5229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5230 for as_dir in $PATH 5231 do 5232 IFS=$as_save_IFS 5233 test -z "$as_dir" && as_dir=. 5234 for ac_exec_ext in '' $ac_executable_extensions; do 5235 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5236 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" 5237 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5238 break 2 5239 fi 5240 done 5241 done 5242 IFS=$as_save_IFS 5243 5244 ;; 5245 esac 5246 fi 5247 RM=$ac_cv_path_RM 5248 if test -n "$RM"; then 5249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 5250 $as_echo "$RM" >&6; } 5251 else 5252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5253 $as_echo "no" >&6; } 5254 fi 5255 5256 5257 test -n "$RM" && break 5258 done 5259 5260 5261 if test "x$RM" = x; then 5262 if test "xrm" = x; then 5263 PROG_NAME=rm 5264 else 5265 PROG_NAME=rm 5266 fi 5267 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5268 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5269 as_fn_error $? "Cannot continue" "$LINENO" 5 5270 fi 5271 5272 5273 5274 for ac_prog in sh 5275 do 5276 # Extract the first word of "$ac_prog", so it can be a program name with args. 5277 set dummy $ac_prog; ac_word=$2 5278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5279 $as_echo_n "checking for $ac_word... " >&6; } 5280 if test "${ac_cv_path_SH+set}" = set; then : 5281 $as_echo_n "(cached) " >&6 5282 else 5283 case $SH in 5284 [\\/]* | ?:[\\/]*) 5285 ac_cv_path_SH="$SH" # Let the user override the test with a path. 5286 ;; 5287 *) 5288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5289 for as_dir in $PATH 5290 do 5291 IFS=$as_save_IFS 5292 test -z "$as_dir" && as_dir=. 5293 for ac_exec_ext in '' $ac_executable_extensions; do 5294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5295 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" 5296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5297 break 2 5298 fi 5299 done 5300 done 5301 IFS=$as_save_IFS 5302 5303 ;; 5304 esac 5305 fi 5306 SH=$ac_cv_path_SH 5307 if test -n "$SH"; then 5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5 5309 $as_echo "$SH" >&6; } 5310 else 5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5312 $as_echo "no" >&6; } 5313 fi 5314 5315 5316 test -n "$SH" && break 5317 done 5318 5319 5320 if test "x$SH" = x; then 5321 if test "xsh" = x; then 5322 PROG_NAME=sh 5323 else 5324 PROG_NAME=sh 5325 fi 5326 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5327 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5328 as_fn_error $? "Cannot continue" "$LINENO" 5 5329 fi 5330 5331 5332 5333 for ac_prog in sort 5334 do 5335 # Extract the first word of "$ac_prog", so it can be a program name with args. 5336 set dummy $ac_prog; ac_word=$2 5337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5338 $as_echo_n "checking for $ac_word... " >&6; } 5339 if test "${ac_cv_path_SORT+set}" = set; then : 5340 $as_echo_n "(cached) " >&6 5341 else 5342 case $SORT in 5343 [\\/]* | ?:[\\/]*) 5344 ac_cv_path_SORT="$SORT" # Let the user override the test with a path. 5345 ;; 5346 *) 5347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5348 for as_dir in $PATH 5349 do 5350 IFS=$as_save_IFS 5351 test -z "$as_dir" && as_dir=. 5352 for ac_exec_ext in '' $ac_executable_extensions; do 5353 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5354 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext" 5355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5356 break 2 5357 fi 5358 done 5359 done 5360 IFS=$as_save_IFS 5361 5362 ;; 5363 esac 5364 fi 5365 SORT=$ac_cv_path_SORT 5366 if test -n "$SORT"; then 5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5 5368 $as_echo "$SORT" >&6; } 5369 else 5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5371 $as_echo "no" >&6; } 5372 fi 5373 5374 5375 test -n "$SORT" && break 5376 done 5377 5378 5379 if test "x$SORT" = x; then 5380 if test "xsort" = x; then 5381 PROG_NAME=sort 5382 else 5383 PROG_NAME=sort 5384 fi 5385 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5386 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5387 as_fn_error $? "Cannot continue" "$LINENO" 5 5388 fi 5389 5390 5391 5392 for ac_prog in tail 5393 do 5394 # Extract the first word of "$ac_prog", so it can be a program name with args. 5395 set dummy $ac_prog; ac_word=$2 5396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5397 $as_echo_n "checking for $ac_word... " >&6; } 5398 if test "${ac_cv_path_TAIL+set}" = set; then : 5399 $as_echo_n "(cached) " >&6 5400 else 5401 case $TAIL in 5402 [\\/]* | ?:[\\/]*) 5403 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path. 5404 ;; 5405 *) 5406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5407 for as_dir in $PATH 5408 do 5409 IFS=$as_save_IFS 5410 test -z "$as_dir" && as_dir=. 5411 for ac_exec_ext in '' $ac_executable_extensions; do 5412 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5413 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext" 5414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5415 break 2 5416 fi 5417 done 5418 done 5419 IFS=$as_save_IFS 5420 5421 ;; 5422 esac 5423 fi 5424 TAIL=$ac_cv_path_TAIL 5425 if test -n "$TAIL"; then 5426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5 5427 $as_echo "$TAIL" >&6; } 5428 else 5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5430 $as_echo "no" >&6; } 5431 fi 5432 5433 5434 test -n "$TAIL" && break 5435 done 5436 5437 5438 if test "x$TAIL" = x; then 5439 if test "xtail" = x; then 5440 PROG_NAME=tail 5441 else 5442 PROG_NAME=tail 5443 fi 5444 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5445 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5446 as_fn_error $? "Cannot continue" "$LINENO" 5 5447 fi 5448 5449 5450 5451 for ac_prog in tar 5452 do 5453 # Extract the first word of "$ac_prog", so it can be a program name with args. 5454 set dummy $ac_prog; ac_word=$2 5455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5456 $as_echo_n "checking for $ac_word... " >&6; } 5457 if test "${ac_cv_path_TAR+set}" = set; then : 5458 $as_echo_n "(cached) " >&6 5459 else 5460 case $TAR in 5461 [\\/]* | ?:[\\/]*) 5462 ac_cv_path_TAR="$TAR" # Let the user override the test with a path. 5463 ;; 5464 *) 5465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5466 for as_dir in $PATH 5467 do 5468 IFS=$as_save_IFS 5469 test -z "$as_dir" && as_dir=. 5470 for ac_exec_ext in '' $ac_executable_extensions; do 5471 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5472 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" 5473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5474 break 2 5475 fi 5476 done 5477 done 5478 IFS=$as_save_IFS 5479 5480 ;; 5481 esac 5482 fi 5483 TAR=$ac_cv_path_TAR 5484 if test -n "$TAR"; then 5485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 5486 $as_echo "$TAR" >&6; } 5487 else 5488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5489 $as_echo "no" >&6; } 5490 fi 5491 5492 5493 test -n "$TAR" && break 5494 done 5495 5496 5497 if test "x$TAR" = x; then 5498 if test "xtar" = x; then 5499 PROG_NAME=tar 5500 else 5501 PROG_NAME=tar 5502 fi 5503 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5504 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5505 as_fn_error $? "Cannot continue" "$LINENO" 5 5506 fi 5507 5508 5509 5510 for ac_prog in tee 5511 do 5512 # Extract the first word of "$ac_prog", so it can be a program name with args. 5513 set dummy $ac_prog; ac_word=$2 5514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5515 $as_echo_n "checking for $ac_word... " >&6; } 5516 if test "${ac_cv_path_TEE+set}" = set; then : 5517 $as_echo_n "(cached) " >&6 5518 else 5519 case $TEE in 5520 [\\/]* | ?:[\\/]*) 5521 ac_cv_path_TEE="$TEE" # Let the user override the test with a path. 5522 ;; 5523 *) 5524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5525 for as_dir in $PATH 5526 do 5527 IFS=$as_save_IFS 5528 test -z "$as_dir" && as_dir=. 5529 for ac_exec_ext in '' $ac_executable_extensions; do 5530 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5531 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext" 5532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5533 break 2 5534 fi 5535 done 5536 done 5537 IFS=$as_save_IFS 5538 5539 ;; 5540 esac 5541 fi 5542 TEE=$ac_cv_path_TEE 5543 if test -n "$TEE"; then 5544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5 5545 $as_echo "$TEE" >&6; } 5546 else 5547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5548 $as_echo "no" >&6; } 5549 fi 5550 5551 5552 test -n "$TEE" && break 5553 done 5554 5555 5556 if test "x$TEE" = x; then 5557 if test "xtee" = x; then 5558 PROG_NAME=tee 5559 else 5560 PROG_NAME=tee 5561 fi 5562 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5563 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5564 as_fn_error $? "Cannot continue" "$LINENO" 5 5565 fi 5566 5567 5568 5569 for ac_prog in touch 5570 do 5571 # Extract the first word of "$ac_prog", so it can be a program name with args. 5572 set dummy $ac_prog; ac_word=$2 5573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5574 $as_echo_n "checking for $ac_word... " >&6; } 5575 if test "${ac_cv_path_TOUCH+set}" = set; then : 5576 $as_echo_n "(cached) " >&6 5577 else 5578 case $TOUCH in 5579 [\\/]* | ?:[\\/]*) 5580 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path. 5581 ;; 5582 *) 5583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5584 for as_dir in $PATH 5585 do 5586 IFS=$as_save_IFS 5587 test -z "$as_dir" && as_dir=. 5588 for ac_exec_ext in '' $ac_executable_extensions; do 5589 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5590 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext" 5591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5592 break 2 5593 fi 5594 done 5595 done 5596 IFS=$as_save_IFS 5597 5598 ;; 5599 esac 5600 fi 5601 TOUCH=$ac_cv_path_TOUCH 5602 if test -n "$TOUCH"; then 5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5 5604 $as_echo "$TOUCH" >&6; } 5605 else 5606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5607 $as_echo "no" >&6; } 5608 fi 5609 5610 5611 test -n "$TOUCH" && break 5612 done 5613 5614 5615 if test "x$TOUCH" = x; then 5616 if test "xtouch" = x; then 5617 PROG_NAME=touch 5618 else 5619 PROG_NAME=touch 5620 fi 5621 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5622 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5623 as_fn_error $? "Cannot continue" "$LINENO" 5 5624 fi 5625 5626 5627 5628 for ac_prog in tr 5629 do 5630 # Extract the first word of "$ac_prog", so it can be a program name with args. 5631 set dummy $ac_prog; ac_word=$2 5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5633 $as_echo_n "checking for $ac_word... " >&6; } 5634 if test "${ac_cv_path_TR+set}" = set; then : 5635 $as_echo_n "(cached) " >&6 5636 else 5637 case $TR in 5638 [\\/]* | ?:[\\/]*) 5639 ac_cv_path_TR="$TR" # Let the user override the test with a path. 5640 ;; 5641 *) 5642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5643 for as_dir in $PATH 5644 do 5645 IFS=$as_save_IFS 5646 test -z "$as_dir" && as_dir=. 5647 for ac_exec_ext in '' $ac_executable_extensions; do 5648 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5649 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" 5650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5651 break 2 5652 fi 5653 done 5654 done 5655 IFS=$as_save_IFS 5656 5657 ;; 5658 esac 5659 fi 5660 TR=$ac_cv_path_TR 5661 if test -n "$TR"; then 5662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 5663 $as_echo "$TR" >&6; } 5664 else 5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5666 $as_echo "no" >&6; } 5667 fi 5668 5669 5670 test -n "$TR" && break 5671 done 5672 5673 5674 if test "x$TR" = x; then 5675 if test "xtr" = x; then 5676 PROG_NAME=tr 5677 else 5678 PROG_NAME=tr 5679 fi 5680 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5681 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5682 as_fn_error $? "Cannot continue" "$LINENO" 5 5683 fi 5684 5685 5686 5687 for ac_prog in uname 5688 do 5689 # Extract the first word of "$ac_prog", so it can be a program name with args. 5690 set dummy $ac_prog; ac_word=$2 5691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5692 $as_echo_n "checking for $ac_word... " >&6; } 5693 if test "${ac_cv_path_UNAME+set}" = set; then : 5694 $as_echo_n "(cached) " >&6 5695 else 5696 case $UNAME in 5697 [\\/]* | ?:[\\/]*) 5698 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path. 5699 ;; 5700 *) 5701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5702 for as_dir in $PATH 5703 do 5704 IFS=$as_save_IFS 5705 test -z "$as_dir" && as_dir=. 5706 for ac_exec_ext in '' $ac_executable_extensions; do 5707 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5708 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext" 5709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5710 break 2 5711 fi 5712 done 5713 done 5714 IFS=$as_save_IFS 5715 5716 ;; 5717 esac 5718 fi 5719 UNAME=$ac_cv_path_UNAME 5720 if test -n "$UNAME"; then 5721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5 5722 $as_echo "$UNAME" >&6; } 5723 else 5724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5725 $as_echo "no" >&6; } 5726 fi 5727 5728 5729 test -n "$UNAME" && break 5730 done 5731 5732 5733 if test "x$UNAME" = x; then 5734 if test "xuname" = x; then 5735 PROG_NAME=uname 5736 else 5737 PROG_NAME=uname 5738 fi 5739 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5740 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5741 as_fn_error $? "Cannot continue" "$LINENO" 5 5742 fi 5743 5744 5745 5746 for ac_prog in uniq 5747 do 5748 # Extract the first word of "$ac_prog", so it can be a program name with args. 5749 set dummy $ac_prog; ac_word=$2 5750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5751 $as_echo_n "checking for $ac_word... " >&6; } 5752 if test "${ac_cv_path_UNIQ+set}" = set; then : 5753 $as_echo_n "(cached) " >&6 5754 else 5755 case $UNIQ in 5756 [\\/]* | ?:[\\/]*) 5757 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path. 5758 ;; 5759 *) 5760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5761 for as_dir in $PATH 5762 do 5763 IFS=$as_save_IFS 5764 test -z "$as_dir" && as_dir=. 5765 for ac_exec_ext in '' $ac_executable_extensions; do 5766 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5767 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext" 5768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5769 break 2 5770 fi 5771 done 5772 done 5773 IFS=$as_save_IFS 5774 5775 ;; 5776 esac 5777 fi 5778 UNIQ=$ac_cv_path_UNIQ 5779 if test -n "$UNIQ"; then 5780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5 5781 $as_echo "$UNIQ" >&6; } 5782 else 5783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5784 $as_echo "no" >&6; } 5785 fi 5786 5787 5788 test -n "$UNIQ" && break 5789 done 5790 5791 5792 if test "x$UNIQ" = x; then 5793 if test "xuniq" = x; then 5794 PROG_NAME=uniq 5795 else 5796 PROG_NAME=uniq 5797 fi 5798 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5799 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5800 as_fn_error $? "Cannot continue" "$LINENO" 5 5801 fi 5802 5803 5804 5805 for ac_prog in wc 5806 do 5807 # Extract the first word of "$ac_prog", so it can be a program name with args. 5808 set dummy $ac_prog; ac_word=$2 5809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5810 $as_echo_n "checking for $ac_word... " >&6; } 5811 if test "${ac_cv_path_WC+set}" = set; then : 5812 $as_echo_n "(cached) " >&6 5813 else 5814 case $WC in 5815 [\\/]* | ?:[\\/]*) 5816 ac_cv_path_WC="$WC" # Let the user override the test with a path. 5817 ;; 5818 *) 5819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5820 for as_dir in $PATH 5821 do 5822 IFS=$as_save_IFS 5823 test -z "$as_dir" && as_dir=. 5824 for ac_exec_ext in '' $ac_executable_extensions; do 5825 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5826 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext" 5827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5828 break 2 5829 fi 5830 done 5831 done 5832 IFS=$as_save_IFS 5833 5834 ;; 5835 esac 5836 fi 5837 WC=$ac_cv_path_WC 5838 if test -n "$WC"; then 5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5 5840 $as_echo "$WC" >&6; } 5841 else 5842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5843 $as_echo "no" >&6; } 5844 fi 5845 5846 5847 test -n "$WC" && break 5848 done 5849 5850 5851 if test "x$WC" = x; then 5852 if test "xwc" = x; then 5853 PROG_NAME=wc 5854 else 5855 PROG_NAME=wc 5856 fi 5857 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5858 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5859 as_fn_error $? "Cannot continue" "$LINENO" 5 5860 fi 5861 5862 5863 5864 for ac_prog in which 5865 do 5866 # Extract the first word of "$ac_prog", so it can be a program name with args. 5867 set dummy $ac_prog; ac_word=$2 5868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5869 $as_echo_n "checking for $ac_word... " >&6; } 5870 if test "${ac_cv_path_WHICH+set}" = set; then : 5871 $as_echo_n "(cached) " >&6 5872 else 5873 case $WHICH in 5874 [\\/]* | ?:[\\/]*) 5875 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path. 5876 ;; 5877 *) 5878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5879 for as_dir in $PATH 5880 do 5881 IFS=$as_save_IFS 5882 test -z "$as_dir" && as_dir=. 5883 for ac_exec_ext in '' $ac_executable_extensions; do 5884 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5885 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext" 5886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5887 break 2 5888 fi 5889 done 5890 done 5891 IFS=$as_save_IFS 5892 5893 ;; 5894 esac 5895 fi 5896 WHICH=$ac_cv_path_WHICH 5897 if test -n "$WHICH"; then 5898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5 5899 $as_echo "$WHICH" >&6; } 5900 else 5901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5902 $as_echo "no" >&6; } 5903 fi 5904 5905 5906 test -n "$WHICH" && break 5907 done 5908 5909 5910 if test "x$WHICH" = x; then 5911 if test "xwhich" = x; then 5912 PROG_NAME=which 5913 else 5914 PROG_NAME=which 5915 fi 5916 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5917 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5918 as_fn_error $? "Cannot continue" "$LINENO" 5 5919 fi 5920 5921 5922 5923 for ac_prog in xargs 5924 do 5925 # Extract the first word of "$ac_prog", so it can be a program name with args. 5926 set dummy $ac_prog; ac_word=$2 5927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5928 $as_echo_n "checking for $ac_word... " >&6; } 5929 if test "${ac_cv_path_XARGS+set}" = set; then : 5930 $as_echo_n "(cached) " >&6 5931 else 5932 case $XARGS in 5933 [\\/]* | ?:[\\/]*) 5934 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path. 5935 ;; 5936 *) 5937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5938 for as_dir in $PATH 5939 do 5940 IFS=$as_save_IFS 5941 test -z "$as_dir" && as_dir=. 5942 for ac_exec_ext in '' $ac_executable_extensions; do 5943 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5944 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext" 5945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5946 break 2 5947 fi 5948 done 5949 done 5950 IFS=$as_save_IFS 5951 5952 ;; 5953 esac 5954 fi 5955 XARGS=$ac_cv_path_XARGS 5956 if test -n "$XARGS"; then 5957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5 5958 $as_echo "$XARGS" >&6; } 5959 else 5960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5961 $as_echo "no" >&6; } 5962 fi 5963 5964 5965 test -n "$XARGS" && break 5966 done 5967 5968 5969 if test "x$XARGS" = x; then 5970 if test "xxargs" = x; then 5971 PROG_NAME=xargs 5972 else 5973 PROG_NAME=xargs 5974 fi 5975 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 5976 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 5977 as_fn_error $? "Cannot continue" "$LINENO" 5 5978 fi 5979 5980 5981 5982 # Then required tools that require some special treatment. 5983 for ac_prog in gawk mawk nawk awk 5984 do 5985 # Extract the first word of "$ac_prog", so it can be a program name with args. 5986 set dummy $ac_prog; ac_word=$2 5987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5988 $as_echo_n "checking for $ac_word... " >&6; } 5989 if test "${ac_cv_prog_AWK+set}" = set; then : 5990 $as_echo_n "(cached) " >&6 5991 else 5992 if test -n "$AWK"; then 5993 ac_cv_prog_AWK="$AWK" # Let the user override the test. 5994 else 5995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5996 for as_dir in $PATH 5997 do 5998 IFS=$as_save_IFS 5999 test -z "$as_dir" && as_dir=. 6000 for ac_exec_ext in '' $ac_executable_extensions; do 6001 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6002 ac_cv_prog_AWK="$ac_prog" 6003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6004 break 2 6005 fi 6006 done 6007 done 6008 IFS=$as_save_IFS 6009 6010 fi 6011 fi 6012 AWK=$ac_cv_prog_AWK 6013 if test -n "$AWK"; then 6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 6015 $as_echo "$AWK" >&6; } 6016 else 6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6018 $as_echo "no" >&6; } 6019 fi 6020 6021 6022 test -n "$AWK" && break 6023 done 6024 6025 6026 if test "x$AWK" = x; then 6027 if test "x" = x; then 6028 PROG_NAME=awk 6029 else 6030 PROG_NAME= 6031 fi 6032 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6033 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6034 as_fn_error $? "Cannot continue" "$LINENO" 5 6035 fi 6036 6037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 6038 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } 6039 if test "${ac_cv_path_GREP+set}" = set; then : 6040 $as_echo_n "(cached) " >&6 6041 else 6042 if test -z "$GREP"; then 6043 ac_path_GREP_found=false 6044 # Loop through the user's path and test for each of PROGNAME-LIST 6045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6046 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6047 do 6048 IFS=$as_save_IFS 6049 test -z "$as_dir" && as_dir=. 6050 for ac_prog in grep ggrep; do 6051 for ac_exec_ext in '' $ac_executable_extensions; do 6052 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 6053 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue 6054 # Check for GNU ac_path_GREP and select it if it is found. 6055 # Check for GNU $ac_path_GREP 6056 case `"$ac_path_GREP" --version 2>&1` in 6057 *GNU*) 6058 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 6059 *) 6060 ac_count=0 6061 $as_echo_n 0123456789 >"conftest.in" 6062 while : 6063 do 6064 cat "conftest.in" "conftest.in" >"conftest.tmp" 6065 mv "conftest.tmp" "conftest.in" 6066 cp "conftest.in" "conftest.nl" 6067 $as_echo 'GREP' >> "conftest.nl" 6068 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6069 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6070 as_fn_arith $ac_count + 1 && ac_count=$as_val 6071 if test $ac_count -gt ${ac_path_GREP_max-0}; then 6072 # Best one so far, save it but keep looking for a better one 6073 ac_cv_path_GREP="$ac_path_GREP" 6074 ac_path_GREP_max=$ac_count 6075 fi 6076 # 10*(2^10) chars as input seems more than enough 6077 test $ac_count -gt 10 && break 6078 done 6079 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6080 esac 6081 6082 $ac_path_GREP_found && break 3 6083 done 6084 done 6085 done 6086 IFS=$as_save_IFS 6087 if test -z "$ac_cv_path_GREP"; then 6088 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6089 fi 6090 else 6091 ac_cv_path_GREP=$GREP 6092 fi 6093 6094 fi 6095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 6096 $as_echo "$ac_cv_path_GREP" >&6; } 6097 GREP="$ac_cv_path_GREP" 6098 6099 6100 6101 if test "x$GREP" = x; then 6102 if test "x" = x; then 6103 PROG_NAME=grep 6104 else 6105 PROG_NAME= 6106 fi 6107 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6108 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6109 as_fn_error $? "Cannot continue" "$LINENO" 5 6110 fi 6111 6112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 6113 $as_echo_n "checking for egrep... " >&6; } 6114 if test "${ac_cv_path_EGREP+set}" = set; then : 6115 $as_echo_n "(cached) " >&6 6116 else 6117 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 6118 then ac_cv_path_EGREP="$GREP -E" 6119 else 6120 if test -z "$EGREP"; then 6121 ac_path_EGREP_found=false 6122 # Loop through the user's path and test for each of PROGNAME-LIST 6123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6124 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6125 do 6126 IFS=$as_save_IFS 6127 test -z "$as_dir" && as_dir=. 6128 for ac_prog in egrep; do 6129 for ac_exec_ext in '' $ac_executable_extensions; do 6130 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 6131 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue 6132 # Check for GNU ac_path_EGREP and select it if it is found. 6133 # Check for GNU $ac_path_EGREP 6134 case `"$ac_path_EGREP" --version 2>&1` in 6135 *GNU*) 6136 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 6137 *) 6138 ac_count=0 6139 $as_echo_n 0123456789 >"conftest.in" 6140 while : 6141 do 6142 cat "conftest.in" "conftest.in" >"conftest.tmp" 6143 mv "conftest.tmp" "conftest.in" 6144 cp "conftest.in" "conftest.nl" 6145 $as_echo 'EGREP' >> "conftest.nl" 6146 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6147 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6148 as_fn_arith $ac_count + 1 && ac_count=$as_val 6149 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 6150 # Best one so far, save it but keep looking for a better one 6151 ac_cv_path_EGREP="$ac_path_EGREP" 6152 ac_path_EGREP_max=$ac_count 6153 fi 6154 # 10*(2^10) chars as input seems more than enough 6155 test $ac_count -gt 10 && break 6156 done 6157 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6158 esac 6159 6160 $ac_path_EGREP_found && break 3 6161 done 6162 done 6163 done 6164 IFS=$as_save_IFS 6165 if test -z "$ac_cv_path_EGREP"; then 6166 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6167 fi 6168 else 6169 ac_cv_path_EGREP=$EGREP 6170 fi 6171 6172 fi 6173 fi 6174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 6175 $as_echo "$ac_cv_path_EGREP" >&6; } 6176 EGREP="$ac_cv_path_EGREP" 6177 6178 6179 6180 if test "x$EGREP" = x; then 6181 if test "x" = x; then 6182 PROG_NAME=egrep 6183 else 6184 PROG_NAME= 6185 fi 6186 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6187 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6188 as_fn_error $? "Cannot continue" "$LINENO" 5 6189 fi 6190 6191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 6192 $as_echo_n "checking for fgrep... " >&6; } 6193 if test "${ac_cv_path_FGREP+set}" = set; then : 6194 $as_echo_n "(cached) " >&6 6195 else 6196 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 6197 then ac_cv_path_FGREP="$GREP -F" 6198 else 6199 if test -z "$FGREP"; then 6200 ac_path_FGREP_found=false 6201 # Loop through the user's path and test for each of PROGNAME-LIST 6202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6203 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6204 do 6205 IFS=$as_save_IFS 6206 test -z "$as_dir" && as_dir=. 6207 for ac_prog in fgrep; do 6208 for ac_exec_ext in '' $ac_executable_extensions; do 6209 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" 6210 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue 6211 # Check for GNU ac_path_FGREP and select it if it is found. 6212 # Check for GNU $ac_path_FGREP 6213 case `"$ac_path_FGREP" --version 2>&1` in 6214 *GNU*) 6215 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; 6216 *) 6217 ac_count=0 6218 $as_echo_n 0123456789 >"conftest.in" 6219 while : 6220 do 6221 cat "conftest.in" "conftest.in" >"conftest.tmp" 6222 mv "conftest.tmp" "conftest.in" 6223 cp "conftest.in" "conftest.nl" 6224 $as_echo 'FGREP' >> "conftest.nl" 6225 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break 6226 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6227 as_fn_arith $ac_count + 1 && ac_count=$as_val 6228 if test $ac_count -gt ${ac_path_FGREP_max-0}; then 6229 # Best one so far, save it but keep looking for a better one 6230 ac_cv_path_FGREP="$ac_path_FGREP" 6231 ac_path_FGREP_max=$ac_count 6232 fi 6233 # 10*(2^10) chars as input seems more than enough 6234 test $ac_count -gt 10 && break 6235 done 6236 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6237 esac 6238 6239 $ac_path_FGREP_found && break 3 6240 done 6241 done 6242 done 6243 IFS=$as_save_IFS 6244 if test -z "$ac_cv_path_FGREP"; then 6245 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6246 fi 6247 else 6248 ac_cv_path_FGREP=$FGREP 6249 fi 6250 6251 fi 6252 fi 6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 6254 $as_echo "$ac_cv_path_FGREP" >&6; } 6255 FGREP="$ac_cv_path_FGREP" 6256 6257 6258 6259 if test "x$FGREP" = x; then 6260 if test "x" = x; then 6261 PROG_NAME=fgrep 6262 else 6263 PROG_NAME= 6264 fi 6265 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6266 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6267 as_fn_error $? "Cannot continue" "$LINENO" 5 6268 fi 6269 6270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 6271 $as_echo_n "checking for a sed that does not truncate output... " >&6; } 6272 if test "${ac_cv_path_SED+set}" = set; then : 6273 $as_echo_n "(cached) " >&6 6274 else 6275 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ 6276 for ac_i in 1 2 3 4 5 6 7; do 6277 ac_script="$ac_script$as_nl$ac_script" 6278 done 6279 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed 6280 { ac_script=; unset ac_script;} 6281 if test -z "$SED"; then 6282 ac_path_SED_found=false 6283 # Loop through the user's path and test for each of PROGNAME-LIST 6284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6285 for as_dir in $PATH 6286 do 6287 IFS=$as_save_IFS 6288 test -z "$as_dir" && as_dir=. 6289 for ac_prog in sed gsed; do 6290 for ac_exec_ext in '' $ac_executable_extensions; do 6291 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" 6292 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue 6293 # Check for GNU ac_path_SED and select it if it is found. 6294 # Check for GNU $ac_path_SED 6295 case `"$ac_path_SED" --version 2>&1` in 6296 *GNU*) 6297 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; 6298 *) 6299 ac_count=0 6300 $as_echo_n 0123456789 >"conftest.in" 6301 while : 6302 do 6303 cat "conftest.in" "conftest.in" >"conftest.tmp" 6304 mv "conftest.tmp" "conftest.in" 6305 cp "conftest.in" "conftest.nl" 6306 $as_echo '' >> "conftest.nl" 6307 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break 6308 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6309 as_fn_arith $ac_count + 1 && ac_count=$as_val 6310 if test $ac_count -gt ${ac_path_SED_max-0}; then 6311 # Best one so far, save it but keep looking for a better one 6312 ac_cv_path_SED="$ac_path_SED" 6313 ac_path_SED_max=$ac_count 6314 fi 6315 # 10*(2^10) chars as input seems more than enough 6316 test $ac_count -gt 10 && break 6317 done 6318 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6319 esac 6320 6321 $ac_path_SED_found && break 3 6322 done 6323 done 6324 done 6325 IFS=$as_save_IFS 6326 if test -z "$ac_cv_path_SED"; then 6327 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 6328 fi 6329 else 6330 ac_cv_path_SED=$SED 6331 fi 6332 6333 fi 6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 6335 $as_echo "$ac_cv_path_SED" >&6; } 6336 SED="$ac_cv_path_SED" 6337 rm -f conftest.sed 6338 6339 6340 if test "x$SED" = x; then 6341 if test "x" = x; then 6342 PROG_NAME=sed 6343 else 6344 PROG_NAME= 6345 fi 6346 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6347 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6348 as_fn_error $? "Cannot continue" "$LINENO" 5 6349 fi 6350 6351 6352 for ac_prog in nawk gawk awk 6353 do 6354 # Extract the first word of "$ac_prog", so it can be a program name with args. 6355 set dummy $ac_prog; ac_word=$2 6356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6357 $as_echo_n "checking for $ac_word... " >&6; } 6358 if test "${ac_cv_path_NAWK+set}" = set; then : 6359 $as_echo_n "(cached) " >&6 6360 else 6361 case $NAWK in 6362 [\\/]* | ?:[\\/]*) 6363 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path. 6364 ;; 6365 *) 6366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6367 for as_dir in $PATH 6368 do 6369 IFS=$as_save_IFS 6370 test -z "$as_dir" && as_dir=. 6371 for ac_exec_ext in '' $ac_executable_extensions; do 6372 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6373 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext" 6374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6375 break 2 6376 fi 6377 done 6378 done 6379 IFS=$as_save_IFS 6380 6381 ;; 6382 esac 6383 fi 6384 NAWK=$ac_cv_path_NAWK 6385 if test -n "$NAWK"; then 6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5 6387 $as_echo "$NAWK" >&6; } 6388 else 6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6390 $as_echo "no" >&6; } 6391 fi 6392 6393 6394 test -n "$NAWK" && break 6395 done 6396 6397 6398 if test "x$NAWK" = x; then 6399 if test "x" = x; then 6400 PROG_NAME=nawk 6401 else 6402 PROG_NAME= 6403 fi 6404 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 6405 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 6406 as_fn_error $? "Cannot continue" "$LINENO" 5 6407 fi 6408 6409 6410 # Always force rm. 6411 RM="$RM -f" 6412 6413 # These are not required on all platforms 6414 # Extract the first word of "cygpath", so it can be a program name with args. 6415 set dummy cygpath; ac_word=$2 6416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6417 $as_echo_n "checking for $ac_word... " >&6; } 6418 if test "${ac_cv_path_CYGPATH+set}" = set; then : 6419 $as_echo_n "(cached) " >&6 6420 else 6421 case $CYGPATH in 6422 [\\/]* | ?:[\\/]*) 6423 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path. 6424 ;; 6425 *) 6426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6427 for as_dir in $PATH 6428 do 6429 IFS=$as_save_IFS 6430 test -z "$as_dir" && as_dir=. 6431 for ac_exec_ext in '' $ac_executable_extensions; do 6432 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6433 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext" 6434 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6435 break 2 6436 fi 6437 done 6438 done 6439 IFS=$as_save_IFS 6440 6441 ;; 6442 esac 6443 fi 6444 CYGPATH=$ac_cv_path_CYGPATH 6445 if test -n "$CYGPATH"; then 6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 6447 $as_echo "$CYGPATH" >&6; } 6448 else 6449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6450 $as_echo "no" >&6; } 6451 fi 6452 6453 6454 # Extract the first word of "readlink", so it can be a program name with args. 6455 set dummy readlink; ac_word=$2 6456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6457 $as_echo_n "checking for $ac_word... " >&6; } 6458 if test "${ac_cv_path_READLINK+set}" = set; then : 6459 $as_echo_n "(cached) " >&6 6460 else 6461 case $READLINK in 6462 [\\/]* | ?:[\\/]*) 6463 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path. 6464 ;; 6465 *) 6466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6467 for as_dir in $PATH 6468 do 6469 IFS=$as_save_IFS 6470 test -z "$as_dir" && as_dir=. 6471 for ac_exec_ext in '' $ac_executable_extensions; do 6472 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6473 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext" 6474 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6475 break 2 6476 fi 6477 done 6478 done 6479 IFS=$as_save_IFS 6480 6481 ;; 6482 esac 6483 fi 6484 READLINK=$ac_cv_path_READLINK 6485 if test -n "$READLINK"; then 6486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5 6487 $as_echo "$READLINK" >&6; } 6488 else 6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6490 $as_echo "no" >&6; } 6491 fi 6492 6493 6494 # Extract the first word of "df", so it can be a program name with args. 6495 set dummy df; ac_word=$2 6496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6497 $as_echo_n "checking for $ac_word... " >&6; } 6498 if test "${ac_cv_path_DF+set}" = set; then : 6499 $as_echo_n "(cached) " >&6 6500 else 6501 case $DF in 6502 [\\/]* | ?:[\\/]*) 6503 ac_cv_path_DF="$DF" # Let the user override the test with a path. 6504 ;; 6505 *) 6506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6507 for as_dir in $PATH 6508 do 6509 IFS=$as_save_IFS 6510 test -z "$as_dir" && as_dir=. 6511 for ac_exec_ext in '' $ac_executable_extensions; do 6512 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6513 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext" 6514 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6515 break 2 6516 fi 6517 done 6518 done 6519 IFS=$as_save_IFS 6520 6521 ;; 6522 esac 6523 fi 6524 DF=$ac_cv_path_DF 6525 if test -n "$DF"; then 6526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5 6527 $as_echo "$DF" >&6; } 6528 else 6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6530 $as_echo "no" >&6; } 6531 fi 6532 6533 6534 # Extract the first word of "SetFile", so it can be a program name with args. 6535 set dummy SetFile; ac_word=$2 6536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6537 $as_echo_n "checking for $ac_word... " >&6; } 6538 if test "${ac_cv_path_SETFILE+set}" = set; then : 6539 $as_echo_n "(cached) " >&6 6540 else 6541 case $SETFILE in 6542 [\\/]* | ?:[\\/]*) 6543 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path. 6544 ;; 6545 *) 6546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6547 for as_dir in $PATH 6548 do 6549 IFS=$as_save_IFS 6550 test -z "$as_dir" && as_dir=. 6551 for ac_exec_ext in '' $ac_executable_extensions; do 6552 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6553 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext" 6554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6555 break 2 6556 fi 6557 done 6558 done 6559 IFS=$as_save_IFS 6560 6561 ;; 6562 esac 6563 fi 6564 SETFILE=$ac_cv_path_SETFILE 6565 if test -n "$SETFILE"; then 6566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5 6567 $as_echo "$SETFILE" >&6; } 6568 else 6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6570 $as_echo "no" >&6; } 6571 fi 6572 6573 6574 6575 6576 # Now we can determine OpenJDK build and target platforms. This is required to 6577 # have early on. 6578 # Make sure we can run config.sub. 6579 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 6580 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 6581 6582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 6583 $as_echo_n "checking build system type... " >&6; } 6584 if test "${ac_cv_build+set}" = set; then : 6585 $as_echo_n "(cached) " >&6 6586 else 6587 ac_build_alias=$build_alias 6588 test "x$ac_build_alias" = x && 6589 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 6590 test "x$ac_build_alias" = x && 6591 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 6592 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 6593 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 6594 6595 fi 6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 6597 $as_echo "$ac_cv_build" >&6; } 6598 case $ac_cv_build in 6599 *-*-*) ;; 6600 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; 6601 esac 6602 build=$ac_cv_build 6603 ac_save_IFS=$IFS; IFS='-' 6604 set x $ac_cv_build 6605 shift 6606 build_cpu=$1 6607 build_vendor=$2 6608 shift; shift 6609 # Remember, the first character of IFS is used to create $*, 6610 # except with old shells: 6611 build_os=$* 6612 IFS=$ac_save_IFS 6613 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 6614 6615 6616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 6617 $as_echo_n "checking host system type... " >&6; } 6618 if test "${ac_cv_host+set}" = set; then : 6619 $as_echo_n "(cached) " >&6 6620 else 6621 if test "x$host_alias" = x; then 6622 ac_cv_host=$ac_cv_build 6623 else 6624 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 6625 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 6626 fi 6627 6628 fi 6629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 6630 $as_echo "$ac_cv_host" >&6; } 6631 case $ac_cv_host in 6632 *-*-*) ;; 6633 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; 6634 esac 6635 host=$ac_cv_host 6636 ac_save_IFS=$IFS; IFS='-' 6637 set x $ac_cv_host 6638 shift 6639 host_cpu=$1 6640 host_vendor=$2 6641 shift; shift 6642 # Remember, the first character of IFS is used to create $*, 6643 # except with old shells: 6644 host_os=$* 6645 IFS=$ac_save_IFS 6646 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 6647 6648 6649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 6650 $as_echo_n "checking target system type... " >&6; } 6651 if test "${ac_cv_target+set}" = set; then : 6652 $as_echo_n "(cached) " >&6 6653 else 6654 if test "x$target_alias" = x; then 6655 ac_cv_target=$ac_cv_host 6656 else 6657 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || 6658 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 6659 fi 6660 6661 fi 6662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 6663 $as_echo "$ac_cv_target" >&6; } 6664 case $ac_cv_target in 6665 *-*-*) ;; 6666 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;; 6667 esac 6668 target=$ac_cv_target 6669 ac_save_IFS=$IFS; IFS='-' 6670 set x $ac_cv_target 6671 shift 6672 target_cpu=$1 6673 target_vendor=$2 6674 shift; shift 6675 # Remember, the first character of IFS is used to create $*, 6676 # except with old shells: 6677 target_os=$* 6678 IFS=$ac_save_IFS 6679 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac 6680 6681 6682 # The aliases save the names the user supplied, while $host etc. 6683 # will get canonicalized. 6684 test -n "$target_alias" && 6685 test "$program_prefix$program_suffix$program_transform_name" = \ 6686 NONENONEs,x,x, && 6687 program_prefix=${target_alias}- 6688 6689 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" 6690 # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the 6691 # product you're building. The target of this build is called "host". Since this is confusing to most people, we 6692 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need 6693 # to use the configure naming style. 6694 6695 6696 6697 6698 6699 # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME 6700 # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME 6701 # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build, 6702 # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME. 6703 OPENJDK_TARGET_AUTOCONF_NAME="$host" 6704 OPENJDK_BUILD_AUTOCONF_NAME="$build" 6705 6706 6707 6708 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. 6709 6710 case "$build_os" in 6711 *linux*) 6712 VAR_OS=linux 6713 VAR_OS_API=posix 6714 VAR_OS_ENV=linux 6715 ;; 6716 *solaris*) 6717 VAR_OS=solaris 6718 VAR_OS_API=posix 6719 VAR_OS_ENV=solaris 6720 ;; 6721 *darwin*) 6722 VAR_OS=macosx 6723 VAR_OS_API=posix 6724 VAR_OS_ENV=macosx 6725 ;; 6726 *bsd*) 6727 VAR_OS=bsd 6728 VAR_OS_API=posix 6729 VAR_OS_ENV=bsd 6730 ;; 6731 *cygwin*) 6732 VAR_OS=windows 6733 VAR_OS_API=winapi 6734 VAR_OS_ENV=windows.cygwin 6735 ;; 6736 *mingw*) 6737 VAR_OS=windows 6738 VAR_OS_API=winapi 6739 VAR_OS_ENV=windows.msys 6740 ;; 6741 *) 6742 as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5 6743 ;; 6744 esac 6745 6746 6747 # First argument is the cpu name from the trip/quad 6748 case "$build_cpu" in 6749 x86_64) 6750 VAR_CPU=x86_64 6751 VAR_CPU_ARCH=x86 6752 VAR_CPU_BITS=64 6753 VAR_CPU_ENDIAN=little 6754 ;; 6755 i?86) 6756 VAR_CPU=x86 6757 VAR_CPU_ARCH=x86 6758 VAR_CPU_BITS=32 6759 VAR_CPU_ENDIAN=little 6760 ;; 6761 arm*) 6762 VAR_CPU=arm 6763 VAR_CPU_ARCH=arm 6764 VAR_CPU_BITS=32 6765 VAR_CPU_ENDIAN=little 6766 ;; 6767 powerpc) 6768 VAR_CPU=ppc 6769 VAR_CPU_ARCH=ppc 6770 VAR_CPU_BITS=32 6771 VAR_CPU_ENDIAN=big 6772 ;; 6773 powerpc64) 6774 VAR_CPU=ppc64 6775 VAR_CPU_ARCH=ppc 6776 VAR_CPU_BITS=64 6777 VAR_CPU_ENDIAN=big 6778 ;; 6779 sparc) 6780 VAR_CPU=sparc 6781 VAR_CPU_ARCH=sparc 6782 VAR_CPU_BITS=32 6783 VAR_CPU_ENDIAN=big 6784 ;; 6785 sparcv9) 6786 VAR_CPU=sparcv9 6787 VAR_CPU_ARCH=sparc 6788 VAR_CPU_BITS=64 6789 VAR_CPU_ENDIAN=big 6790 ;; 6791 *) 6792 as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5 6793 ;; 6794 esac 6795 6796 # ..and setup our own variables. (Do this explicitely to facilitate searching) 6797 OPENJDK_BUILD_OS="$VAR_OS" 6798 OPENJDK_BUILD_OS_API="$VAR_OS_API" 6799 OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV" 6800 OPENJDK_BUILD_CPU="$VAR_CPU" 6801 OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH" 6802 OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS" 6803 OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN" 6804 6805 6806 6807 6808 6809 6810 6811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5 6812 $as_echo_n "checking openjdk-build os-cpu... " >&6; } 6813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5 6814 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; } 6815 6816 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. 6817 6818 case "$host_os" in 6819 *linux*) 6820 VAR_OS=linux 6821 VAR_OS_API=posix 6822 VAR_OS_ENV=linux 6823 ;; 6824 *solaris*) 6825 VAR_OS=solaris 6826 VAR_OS_API=posix 6827 VAR_OS_ENV=solaris 6828 ;; 6829 *darwin*) 6830 VAR_OS=macosx 6831 VAR_OS_API=posix 6832 VAR_OS_ENV=macosx 6833 ;; 6834 *bsd*) 6835 VAR_OS=bsd 6836 VAR_OS_API=posix 6837 VAR_OS_ENV=bsd 6838 ;; 6839 *cygwin*) 6840 VAR_OS=windows 6841 VAR_OS_API=winapi 6842 VAR_OS_ENV=windows.cygwin 6843 ;; 6844 *mingw*) 6845 VAR_OS=windows 6846 VAR_OS_API=winapi 6847 VAR_OS_ENV=windows.msys 6848 ;; 6849 *) 6850 as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5 6851 ;; 6852 esac 6853 6854 6855 # First argument is the cpu name from the trip/quad 6856 case "$host_cpu" in 6857 x86_64) 6858 VAR_CPU=x86_64 6859 VAR_CPU_ARCH=x86 6860 VAR_CPU_BITS=64 6861 VAR_CPU_ENDIAN=little 6862 ;; 6863 i?86) 6864 VAR_CPU=x86 6865 VAR_CPU_ARCH=x86 6866 VAR_CPU_BITS=32 6867 VAR_CPU_ENDIAN=little 6868 ;; 6869 arm*) 6870 VAR_CPU=arm 6871 VAR_CPU_ARCH=arm 6872 VAR_CPU_BITS=32 6873 VAR_CPU_ENDIAN=little 6874 ;; 6875 powerpc) 6876 VAR_CPU=ppc 6877 VAR_CPU_ARCH=ppc 6878 VAR_CPU_BITS=32 6879 VAR_CPU_ENDIAN=big 6880 ;; 6881 powerpc64) 6882 VAR_CPU=ppc64 6883 VAR_CPU_ARCH=ppc 6884 VAR_CPU_BITS=64 6885 VAR_CPU_ENDIAN=big 6886 ;; 6887 sparc) 6888 VAR_CPU=sparc 6889 VAR_CPU_ARCH=sparc 6890 VAR_CPU_BITS=32 6891 VAR_CPU_ENDIAN=big 6892 ;; 6893 sparcv9) 6894 VAR_CPU=sparcv9 6895 VAR_CPU_ARCH=sparc 6896 VAR_CPU_BITS=64 6897 VAR_CPU_ENDIAN=big 6898 ;; 6899 *) 6900 as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5 6901 ;; 6902 esac 6903 6904 # ... and setup our own variables. (Do this explicitely to facilitate searching) 6905 OPENJDK_TARGET_OS="$VAR_OS" 6906 OPENJDK_TARGET_OS_API="$VAR_OS_API" 6907 OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV" 6908 OPENJDK_TARGET_CPU="$VAR_CPU" 6909 OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH" 6910 OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS" 6911 OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN" 6912 6913 6914 6915 6916 6917 6918 6919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5 6920 $as_echo_n "checking openjdk-target os-cpu... " >&6; } 6921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5 6922 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; } 6923 6924 6925 6926 # Check whether --with-target-bits was given. 6927 if test "${with_target_bits+set}" = set; then : 6928 withval=$with_target_bits; 6929 fi 6930 6931 6932 # We have three types of compiles: 6933 # native == normal compilation, target system == build system 6934 # cross == traditional cross compilation, target system != build system; special toolchain needed 6935 # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines 6936 # 6937 if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then 6938 # We're doing a proper cross-compilation 6939 COMPILE_TYPE="cross" 6940 else 6941 COMPILE_TYPE="native" 6942 fi 6943 6944 if test "x$with_target_bits" != x; then 6945 if test "x$COMPILE_TYPE" = "xcross"; then 6946 as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5 6947 fi 6948 6949 if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 6950 # A reduced build is requested 6951 COMPILE_TYPE="reduced" 6952 OPENJDK_TARGET_CPU_BITS=32 6953 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then 6954 OPENJDK_TARGET_CPU=x86 6955 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then 6956 OPENJDK_TARGET_CPU=sparc 6957 else 6958 as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5 6959 fi 6960 elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 6961 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 6962 elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then 6963 { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5 6964 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;} 6965 else 6966 as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5 6967 fi 6968 fi 6969 6970 6971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5 6972 $as_echo_n "checking compilation type... " >&6; } 6973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5 6974 $as_echo "$COMPILE_TYPE" >&6; } 6975 6976 6977 if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 6978 REQUIRED_OS_NAME=SunOS 6979 REQUIRED_OS_VERSION=5.10 6980 fi 6981 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then 6982 REQUIRED_OS_NAME=Linux 6983 REQUIRED_OS_VERSION=2.6 6984 fi 6985 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 6986 REQUIRED_OS_NAME=Windows 6987 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 6988 REQUIRED_OS_VERSION=5.2 6989 else 6990 REQUIRED_OS_VERSION=5.1 6991 fi 6992 fi 6993 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 6994 REQUIRED_OS_NAME=Darwin 6995 REQUIRED_OS_VERSION=11.2 6996 fi 6997 6998 6999 7000 7001 7002 # Also store the legacy naming of the cpu. 7003 # Ie i586 and amd64 instead of x86 and x86_64 7004 OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU" 7005 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7006 OPENJDK_TARGET_CPU_LEGACY="i586" 7007 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7008 # On all platforms except MacOSX replace x86_64 with amd64. 7009 OPENJDK_TARGET_CPU_LEGACY="amd64" 7010 fi 7011 7012 7013 # And the second legacy naming of the cpu. 7014 # Ie i386 and amd64 instead of x86 and x86_64. 7015 OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU" 7016 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7017 OPENJDK_TARGET_CPU_LEGACY_LIB="i386" 7018 elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7019 OPENJDK_TARGET_CPU_LEGACY_LIB="amd64" 7020 fi 7021 7022 7023 # This is the name of the cpu (but using i386 and amd64 instead of 7024 # x86 and x86_64, respectively), preceeded by a /, to be used when 7025 # locating libraries. On macosx, it's empty, though. 7026 OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB" 7027 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 7028 OPENJDK_TARGET_CPU_LIBDIR="" 7029 fi 7030 7031 7032 # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to 7033 # /amd64 or /sparcv9. This string is appended to some library paths, like this: 7034 # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so 7035 OPENJDK_TARGET_CPU_ISADIR="" 7036 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 7037 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7038 OPENJDK_TARGET_CPU_ISADIR="/amd64" 7039 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then 7040 OPENJDK_TARGET_CPU_ISADIR="/sparcv9" 7041 fi 7042 fi 7043 7044 7045 # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property 7046 OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU" 7047 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then 7048 # On linux only, we replace x86 with i386. 7049 OPENJDK_TARGET_CPU_OSARCH="i386" 7050 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7051 # On all platforms except macosx, we replace x86_64 with amd64. 7052 OPENJDK_TARGET_CPU_OSARCH="amd64" 7053 fi 7054 7055 7056 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU" 7057 if test "x$OPENJDK_TARGET_CPU" = xx86; then 7058 OPENJDK_TARGET_CPU_JLI="i386" 7059 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 7060 # On all platforms except macosx, we replace x86_64 with amd64. 7061 OPENJDK_TARGET_CPU_JLI="amd64" 7062 fi 7063 # Now setup the -D flags for building libjli. 7064 OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'" 7065 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 7066 if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then 7067 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'" 7068 elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then 7069 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'" 7070 fi 7071 fi 7072 7073 7074 # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths. 7075 if test "x$OPENJDK_TARGET_OS_API" = xposix; then 7076 OPENJDK_TARGET_OS_API_DIR="solaris" 7077 fi 7078 if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then 7079 OPENJDK_TARGET_OS_API_DIR="windows" 7080 fi 7081 7082 7083 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7084 A_LP64="LP64:=" 7085 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in 7086 # unpack200.exe 7087 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then 7088 ADD_LP64="-D_LP64=1" 7089 fi 7090 fi 7091 LP64=$A_LP64 7092 7093 7094 if test "x$COMPILE_TYPE" = "xcross"; then 7095 # FIXME: ... or should this include reduced builds..? 7096 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY" 7097 else 7098 DEFINE_CROSS_COMPILE_ARCH="" 7099 fi 7100 7101 7102 # Some Zero and Shark settings. 7103 # ZERO_ARCHFLAG tells the compiler which mode to build for 7104 case "${OPENJDK_TARGET_CPU}" in 7105 s390) 7106 ZERO_ARCHFLAG="-m31" 7107 ;; 7108 *) 7109 ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}" 7110 esac 7111 7112 7113 # ZERO_ARCHDEF is used to enable architecture-specific code 7114 case "${OPENJDK_TARGET_CPU}" in 7115 ppc*) ZERO_ARCHDEF=PPC ;; 7116 s390*) ZERO_ARCHDEF=S390 ;; 7117 sparc*) ZERO_ARCHDEF=SPARC ;; 7118 x86_64*) ZERO_ARCHDEF=AMD64 ;; 7119 x86) ZERO_ARCHDEF=IA32 ;; 7120 *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z) 7121 esac 7122 7123 7124 7125 7126 7127 # Continue setting up basic stuff. Most remaining code require fundamental tools. 7128 7129 # Locate the directory of this script. 7130 SCRIPT="$0" 7131 7132 if test "x$OPENJDK_BUILD_OS" != xwindows; then 7133 # Follow a chain of symbolic links. Use readlink 7134 # where it exists, else fall back to horribly 7135 # complicated shell code. 7136 if test "x$READLINK_TESTED" != yes; then 7137 # On MacOSX there is a readlink tool with a different 7138 # purpose than the GNU readlink tool. Check the found readlink. 7139 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 7140 if test "x$ISGNU" = x; then 7141 # A readlink that we do not know how to use. 7142 # Are there other non-GNU readlinks out there? 7143 READLINK_TESTED=yes 7144 READLINK= 7145 fi 7146 fi 7147 7148 if test "x$READLINK" != x; then 7149 SCRIPT=`$READLINK -f $SCRIPT` 7150 else 7151 # Save the current directory for restoring afterwards 7152 STARTDIR=$PWD 7153 COUNTER=0 7154 sym_link_dir=`$DIRNAME $SCRIPT` 7155 sym_link_file=`$BASENAME $SCRIPT` 7156 # Use the system pwd and not the shell builtin to resolve directory symlinks 7157 cd $sym_link_dir 7158 cd `$THEPWDCMD` 7159 sym_link_dir=`$THEPWDCMD` 7160 # Resolve file symlinks 7161 while test $COUNTER -lt 20; do 7162 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 7163 if test "x$ISLINK" == x; then 7164 # This is not a symbolic link! We are done! 7165 break 7166 fi 7167 # Again resolve directory symlinks since the target of the just found 7168 # link could be in a different directory 7169 cd `$DIRNAME $ISLINK` 7170 sym_link_dir=`$THEPWDCMD` 7171 sym_link_file=`$BASENAME $ISLINK` 7172 let COUNTER=COUNTER+1 7173 done 7174 cd $STARTDIR 7175 SCRIPT=$sym_link_dir/$sym_link_file 7176 fi 7177 fi 7178 7179 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD` 7180 7181 # Where is the source? It is located two levels above the configure script. 7182 CURDIR="$PWD" 7183 cd "$AUTOCONF_DIR/../.." 7184 SRC_ROOT="`$THEPWDCMD`" 7185 7186 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 7187 PATH_SEP=";" 7188 7189 SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m` 7190 if test $SRC_ROOT_LENGTH -gt 100; then 7191 as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5 7192 fi 7193 7194 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5 7196 $as_echo_n "checking cygwin release... " >&6; } 7197 CYGWIN_VERSION=`$UNAME -r` 7198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5 7199 $as_echo "$CYGWIN_VERSION" >&6; } 7200 WINDOWS_ENV_VENDOR='cygwin' 7201 WINDOWS_ENV_VERSION="$CYGWIN_VERSION" 7202 7203 CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.` 7204 if test "x$CYGWIN_VERSION_OK" = x; then 7205 { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5 7206 $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;} 7207 as_fn_error $? "Cannot continue" "$LINENO" 5 7208 fi 7209 if test "x$CYGPATH" = x; then 7210 as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5 7211 fi 7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5 7213 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; } 7214 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away 7215 cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"` 7216 # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. 7217 CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` 7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5 7219 $as_echo "$CYGWIN_ROOT_PATH" >&6; } 7220 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" 7221 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` 7222 if test "x$test_cygdrive_prefix" = x; then 7223 as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5 7224 fi 7225 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5 7227 $as_echo_n "checking msys release... " >&6; } 7228 MSYS_VERSION=`$UNAME -r` 7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5 7230 $as_echo "$MSYS_VERSION" >&6; } 7231 7232 WINDOWS_ENV_VENDOR='msys' 7233 WINDOWS_ENV_VERSION="$MSYS_VERSION" 7234 7235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5 7236 $as_echo_n "checking msys root directory as unix-style path... " >&6; } 7237 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away 7238 MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"` 7239 7240 windows_path="$MSYS_ROOT_PATH" 7241 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7242 unix_path=`$CYGPATH -u "$windows_path"` 7243 MSYS_ROOT_PATH="$unix_path" 7244 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7245 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7246 MSYS_ROOT_PATH="$unix_path" 7247 fi 7248 7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5 7250 $as_echo "$MSYS_ROOT_PATH" >&6; } 7251 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH" 7252 else 7253 as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5 7254 fi 7255 7256 # Test if windows or unix (cygwin/msys) find is first in path. 7257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5 7258 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; } 7259 FIND_BINARY_OUTPUT=`find --version 2>&1` 7260 if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then 7261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5 7262 $as_echo "unix style" >&6; } 7263 elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then 7264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5 7265 $as_echo "Windows" >&6; } 7266 { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5 7267 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;} 7268 { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5 7269 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;} 7270 as_fn_error $? "Cannot continue" "$LINENO" 5 7271 else 7272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 7273 $as_echo "unknown" >&6; } 7274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5 7275 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;} 7276 fi 7277 7278 else 7279 PATH_SEP=":" 7280 fi 7281 7282 7283 7284 cd "$CURDIR" 7285 7286 7287 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7288 7289 # Input might be given as Windows format, start by converting to 7290 # unix format. 7291 path="$SRC_ROOT" 7292 new_path=`$CYGPATH -u "$path"` 7293 7294 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7295 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7296 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7297 # "foo.exe" is OK but "foo" is an error. 7298 # 7299 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7300 # It is also a way to make sure we got the proper file name for the real test later on. 7301 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7302 if test "x$test_shortpath" = x; then 7303 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7304 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7305 as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5 7306 fi 7307 7308 # Call helper function which possibly converts this using DOS-style short mode. 7309 # If so, the updated path is stored in $new_path. 7310 7311 input_path="$new_path" 7312 # Check if we need to convert this using DOS-style short mode. If the path 7313 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7314 # take no chances and rewrite it. 7315 # Note: m4 eats our [], so we need to use [ and ] instead. 7316 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7317 if test "x$has_forbidden_chars" != x; then 7318 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7319 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7320 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7321 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7322 # Going to short mode and back again did indeed matter. Since short mode is 7323 # case insensitive, let's make it lowercase to improve readability. 7324 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7325 # Now convert it back to Unix-stile (cygpath) 7326 input_path=`$CYGPATH -u "$shortmode_path"` 7327 new_path="$input_path" 7328 fi 7329 fi 7330 7331 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7332 if test "x$test_cygdrive_prefix" = x; then 7333 # As a simple fix, exclude /usr/bin since it's not a real path. 7334 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7335 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7336 # a path prefixed by /cygdrive for fixpath to work. 7337 new_path="$CYGWIN_ROOT_PATH$input_path" 7338 fi 7339 fi 7340 7341 7342 if test "x$path" != "x$new_path"; then 7343 SRC_ROOT="$new_path" 7344 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7345 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7346 fi 7347 7348 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7349 7350 path="$SRC_ROOT" 7351 has_colon=`$ECHO $path | $GREP ^.:` 7352 new_path="$path" 7353 if test "x$has_colon" = x; then 7354 # Not in mixed or Windows style, start by that. 7355 new_path=`cmd //c echo $path` 7356 fi 7357 7358 7359 input_path="$new_path" 7360 # Check if we need to convert this using DOS-style short mode. If the path 7361 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7362 # take no chances and rewrite it. 7363 # Note: m4 eats our [], so we need to use [ and ] instead. 7364 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7365 if test "x$has_forbidden_chars" != x; then 7366 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7367 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7368 fi 7369 7370 7371 windows_path="$new_path" 7372 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7373 unix_path=`$CYGPATH -u "$windows_path"` 7374 new_path="$unix_path" 7375 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7376 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7377 new_path="$unix_path" 7378 fi 7379 7380 if test "x$path" != "x$new_path"; then 7381 SRC_ROOT="$new_path" 7382 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5 7383 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;} 7384 fi 7385 7386 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7387 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7388 7389 else 7390 # We're on a posix platform. Hooray! :) 7391 path="$SRC_ROOT" 7392 7393 if test ! -f "$path" && test ! -d "$path"; then 7394 as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 7395 fi 7396 7397 has_space=`$ECHO "$path" | $GREP " "` 7398 if test "x$has_space" != x; then 7399 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5 7400 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;} 7401 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7402 fi 7403 fi 7404 7405 7406 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7407 7408 # Input might be given as Windows format, start by converting to 7409 # unix format. 7410 path="$CURDIR" 7411 new_path=`$CYGPATH -u "$path"` 7412 7413 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 7414 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 7415 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 7416 # "foo.exe" is OK but "foo" is an error. 7417 # 7418 # This test is therefore slightly more accurate than "test -f" to check for file precense. 7419 # It is also a way to make sure we got the proper file name for the real test later on. 7420 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 7421 if test "x$test_shortpath" = x; then 7422 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7423 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7424 as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5 7425 fi 7426 7427 # Call helper function which possibly converts this using DOS-style short mode. 7428 # If so, the updated path is stored in $new_path. 7429 7430 input_path="$new_path" 7431 # Check if we need to convert this using DOS-style short mode. If the path 7432 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7433 # take no chances and rewrite it. 7434 # Note: m4 eats our [], so we need to use [ and ] instead. 7435 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 7436 if test "x$has_forbidden_chars" != x; then 7437 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7438 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 7439 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 7440 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 7441 # Going to short mode and back again did indeed matter. Since short mode is 7442 # case insensitive, let's make it lowercase to improve readability. 7443 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7444 # Now convert it back to Unix-stile (cygpath) 7445 input_path=`$CYGPATH -u "$shortmode_path"` 7446 new_path="$input_path" 7447 fi 7448 fi 7449 7450 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 7451 if test "x$test_cygdrive_prefix" = x; then 7452 # As a simple fix, exclude /usr/bin since it's not a real path. 7453 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 7454 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 7455 # a path prefixed by /cygdrive for fixpath to work. 7456 new_path="$CYGWIN_ROOT_PATH$input_path" 7457 fi 7458 fi 7459 7460 7461 if test "x$path" != "x$new_path"; then 7462 CURDIR="$new_path" 7463 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7464 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7465 fi 7466 7467 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7468 7469 path="$CURDIR" 7470 has_colon=`$ECHO $path | $GREP ^.:` 7471 new_path="$path" 7472 if test "x$has_colon" = x; then 7473 # Not in mixed or Windows style, start by that. 7474 new_path=`cmd //c echo $path` 7475 fi 7476 7477 7478 input_path="$new_path" 7479 # Check if we need to convert this using DOS-style short mode. If the path 7480 # contains just simple characters, use it. Otherwise (spaces, weird characters), 7481 # take no chances and rewrite it. 7482 # Note: m4 eats our [], so we need to use [ and ] instead. 7483 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 7484 if test "x$has_forbidden_chars" != x; then 7485 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 7486 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7487 fi 7488 7489 7490 windows_path="$new_path" 7491 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 7492 unix_path=`$CYGPATH -u "$windows_path"` 7493 new_path="$unix_path" 7494 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 7495 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 7496 new_path="$unix_path" 7497 fi 7498 7499 if test "x$path" != "x$new_path"; then 7500 CURDIR="$new_path" 7501 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5 7502 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;} 7503 fi 7504 7505 # Save the first 10 bytes of this path to the storage, so fixpath can work. 7506 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 7507 7508 else 7509 # We're on a posix platform. Hooray! :) 7510 path="$CURDIR" 7511 7512 if test ! -f "$path" && test ! -d "$path"; then 7513 as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5 7514 fi 7515 7516 has_space=`$ECHO "$path" | $GREP " "` 7517 if test "x$has_space" != x; then 7518 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5 7519 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;} 7520 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 7521 fi 7522 fi 7523 7524 7525 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then 7526 # Add extra search paths on solaris for utilities like ar and as etc... 7527 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" 7528 fi 7529 7530 # You can force the sys-root if the sys-root encoded into the cross compiler tools 7531 # is not correct. 7532 7533 # Check whether --with-sys-root was given. 7534 if test "${with_sys_root+set}" = set; then : 7535 withval=$with_sys_root; 7536 fi 7537 7538 7539 if test "x$with_sys_root" != x; then 7540 SYS_ROOT=$with_sys_root 7541 else 7542 SYS_ROOT=/ 7543 fi 7544 7545 7546 7547 # Check whether --with-tools-dir was given. 7548 if test "${with_tools_dir+set}" = set; then : 7549 withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir 7550 fi 7551 7552 7553 7554 # Check whether --with-devkit was given. 7555 if test "${with_devkit+set}" = set; then : 7556 withval=$with_devkit; 7557 if test "x$with_sys_root" != x; then 7558 as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5 7559 fi 7560 if test "x$with_tools_dir" != x; then 7561 as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5 7562 fi 7563 TOOLS_DIR=$with_devkit/bin 7564 SYS_ROOT=$with_devkit/$host_alias/libc 7565 7566 fi 7567 7568 7569 7570 7571 # Setup default logging of stdout and stderr to build.log in the output root. 7572 BUILD_LOG='$(OUTPUT_ROOT)/build.log' 7573 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old' 7574 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)' 7575 7576 7577 7578 7579 7580 # Check if it's a pure open build or if custom sources are to be used. 7581 7582 # Check whether --enable-openjdk-only was given. 7583 if test "${enable_openjdk_only+set}" = set; then : 7584 enableval=$enable_openjdk_only; 7585 else 7586 enable_openjdk_only="no" 7587 fi 7588 7589 7590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5 7591 $as_echo_n "checking for presence of closed sources... " >&6; } 7592 if test -d "$SRC_ROOT/jdk/src/closed"; then 7593 CLOSED_SOURCE_PRESENT=yes 7594 else 7595 CLOSED_SOURCE_PRESENT=no 7596 fi 7597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5 7598 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; } 7599 7600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5 7601 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; } 7602 SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only" 7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5 7604 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; } 7605 7606 if test "x$CLOSED_SOURCE_PRESENT" = xno; then 7607 OPENJDK=true 7608 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 7609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5 7610 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;} 7611 fi 7612 else 7613 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 7614 OPENJDK=true 7615 else 7616 OPENJDK=false 7617 fi 7618 fi 7619 7620 if test "x$OPENJDK" = "xtrue"; then 7621 SET_OPENJDK="OPENJDK=true" 7622 fi 7623 7624 7625 7626 7627 # These are needed to be able to create a configuration name (and thus the output directory) 7628 7629 ############################################################################### 7630 # 7631 # Check which variant of the JDK that we want to build. 7632 # Currently we have: 7633 # normal: standard edition 7634 # but the custom make system may add other variants 7635 # 7636 # Effectively the JDK variant gives a name to a specific set of 7637 # modules to compile into the JDK. In the future, these modules 7638 # might even be Jigsaw modules. 7639 # 7640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5 7641 $as_echo_n "checking which variant of the JDK to build... " >&6; } 7642 7643 # Check whether --with-jdk-variant was given. 7644 if test "${with_jdk_variant+set}" = set; then : 7645 withval=$with_jdk_variant; 7646 fi 7647 7648 7649 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then 7650 JDK_VARIANT="normal" 7651 else 7652 as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5 7653 fi 7654 7655 7656 7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5 7658 $as_echo "$JDK_VARIANT" >&6; } 7659 7660 7661 7662 ############################################################################### 7663 # 7664 # Check which variants of the JVM that we want to build. 7665 # Currently we have: 7666 # server: normal interpreter and a tiered C1/C2 compiler 7667 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) 7668 # minimal1: reduced form of client with optional VM services and features stripped out 7669 # kernel: kernel footprint JVM that passes the TCK without major performance problems, 7670 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc 7671 # zero: no machine code interpreter, no compiler 7672 # zeroshark: zero interpreter and shark/llvm compiler backend 7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5 7674 $as_echo_n "checking which variants of the JVM to build... " >&6; } 7675 7676 # Check whether --with-jvm-variants was given. 7677 if test "${with_jvm_variants+set}" = set; then : 7678 withval=$with_jvm_variants; 7679 fi 7680 7681 7682 if test "x$with_jvm_variants" = x; then 7683 with_jvm_variants="server" 7684 fi 7685 7686 JVM_VARIANTS=",$with_jvm_variants," 7687 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` 7688 7689 if test "x$TEST_VARIANTS" != "x,"; then 7690 as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5 7691 fi 7692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5 7693 $as_echo "$with_jvm_variants" >&6; } 7694 7695 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` 7696 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 7697 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'` 7698 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` 7699 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` 7700 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` 7701 7702 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 7703 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7704 as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5 7705 fi 7706 fi 7707 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 7708 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7709 as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5 7710 fi 7711 fi 7712 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 7713 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 7714 as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5 7715 fi 7716 fi 7717 7718 # Replace the commas with AND for use in the build directory name. 7719 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` 7720 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` 7721 if test "x$COUNT_VARIANTS" != "x,1"; then 7722 BUILDING_MULTIPLE_JVM_VARIANTS=yes 7723 else 7724 BUILDING_MULTIPLE_JVM_VARIANTS=no 7725 fi 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 INCLUDE_SA=true 7736 if test "x$JVM_VARIANT_ZERO" = xtrue ; then 7737 INCLUDE_SA=false 7738 fi 7739 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then 7740 INCLUDE_SA=false 7741 fi 7742 7743 7744 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 7745 MACOSX_UNIVERSAL="true" 7746 fi 7747 7748 7749 7750 7751 7752 ############################################################################### 7753 # 7754 # Set the debug level 7755 # release: no debug information, all optimizations, no asserts. 7756 # fastdebug: debug information (-g), all optimizations, all asserts 7757 # slowdebug: debug information (-g), no optimizations, all asserts 7758 # 7759 DEBUG_LEVEL="release" 7760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5 7761 $as_echo_n "checking which debug level to use... " >&6; } 7762 # Check whether --enable-debug was given. 7763 if test "${enable_debug+set}" = set; then : 7764 enableval=$enable_debug; 7765 ENABLE_DEBUG="${enableval}" 7766 DEBUG_LEVEL="fastdebug" 7767 7768 else 7769 ENABLE_DEBUG="no" 7770 fi 7771 7772 7773 7774 # Check whether --with-debug-level was given. 7775 if test "${with_debug_level+set}" = set; then : 7776 withval=$with_debug_level; 7777 DEBUG_LEVEL="${withval}" 7778 if test "x$ENABLE_DEBUG" = xyes; then 7779 as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5 7780 fi 7781 7782 fi 7783 7784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5 7785 $as_echo "$DEBUG_LEVEL" >&6; } 7786 7787 if test "x$DEBUG_LEVEL" != xrelease && \ 7788 test "x$DEBUG_LEVEL" != xfastdebug && \ 7789 test "x$DEBUG_LEVEL" != xslowdebug; then 7790 as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5 7791 fi 7792 7793 7794 ############################################################################### 7795 # 7796 # Setup legacy vars/targets and new vars to deal with different debug levels. 7797 # 7798 7799 case $DEBUG_LEVEL in 7800 release ) 7801 VARIANT="OPT" 7802 FASTDEBUG="false" 7803 DEBUG_CLASSFILES="false" 7804 BUILD_VARIANT_RELEASE="" 7805 HOTSPOT_DEBUG_LEVEL="product" 7806 HOTSPOT_EXPORT="product" 7807 ;; 7808 fastdebug ) 7809 VARIANT="DBG" 7810 FASTDEBUG="true" 7811 DEBUG_CLASSFILES="true" 7812 BUILD_VARIANT_RELEASE="-fastdebug" 7813 HOTSPOT_DEBUG_LEVEL="fastdebug" 7814 HOTSPOT_EXPORT="fastdebug" 7815 ;; 7816 slowdebug ) 7817 VARIANT="DBG" 7818 FASTDEBUG="false" 7819 DEBUG_CLASSFILES="true" 7820 BUILD_VARIANT_RELEASE="-debug" 7821 HOTSPOT_DEBUG_LEVEL="jvmg" 7822 HOTSPOT_EXPORT="debug" 7823 ;; 7824 esac 7825 7826 ##### 7827 # Generate the legacy makefile targets for hotspot. 7828 # The hotspot api for selecting the build artifacts, really, needs to be improved. 7829 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to 7830 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc 7831 # But until then ... 7832 HOTSPOT_TARGET="" 7833 7834 if test "x$JVM_VARIANT_SERVER" = xtrue; then 7835 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " 7836 fi 7837 7838 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 7839 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " 7840 fi 7841 7842 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 7843 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " 7844 fi 7845 7846 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 7847 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " 7848 fi 7849 7850 if test "x$JVM_VARIANT_ZERO" = xtrue; then 7851 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " 7852 fi 7853 7854 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 7855 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " 7856 fi 7857 7858 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" 7859 7860 # On Macosx universal binaries are produced, but they only contain 7861 # 64 bit intel. This invalidates control of which jvms are built 7862 # from configure, but only server is valid anyway. Fix this 7863 # when hotspot makefiles are rewritten. 7864 if test "x$MACOSX_UNIVERSAL" = xtrue; then 7865 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} 7866 fi 7867 7868 ##### 7869 7870 7871 7872 7873 7874 7875 7876 7877 # With basic setup done, call the custom early hook. 7878 7879 7880 # To properly create a configuration name, we need to have the OpenJDK target 7881 # and options (variants and debug level) parsed. 7882 7883 7884 7885 # Check whether --with-conf-name was given. 7886 if test "${with_conf_name+set}" = set; then : 7887 withval=$with_conf_name; CONF_NAME=${with_conf_name} 7888 fi 7889 7890 7891 # Test from where we are running configure, in or outside of src root. 7892 # To enable comparison of directories, CURDIR needs to be symlink free 7893 # just like SRC_ROOT already is 7894 NOSYM_CURDIR="$CURDIR" 7895 7896 if test "x$OPENJDK_BUILD_OS" != xwindows; then 7897 # Follow a chain of symbolic links. Use readlink 7898 # where it exists, else fall back to horribly 7899 # complicated shell code. 7900 if test "x$READLINK_TESTED" != yes; then 7901 # On MacOSX there is a readlink tool with a different 7902 # purpose than the GNU readlink tool. Check the found readlink. 7903 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 7904 if test "x$ISGNU" = x; then 7905 # A readlink that we do not know how to use. 7906 # Are there other non-GNU readlinks out there? 7907 READLINK_TESTED=yes 7908 READLINK= 7909 fi 7910 fi 7911 7912 if test "x$READLINK" != x; then 7913 NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR` 7914 else 7915 # Save the current directory for restoring afterwards 7916 STARTDIR=$PWD 7917 COUNTER=0 7918 sym_link_dir=`$DIRNAME $NOSYM_CURDIR` 7919 sym_link_file=`$BASENAME $NOSYM_CURDIR` 7920 # Use the system pwd and not the shell builtin to resolve directory symlinks 7921 cd $sym_link_dir 7922 cd `$THEPWDCMD` 7923 sym_link_dir=`$THEPWDCMD` 7924 # Resolve file symlinks 7925 while test $COUNTER -lt 20; do 7926 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 7927 if test "x$ISLINK" == x; then 7928 # This is not a symbolic link! We are done! 7929 break 7930 fi 7931 # Again resolve directory symlinks since the target of the just found 7932 # link could be in a different directory 7933 cd `$DIRNAME $ISLINK` 7934 sym_link_dir=`$THEPWDCMD` 7935 sym_link_file=`$BASENAME $ISLINK` 7936 let COUNTER=COUNTER+1 7937 done 7938 cd $STARTDIR 7939 NOSYM_CURDIR=$sym_link_dir/$sym_link_file 7940 fi 7941 fi 7942 7943 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \ 7944 || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \ 7945 || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then 7946 # We are running configure from the src root. 7947 # Create a default ./build/target-variant-debuglevel output root. 7948 if test "x${CONF_NAME}" = x; then 7949 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 7950 fi 7951 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 7952 $MKDIR -p "$OUTPUT_ROOT" 7953 if test ! -d "$OUTPUT_ROOT"; then 7954 as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5 7955 fi 7956 else 7957 # We are running configure from outside of the src dir. 7958 # Then use the current directory as output dir! 7959 # If configuration is situated in normal build directory, just use the build 7960 # directory name as configuration name, otherwise use the complete path. 7961 if test "x${CONF_NAME}" = x; then 7962 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 7963 fi 7964 OUTPUT_ROOT="$CURDIR" 7965 7966 # WARNING: This might be a bad thing to do. You need to be sure you want to 7967 # have a configuration in this directory. Do some sanity checks! 7968 7969 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then 7970 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for 7971 # other files 7972 files_present=`$LS $OUTPUT_ROOT` 7973 # Configure has already touched config.log and confdefs.h in the current dir when this check 7974 # is performed. 7975 filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \ 7976 | $TR -d '\n'` 7977 if test "x$filtered_files" != x; then 7978 { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5 7979 $as_echo "$as_me: Current directory is $CURDIR." >&6;} 7980 { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5 7981 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;} 7982 { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5 7983 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;} 7984 { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5 7985 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;} 7986 { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5 7987 $as_echo "$as_me: seriously mess up just about everything." >&6;} 7988 { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5 7989 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;} 7990 { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5 7991 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;} 7992 as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5 7993 fi 7994 fi 7995 fi 7996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5 7997 $as_echo_n "checking what configuration name to use... " >&6; } 7998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5 7999 $as_echo "$CONF_NAME" >&6; } 8000 8001 8002 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8003 8004 # Input might be given as Windows format, start by converting to 8005 # unix format. 8006 path="$OUTPUT_ROOT" 8007 new_path=`$CYGPATH -u "$path"` 8008 8009 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8010 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8011 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8012 # "foo.exe" is OK but "foo" is an error. 8013 # 8014 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8015 # It is also a way to make sure we got the proper file name for the real test later on. 8016 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8017 if test "x$test_shortpath" = x; then 8018 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5 8019 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;} 8020 as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5 8021 fi 8022 8023 # Call helper function which possibly converts this using DOS-style short mode. 8024 # If so, the updated path is stored in $new_path. 8025 8026 input_path="$new_path" 8027 # Check if we need to convert this using DOS-style short mode. If the path 8028 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8029 # take no chances and rewrite it. 8030 # Note: m4 eats our [], so we need to use [ and ] instead. 8031 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8032 if test "x$has_forbidden_chars" != x; then 8033 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8034 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8035 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8036 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8037 # Going to short mode and back again did indeed matter. Since short mode is 8038 # case insensitive, let's make it lowercase to improve readability. 8039 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8040 # Now convert it back to Unix-stile (cygpath) 8041 input_path=`$CYGPATH -u "$shortmode_path"` 8042 new_path="$input_path" 8043 fi 8044 fi 8045 8046 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8047 if test "x$test_cygdrive_prefix" = x; then 8048 # As a simple fix, exclude /usr/bin since it's not a real path. 8049 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 8050 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8051 # a path prefixed by /cygdrive for fixpath to work. 8052 new_path="$CYGWIN_ROOT_PATH$input_path" 8053 fi 8054 fi 8055 8056 8057 if test "x$path" != "x$new_path"; then 8058 OUTPUT_ROOT="$new_path" 8059 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5 8060 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;} 8061 fi 8062 8063 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8064 8065 path="$OUTPUT_ROOT" 8066 has_colon=`$ECHO $path | $GREP ^.:` 8067 new_path="$path" 8068 if test "x$has_colon" = x; then 8069 # Not in mixed or Windows style, start by that. 8070 new_path=`cmd //c echo $path` 8071 fi 8072 8073 8074 input_path="$new_path" 8075 # Check if we need to convert this using DOS-style short mode. If the path 8076 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8077 # take no chances and rewrite it. 8078 # Note: m4 eats our [], so we need to use [ and ] instead. 8079 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8080 if test "x$has_forbidden_chars" != x; then 8081 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8082 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8083 fi 8084 8085 8086 windows_path="$new_path" 8087 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8088 unix_path=`$CYGPATH -u "$windows_path"` 8089 new_path="$unix_path" 8090 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8091 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8092 new_path="$unix_path" 8093 fi 8094 8095 if test "x$path" != "x$new_path"; then 8096 OUTPUT_ROOT="$new_path" 8097 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5 8098 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;} 8099 fi 8100 8101 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8102 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8103 8104 else 8105 # We're on a posix platform. Hooray! :) 8106 path="$OUTPUT_ROOT" 8107 8108 if test ! -f "$path" && test ! -d "$path"; then 8109 as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5 8110 fi 8111 8112 has_space=`$ECHO "$path" | $GREP " "` 8113 if test "x$has_space" != x; then 8114 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5 8115 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;} 8116 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 8117 fi 8118 fi 8119 8120 8121 SPEC=$OUTPUT_ROOT/spec.gmk 8122 8123 CONF_NAME=$CONF_NAME 8124 8125 OUTPUT_ROOT=$OUTPUT_ROOT 8126 8127 8128 # Most of the probed defines are put into config.h 8129 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" 8130 8131 # The spec.gmk file contains all variables for the make system. 8132 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" 8133 8134 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system. 8135 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" 8136 8137 # The bootcycle-spec.gmk file contains support for boot cycle builds. 8138 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" 8139 8140 # The compare.sh is used to compare the build output to other builds. 8141 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" 8142 8143 # Spec.sh is currently used by compare-objects.sh 8144 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" 8145 8146 # The generated Makefile knows where the spec.gmk is and where the source is. 8147 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile 8148 # which will look for generated configurations 8149 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" 8150 8151 8152 # Save the arguments given to us 8153 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments 8154 8155 8156 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY. 8157 8158 for ac_prog in apt-get yum port pkgutil pkgadd 8159 do 8160 # Extract the first word of "$ac_prog", so it can be a program name with args. 8161 set dummy $ac_prog; ac_word=$2 8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8163 $as_echo_n "checking for $ac_word... " >&6; } 8164 if test "${ac_cv_prog_PKGHANDLER+set}" = set; then : 8165 $as_echo_n "(cached) " >&6 8166 else 8167 if test -n "$PKGHANDLER"; then 8168 ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test. 8169 else 8170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8171 for as_dir in $PATH 8172 do 8173 IFS=$as_save_IFS 8174 test -z "$as_dir" && as_dir=. 8175 for ac_exec_ext in '' $ac_executable_extensions; do 8176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8177 ac_cv_prog_PKGHANDLER="$ac_prog" 8178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8179 break 2 8180 fi 8181 done 8182 done 8183 IFS=$as_save_IFS 8184 8185 fi 8186 fi 8187 PKGHANDLER=$ac_cv_prog_PKGHANDLER 8188 if test -n "$PKGHANDLER"; then 8189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5 8190 $as_echo "$PKGHANDLER" >&6; } 8191 else 8192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8193 $as_echo "no" >&6; } 8194 fi 8195 8196 8197 test -n "$PKGHANDLER" && break 8198 done 8199 8200 8201 8202 # Setup tools that requires more complex handling, or that is not needed by the configure script. 8203 8204 8205 # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky. 8206 if test "x$MAKE" != x; then 8207 # User has supplied a make, test it. 8208 if test ! -f "$MAKE"; then 8209 as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5 8210 fi 8211 8212 MAKE_CANDIDATE=""$MAKE"" 8213 DESCRIPTION="user supplied MAKE=$MAKE" 8214 if test "x$MAKE_CANDIDATE" != x; then 8215 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8216 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8217 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8218 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8219 if test "x$IS_GNU_MAKE" = x; then 8220 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8221 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8222 else 8223 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8224 if test "x$IS_MODERN_MAKE" = x; then 8225 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 8226 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 8227 else 8228 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8229 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8230 MAKE_EXPECTED_ENV='cygwin' 8231 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8232 MAKE_EXPECTED_ENV='msys' 8233 else 8234 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8235 fi 8236 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8237 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8238 else 8239 # Not relevant for non-Windows 8240 IS_MAKE_CORRECT_ENV=true 8241 fi 8242 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8243 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 8244 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 8245 else 8246 FOUND_MAKE=$MAKE_CANDIDATE 8247 8248 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8249 8250 # First separate the path from the arguments. This will split at the first 8251 # space. 8252 complete="$FOUND_MAKE" 8253 path="${complete%% *}" 8254 tmp="$complete EOL" 8255 arguments="${tmp#* }" 8256 8257 # Input might be given as Windows format, start by converting to 8258 # unix format. 8259 new_path=`$CYGPATH -u "$path"` 8260 8261 # Now try to locate executable using which 8262 new_path=`$WHICH "$new_path" 2> /dev/null` 8263 # bat and cmd files are not always considered executable in cygwin causing which 8264 # to not find them 8265 if test "x$new_path" = x \ 8266 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8267 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8268 new_path=`$CYGPATH -u "$path"` 8269 fi 8270 if test "x$new_path" = x; then 8271 # Oops. Which didn't find the executable. 8272 # The splitting of arguments from the executable at a space might have been incorrect, 8273 # since paths with space are more likely in Windows. Give it another try with the whole 8274 # argument. 8275 path="$complete" 8276 arguments="EOL" 8277 new_path=`$CYGPATH -u "$path"` 8278 new_path=`$WHICH "$new_path" 2> /dev/null` 8279 # bat and cmd files are not always considered executable in cygwin causing which 8280 # to not find them 8281 if test "x$new_path" = x \ 8282 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8283 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8284 new_path=`$CYGPATH -u "$path"` 8285 fi 8286 if test "x$new_path" = x; then 8287 # It's still not found. Now this is an unrecoverable error. 8288 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8289 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8290 has_space=`$ECHO "$complete" | $GREP " "` 8291 if test "x$has_space" != x; then 8292 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8294 fi 8295 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8296 fi 8297 fi 8298 8299 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8300 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8301 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8302 # "foo.exe" is OK but "foo" is an error. 8303 # 8304 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8305 # It is also a way to make sure we got the proper file name for the real test later on. 8306 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8307 if test "x$test_shortpath" = x; then 8308 # Short path failed, file does not exist as specified. 8309 # Try adding .exe or .cmd 8310 if test -f "${new_path}.exe"; then 8311 input_to_shortpath="${new_path}.exe" 8312 elif test -f "${new_path}.cmd"; then 8313 input_to_shortpath="${new_path}.cmd" 8314 else 8315 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8316 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8317 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8319 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8320 fi 8321 else 8322 input_to_shortpath="$new_path" 8323 fi 8324 8325 # Call helper function which possibly converts this using DOS-style short mode. 8326 # If so, the updated path is stored in $new_path. 8327 new_path="$input_to_shortpath" 8328 8329 input_path="$input_to_shortpath" 8330 # Check if we need to convert this using DOS-style short mode. If the path 8331 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8332 # take no chances and rewrite it. 8333 # Note: m4 eats our [], so we need to use [ and ] instead. 8334 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8335 if test "x$has_forbidden_chars" != x; then 8336 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8337 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8338 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8339 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8340 # Going to short mode and back again did indeed matter. Since short mode is 8341 # case insensitive, let's make it lowercase to improve readability. 8342 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8343 # Now convert it back to Unix-stile (cygpath) 8344 input_path=`$CYGPATH -u "$shortmode_path"` 8345 new_path="$input_path" 8346 fi 8347 fi 8348 8349 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8350 if test "x$test_cygdrive_prefix" = x; then 8351 # As a simple fix, exclude /usr/bin since it's not a real path. 8352 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8353 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8354 # a path prefixed by /cygdrive for fixpath to work. 8355 new_path="$CYGWIN_ROOT_PATH$input_path" 8356 fi 8357 fi 8358 8359 # remove trailing .exe if any 8360 new_path="${new_path/%.exe/}" 8361 8362 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8363 8364 # First separate the path from the arguments. This will split at the first 8365 # space. 8366 complete="$FOUND_MAKE" 8367 path="${complete%% *}" 8368 tmp="$complete EOL" 8369 arguments="${tmp#* }" 8370 8371 # Input might be given as Windows format, start by converting to 8372 # unix format. 8373 new_path="$path" 8374 8375 windows_path="$new_path" 8376 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8377 unix_path=`$CYGPATH -u "$windows_path"` 8378 new_path="$unix_path" 8379 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8380 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8381 new_path="$unix_path" 8382 fi 8383 8384 8385 # Now try to locate executable using which 8386 new_path=`$WHICH "$new_path" 2> /dev/null` 8387 8388 if test "x$new_path" = x; then 8389 # Oops. Which didn't find the executable. 8390 # The splitting of arguments from the executable at a space might have been incorrect, 8391 # since paths with space are more likely in Windows. Give it another try with the whole 8392 # argument. 8393 path="$complete" 8394 arguments="EOL" 8395 new_path="$path" 8396 8397 windows_path="$new_path" 8398 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8399 unix_path=`$CYGPATH -u "$windows_path"` 8400 new_path="$unix_path" 8401 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8402 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8403 new_path="$unix_path" 8404 fi 8405 8406 8407 new_path=`$WHICH "$new_path" 2> /dev/null` 8408 8409 if test "x$new_path" = x; then 8410 # It's still not found. Now this is an unrecoverable error. 8411 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8412 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8413 has_space=`$ECHO "$complete" | $GREP " "` 8414 if test "x$has_space" != x; then 8415 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8417 fi 8418 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8419 fi 8420 fi 8421 8422 # Now new_path has a complete unix path to the binary 8423 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 8424 # Keep paths in /bin as-is, but remove trailing .exe if any 8425 new_path="${new_path/%.exe/}" 8426 # Do not save /bin paths to all_fixpath_prefixes! 8427 else 8428 # Not in mixed or Windows style, start by that. 8429 new_path=`cmd //c echo $new_path` 8430 8431 input_path="$new_path" 8432 # Check if we need to convert this using DOS-style short mode. If the path 8433 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8434 # take no chances and rewrite it. 8435 # Note: m4 eats our [], so we need to use [ and ] instead. 8436 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8437 if test "x$has_forbidden_chars" != x; then 8438 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8439 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8440 fi 8441 8442 # Output is in $new_path 8443 8444 windows_path="$new_path" 8445 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8446 unix_path=`$CYGPATH -u "$windows_path"` 8447 new_path="$unix_path" 8448 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8449 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8450 new_path="$unix_path" 8451 fi 8452 8453 # remove trailing .exe if any 8454 new_path="${new_path/%.exe/}" 8455 8456 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8457 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8458 fi 8459 8460 else 8461 # We're on a posix platform. Hooray! :) 8462 # First separate the path from the arguments. This will split at the first 8463 # space. 8464 complete="$FOUND_MAKE" 8465 path="${complete%% *}" 8466 tmp="$complete EOL" 8467 arguments="${tmp#* }" 8468 8469 # Cannot rely on the command "which" here since it doesn't always work. 8470 is_absolute_path=`$ECHO "$path" | $GREP ^/` 8471 if test -z "$is_absolute_path"; then 8472 # Path to executable is not absolute. Find it. 8473 IFS_save="$IFS" 8474 IFS=: 8475 for p in $PATH; do 8476 if test -f "$p/$path" && test -x "$p/$path"; then 8477 new_path="$p/$path" 8478 break 8479 fi 8480 done 8481 IFS="$IFS_save" 8482 else 8483 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 8484 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 8485 new_path="$path" 8486 fi 8487 8488 if test "x$new_path" = x; then 8489 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8490 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8491 has_space=`$ECHO "$complete" | $GREP " "` 8492 if test "x$has_space" != x; then 8493 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 8494 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 8495 fi 8496 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8497 fi 8498 fi 8499 8500 # Now join together the path and the arguments once again 8501 if test "x$arguments" != xEOL; then 8502 new_complete="$new_path ${arguments% *}" 8503 else 8504 new_complete="$new_path" 8505 fi 8506 8507 if test "x$complete" != "x$new_complete"; then 8508 FOUND_MAKE="$new_complete" 8509 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 8510 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 8511 fi 8512 8513 fi 8514 fi 8515 fi 8516 fi 8517 8518 if test "x$FOUND_MAKE" = x; then 8519 as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5 8520 fi 8521 else 8522 # Try our hardest to locate a correct version of GNU make 8523 for ac_prog in gmake 8524 do 8525 # Extract the first word of "$ac_prog", so it can be a program name with args. 8526 set dummy $ac_prog; ac_word=$2 8527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8528 $as_echo_n "checking for $ac_word... " >&6; } 8529 if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then : 8530 $as_echo_n "(cached) " >&6 8531 else 8532 case $CHECK_GMAKE in 8533 [\\/]* | ?:[\\/]*) 8534 ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path. 8535 ;; 8536 *) 8537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8538 for as_dir in $PATH 8539 do 8540 IFS=$as_save_IFS 8541 test -z "$as_dir" && as_dir=. 8542 for ac_exec_ext in '' $ac_executable_extensions; do 8543 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8544 ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext" 8545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8546 break 2 8547 fi 8548 done 8549 done 8550 IFS=$as_save_IFS 8551 8552 ;; 8553 esac 8554 fi 8555 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE 8556 if test -n "$CHECK_GMAKE"; then 8557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5 8558 $as_echo "$CHECK_GMAKE" >&6; } 8559 else 8560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8561 $as_echo "no" >&6; } 8562 fi 8563 8564 8565 test -n "$CHECK_GMAKE" && break 8566 done 8567 8568 8569 MAKE_CANDIDATE=""$CHECK_GMAKE"" 8570 DESCRIPTION="gmake in PATH" 8571 if test "x$MAKE_CANDIDATE" != x; then 8572 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8573 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8574 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8575 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8576 if test "x$IS_GNU_MAKE" = x; then 8577 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8578 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8579 else 8580 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8581 if test "x$IS_MODERN_MAKE" = x; then 8582 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 8583 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 8584 else 8585 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8586 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8587 MAKE_EXPECTED_ENV='cygwin' 8588 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8589 MAKE_EXPECTED_ENV='msys' 8590 else 8591 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8592 fi 8593 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8594 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8595 else 8596 # Not relevant for non-Windows 8597 IS_MAKE_CORRECT_ENV=true 8598 fi 8599 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8600 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 8601 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 8602 else 8603 FOUND_MAKE=$MAKE_CANDIDATE 8604 8605 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8606 8607 # First separate the path from the arguments. This will split at the first 8608 # space. 8609 complete="$FOUND_MAKE" 8610 path="${complete%% *}" 8611 tmp="$complete EOL" 8612 arguments="${tmp#* }" 8613 8614 # Input might be given as Windows format, start by converting to 8615 # unix format. 8616 new_path=`$CYGPATH -u "$path"` 8617 8618 # Now try to locate executable using which 8619 new_path=`$WHICH "$new_path" 2> /dev/null` 8620 # bat and cmd files are not always considered executable in cygwin causing which 8621 # to not find them 8622 if test "x$new_path" = x \ 8623 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8624 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8625 new_path=`$CYGPATH -u "$path"` 8626 fi 8627 if test "x$new_path" = x; then 8628 # Oops. Which didn't find the executable. 8629 # The splitting of arguments from the executable at a space might have been incorrect, 8630 # since paths with space are more likely in Windows. Give it another try with the whole 8631 # argument. 8632 path="$complete" 8633 arguments="EOL" 8634 new_path=`$CYGPATH -u "$path"` 8635 new_path=`$WHICH "$new_path" 2> /dev/null` 8636 # bat and cmd files are not always considered executable in cygwin causing which 8637 # to not find them 8638 if test "x$new_path" = x \ 8639 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8640 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8641 new_path=`$CYGPATH -u "$path"` 8642 fi 8643 if test "x$new_path" = x; then 8644 # It's still not found. Now this is an unrecoverable error. 8645 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8646 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8647 has_space=`$ECHO "$complete" | $GREP " "` 8648 if test "x$has_space" != x; then 8649 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8650 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8651 fi 8652 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8653 fi 8654 fi 8655 8656 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 8657 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 8658 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 8659 # "foo.exe" is OK but "foo" is an error. 8660 # 8661 # This test is therefore slightly more accurate than "test -f" to check for file precense. 8662 # It is also a way to make sure we got the proper file name for the real test later on. 8663 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 8664 if test "x$test_shortpath" = x; then 8665 # Short path failed, file does not exist as specified. 8666 # Try adding .exe or .cmd 8667 if test -f "${new_path}.exe"; then 8668 input_to_shortpath="${new_path}.exe" 8669 elif test -f "${new_path}.cmd"; then 8670 input_to_shortpath="${new_path}.cmd" 8671 else 8672 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 8673 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 8674 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 8675 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 8676 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8677 fi 8678 else 8679 input_to_shortpath="$new_path" 8680 fi 8681 8682 # Call helper function which possibly converts this using DOS-style short mode. 8683 # If so, the updated path is stored in $new_path. 8684 new_path="$input_to_shortpath" 8685 8686 input_path="$input_to_shortpath" 8687 # Check if we need to convert this using DOS-style short mode. If the path 8688 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8689 # take no chances and rewrite it. 8690 # Note: m4 eats our [], so we need to use [ and ] instead. 8691 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 8692 if test "x$has_forbidden_chars" != x; then 8693 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8694 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 8695 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 8696 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 8697 # Going to short mode and back again did indeed matter. Since short mode is 8698 # case insensitive, let's make it lowercase to improve readability. 8699 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8700 # Now convert it back to Unix-stile (cygpath) 8701 input_path=`$CYGPATH -u "$shortmode_path"` 8702 new_path="$input_path" 8703 fi 8704 fi 8705 8706 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 8707 if test "x$test_cygdrive_prefix" = x; then 8708 # As a simple fix, exclude /usr/bin since it's not a real path. 8709 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 8710 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 8711 # a path prefixed by /cygdrive for fixpath to work. 8712 new_path="$CYGWIN_ROOT_PATH$input_path" 8713 fi 8714 fi 8715 8716 # remove trailing .exe if any 8717 new_path="${new_path/%.exe/}" 8718 8719 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8720 8721 # First separate the path from the arguments. This will split at the first 8722 # space. 8723 complete="$FOUND_MAKE" 8724 path="${complete%% *}" 8725 tmp="$complete EOL" 8726 arguments="${tmp#* }" 8727 8728 # Input might be given as Windows format, start by converting to 8729 # unix format. 8730 new_path="$path" 8731 8732 windows_path="$new_path" 8733 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8734 unix_path=`$CYGPATH -u "$windows_path"` 8735 new_path="$unix_path" 8736 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8737 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8738 new_path="$unix_path" 8739 fi 8740 8741 8742 # Now try to locate executable using which 8743 new_path=`$WHICH "$new_path" 2> /dev/null` 8744 8745 if test "x$new_path" = x; then 8746 # Oops. Which didn't find the executable. 8747 # The splitting of arguments from the executable at a space might have been incorrect, 8748 # since paths with space are more likely in Windows. Give it another try with the whole 8749 # argument. 8750 path="$complete" 8751 arguments="EOL" 8752 new_path="$path" 8753 8754 windows_path="$new_path" 8755 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8756 unix_path=`$CYGPATH -u "$windows_path"` 8757 new_path="$unix_path" 8758 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8759 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8760 new_path="$unix_path" 8761 fi 8762 8763 8764 new_path=`$WHICH "$new_path" 2> /dev/null` 8765 8766 if test "x$new_path" = x; then 8767 # It's still not found. Now this is an unrecoverable error. 8768 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8769 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8770 has_space=`$ECHO "$complete" | $GREP " "` 8771 if test "x$has_space" != x; then 8772 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 8773 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 8774 fi 8775 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8776 fi 8777 fi 8778 8779 # Now new_path has a complete unix path to the binary 8780 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 8781 # Keep paths in /bin as-is, but remove trailing .exe if any 8782 new_path="${new_path/%.exe/}" 8783 # Do not save /bin paths to all_fixpath_prefixes! 8784 else 8785 # Not in mixed or Windows style, start by that. 8786 new_path=`cmd //c echo $new_path` 8787 8788 input_path="$new_path" 8789 # Check if we need to convert this using DOS-style short mode. If the path 8790 # contains just simple characters, use it. Otherwise (spaces, weird characters), 8791 # take no chances and rewrite it. 8792 # Note: m4 eats our [], so we need to use [ and ] instead. 8793 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 8794 if test "x$has_forbidden_chars" != x; then 8795 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 8796 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 8797 fi 8798 8799 # Output is in $new_path 8800 8801 windows_path="$new_path" 8802 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8803 unix_path=`$CYGPATH -u "$windows_path"` 8804 new_path="$unix_path" 8805 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8806 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 8807 new_path="$unix_path" 8808 fi 8809 8810 # remove trailing .exe if any 8811 new_path="${new_path/%.exe/}" 8812 8813 # Save the first 10 bytes of this path to the storage, so fixpath can work. 8814 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 8815 fi 8816 8817 else 8818 # We're on a posix platform. Hooray! :) 8819 # First separate the path from the arguments. This will split at the first 8820 # space. 8821 complete="$FOUND_MAKE" 8822 path="${complete%% *}" 8823 tmp="$complete EOL" 8824 arguments="${tmp#* }" 8825 8826 # Cannot rely on the command "which" here since it doesn't always work. 8827 is_absolute_path=`$ECHO "$path" | $GREP ^/` 8828 if test -z "$is_absolute_path"; then 8829 # Path to executable is not absolute. Find it. 8830 IFS_save="$IFS" 8831 IFS=: 8832 for p in $PATH; do 8833 if test -f "$p/$path" && test -x "$p/$path"; then 8834 new_path="$p/$path" 8835 break 8836 fi 8837 done 8838 IFS="$IFS_save" 8839 else 8840 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 8841 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 8842 new_path="$path" 8843 fi 8844 8845 if test "x$new_path" = x; then 8846 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 8847 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 8848 has_space=`$ECHO "$complete" | $GREP " "` 8849 if test "x$has_space" != x; then 8850 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 8851 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 8852 fi 8853 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 8854 fi 8855 fi 8856 8857 # Now join together the path and the arguments once again 8858 if test "x$arguments" != xEOL; then 8859 new_complete="$new_path ${arguments% *}" 8860 else 8861 new_complete="$new_path" 8862 fi 8863 8864 if test "x$complete" != "x$new_complete"; then 8865 FOUND_MAKE="$new_complete" 8866 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 8867 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 8868 fi 8869 8870 fi 8871 fi 8872 fi 8873 fi 8874 8875 8876 if test "x$FOUND_MAKE" = x; then 8877 for ac_prog in make 8878 do 8879 # Extract the first word of "$ac_prog", so it can be a program name with args. 8880 set dummy $ac_prog; ac_word=$2 8881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8882 $as_echo_n "checking for $ac_word... " >&6; } 8883 if test "${ac_cv_path_CHECK_MAKE+set}" = set; then : 8884 $as_echo_n "(cached) " >&6 8885 else 8886 case $CHECK_MAKE in 8887 [\\/]* | ?:[\\/]*) 8888 ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path. 8889 ;; 8890 *) 8891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8892 for as_dir in $PATH 8893 do 8894 IFS=$as_save_IFS 8895 test -z "$as_dir" && as_dir=. 8896 for ac_exec_ext in '' $ac_executable_extensions; do 8897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8898 ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext" 8899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8900 break 2 8901 fi 8902 done 8903 done 8904 IFS=$as_save_IFS 8905 8906 ;; 8907 esac 8908 fi 8909 CHECK_MAKE=$ac_cv_path_CHECK_MAKE 8910 if test -n "$CHECK_MAKE"; then 8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5 8912 $as_echo "$CHECK_MAKE" >&6; } 8913 else 8914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8915 $as_echo "no" >&6; } 8916 fi 8917 8918 8919 test -n "$CHECK_MAKE" && break 8920 done 8921 8922 8923 MAKE_CANDIDATE=""$CHECK_MAKE"" 8924 DESCRIPTION="make in PATH" 8925 if test "x$MAKE_CANDIDATE" != x; then 8926 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 8927 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 8928 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 8929 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 8930 if test "x$IS_GNU_MAKE" = x; then 8931 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 8932 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 8933 else 8934 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 8935 if test "x$IS_MODERN_MAKE" = x; then 8936 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 8937 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 8938 else 8939 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 8940 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8941 MAKE_EXPECTED_ENV='cygwin' 8942 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 8943 MAKE_EXPECTED_ENV='msys' 8944 else 8945 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 8946 fi 8947 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 8948 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 8949 else 8950 # Not relevant for non-Windows 8951 IS_MAKE_CORRECT_ENV=true 8952 fi 8953 if test "x$IS_MAKE_CORRECT_ENV" = x; then 8954 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 8955 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 8956 else 8957 FOUND_MAKE=$MAKE_CANDIDATE 8958 8959 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 8960 8961 # First separate the path from the arguments. This will split at the first 8962 # space. 8963 complete="$FOUND_MAKE" 8964 path="${complete%% *}" 8965 tmp="$complete EOL" 8966 arguments="${tmp#* }" 8967 8968 # Input might be given as Windows format, start by converting to 8969 # unix format. 8970 new_path=`$CYGPATH -u "$path"` 8971 8972 # Now try to locate executable using which 8973 new_path=`$WHICH "$new_path" 2> /dev/null` 8974 # bat and cmd files are not always considered executable in cygwin causing which 8975 # to not find them 8976 if test "x$new_path" = x \ 8977 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8978 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8979 new_path=`$CYGPATH -u "$path"` 8980 fi 8981 if test "x$new_path" = x; then 8982 # Oops. Which didn't find the executable. 8983 # The splitting of arguments from the executable at a space might have been incorrect, 8984 # since paths with space are more likely in Windows. Give it another try with the whole 8985 # argument. 8986 path="$complete" 8987 arguments="EOL" 8988 new_path=`$CYGPATH -u "$path"` 8989 new_path=`$WHICH "$new_path" 2> /dev/null` 8990 # bat and cmd files are not always considered executable in cygwin causing which 8991 # to not find them 8992 if test "x$new_path" = x \ 8993 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 8994 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 8995 new_path=`$CYGPATH -u "$path"` 8996 fi 8997 if test "x$new_path" = x; then 8998 # It's still not found. Now this is an unrecoverable error. 8999 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9000 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9001 has_space=`$ECHO "$complete" | $GREP " "` 9002 if test "x$has_space" != x; then 9003 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9004 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9005 fi 9006 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9007 fi 9008 fi 9009 9010 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9011 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9012 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9013 # "foo.exe" is OK but "foo" is an error. 9014 # 9015 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9016 # It is also a way to make sure we got the proper file name for the real test later on. 9017 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9018 if test "x$test_shortpath" = x; then 9019 # Short path failed, file does not exist as specified. 9020 # Try adding .exe or .cmd 9021 if test -f "${new_path}.exe"; then 9022 input_to_shortpath="${new_path}.exe" 9023 elif test -f "${new_path}.cmd"; then 9024 input_to_shortpath="${new_path}.cmd" 9025 else 9026 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9027 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9028 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9029 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9030 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9031 fi 9032 else 9033 input_to_shortpath="$new_path" 9034 fi 9035 9036 # Call helper function which possibly converts this using DOS-style short mode. 9037 # If so, the updated path is stored in $new_path. 9038 new_path="$input_to_shortpath" 9039 9040 input_path="$input_to_shortpath" 9041 # Check if we need to convert this using DOS-style short mode. If the path 9042 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9043 # take no chances and rewrite it. 9044 # Note: m4 eats our [], so we need to use [ and ] instead. 9045 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9046 if test "x$has_forbidden_chars" != x; then 9047 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9048 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9049 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9050 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9051 # Going to short mode and back again did indeed matter. Since short mode is 9052 # case insensitive, let's make it lowercase to improve readability. 9053 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9054 # Now convert it back to Unix-stile (cygpath) 9055 input_path=`$CYGPATH -u "$shortmode_path"` 9056 new_path="$input_path" 9057 fi 9058 fi 9059 9060 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9061 if test "x$test_cygdrive_prefix" = x; then 9062 # As a simple fix, exclude /usr/bin since it's not a real path. 9063 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9064 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9065 # a path prefixed by /cygdrive for fixpath to work. 9066 new_path="$CYGWIN_ROOT_PATH$input_path" 9067 fi 9068 fi 9069 9070 # remove trailing .exe if any 9071 new_path="${new_path/%.exe/}" 9072 9073 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9074 9075 # First separate the path from the arguments. This will split at the first 9076 # space. 9077 complete="$FOUND_MAKE" 9078 path="${complete%% *}" 9079 tmp="$complete EOL" 9080 arguments="${tmp#* }" 9081 9082 # Input might be given as Windows format, start by converting to 9083 # unix format. 9084 new_path="$path" 9085 9086 windows_path="$new_path" 9087 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9088 unix_path=`$CYGPATH -u "$windows_path"` 9089 new_path="$unix_path" 9090 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9091 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9092 new_path="$unix_path" 9093 fi 9094 9095 9096 # Now try to locate executable using which 9097 new_path=`$WHICH "$new_path" 2> /dev/null` 9098 9099 if test "x$new_path" = x; then 9100 # Oops. Which didn't find the executable. 9101 # The splitting of arguments from the executable at a space might have been incorrect, 9102 # since paths with space are more likely in Windows. Give it another try with the whole 9103 # argument. 9104 path="$complete" 9105 arguments="EOL" 9106 new_path="$path" 9107 9108 windows_path="$new_path" 9109 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9110 unix_path=`$CYGPATH -u "$windows_path"` 9111 new_path="$unix_path" 9112 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9113 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9114 new_path="$unix_path" 9115 fi 9116 9117 9118 new_path=`$WHICH "$new_path" 2> /dev/null` 9119 9120 if test "x$new_path" = x; then 9121 # It's still not found. Now this is an unrecoverable error. 9122 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9123 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9124 has_space=`$ECHO "$complete" | $GREP " "` 9125 if test "x$has_space" != x; then 9126 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9127 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9128 fi 9129 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9130 fi 9131 fi 9132 9133 # Now new_path has a complete unix path to the binary 9134 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9135 # Keep paths in /bin as-is, but remove trailing .exe if any 9136 new_path="${new_path/%.exe/}" 9137 # Do not save /bin paths to all_fixpath_prefixes! 9138 else 9139 # Not in mixed or Windows style, start by that. 9140 new_path=`cmd //c echo $new_path` 9141 9142 input_path="$new_path" 9143 # Check if we need to convert this using DOS-style short mode. If the path 9144 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9145 # take no chances and rewrite it. 9146 # Note: m4 eats our [], so we need to use [ and ] instead. 9147 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9148 if test "x$has_forbidden_chars" != x; then 9149 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9150 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9151 fi 9152 9153 # Output is in $new_path 9154 9155 windows_path="$new_path" 9156 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9157 unix_path=`$CYGPATH -u "$windows_path"` 9158 new_path="$unix_path" 9159 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9160 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9161 new_path="$unix_path" 9162 fi 9163 9164 # remove trailing .exe if any 9165 new_path="${new_path/%.exe/}" 9166 9167 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9168 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9169 fi 9170 9171 else 9172 # We're on a posix platform. Hooray! :) 9173 # First separate the path from the arguments. This will split at the first 9174 # space. 9175 complete="$FOUND_MAKE" 9176 path="${complete%% *}" 9177 tmp="$complete EOL" 9178 arguments="${tmp#* }" 9179 9180 # Cannot rely on the command "which" here since it doesn't always work. 9181 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9182 if test -z "$is_absolute_path"; then 9183 # Path to executable is not absolute. Find it. 9184 IFS_save="$IFS" 9185 IFS=: 9186 for p in $PATH; do 9187 if test -f "$p/$path" && test -x "$p/$path"; then 9188 new_path="$p/$path" 9189 break 9190 fi 9191 done 9192 IFS="$IFS_save" 9193 else 9194 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9195 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9196 new_path="$path" 9197 fi 9198 9199 if test "x$new_path" = x; then 9200 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9201 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9202 has_space=`$ECHO "$complete" | $GREP " "` 9203 if test "x$has_space" != x; then 9204 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9205 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9206 fi 9207 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9208 fi 9209 fi 9210 9211 # Now join together the path and the arguments once again 9212 if test "x$arguments" != xEOL; then 9213 new_complete="$new_path ${arguments% *}" 9214 else 9215 new_complete="$new_path" 9216 fi 9217 9218 if test "x$complete" != "x$new_complete"; then 9219 FOUND_MAKE="$new_complete" 9220 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9221 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9222 fi 9223 9224 fi 9225 fi 9226 fi 9227 fi 9228 9229 fi 9230 9231 if test "x$FOUND_MAKE" = x; then 9232 if test "x$TOOLS_DIR" != x; then 9233 # We have a tools-dir, check that as well before giving up. 9234 OLD_PATH=$PATH 9235 PATH=$TOOLS_DIR:$PATH 9236 for ac_prog in gmake 9237 do 9238 # Extract the first word of "$ac_prog", so it can be a program name with args. 9239 set dummy $ac_prog; ac_word=$2 9240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9241 $as_echo_n "checking for $ac_word... " >&6; } 9242 if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then : 9243 $as_echo_n "(cached) " >&6 9244 else 9245 case $CHECK_TOOLSDIR_GMAKE in 9246 [\\/]* | ?:[\\/]*) 9247 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path. 9248 ;; 9249 *) 9250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9251 for as_dir in $PATH 9252 do 9253 IFS=$as_save_IFS 9254 test -z "$as_dir" && as_dir=. 9255 for ac_exec_ext in '' $ac_executable_extensions; do 9256 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 9257 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext" 9258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9259 break 2 9260 fi 9261 done 9262 done 9263 IFS=$as_save_IFS 9264 9265 ;; 9266 esac 9267 fi 9268 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE 9269 if test -n "$CHECK_TOOLSDIR_GMAKE"; then 9270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5 9271 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; } 9272 else 9273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9274 $as_echo "no" >&6; } 9275 fi 9276 9277 9278 test -n "$CHECK_TOOLSDIR_GMAKE" && break 9279 done 9280 9281 9282 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE"" 9283 DESCRIPTION="gmake in tools-dir" 9284 if test "x$MAKE_CANDIDATE" != x; then 9285 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 9286 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 9287 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 9288 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 9289 if test "x$IS_GNU_MAKE" = x; then 9290 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 9291 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 9292 else 9293 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 9294 if test "x$IS_MODERN_MAKE" = x; then 9295 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 9296 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 9297 else 9298 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 9299 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9300 MAKE_EXPECTED_ENV='cygwin' 9301 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9302 MAKE_EXPECTED_ENV='msys' 9303 else 9304 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 9305 fi 9306 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 9307 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 9308 else 9309 # Not relevant for non-Windows 9310 IS_MAKE_CORRECT_ENV=true 9311 fi 9312 if test "x$IS_MAKE_CORRECT_ENV" = x; then 9313 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 9314 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 9315 else 9316 FOUND_MAKE=$MAKE_CANDIDATE 9317 9318 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9319 9320 # First separate the path from the arguments. This will split at the first 9321 # space. 9322 complete="$FOUND_MAKE" 9323 path="${complete%% *}" 9324 tmp="$complete EOL" 9325 arguments="${tmp#* }" 9326 9327 # Input might be given as Windows format, start by converting to 9328 # unix format. 9329 new_path=`$CYGPATH -u "$path"` 9330 9331 # Now try to locate executable using which 9332 new_path=`$WHICH "$new_path" 2> /dev/null` 9333 # bat and cmd files are not always considered executable in cygwin causing which 9334 # to not find them 9335 if test "x$new_path" = x \ 9336 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9337 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9338 new_path=`$CYGPATH -u "$path"` 9339 fi 9340 if test "x$new_path" = x; then 9341 # Oops. Which didn't find the executable. 9342 # The splitting of arguments from the executable at a space might have been incorrect, 9343 # since paths with space are more likely in Windows. Give it another try with the whole 9344 # argument. 9345 path="$complete" 9346 arguments="EOL" 9347 new_path=`$CYGPATH -u "$path"` 9348 new_path=`$WHICH "$new_path" 2> /dev/null` 9349 # bat and cmd files are not always considered executable in cygwin causing which 9350 # to not find them 9351 if test "x$new_path" = x \ 9352 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9353 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9354 new_path=`$CYGPATH -u "$path"` 9355 fi 9356 if test "x$new_path" = x; then 9357 # It's still not found. Now this is an unrecoverable error. 9358 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9359 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9360 has_space=`$ECHO "$complete" | $GREP " "` 9361 if test "x$has_space" != x; then 9362 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9363 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9364 fi 9365 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9366 fi 9367 fi 9368 9369 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9370 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9371 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9372 # "foo.exe" is OK but "foo" is an error. 9373 # 9374 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9375 # It is also a way to make sure we got the proper file name for the real test later on. 9376 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9377 if test "x$test_shortpath" = x; then 9378 # Short path failed, file does not exist as specified. 9379 # Try adding .exe or .cmd 9380 if test -f "${new_path}.exe"; then 9381 input_to_shortpath="${new_path}.exe" 9382 elif test -f "${new_path}.cmd"; then 9383 input_to_shortpath="${new_path}.cmd" 9384 else 9385 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9386 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9387 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9388 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9389 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9390 fi 9391 else 9392 input_to_shortpath="$new_path" 9393 fi 9394 9395 # Call helper function which possibly converts this using DOS-style short mode. 9396 # If so, the updated path is stored in $new_path. 9397 new_path="$input_to_shortpath" 9398 9399 input_path="$input_to_shortpath" 9400 # Check if we need to convert this using DOS-style short mode. If the path 9401 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9402 # take no chances and rewrite it. 9403 # Note: m4 eats our [], so we need to use [ and ] instead. 9404 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9405 if test "x$has_forbidden_chars" != x; then 9406 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9407 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9408 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9409 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9410 # Going to short mode and back again did indeed matter. Since short mode is 9411 # case insensitive, let's make it lowercase to improve readability. 9412 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9413 # Now convert it back to Unix-stile (cygpath) 9414 input_path=`$CYGPATH -u "$shortmode_path"` 9415 new_path="$input_path" 9416 fi 9417 fi 9418 9419 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9420 if test "x$test_cygdrive_prefix" = x; then 9421 # As a simple fix, exclude /usr/bin since it's not a real path. 9422 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9423 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9424 # a path prefixed by /cygdrive for fixpath to work. 9425 new_path="$CYGWIN_ROOT_PATH$input_path" 9426 fi 9427 fi 9428 9429 # remove trailing .exe if any 9430 new_path="${new_path/%.exe/}" 9431 9432 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9433 9434 # First separate the path from the arguments. This will split at the first 9435 # space. 9436 complete="$FOUND_MAKE" 9437 path="${complete%% *}" 9438 tmp="$complete EOL" 9439 arguments="${tmp#* }" 9440 9441 # Input might be given as Windows format, start by converting to 9442 # unix format. 9443 new_path="$path" 9444 9445 windows_path="$new_path" 9446 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9447 unix_path=`$CYGPATH -u "$windows_path"` 9448 new_path="$unix_path" 9449 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9450 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9451 new_path="$unix_path" 9452 fi 9453 9454 9455 # Now try to locate executable using which 9456 new_path=`$WHICH "$new_path" 2> /dev/null` 9457 9458 if test "x$new_path" = x; then 9459 # Oops. Which didn't find the executable. 9460 # The splitting of arguments from the executable at a space might have been incorrect, 9461 # since paths with space are more likely in Windows. Give it another try with the whole 9462 # argument. 9463 path="$complete" 9464 arguments="EOL" 9465 new_path="$path" 9466 9467 windows_path="$new_path" 9468 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9469 unix_path=`$CYGPATH -u "$windows_path"` 9470 new_path="$unix_path" 9471 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9472 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9473 new_path="$unix_path" 9474 fi 9475 9476 9477 new_path=`$WHICH "$new_path" 2> /dev/null` 9478 9479 if test "x$new_path" = x; then 9480 # It's still not found. Now this is an unrecoverable error. 9481 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9482 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9483 has_space=`$ECHO "$complete" | $GREP " "` 9484 if test "x$has_space" != x; then 9485 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9486 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9487 fi 9488 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9489 fi 9490 fi 9491 9492 # Now new_path has a complete unix path to the binary 9493 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9494 # Keep paths in /bin as-is, but remove trailing .exe if any 9495 new_path="${new_path/%.exe/}" 9496 # Do not save /bin paths to all_fixpath_prefixes! 9497 else 9498 # Not in mixed or Windows style, start by that. 9499 new_path=`cmd //c echo $new_path` 9500 9501 input_path="$new_path" 9502 # Check if we need to convert this using DOS-style short mode. If the path 9503 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9504 # take no chances and rewrite it. 9505 # Note: m4 eats our [], so we need to use [ and ] instead. 9506 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9507 if test "x$has_forbidden_chars" != x; then 9508 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9509 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9510 fi 9511 9512 # Output is in $new_path 9513 9514 windows_path="$new_path" 9515 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9516 unix_path=`$CYGPATH -u "$windows_path"` 9517 new_path="$unix_path" 9518 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9519 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9520 new_path="$unix_path" 9521 fi 9522 9523 # remove trailing .exe if any 9524 new_path="${new_path/%.exe/}" 9525 9526 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9527 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9528 fi 9529 9530 else 9531 # We're on a posix platform. Hooray! :) 9532 # First separate the path from the arguments. This will split at the first 9533 # space. 9534 complete="$FOUND_MAKE" 9535 path="${complete%% *}" 9536 tmp="$complete EOL" 9537 arguments="${tmp#* }" 9538 9539 # Cannot rely on the command "which" here since it doesn't always work. 9540 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9541 if test -z "$is_absolute_path"; then 9542 # Path to executable is not absolute. Find it. 9543 IFS_save="$IFS" 9544 IFS=: 9545 for p in $PATH; do 9546 if test -f "$p/$path" && test -x "$p/$path"; then 9547 new_path="$p/$path" 9548 break 9549 fi 9550 done 9551 IFS="$IFS_save" 9552 else 9553 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9554 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9555 new_path="$path" 9556 fi 9557 9558 if test "x$new_path" = x; then 9559 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9560 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9561 has_space=`$ECHO "$complete" | $GREP " "` 9562 if test "x$has_space" != x; then 9563 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9564 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9565 fi 9566 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9567 fi 9568 fi 9569 9570 # Now join together the path and the arguments once again 9571 if test "x$arguments" != xEOL; then 9572 new_complete="$new_path ${arguments% *}" 9573 else 9574 new_complete="$new_path" 9575 fi 9576 9577 if test "x$complete" != "x$new_complete"; then 9578 FOUND_MAKE="$new_complete" 9579 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9580 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9581 fi 9582 9583 fi 9584 fi 9585 fi 9586 fi 9587 9588 if test "x$FOUND_MAKE" = x; then 9589 for ac_prog in make 9590 do 9591 # Extract the first word of "$ac_prog", so it can be a program name with args. 9592 set dummy $ac_prog; ac_word=$2 9593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9594 $as_echo_n "checking for $ac_word... " >&6; } 9595 if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then : 9596 $as_echo_n "(cached) " >&6 9597 else 9598 case $CHECK_TOOLSDIR_MAKE in 9599 [\\/]* | ?:[\\/]*) 9600 ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path. 9601 ;; 9602 *) 9603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9604 for as_dir in $PATH 9605 do 9606 IFS=$as_save_IFS 9607 test -z "$as_dir" && as_dir=. 9608 for ac_exec_ext in '' $ac_executable_extensions; do 9609 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 9610 ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext" 9611 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 9612 break 2 9613 fi 9614 done 9615 done 9616 IFS=$as_save_IFS 9617 9618 ;; 9619 esac 9620 fi 9621 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE 9622 if test -n "$CHECK_TOOLSDIR_MAKE"; then 9623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5 9624 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; } 9625 else 9626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9627 $as_echo "no" >&6; } 9628 fi 9629 9630 9631 test -n "$CHECK_TOOLSDIR_MAKE" && break 9632 done 9633 9634 9635 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE"" 9636 DESCRIPTION="make in tools-dir" 9637 if test "x$MAKE_CANDIDATE" != x; then 9638 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5 9639 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;} 9640 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1` 9641 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'` 9642 if test "x$IS_GNU_MAKE" = x; then 9643 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5 9644 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;} 9645 else 9646 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'` 9647 if test "x$IS_MODERN_MAKE" = x; then 9648 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5 9649 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;} 9650 else 9651 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 9652 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9653 MAKE_EXPECTED_ENV='cygwin' 9654 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9655 MAKE_EXPECTED_ENV='msys' 9656 else 9657 as_fn_error $? "Unknown Windows environment" "$LINENO" 5 9658 fi 9659 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'` 9660 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV` 9661 else 9662 # Not relevant for non-Windows 9663 IS_MAKE_CORRECT_ENV=true 9664 fi 9665 if test "x$IS_MAKE_CORRECT_ENV" = x; then 9666 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5 9667 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;} 9668 else 9669 FOUND_MAKE=$MAKE_CANDIDATE 9670 9671 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9672 9673 # First separate the path from the arguments. This will split at the first 9674 # space. 9675 complete="$FOUND_MAKE" 9676 path="${complete%% *}" 9677 tmp="$complete EOL" 9678 arguments="${tmp#* }" 9679 9680 # Input might be given as Windows format, start by converting to 9681 # unix format. 9682 new_path=`$CYGPATH -u "$path"` 9683 9684 # Now try to locate executable using which 9685 new_path=`$WHICH "$new_path" 2> /dev/null` 9686 # bat and cmd files are not always considered executable in cygwin causing which 9687 # to not find them 9688 if test "x$new_path" = x \ 9689 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9690 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9691 new_path=`$CYGPATH -u "$path"` 9692 fi 9693 if test "x$new_path" = x; then 9694 # Oops. Which didn't find the executable. 9695 # The splitting of arguments from the executable at a space might have been incorrect, 9696 # since paths with space are more likely in Windows. Give it another try with the whole 9697 # argument. 9698 path="$complete" 9699 arguments="EOL" 9700 new_path=`$CYGPATH -u "$path"` 9701 new_path=`$WHICH "$new_path" 2> /dev/null` 9702 # bat and cmd files are not always considered executable in cygwin causing which 9703 # to not find them 9704 if test "x$new_path" = x \ 9705 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 9706 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 9707 new_path=`$CYGPATH -u "$path"` 9708 fi 9709 if test "x$new_path" = x; then 9710 # It's still not found. Now this is an unrecoverable error. 9711 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9712 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9713 has_space=`$ECHO "$complete" | $GREP " "` 9714 if test "x$has_space" != x; then 9715 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9716 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9717 fi 9718 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9719 fi 9720 fi 9721 9722 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 9723 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 9724 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 9725 # "foo.exe" is OK but "foo" is an error. 9726 # 9727 # This test is therefore slightly more accurate than "test -f" to check for file precense. 9728 # It is also a way to make sure we got the proper file name for the real test later on. 9729 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 9730 if test "x$test_shortpath" = x; then 9731 # Short path failed, file does not exist as specified. 9732 # Try adding .exe or .cmd 9733 if test -f "${new_path}.exe"; then 9734 input_to_shortpath="${new_path}.exe" 9735 elif test -f "${new_path}.cmd"; then 9736 input_to_shortpath="${new_path}.cmd" 9737 else 9738 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5 9739 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;} 9740 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 9741 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 9742 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9743 fi 9744 else 9745 input_to_shortpath="$new_path" 9746 fi 9747 9748 # Call helper function which possibly converts this using DOS-style short mode. 9749 # If so, the updated path is stored in $new_path. 9750 new_path="$input_to_shortpath" 9751 9752 input_path="$input_to_shortpath" 9753 # Check if we need to convert this using DOS-style short mode. If the path 9754 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9755 # take no chances and rewrite it. 9756 # Note: m4 eats our [], so we need to use [ and ] instead. 9757 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 9758 if test "x$has_forbidden_chars" != x; then 9759 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9760 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 9761 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 9762 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 9763 # Going to short mode and back again did indeed matter. Since short mode is 9764 # case insensitive, let's make it lowercase to improve readability. 9765 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9766 # Now convert it back to Unix-stile (cygpath) 9767 input_path=`$CYGPATH -u "$shortmode_path"` 9768 new_path="$input_path" 9769 fi 9770 fi 9771 9772 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 9773 if test "x$test_cygdrive_prefix" = x; then 9774 # As a simple fix, exclude /usr/bin since it's not a real path. 9775 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 9776 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 9777 # a path prefixed by /cygdrive for fixpath to work. 9778 new_path="$CYGWIN_ROOT_PATH$input_path" 9779 fi 9780 fi 9781 9782 # remove trailing .exe if any 9783 new_path="${new_path/%.exe/}" 9784 9785 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9786 9787 # First separate the path from the arguments. This will split at the first 9788 # space. 9789 complete="$FOUND_MAKE" 9790 path="${complete%% *}" 9791 tmp="$complete EOL" 9792 arguments="${tmp#* }" 9793 9794 # Input might be given as Windows format, start by converting to 9795 # unix format. 9796 new_path="$path" 9797 9798 windows_path="$new_path" 9799 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9800 unix_path=`$CYGPATH -u "$windows_path"` 9801 new_path="$unix_path" 9802 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9803 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9804 new_path="$unix_path" 9805 fi 9806 9807 9808 # Now try to locate executable using which 9809 new_path=`$WHICH "$new_path" 2> /dev/null` 9810 9811 if test "x$new_path" = x; then 9812 # Oops. Which didn't find the executable. 9813 # The splitting of arguments from the executable at a space might have been incorrect, 9814 # since paths with space are more likely in Windows. Give it another try with the whole 9815 # argument. 9816 path="$complete" 9817 arguments="EOL" 9818 new_path="$path" 9819 9820 windows_path="$new_path" 9821 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9822 unix_path=`$CYGPATH -u "$windows_path"` 9823 new_path="$unix_path" 9824 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9825 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9826 new_path="$unix_path" 9827 fi 9828 9829 9830 new_path=`$WHICH "$new_path" 2> /dev/null` 9831 9832 if test "x$new_path" = x; then 9833 # It's still not found. Now this is an unrecoverable error. 9834 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9835 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9836 has_space=`$ECHO "$complete" | $GREP " "` 9837 if test "x$has_space" != x; then 9838 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 9839 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 9840 fi 9841 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9842 fi 9843 fi 9844 9845 # Now new_path has a complete unix path to the binary 9846 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 9847 # Keep paths in /bin as-is, but remove trailing .exe if any 9848 new_path="${new_path/%.exe/}" 9849 # Do not save /bin paths to all_fixpath_prefixes! 9850 else 9851 # Not in mixed or Windows style, start by that. 9852 new_path=`cmd //c echo $new_path` 9853 9854 input_path="$new_path" 9855 # Check if we need to convert this using DOS-style short mode. If the path 9856 # contains just simple characters, use it. Otherwise (spaces, weird characters), 9857 # take no chances and rewrite it. 9858 # Note: m4 eats our [], so we need to use [ and ] instead. 9859 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 9860 if test "x$has_forbidden_chars" != x; then 9861 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 9862 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 9863 fi 9864 9865 # Output is in $new_path 9866 9867 windows_path="$new_path" 9868 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 9869 unix_path=`$CYGPATH -u "$windows_path"` 9870 new_path="$unix_path" 9871 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 9872 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 9873 new_path="$unix_path" 9874 fi 9875 9876 # remove trailing .exe if any 9877 new_path="${new_path/%.exe/}" 9878 9879 # Save the first 10 bytes of this path to the storage, so fixpath can work. 9880 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 9881 fi 9882 9883 else 9884 # We're on a posix platform. Hooray! :) 9885 # First separate the path from the arguments. This will split at the first 9886 # space. 9887 complete="$FOUND_MAKE" 9888 path="${complete%% *}" 9889 tmp="$complete EOL" 9890 arguments="${tmp#* }" 9891 9892 # Cannot rely on the command "which" here since it doesn't always work. 9893 is_absolute_path=`$ECHO "$path" | $GREP ^/` 9894 if test -z "$is_absolute_path"; then 9895 # Path to executable is not absolute. Find it. 9896 IFS_save="$IFS" 9897 IFS=: 9898 for p in $PATH; do 9899 if test -f "$p/$path" && test -x "$p/$path"; then 9900 new_path="$p/$path" 9901 break 9902 fi 9903 done 9904 IFS="$IFS_save" 9905 else 9906 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 9907 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} 9908 new_path="$path" 9909 fi 9910 9911 if test "x$new_path" = x; then 9912 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 9913 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} 9914 has_space=`$ECHO "$complete" | $GREP " "` 9915 if test "x$has_space" != x; then 9916 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 9917 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 9918 fi 9919 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 9920 fi 9921 fi 9922 9923 # Now join together the path and the arguments once again 9924 if test "x$arguments" != xEOL; then 9925 new_complete="$new_path ${arguments% *}" 9926 else 9927 new_complete="$new_path" 9928 fi 9929 9930 if test "x$complete" != "x$new_complete"; then 9931 FOUND_MAKE="$new_complete" 9932 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 9933 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} 9934 fi 9935 9936 fi 9937 fi 9938 fi 9939 fi 9940 9941 fi 9942 PATH=$OLD_PATH 9943 fi 9944 fi 9945 9946 if test "x$FOUND_MAKE" = x; then 9947 as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5 9948 fi 9949 fi 9950 9951 MAKE=$FOUND_MAKE 9952 9953 { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5 9954 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;} 9955 9956 9957 9958 # Test if find supports -delete 9959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5 9960 $as_echo_n "checking if find supports -delete... " >&6; } 9961 FIND_DELETE="-delete" 9962 9963 DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?) 9964 9965 echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete 9966 9967 TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1` 9968 if test -f $DELETEDIR/TestIfFindSupportsDelete; then 9969 # No, it does not. 9970 rm $DELETEDIR/TestIfFindSupportsDelete 9971 FIND_DELETE="-exec rm \{\} \+" 9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 9973 $as_echo "no" >&6; } 9974 else 9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9976 $as_echo "yes" >&6; } 9977 fi 9978 rmdir $DELETEDIR 9979 9980 9981 9982 # These tools might not be installed by default, 9983 # need hint on how to install them. 9984 9985 for ac_prog in unzip 9986 do 9987 # Extract the first word of "$ac_prog", so it can be a program name with args. 9988 set dummy $ac_prog; ac_word=$2 9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9990 $as_echo_n "checking for $ac_word... " >&6; } 9991 if test "${ac_cv_path_UNZIP+set}" = set; then : 9992 $as_echo_n "(cached) " >&6 9993 else 9994 case $UNZIP in 9995 [\\/]* | ?:[\\/]*) 9996 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path. 9997 ;; 9998 *) 9999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10000 for as_dir in $PATH 10001 do 10002 IFS=$as_save_IFS 10003 test -z "$as_dir" && as_dir=. 10004 for ac_exec_ext in '' $ac_executable_extensions; do 10005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10006 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext" 10007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10008 break 2 10009 fi 10010 done 10011 done 10012 IFS=$as_save_IFS 10013 10014 ;; 10015 esac 10016 fi 10017 UNZIP=$ac_cv_path_UNZIP 10018 if test -n "$UNZIP"; then 10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5 10020 $as_echo "$UNZIP" >&6; } 10021 else 10022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10023 $as_echo "no" >&6; } 10024 fi 10025 10026 10027 test -n "$UNZIP" && break 10028 done 10029 10030 10031 if test "x$UNZIP" = x; then 10032 if test "xunzip" = x; then 10033 PROG_NAME=unzip 10034 else 10035 PROG_NAME=unzip 10036 fi 10037 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10038 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10039 as_fn_error $? "Cannot continue" "$LINENO" 5 10040 fi 10041 10042 10043 10044 for ac_prog in zip 10045 do 10046 # Extract the first word of "$ac_prog", so it can be a program name with args. 10047 set dummy $ac_prog; ac_word=$2 10048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10049 $as_echo_n "checking for $ac_word... " >&6; } 10050 if test "${ac_cv_path_ZIP+set}" = set; then : 10051 $as_echo_n "(cached) " >&6 10052 else 10053 case $ZIP in 10054 [\\/]* | ?:[\\/]*) 10055 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path. 10056 ;; 10057 *) 10058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10059 for as_dir in $PATH 10060 do 10061 IFS=$as_save_IFS 10062 test -z "$as_dir" && as_dir=. 10063 for ac_exec_ext in '' $ac_executable_extensions; do 10064 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10065 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" 10066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10067 break 2 10068 fi 10069 done 10070 done 10071 IFS=$as_save_IFS 10072 10073 ;; 10074 esac 10075 fi 10076 ZIP=$ac_cv_path_ZIP 10077 if test -n "$ZIP"; then 10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5 10079 $as_echo "$ZIP" >&6; } 10080 else 10081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10082 $as_echo "no" >&6; } 10083 fi 10084 10085 10086 test -n "$ZIP" && break 10087 done 10088 10089 10090 if test "x$ZIP" = x; then 10091 if test "xzip" = x; then 10092 PROG_NAME=zip 10093 else 10094 PROG_NAME=zip 10095 fi 10096 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10097 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10098 as_fn_error $? "Cannot continue" "$LINENO" 5 10099 fi 10100 10101 10102 10103 # Non-required basic tools 10104 10105 # Extract the first word of "ldd", so it can be a program name with args. 10106 set dummy ldd; ac_word=$2 10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10108 $as_echo_n "checking for $ac_word... " >&6; } 10109 if test "${ac_cv_path_LDD+set}" = set; then : 10110 $as_echo_n "(cached) " >&6 10111 else 10112 case $LDD in 10113 [\\/]* | ?:[\\/]*) 10114 ac_cv_path_LDD="$LDD" # Let the user override the test with a path. 10115 ;; 10116 *) 10117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10118 for as_dir in $PATH 10119 do 10120 IFS=$as_save_IFS 10121 test -z "$as_dir" && as_dir=. 10122 for ac_exec_ext in '' $ac_executable_extensions; do 10123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10124 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext" 10125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10126 break 2 10127 fi 10128 done 10129 done 10130 IFS=$as_save_IFS 10131 10132 ;; 10133 esac 10134 fi 10135 LDD=$ac_cv_path_LDD 10136 if test -n "$LDD"; then 10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5 10138 $as_echo "$LDD" >&6; } 10139 else 10140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10141 $as_echo "no" >&6; } 10142 fi 10143 10144 10145 if test "x$LDD" = "x"; then 10146 # List shared lib dependencies is used for 10147 # debug output and checking for forbidden dependencies. 10148 # We can build without it. 10149 LDD="true" 10150 fi 10151 # Extract the first word of "otool", so it can be a program name with args. 10152 set dummy otool; ac_word=$2 10153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10154 $as_echo_n "checking for $ac_word... " >&6; } 10155 if test "${ac_cv_path_OTOOL+set}" = set; then : 10156 $as_echo_n "(cached) " >&6 10157 else 10158 case $OTOOL in 10159 [\\/]* | ?:[\\/]*) 10160 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path. 10161 ;; 10162 *) 10163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10164 for as_dir in $PATH 10165 do 10166 IFS=$as_save_IFS 10167 test -z "$as_dir" && as_dir=. 10168 for ac_exec_ext in '' $ac_executable_extensions; do 10169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10170 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext" 10171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10172 break 2 10173 fi 10174 done 10175 done 10176 IFS=$as_save_IFS 10177 10178 ;; 10179 esac 10180 fi 10181 OTOOL=$ac_cv_path_OTOOL 10182 if test -n "$OTOOL"; then 10183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 10184 $as_echo "$OTOOL" >&6; } 10185 else 10186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10187 $as_echo "no" >&6; } 10188 fi 10189 10190 10191 if test "x$OTOOL" = "x"; then 10192 OTOOL="true" 10193 fi 10194 for ac_prog in readelf greadelf 10195 do 10196 # Extract the first word of "$ac_prog", so it can be a program name with args. 10197 set dummy $ac_prog; ac_word=$2 10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10199 $as_echo_n "checking for $ac_word... " >&6; } 10200 if test "${ac_cv_path_READELF+set}" = set; then : 10201 $as_echo_n "(cached) " >&6 10202 else 10203 case $READELF in 10204 [\\/]* | ?:[\\/]*) 10205 ac_cv_path_READELF="$READELF" # Let the user override the test with a path. 10206 ;; 10207 *) 10208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10209 for as_dir in $PATH 10210 do 10211 IFS=$as_save_IFS 10212 test -z "$as_dir" && as_dir=. 10213 for ac_exec_ext in '' $ac_executable_extensions; do 10214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10215 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext" 10216 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10217 break 2 10218 fi 10219 done 10220 done 10221 IFS=$as_save_IFS 10222 10223 ;; 10224 esac 10225 fi 10226 READELF=$ac_cv_path_READELF 10227 if test -n "$READELF"; then 10228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 10229 $as_echo "$READELF" >&6; } 10230 else 10231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10232 $as_echo "no" >&6; } 10233 fi 10234 10235 10236 test -n "$READELF" && break 10237 done 10238 10239 # Extract the first word of "hg", so it can be a program name with args. 10240 set dummy hg; ac_word=$2 10241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10242 $as_echo_n "checking for $ac_word... " >&6; } 10243 if test "${ac_cv_path_HG+set}" = set; then : 10244 $as_echo_n "(cached) " >&6 10245 else 10246 case $HG in 10247 [\\/]* | ?:[\\/]*) 10248 ac_cv_path_HG="$HG" # Let the user override the test with a path. 10249 ;; 10250 *) 10251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10252 for as_dir in $PATH 10253 do 10254 IFS=$as_save_IFS 10255 test -z "$as_dir" && as_dir=. 10256 for ac_exec_ext in '' $ac_executable_extensions; do 10257 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10258 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext" 10259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10260 break 2 10261 fi 10262 done 10263 done 10264 IFS=$as_save_IFS 10265 10266 ;; 10267 esac 10268 fi 10269 HG=$ac_cv_path_HG 10270 if test -n "$HG"; then 10271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5 10272 $as_echo "$HG" >&6; } 10273 else 10274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10275 $as_echo "no" >&6; } 10276 fi 10277 10278 10279 # Extract the first word of "stat", so it can be a program name with args. 10280 set dummy stat; ac_word=$2 10281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10282 $as_echo_n "checking for $ac_word... " >&6; } 10283 if test "${ac_cv_path_STAT+set}" = set; then : 10284 $as_echo_n "(cached) " >&6 10285 else 10286 case $STAT in 10287 [\\/]* | ?:[\\/]*) 10288 ac_cv_path_STAT="$STAT" # Let the user override the test with a path. 10289 ;; 10290 *) 10291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10292 for as_dir in $PATH 10293 do 10294 IFS=$as_save_IFS 10295 test -z "$as_dir" && as_dir=. 10296 for ac_exec_ext in '' $ac_executable_extensions; do 10297 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10298 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext" 10299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10300 break 2 10301 fi 10302 done 10303 done 10304 IFS=$as_save_IFS 10305 10306 ;; 10307 esac 10308 fi 10309 STAT=$ac_cv_path_STAT 10310 if test -n "$STAT"; then 10311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5 10312 $as_echo "$STAT" >&6; } 10313 else 10314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10315 $as_echo "no" >&6; } 10316 fi 10317 10318 10319 # Extract the first word of "time", so it can be a program name with args. 10320 set dummy time; ac_word=$2 10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10322 $as_echo_n "checking for $ac_word... " >&6; } 10323 if test "${ac_cv_path_TIME+set}" = set; then : 10324 $as_echo_n "(cached) " >&6 10325 else 10326 case $TIME in 10327 [\\/]* | ?:[\\/]*) 10328 ac_cv_path_TIME="$TIME" # Let the user override the test with a path. 10329 ;; 10330 *) 10331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10332 for as_dir in $PATH 10333 do 10334 IFS=$as_save_IFS 10335 test -z "$as_dir" && as_dir=. 10336 for ac_exec_ext in '' $ac_executable_extensions; do 10337 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10338 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext" 10339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10340 break 2 10341 fi 10342 done 10343 done 10344 IFS=$as_save_IFS 10345 10346 ;; 10347 esac 10348 fi 10349 TIME=$ac_cv_path_TIME 10350 if test -n "$TIME"; then 10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5 10352 $as_echo "$TIME" >&6; } 10353 else 10354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10355 $as_echo "no" >&6; } 10356 fi 10357 10358 10359 10360 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 10361 10362 for ac_prog in comm 10363 do 10364 # Extract the first word of "$ac_prog", so it can be a program name with args. 10365 set dummy $ac_prog; ac_word=$2 10366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10367 $as_echo_n "checking for $ac_word... " >&6; } 10368 if test "${ac_cv_path_COMM+set}" = set; then : 10369 $as_echo_n "(cached) " >&6 10370 else 10371 case $COMM in 10372 [\\/]* | ?:[\\/]*) 10373 ac_cv_path_COMM="$COMM" # Let the user override the test with a path. 10374 ;; 10375 *) 10376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10377 for as_dir in $PATH 10378 do 10379 IFS=$as_save_IFS 10380 test -z "$as_dir" && as_dir=. 10381 for ac_exec_ext in '' $ac_executable_extensions; do 10382 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10383 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext" 10384 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10385 break 2 10386 fi 10387 done 10388 done 10389 IFS=$as_save_IFS 10390 10391 ;; 10392 esac 10393 fi 10394 COMM=$ac_cv_path_COMM 10395 if test -n "$COMM"; then 10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5 10397 $as_echo "$COMM" >&6; } 10398 else 10399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10400 $as_echo "no" >&6; } 10401 fi 10402 10403 10404 test -n "$COMM" && break 10405 done 10406 10407 10408 if test "x$COMM" = x; then 10409 if test "xcomm" = x; then 10410 PROG_NAME=comm 10411 else 10412 PROG_NAME=comm 10413 fi 10414 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10415 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10416 as_fn_error $? "Cannot continue" "$LINENO" 5 10417 fi 10418 10419 10420 fi 10421 10422 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 10423 10424 for ac_prog in xattr 10425 do 10426 # Extract the first word of "$ac_prog", so it can be a program name with args. 10427 set dummy $ac_prog; ac_word=$2 10428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10429 $as_echo_n "checking for $ac_word... " >&6; } 10430 if test "${ac_cv_path_XATTR+set}" = set; then : 10431 $as_echo_n "(cached) " >&6 10432 else 10433 case $XATTR in 10434 [\\/]* | ?:[\\/]*) 10435 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path. 10436 ;; 10437 *) 10438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10439 for as_dir in $PATH 10440 do 10441 IFS=$as_save_IFS 10442 test -z "$as_dir" && as_dir=. 10443 for ac_exec_ext in '' $ac_executable_extensions; do 10444 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10445 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext" 10446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10447 break 2 10448 fi 10449 done 10450 done 10451 IFS=$as_save_IFS 10452 10453 ;; 10454 esac 10455 fi 10456 XATTR=$ac_cv_path_XATTR 10457 if test -n "$XATTR"; then 10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5 10459 $as_echo "$XATTR" >&6; } 10460 else 10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10462 $as_echo "no" >&6; } 10463 fi 10464 10465 10466 test -n "$XATTR" && break 10467 done 10468 10469 10470 if test "x$XATTR" = x; then 10471 if test "xxattr" = x; then 10472 PROG_NAME=xattr 10473 else 10474 PROG_NAME=xattr 10475 fi 10476 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 10477 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 10478 as_fn_error $? "Cannot continue" "$LINENO" 5 10479 fi 10480 10481 10482 fi 10483 10484 10485 # Check if pkg-config is available. 10486 10487 10488 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 10489 if test -n "$ac_tool_prefix"; then 10490 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. 10491 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 10492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10493 $as_echo_n "checking for $ac_word... " >&6; } 10494 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : 10495 $as_echo_n "(cached) " >&6 10496 else 10497 case $PKG_CONFIG in 10498 [\\/]* | ?:[\\/]*) 10499 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. 10500 ;; 10501 *) 10502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10503 for as_dir in $PATH 10504 do 10505 IFS=$as_save_IFS 10506 test -z "$as_dir" && as_dir=. 10507 for ac_exec_ext in '' $ac_executable_extensions; do 10508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10509 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 10510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10511 break 2 10512 fi 10513 done 10514 done 10515 IFS=$as_save_IFS 10516 10517 ;; 10518 esac 10519 fi 10520 PKG_CONFIG=$ac_cv_path_PKG_CONFIG 10521 if test -n "$PKG_CONFIG"; then 10522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 10523 $as_echo "$PKG_CONFIG" >&6; } 10524 else 10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10526 $as_echo "no" >&6; } 10527 fi 10528 10529 10530 fi 10531 if test -z "$ac_cv_path_PKG_CONFIG"; then 10532 ac_pt_PKG_CONFIG=$PKG_CONFIG 10533 # Extract the first word of "pkg-config", so it can be a program name with args. 10534 set dummy pkg-config; ac_word=$2 10535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10536 $as_echo_n "checking for $ac_word... " >&6; } 10537 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : 10538 $as_echo_n "(cached) " >&6 10539 else 10540 case $ac_pt_PKG_CONFIG in 10541 [\\/]* | ?:[\\/]*) 10542 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. 10543 ;; 10544 *) 10545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10546 for as_dir in $PATH 10547 do 10548 IFS=$as_save_IFS 10549 test -z "$as_dir" && as_dir=. 10550 for ac_exec_ext in '' $ac_executable_extensions; do 10551 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10552 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 10553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10554 break 2 10555 fi 10556 done 10557 done 10558 IFS=$as_save_IFS 10559 10560 ;; 10561 esac 10562 fi 10563 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG 10564 if test -n "$ac_pt_PKG_CONFIG"; then 10565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 10566 $as_echo "$ac_pt_PKG_CONFIG" >&6; } 10567 else 10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10569 $as_echo "no" >&6; } 10570 fi 10571 10572 if test "x$ac_pt_PKG_CONFIG" = x; then 10573 PKG_CONFIG="" 10574 else 10575 case $cross_compiling:$ac_tool_warned in 10576 yes:) 10577 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 10578 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 10579 ac_tool_warned=yes ;; 10580 esac 10581 PKG_CONFIG=$ac_pt_PKG_CONFIG 10582 fi 10583 else 10584 PKG_CONFIG="$ac_cv_path_PKG_CONFIG" 10585 fi 10586 10587 fi 10588 if test -n "$PKG_CONFIG"; then 10589 _pkg_min_version=0.9.0 10590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 10591 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } 10592 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 10593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10594 $as_echo "yes" >&6; } 10595 else 10596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10597 $as_echo "no" >&6; } 10598 PKG_CONFIG="" 10599 fi 10600 10601 fi 10602 10603 # After basic tools have been setup, we can check build os specific details. 10604 10605 ############################################################################### 10606 10607 # Note that this is the build platform OS version! 10608 10609 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`" 10610 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`" 10611 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`" 10612 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`" 10613 10614 10615 10616 10617 10618 # Setup builddeps, for automatic downloading of tools we need. 10619 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in 10620 # boot-jdk setup, but we need to have basic tools setup first. 10621 10622 10623 # Check whether --with-builddeps-conf was given. 10624 if test "${with_builddeps_conf+set}" = set; then : 10625 withval=$with_builddeps_conf; 10626 fi 10627 10628 10629 10630 # Check whether --with-builddeps-server was given. 10631 if test "${with_builddeps_server+set}" = set; then : 10632 withval=$with_builddeps_server; 10633 fi 10634 10635 10636 10637 # Check whether --with-builddeps-dir was given. 10638 if test "${with_builddeps_dir+set}" = set; then : 10639 withval=$with_builddeps_dir; 10640 else 10641 with_builddeps_dir=/localhome/builddeps 10642 fi 10643 10644 10645 10646 # Check whether --with-builddeps-group was given. 10647 if test "${with_builddeps_group+set}" = set; then : 10648 withval=$with_builddeps_group; 10649 fi 10650 10651 10652 10653 10654 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 10655 if test "x$with_builddeps_conf" != x; then 10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5 10657 $as_echo_n "checking for supplied builddeps configuration file... " >&6; } 10658 builddepsfile=$with_builddeps_conf 10659 if test -s $builddepsfile; then 10660 . $builddepsfile 10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5 10662 $as_echo "loaded!" >&6; } 10663 else 10664 as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5 10665 fi 10666 else 10667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5 10668 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; } 10669 builddepsfile=`mktemp` 10670 touch $builddepsfile 10671 # Put all found confs into a single file. 10672 find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile 10673 # Source the file to acquire the variables 10674 if test -s $builddepsfile; then 10675 . $builddepsfile 10676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5 10677 $as_echo "found at least one!" >&6; } 10678 else 10679 as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5 10680 fi 10681 fi 10682 # Create build and target names that use _ instead of "-" and ".". 10683 # This is necessary to use them in variable names. 10684 build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` 10685 target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` 10686 # Extract rewrite information for build and target 10687 eval rewritten_build=\${REWRITE_${build_var}} 10688 if test "x$rewritten_build" = x; then 10689 rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME} 10690 echo Build stays the same $rewritten_build 10691 else 10692 echo Rewriting build for builddeps into $rewritten_build 10693 fi 10694 eval rewritten_target=\${REWRITE_${target_var}} 10695 if test "x$rewritten_target" = x; then 10696 rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME} 10697 echo Target stays the same $rewritten_target 10698 else 10699 echo Rewriting target for builddeps into $rewritten_target 10700 fi 10701 rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'` 10702 rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'` 10703 fi 10704 for ac_prog in 7z unzip 10705 do 10706 # Extract the first word of "$ac_prog", so it can be a program name with args. 10707 set dummy $ac_prog; ac_word=$2 10708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10709 $as_echo_n "checking for $ac_word... " >&6; } 10710 if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then : 10711 $as_echo_n "(cached) " >&6 10712 else 10713 if test -n "$BDEPS_UNZIP"; then 10714 ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test. 10715 else 10716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10717 for as_dir in $PATH 10718 do 10719 IFS=$as_save_IFS 10720 test -z "$as_dir" && as_dir=. 10721 for ac_exec_ext in '' $ac_executable_extensions; do 10722 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10723 ac_cv_prog_BDEPS_UNZIP="$ac_prog" 10724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10725 break 2 10726 fi 10727 done 10728 done 10729 IFS=$as_save_IFS 10730 10731 fi 10732 fi 10733 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP 10734 if test -n "$BDEPS_UNZIP"; then 10735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5 10736 $as_echo "$BDEPS_UNZIP" >&6; } 10737 else 10738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10739 $as_echo "no" >&6; } 10740 fi 10741 10742 10743 test -n "$BDEPS_UNZIP" && break 10744 done 10745 10746 if test "x$BDEPS_UNZIP" = x7z; then 10747 BDEPS_UNZIP="7z x" 10748 fi 10749 10750 for ac_prog in wget lftp ftp 10751 do 10752 # Extract the first word of "$ac_prog", so it can be a program name with args. 10753 set dummy $ac_prog; ac_word=$2 10754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10755 $as_echo_n "checking for $ac_word... " >&6; } 10756 if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then : 10757 $as_echo_n "(cached) " >&6 10758 else 10759 if test -n "$BDEPS_FTP"; then 10760 ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test. 10761 else 10762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10763 for as_dir in $PATH 10764 do 10765 IFS=$as_save_IFS 10766 test -z "$as_dir" && as_dir=. 10767 for ac_exec_ext in '' $ac_executable_extensions; do 10768 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 10769 ac_cv_prog_BDEPS_FTP="$ac_prog" 10770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 10771 break 2 10772 fi 10773 done 10774 done 10775 IFS=$as_save_IFS 10776 10777 fi 10778 fi 10779 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP 10780 if test -n "$BDEPS_FTP"; then 10781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5 10782 $as_echo "$BDEPS_FTP" >&6; } 10783 else 10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 10785 $as_echo "no" >&6; } 10786 fi 10787 10788 10789 test -n "$BDEPS_FTP" && break 10790 done 10791 10792 10793 10794 ############################################################################### 10795 # 10796 # Determine OpenJDK variants, options and version numbers. 10797 # 10798 ############################################################################### 10799 10800 # We need build & target for this. 10801 10802 10803 ############################################################################### 10804 # 10805 # Should we build a JDK/JVM with headful support (ie a graphical ui)? 10806 # We always build headless support. 10807 # 10808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5 10809 $as_echo_n "checking headful support... " >&6; } 10810 # Check whether --enable-headful was given. 10811 if test "${enable_headful+set}" = set; then : 10812 enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful} 10813 else 10814 SUPPORT_HEADFUL=yes 10815 fi 10816 10817 10818 SUPPORT_HEADLESS=yes 10819 BUILD_HEADLESS="BUILD_HEADLESS:=true" 10820 10821 if test "x$SUPPORT_HEADFUL" = xyes; then 10822 # We are building both headful and headless. 10823 headful_msg="inlude support for both headful and headless" 10824 fi 10825 10826 if test "x$SUPPORT_HEADFUL" = xno; then 10827 # Thus we are building headless only. 10828 BUILD_HEADLESS="BUILD_HEADLESS:=true" 10829 headful_msg="headless only" 10830 fi 10831 10832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5 10833 $as_echo "$headful_msg" >&6; } 10834 10835 10836 10837 10838 10839 # Control wether Hotspot runs Queens test after build. 10840 # Check whether --enable-hotspot-test-in-build was given. 10841 if test "${enable_hotspot_test_in_build+set}" = set; then : 10842 enableval=$enable_hotspot_test_in_build; 10843 else 10844 enable_hotspot_test_in_build=no 10845 fi 10846 10847 if test "x$enable_hotspot_test_in_build" = "xyes"; then 10848 TEST_IN_BUILD=true 10849 else 10850 TEST_IN_BUILD=false 10851 fi 10852 10853 10854 ############################################################################### 10855 # 10856 # Choose cacerts source file 10857 # 10858 10859 # Check whether --with-cacerts-file was given. 10860 if test "${with_cacerts_file+set}" = set; then : 10861 withval=$with_cacerts_file; 10862 fi 10863 10864 if test "x$with_cacerts_file" != x; then 10865 CACERTS_FILE=$with_cacerts_file 10866 else 10867 if test "x$OPENJDK" = "xtrue"; then 10868 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts 10869 else 10870 CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal 10871 fi 10872 fi 10873 10874 10875 ############################################################################### 10876 # 10877 # Enable or disable unlimited crypto 10878 # 10879 # Check whether --enable-unlimited-crypto was given. 10880 if test "${enable_unlimited_crypto+set}" = set; then : 10881 enableval=$enable_unlimited_crypto; 10882 else 10883 enable_unlimited_crypto=no 10884 fi 10885 10886 if test "x$enable_unlimited_crypto" = "xyes"; then 10887 UNLIMITED_CRYPTO=true 10888 else 10889 UNLIMITED_CRYPTO=false 10890 fi 10891 10892 10893 ############################################################################### 10894 # 10895 # Enable or disable the elliptic curve crypto implementation 10896 # 10897 10898 10899 ############################################################################### 10900 # 10901 # Compress jars 10902 # 10903 COMPRESS_JARS=false 10904 10905 10906 10907 10908 # Source the version numbers 10909 . $AUTOCONF_DIR/version-numbers 10910 10911 # Get the settings from parameters 10912 10913 # Check whether --with-milestone was given. 10914 if test "${with_milestone+set}" = set; then : 10915 withval=$with_milestone; 10916 fi 10917 10918 if test "x$with_milestone" = xyes; then 10919 as_fn_error $? "Milestone must have a value" "$LINENO" 5 10920 elif test "x$with_milestone" != x; then 10921 MILESTONE="$with_milestone" 10922 fi 10923 if test "x$MILESTONE" = x; then 10924 MILESTONE=internal 10925 fi 10926 10927 10928 # Check whether --with-build-number was given. 10929 if test "${with_build_number+set}" = set; then : 10930 withval=$with_build_number; 10931 fi 10932 10933 if test "x$with_build_number" = xyes; then 10934 as_fn_error $? "Build number must have a value" "$LINENO" 5 10935 elif test "x$with_build_number" != x; then 10936 JDK_BUILD_NUMBER="$with_build_number" 10937 fi 10938 if test "x$JDK_BUILD_NUMBER" = x; then 10939 JDK_BUILD_NUMBER=b00 10940 fi 10941 10942 10943 # Check whether --with-user-release-suffix was given. 10944 if test "${with_user_release_suffix+set}" = set; then : 10945 withval=$with_user_release_suffix; 10946 fi 10947 10948 if test "x$with_user_release_suffix" = xyes; then 10949 as_fn_error $? "Release suffix must have a value" "$LINENO" 5 10950 elif test "x$with_user_release_suffix" != x; then 10951 USER_RELEASE_SUFFIX="$with_user_release_suffix" 10952 else 10953 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` 10954 # Avoid [:alnum:] since it depends on the locale. 10955 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` 10956 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 10957 fi 10958 10959 10960 # Now set the JDK version, milestone, build number etc. 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 COPYRIGHT_YEAR=`date +'%Y'` 10976 10977 10978 if test "x$JDK_UPDATE_VERSION" != x; then 10979 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" 10980 else 10981 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" 10982 fi 10983 10984 10985 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` 10986 10987 10988 10989 ############################################################################### 10990 # 10991 # Setup BootJDK, used to bootstrap the build. 10992 # 10993 ############################################################################### 10994 10995 10996 BOOT_JDK_FOUND=no 10997 10998 # Check whether --with-boot-jdk was given. 10999 if test "${with_boot_jdk+set}" = set; then : 11000 withval=$with_boot_jdk; 11001 fi 11002 11003 11004 # We look for the Boot JDK through various means, going from more certain to 11005 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if 11006 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we 11007 # must check if this is indeed valid; otherwise we'll continue looking. 11008 11009 # Test: Is bootjdk explicitely set by command line arguments? 11010 11011 if test "x$BOOT_JDK_FOUND" = xno; then 11012 # Now execute the test 11013 11014 if test "x$with_boot_jdk" != x; then 11015 BOOT_JDK=$with_boot_jdk 11016 BOOT_JDK_FOUND=maybe 11017 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5 11018 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;} 11019 fi 11020 11021 11022 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11023 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11024 # Do we have a bin/java? 11025 if test ! -x "$BOOT_JDK/bin/java"; then 11026 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11027 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11028 BOOT_JDK_FOUND=no 11029 else 11030 # Do we have a bin/javac? 11031 if test ! -x "$BOOT_JDK/bin/javac"; then 11032 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11034 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11035 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11036 BOOT_JDK_FOUND=no 11037 else 11038 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11039 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11040 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11041 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11042 BOOT_JDK_FOUND=no 11043 else 11044 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11045 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11046 11047 # Extra M4 quote needed to protect [] in grep expression. 11048 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11049 if test "x$FOUND_VERSION_78" = x; then 11050 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11052 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11053 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11054 BOOT_JDK_FOUND=no 11055 else 11056 # We're done! :-) 11057 BOOT_JDK_FOUND=yes 11058 11059 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11060 11061 # Input might be given as Windows format, start by converting to 11062 # unix format. 11063 path="$BOOT_JDK" 11064 new_path=`$CYGPATH -u "$path"` 11065 11066 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11067 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11068 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11069 # "foo.exe" is OK but "foo" is an error. 11070 # 11071 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11072 # It is also a way to make sure we got the proper file name for the real test later on. 11073 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11074 if test "x$test_shortpath" = x; then 11075 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11076 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11077 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11078 fi 11079 11080 # Call helper function which possibly converts this using DOS-style short mode. 11081 # If so, the updated path is stored in $new_path. 11082 11083 input_path="$new_path" 11084 # Check if we need to convert this using DOS-style short mode. If the path 11085 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11086 # take no chances and rewrite it. 11087 # Note: m4 eats our [], so we need to use [ and ] instead. 11088 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11089 if test "x$has_forbidden_chars" != x; then 11090 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11091 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11092 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11093 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11094 # Going to short mode and back again did indeed matter. Since short mode is 11095 # case insensitive, let's make it lowercase to improve readability. 11096 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11097 # Now convert it back to Unix-stile (cygpath) 11098 input_path=`$CYGPATH -u "$shortmode_path"` 11099 new_path="$input_path" 11100 fi 11101 fi 11102 11103 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11104 if test "x$test_cygdrive_prefix" = x; then 11105 # As a simple fix, exclude /usr/bin since it's not a real path. 11106 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11107 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11108 # a path prefixed by /cygdrive for fixpath to work. 11109 new_path="$CYGWIN_ROOT_PATH$input_path" 11110 fi 11111 fi 11112 11113 11114 if test "x$path" != "x$new_path"; then 11115 BOOT_JDK="$new_path" 11116 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11117 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11118 fi 11119 11120 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11121 11122 path="$BOOT_JDK" 11123 has_colon=`$ECHO $path | $GREP ^.:` 11124 new_path="$path" 11125 if test "x$has_colon" = x; then 11126 # Not in mixed or Windows style, start by that. 11127 new_path=`cmd //c echo $path` 11128 fi 11129 11130 11131 input_path="$new_path" 11132 # Check if we need to convert this using DOS-style short mode. If the path 11133 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11134 # take no chances and rewrite it. 11135 # Note: m4 eats our [], so we need to use [ and ] instead. 11136 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11137 if test "x$has_forbidden_chars" != x; then 11138 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11139 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11140 fi 11141 11142 11143 windows_path="$new_path" 11144 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11145 unix_path=`$CYGPATH -u "$windows_path"` 11146 new_path="$unix_path" 11147 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11148 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11149 new_path="$unix_path" 11150 fi 11151 11152 if test "x$path" != "x$new_path"; then 11153 BOOT_JDK="$new_path" 11154 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11155 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11156 fi 11157 11158 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11159 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11160 11161 else 11162 # We're on a posix platform. Hooray! :) 11163 path="$BOOT_JDK" 11164 11165 if test ! -f "$path" && test ! -d "$path"; then 11166 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11167 fi 11168 11169 has_space=`$ECHO "$path" | $GREP " "` 11170 if test "x$has_space" != x; then 11171 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11173 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11174 fi 11175 fi 11176 11177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11178 $as_echo_n "checking for Boot JDK... " >&6; } 11179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11180 $as_echo "$BOOT_JDK" >&6; } 11181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11182 $as_echo_n "checking Boot JDK version... " >&6; } 11183 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11185 $as_echo "$BOOT_JDK_VERSION" >&6; } 11186 fi # end check jdk version 11187 fi # end check rt.jar 11188 fi # end check javac 11189 fi # end check java 11190 fi # end check boot jdk found 11191 fi 11192 11193 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then 11194 # Having specified an argument which is incorrect will produce an instant failure; 11195 # we should not go on looking 11196 as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5 11197 fi 11198 11199 # Test: Is bootjdk available from builddeps? 11200 11201 if test "x$BOOT_JDK_FOUND" = xno; then 11202 # Now execute the test 11203 11204 11205 11206 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 11207 # Source the builddeps file again, to make sure it uses the latest variables! 11208 . $builddepsfile 11209 # Look for a target and build machine specific resource! 11210 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 11211 if test "x$resource" = x; then 11212 # Ok, lets instead look for a target specific resource 11213 eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}} 11214 fi 11215 if test "x$resource" = x; then 11216 # Ok, lets instead look for a build specific resource 11217 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}} 11218 fi 11219 if test "x$resource" = x; then 11220 # Ok, lets instead look for a generic resource 11221 # (The bootjdk comes from M4 and not the shell, thus no need for eval here.) 11222 resource=${builddep_bootjdk} 11223 fi 11224 if test "x$resource" != x; then 11225 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5 11226 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;} 11227 # If the resource in the builddeps.conf file is an existing directory, 11228 # for example /java/linux/cups 11229 if test -d ${resource}; then 11230 depdir=${resource} 11231 else 11232 11233 # bootjdk is for example mymodule 11234 # $resource is for example libs/general/libmymod_1_2_3.zip 11235 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 11236 # $with_builddeps_dir is for example /localhome/builddeps 11237 # depdir is the name of the variable into which we store the depdir, eg MYMOD 11238 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 11239 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 11240 filename=`basename $resource` 11241 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 11242 filebase=${filename%%.*} 11243 extension=${filename#*.} 11244 installdir=$with_builddeps_dir/$filebase 11245 if test ! -f $installdir/$filename.unpacked; then 11246 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5 11247 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;} 11248 if test ! -d $installdir; then 11249 mkdir -p $installdir 11250 fi 11251 if test ! -d $installdir; then 11252 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 11253 fi 11254 tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX` 11255 touch $tmpfile 11256 if test ! -f $tmpfile; then 11257 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 11258 fi 11259 11260 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 11261 # $tmpfile is the local file name for the downloaded file. 11262 VALID_TOOL=no 11263 if test "x$BDEPS_FTP" = xwget; then 11264 VALID_TOOL=yes 11265 wget -O $tmpfile $with_builddeps_server/$resource 11266 fi 11267 if test "x$BDEPS_FTP" = xlftp; then 11268 VALID_TOOL=yes 11269 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 11270 fi 11271 if test "x$BDEPS_FTP" = xftp; then 11272 VALID_TOOL=yes 11273 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 11274 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 11275 FTPUSERPWD=${FTPSERVER%%@*} 11276 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 11277 FTPUSER=${userpwd%%:*} 11278 FTPPWD=${userpwd#*@} 11279 FTPSERVER=${FTPSERVER#*@} 11280 else 11281 FTPUSER=ftp 11282 FTPPWD=ftp 11283 fi 11284 # the "pass" command does not work on some 11285 # ftp clients (read ftp.exe) but if it works, 11286 # passive mode is better! 11287 (\ 11288 echo "user $FTPUSER $FTPPWD" ;\ 11289 echo "pass" ;\ 11290 echo "bin" ;\ 11291 echo "get $FTPPATH $tmpfile" ;\ 11292 ) | ftp -in $FTPSERVER 11293 fi 11294 if test "x$VALID_TOOL" != xyes; then 11295 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 11296 fi 11297 11298 mv $tmpfile $installdir/$filename 11299 if test ! -s $installdir/$filename; then 11300 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 11301 fi 11302 case "$extension" in 11303 zip) echo "Unzipping $installdir/$filename..." 11304 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 11305 ;; 11306 tar.gz) echo "Untaring $installdir/$filename..." 11307 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 11308 ;; 11309 tgz) echo "Untaring $installdir/$filename..." 11310 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 11311 ;; 11312 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 11313 ;; 11314 esac 11315 fi 11316 if test -f $installdir/$filename.unpacked; then 11317 depdir=$installdir 11318 fi 11319 11320 fi 11321 # Source the builddeps file again, because in the previous command, the depdir 11322 # was updated to point at the current build dependency install directory. 11323 . $builddepsfile 11324 # Now extract variables from the builddeps.conf files. 11325 theroot=${builddep_bootjdk_ROOT} 11326 thecflags=${builddep_bootjdk_CFLAGS} 11327 thelibs=${builddep_bootjdk_LIBS} 11328 if test "x$depdir" = x; then 11329 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5 11330 fi 11331 BOOT_JDK=$depdir 11332 if test "x$theroot" != x; then 11333 BOOT_JDK="$theroot" 11334 fi 11335 if test "x$thecflags" != x; then 11336 BOOT_JDK_CFLAGS="$thecflags" 11337 fi 11338 if test "x$thelibs" != x; then 11339 BOOT_JDK_LIBS="$thelibs" 11340 fi 11341 BOOT_JDK_FOUND=maybe 11342 else BOOT_JDK_FOUND=no 11343 11344 fi 11345 else BOOT_JDK_FOUND=no 11346 11347 fi 11348 11349 11350 11351 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11352 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11353 # Do we have a bin/java? 11354 if test ! -x "$BOOT_JDK/bin/java"; then 11355 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11356 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11357 BOOT_JDK_FOUND=no 11358 else 11359 # Do we have a bin/javac? 11360 if test ! -x "$BOOT_JDK/bin/javac"; then 11361 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11363 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11364 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11365 BOOT_JDK_FOUND=no 11366 else 11367 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11368 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11369 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11370 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11371 BOOT_JDK_FOUND=no 11372 else 11373 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11374 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11375 11376 # Extra M4 quote needed to protect [] in grep expression. 11377 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11378 if test "x$FOUND_VERSION_78" = x; then 11379 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11381 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11382 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11383 BOOT_JDK_FOUND=no 11384 else 11385 # We're done! :-) 11386 BOOT_JDK_FOUND=yes 11387 11388 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11389 11390 # Input might be given as Windows format, start by converting to 11391 # unix format. 11392 path="$BOOT_JDK" 11393 new_path=`$CYGPATH -u "$path"` 11394 11395 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11396 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11397 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11398 # "foo.exe" is OK but "foo" is an error. 11399 # 11400 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11401 # It is also a way to make sure we got the proper file name for the real test later on. 11402 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11403 if test "x$test_shortpath" = x; then 11404 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11405 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11406 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11407 fi 11408 11409 # Call helper function which possibly converts this using DOS-style short mode. 11410 # If so, the updated path is stored in $new_path. 11411 11412 input_path="$new_path" 11413 # Check if we need to convert this using DOS-style short mode. If the path 11414 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11415 # take no chances and rewrite it. 11416 # Note: m4 eats our [], so we need to use [ and ] instead. 11417 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11418 if test "x$has_forbidden_chars" != x; then 11419 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11420 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11421 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11422 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11423 # Going to short mode and back again did indeed matter. Since short mode is 11424 # case insensitive, let's make it lowercase to improve readability. 11425 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11426 # Now convert it back to Unix-stile (cygpath) 11427 input_path=`$CYGPATH -u "$shortmode_path"` 11428 new_path="$input_path" 11429 fi 11430 fi 11431 11432 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11433 if test "x$test_cygdrive_prefix" = x; then 11434 # As a simple fix, exclude /usr/bin since it's not a real path. 11435 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11436 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11437 # a path prefixed by /cygdrive for fixpath to work. 11438 new_path="$CYGWIN_ROOT_PATH$input_path" 11439 fi 11440 fi 11441 11442 11443 if test "x$path" != "x$new_path"; then 11444 BOOT_JDK="$new_path" 11445 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11446 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11447 fi 11448 11449 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11450 11451 path="$BOOT_JDK" 11452 has_colon=`$ECHO $path | $GREP ^.:` 11453 new_path="$path" 11454 if test "x$has_colon" = x; then 11455 # Not in mixed or Windows style, start by that. 11456 new_path=`cmd //c echo $path` 11457 fi 11458 11459 11460 input_path="$new_path" 11461 # Check if we need to convert this using DOS-style short mode. If the path 11462 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11463 # take no chances and rewrite it. 11464 # Note: m4 eats our [], so we need to use [ and ] instead. 11465 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11466 if test "x$has_forbidden_chars" != x; then 11467 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11468 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11469 fi 11470 11471 11472 windows_path="$new_path" 11473 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11474 unix_path=`$CYGPATH -u "$windows_path"` 11475 new_path="$unix_path" 11476 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11477 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11478 new_path="$unix_path" 11479 fi 11480 11481 if test "x$path" != "x$new_path"; then 11482 BOOT_JDK="$new_path" 11483 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11484 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11485 fi 11486 11487 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11488 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11489 11490 else 11491 # We're on a posix platform. Hooray! :) 11492 path="$BOOT_JDK" 11493 11494 if test ! -f "$path" && test ! -d "$path"; then 11495 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11496 fi 11497 11498 has_space=`$ECHO "$path" | $GREP " "` 11499 if test "x$has_space" != x; then 11500 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11501 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11502 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11503 fi 11504 fi 11505 11506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11507 $as_echo_n "checking for Boot JDK... " >&6; } 11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11509 $as_echo "$BOOT_JDK" >&6; } 11510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11511 $as_echo_n "checking Boot JDK version... " >&6; } 11512 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11514 $as_echo "$BOOT_JDK_VERSION" >&6; } 11515 fi # end check jdk version 11516 fi # end check rt.jar 11517 fi # end check javac 11518 fi # end check java 11519 fi # end check boot jdk found 11520 fi 11521 11522 11523 # Test: Is $JAVA_HOME set? 11524 11525 if test "x$BOOT_JDK_FOUND" = xno; then 11526 # Now execute the test 11527 11528 if test "x$JAVA_HOME" != x; then 11529 JAVA_HOME_PROCESSED="$JAVA_HOME" 11530 11531 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11532 11533 # Input might be given as Windows format, start by converting to 11534 # unix format. 11535 path="$JAVA_HOME_PROCESSED" 11536 new_path=`$CYGPATH -u "$path"` 11537 11538 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11539 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11540 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11541 # "foo.exe" is OK but "foo" is an error. 11542 # 11543 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11544 # It is also a way to make sure we got the proper file name for the real test later on. 11545 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11546 if test "x$test_shortpath" = x; then 11547 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5 11548 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;} 11549 as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5 11550 fi 11551 11552 # Call helper function which possibly converts this using DOS-style short mode. 11553 # If so, the updated path is stored in $new_path. 11554 11555 input_path="$new_path" 11556 # Check if we need to convert this using DOS-style short mode. If the path 11557 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11558 # take no chances and rewrite it. 11559 # Note: m4 eats our [], so we need to use [ and ] instead. 11560 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11561 if test "x$has_forbidden_chars" != x; then 11562 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11563 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11564 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11565 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11566 # Going to short mode and back again did indeed matter. Since short mode is 11567 # case insensitive, let's make it lowercase to improve readability. 11568 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11569 # Now convert it back to Unix-stile (cygpath) 11570 input_path=`$CYGPATH -u "$shortmode_path"` 11571 new_path="$input_path" 11572 fi 11573 fi 11574 11575 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11576 if test "x$test_cygdrive_prefix" = x; then 11577 # As a simple fix, exclude /usr/bin since it's not a real path. 11578 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11579 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11580 # a path prefixed by /cygdrive for fixpath to work. 11581 new_path="$CYGWIN_ROOT_PATH$input_path" 11582 fi 11583 fi 11584 11585 11586 if test "x$path" != "x$new_path"; then 11587 JAVA_HOME_PROCESSED="$new_path" 11588 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5 11589 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;} 11590 fi 11591 11592 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11593 11594 path="$JAVA_HOME_PROCESSED" 11595 has_colon=`$ECHO $path | $GREP ^.:` 11596 new_path="$path" 11597 if test "x$has_colon" = x; then 11598 # Not in mixed or Windows style, start by that. 11599 new_path=`cmd //c echo $path` 11600 fi 11601 11602 11603 input_path="$new_path" 11604 # Check if we need to convert this using DOS-style short mode. If the path 11605 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11606 # take no chances and rewrite it. 11607 # Note: m4 eats our [], so we need to use [ and ] instead. 11608 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11609 if test "x$has_forbidden_chars" != x; then 11610 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11611 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11612 fi 11613 11614 11615 windows_path="$new_path" 11616 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11617 unix_path=`$CYGPATH -u "$windows_path"` 11618 new_path="$unix_path" 11619 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11620 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11621 new_path="$unix_path" 11622 fi 11623 11624 if test "x$path" != "x$new_path"; then 11625 JAVA_HOME_PROCESSED="$new_path" 11626 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5 11627 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;} 11628 fi 11629 11630 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11631 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11632 11633 else 11634 # We're on a posix platform. Hooray! :) 11635 path="$JAVA_HOME_PROCESSED" 11636 11637 if test ! -f "$path" && test ! -d "$path"; then 11638 as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5 11639 fi 11640 11641 has_space=`$ECHO "$path" | $GREP " "` 11642 if test "x$has_space" != x; then 11643 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5 11644 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;} 11645 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11646 fi 11647 fi 11648 11649 if test ! -d "$JAVA_HOME_PROCESSED"; then 11650 { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5 11651 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;} 11652 else 11653 # Aha, the user has set a JAVA_HOME 11654 # let us use that as the Boot JDK. 11655 BOOT_JDK="$JAVA_HOME_PROCESSED" 11656 BOOT_JDK_FOUND=maybe 11657 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5 11658 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;} 11659 fi 11660 fi 11661 11662 11663 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11664 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11665 # Do we have a bin/java? 11666 if test ! -x "$BOOT_JDK/bin/java"; then 11667 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11669 BOOT_JDK_FOUND=no 11670 else 11671 # Do we have a bin/javac? 11672 if test ! -x "$BOOT_JDK/bin/javac"; then 11673 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11674 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11675 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11676 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11677 BOOT_JDK_FOUND=no 11678 else 11679 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11680 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11681 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11682 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11683 BOOT_JDK_FOUND=no 11684 else 11685 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11686 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11687 11688 # Extra M4 quote needed to protect [] in grep expression. 11689 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11690 if test "x$FOUND_VERSION_78" = x; then 11691 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11692 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11693 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11694 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11695 BOOT_JDK_FOUND=no 11696 else 11697 # We're done! :-) 11698 BOOT_JDK_FOUND=yes 11699 11700 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11701 11702 # Input might be given as Windows format, start by converting to 11703 # unix format. 11704 path="$BOOT_JDK" 11705 new_path=`$CYGPATH -u "$path"` 11706 11707 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11708 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11709 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11710 # "foo.exe" is OK but "foo" is an error. 11711 # 11712 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11713 # It is also a way to make sure we got the proper file name for the real test later on. 11714 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11715 if test "x$test_shortpath" = x; then 11716 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11717 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11718 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11719 fi 11720 11721 # Call helper function which possibly converts this using DOS-style short mode. 11722 # If so, the updated path is stored in $new_path. 11723 11724 input_path="$new_path" 11725 # Check if we need to convert this using DOS-style short mode. If the path 11726 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11727 # take no chances and rewrite it. 11728 # Note: m4 eats our [], so we need to use [ and ] instead. 11729 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11730 if test "x$has_forbidden_chars" != x; then 11731 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11732 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11733 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11734 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11735 # Going to short mode and back again did indeed matter. Since short mode is 11736 # case insensitive, let's make it lowercase to improve readability. 11737 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11738 # Now convert it back to Unix-stile (cygpath) 11739 input_path=`$CYGPATH -u "$shortmode_path"` 11740 new_path="$input_path" 11741 fi 11742 fi 11743 11744 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11745 if test "x$test_cygdrive_prefix" = x; then 11746 # As a simple fix, exclude /usr/bin since it's not a real path. 11747 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11748 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11749 # a path prefixed by /cygdrive for fixpath to work. 11750 new_path="$CYGWIN_ROOT_PATH$input_path" 11751 fi 11752 fi 11753 11754 11755 if test "x$path" != "x$new_path"; then 11756 BOOT_JDK="$new_path" 11757 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11758 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11759 fi 11760 11761 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11762 11763 path="$BOOT_JDK" 11764 has_colon=`$ECHO $path | $GREP ^.:` 11765 new_path="$path" 11766 if test "x$has_colon" = x; then 11767 # Not in mixed or Windows style, start by that. 11768 new_path=`cmd //c echo $path` 11769 fi 11770 11771 11772 input_path="$new_path" 11773 # Check if we need to convert this using DOS-style short mode. If the path 11774 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11775 # take no chances and rewrite it. 11776 # Note: m4 eats our [], so we need to use [ and ] instead. 11777 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11778 if test "x$has_forbidden_chars" != x; then 11779 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11780 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11781 fi 11782 11783 11784 windows_path="$new_path" 11785 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11786 unix_path=`$CYGPATH -u "$windows_path"` 11787 new_path="$unix_path" 11788 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11789 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11790 new_path="$unix_path" 11791 fi 11792 11793 if test "x$path" != "x$new_path"; then 11794 BOOT_JDK="$new_path" 11795 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11796 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11797 fi 11798 11799 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11800 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11801 11802 else 11803 # We're on a posix platform. Hooray! :) 11804 path="$BOOT_JDK" 11805 11806 if test ! -f "$path" && test ! -d "$path"; then 11807 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11808 fi 11809 11810 has_space=`$ECHO "$path" | $GREP " "` 11811 if test "x$has_space" != x; then 11812 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11813 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11814 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 11815 fi 11816 fi 11817 11818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 11819 $as_echo_n "checking for Boot JDK... " >&6; } 11820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 11821 $as_echo "$BOOT_JDK" >&6; } 11822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 11823 $as_echo_n "checking Boot JDK version... " >&6; } 11824 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 11825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 11826 $as_echo "$BOOT_JDK_VERSION" >&6; } 11827 fi # end check jdk version 11828 fi # end check rt.jar 11829 fi # end check javac 11830 fi # end check java 11831 fi # end check boot jdk found 11832 fi 11833 11834 11835 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) 11836 11837 if test "x$BOOT_JDK_FOUND" = xno; then 11838 # Now execute the test 11839 11840 if test -x /usr/libexec/java_home; then 11841 BOOT_JDK=`/usr/libexec/java_home` 11842 BOOT_JDK_FOUND=maybe 11843 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5 11844 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;} 11845 fi 11846 11847 11848 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 11849 if test "x$BOOT_JDK_FOUND" = xmaybe; then 11850 # Do we have a bin/java? 11851 if test ! -x "$BOOT_JDK/bin/java"; then 11852 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 11853 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 11854 BOOT_JDK_FOUND=no 11855 else 11856 # Do we have a bin/javac? 11857 if test ! -x "$BOOT_JDK/bin/javac"; then 11858 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 11859 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 11860 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 11861 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 11862 BOOT_JDK_FOUND=no 11863 else 11864 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 11865 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 11866 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 11867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 11868 BOOT_JDK_FOUND=no 11869 else 11870 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 11871 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 11872 11873 # Extra M4 quote needed to protect [] in grep expression. 11874 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 11875 if test "x$FOUND_VERSION_78" = x; then 11876 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 11877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 11878 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 11879 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 11880 BOOT_JDK_FOUND=no 11881 else 11882 # We're done! :-) 11883 BOOT_JDK_FOUND=yes 11884 11885 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11886 11887 # Input might be given as Windows format, start by converting to 11888 # unix format. 11889 path="$BOOT_JDK" 11890 new_path=`$CYGPATH -u "$path"` 11891 11892 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 11893 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 11894 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 11895 # "foo.exe" is OK but "foo" is an error. 11896 # 11897 # This test is therefore slightly more accurate than "test -f" to check for file precense. 11898 # It is also a way to make sure we got the proper file name for the real test later on. 11899 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 11900 if test "x$test_shortpath" = x; then 11901 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11902 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11903 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 11904 fi 11905 11906 # Call helper function which possibly converts this using DOS-style short mode. 11907 # If so, the updated path is stored in $new_path. 11908 11909 input_path="$new_path" 11910 # Check if we need to convert this using DOS-style short mode. If the path 11911 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11912 # take no chances and rewrite it. 11913 # Note: m4 eats our [], so we need to use [ and ] instead. 11914 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 11915 if test "x$has_forbidden_chars" != x; then 11916 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11917 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 11918 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 11919 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 11920 # Going to short mode and back again did indeed matter. Since short mode is 11921 # case insensitive, let's make it lowercase to improve readability. 11922 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11923 # Now convert it back to Unix-stile (cygpath) 11924 input_path=`$CYGPATH -u "$shortmode_path"` 11925 new_path="$input_path" 11926 fi 11927 fi 11928 11929 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 11930 if test "x$test_cygdrive_prefix" = x; then 11931 # As a simple fix, exclude /usr/bin since it's not a real path. 11932 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 11933 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 11934 # a path prefixed by /cygdrive for fixpath to work. 11935 new_path="$CYGWIN_ROOT_PATH$input_path" 11936 fi 11937 fi 11938 11939 11940 if test "x$path" != "x$new_path"; then 11941 BOOT_JDK="$new_path" 11942 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11943 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11944 fi 11945 11946 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11947 11948 path="$BOOT_JDK" 11949 has_colon=`$ECHO $path | $GREP ^.:` 11950 new_path="$path" 11951 if test "x$has_colon" = x; then 11952 # Not in mixed or Windows style, start by that. 11953 new_path=`cmd //c echo $path` 11954 fi 11955 11956 11957 input_path="$new_path" 11958 # Check if we need to convert this using DOS-style short mode. If the path 11959 # contains just simple characters, use it. Otherwise (spaces, weird characters), 11960 # take no chances and rewrite it. 11961 # Note: m4 eats our [], so we need to use [ and ] instead. 11962 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 11963 if test "x$has_forbidden_chars" != x; then 11964 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 11965 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 11966 fi 11967 11968 11969 windows_path="$new_path" 11970 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 11971 unix_path=`$CYGPATH -u "$windows_path"` 11972 new_path="$unix_path" 11973 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 11974 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 11975 new_path="$unix_path" 11976 fi 11977 11978 if test "x$path" != "x$new_path"; then 11979 BOOT_JDK="$new_path" 11980 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 11981 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 11982 fi 11983 11984 # Save the first 10 bytes of this path to the storage, so fixpath can work. 11985 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 11986 11987 else 11988 # We're on a posix platform. Hooray! :) 11989 path="$BOOT_JDK" 11990 11991 if test ! -f "$path" && test ! -d "$path"; then 11992 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 11993 fi 11994 11995 has_space=`$ECHO "$path" | $GREP " "` 11996 if test "x$has_space" != x; then 11997 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 11998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 11999 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12000 fi 12001 fi 12002 12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12004 $as_echo_n "checking for Boot JDK... " >&6; } 12005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12006 $as_echo "$BOOT_JDK" >&6; } 12007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12008 $as_echo_n "checking Boot JDK version... " >&6; } 12009 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12011 $as_echo "$BOOT_JDK_VERSION" >&6; } 12012 fi # end check jdk version 12013 fi # end check rt.jar 12014 fi # end check javac 12015 fi # end check java 12016 fi # end check boot jdk found 12017 fi 12018 12019 12020 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK? 12021 12022 if test "x$BOOT_JDK_FOUND" = xno; then 12023 # Now execute the test 12024 12025 # Extract the first word of "javac", so it can be a program name with args. 12026 set dummy javac; ac_word=$2 12027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 12028 $as_echo_n "checking for $ac_word... " >&6; } 12029 if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then : 12030 $as_echo_n "(cached) " >&6 12031 else 12032 case $JAVAC_CHECK in 12033 [\\/]* | ?:[\\/]*) 12034 ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path. 12035 ;; 12036 *) 12037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12038 for as_dir in $PATH 12039 do 12040 IFS=$as_save_IFS 12041 test -z "$as_dir" && as_dir=. 12042 for ac_exec_ext in '' $ac_executable_extensions; do 12043 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 12044 ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext" 12045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 12046 break 2 12047 fi 12048 done 12049 done 12050 IFS=$as_save_IFS 12051 12052 ;; 12053 esac 12054 fi 12055 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK 12056 if test -n "$JAVAC_CHECK"; then 12057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5 12058 $as_echo "$JAVAC_CHECK" >&6; } 12059 else 12060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12061 $as_echo "no" >&6; } 12062 fi 12063 12064 12065 # Extract the first word of "java", so it can be a program name with args. 12066 set dummy java; ac_word=$2 12067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 12068 $as_echo_n "checking for $ac_word... " >&6; } 12069 if test "${ac_cv_path_JAVA_CHECK+set}" = set; then : 12070 $as_echo_n "(cached) " >&6 12071 else 12072 case $JAVA_CHECK in 12073 [\\/]* | ?:[\\/]*) 12074 ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path. 12075 ;; 12076 *) 12077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12078 for as_dir in $PATH 12079 do 12080 IFS=$as_save_IFS 12081 test -z "$as_dir" && as_dir=. 12082 for ac_exec_ext in '' $ac_executable_extensions; do 12083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 12084 ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext" 12085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 12086 break 2 12087 fi 12088 done 12089 done 12090 IFS=$as_save_IFS 12091 12092 ;; 12093 esac 12094 fi 12095 JAVA_CHECK=$ac_cv_path_JAVA_CHECK 12096 if test -n "$JAVA_CHECK"; then 12097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5 12098 $as_echo "$JAVA_CHECK" >&6; } 12099 else 12100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12101 $as_echo "no" >&6; } 12102 fi 12103 12104 12105 BINARY="$JAVAC_CHECK" 12106 if test "x$JAVAC_CHECK" = x; then 12107 BINARY="$JAVA_CHECK" 12108 fi 12109 if test "x$BINARY" != x; then 12110 # So there is a java(c) binary, it might be part of a JDK. 12111 # Lets find the JDK/JRE directory by following symbolic links. 12112 # Linux/GNU systems often have links from /usr/bin/java to 12113 # /etc/alternatives/java to the real JDK binary. 12114 12115 if test "x$OPENJDK_BUILD_OS" != xwindows; then 12116 # Follow a chain of symbolic links. Use readlink 12117 # where it exists, else fall back to horribly 12118 # complicated shell code. 12119 if test "x$READLINK_TESTED" != yes; then 12120 # On MacOSX there is a readlink tool with a different 12121 # purpose than the GNU readlink tool. Check the found readlink. 12122 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 12123 if test "x$ISGNU" = x; then 12124 # A readlink that we do not know how to use. 12125 # Are there other non-GNU readlinks out there? 12126 READLINK_TESTED=yes 12127 READLINK= 12128 fi 12129 fi 12130 12131 if test "x$READLINK" != x; then 12132 BINARY=`$READLINK -f $BINARY` 12133 else 12134 # Save the current directory for restoring afterwards 12135 STARTDIR=$PWD 12136 COUNTER=0 12137 sym_link_dir=`$DIRNAME $BINARY` 12138 sym_link_file=`$BASENAME $BINARY` 12139 # Use the system pwd and not the shell builtin to resolve directory symlinks 12140 cd $sym_link_dir 12141 cd `$THEPWDCMD` 12142 sym_link_dir=`$THEPWDCMD` 12143 # Resolve file symlinks 12144 while test $COUNTER -lt 20; do 12145 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 12146 if test "x$ISLINK" == x; then 12147 # This is not a symbolic link! We are done! 12148 break 12149 fi 12150 # Again resolve directory symlinks since the target of the just found 12151 # link could be in a different directory 12152 cd `$DIRNAME $ISLINK` 12153 sym_link_dir=`$THEPWDCMD` 12154 sym_link_file=`$BASENAME $ISLINK` 12155 let COUNTER=COUNTER+1 12156 done 12157 cd $STARTDIR 12158 BINARY=$sym_link_dir/$sym_link_file 12159 fi 12160 fi 12161 12162 BOOT_JDK=`dirname "$BINARY"` 12163 BOOT_JDK=`cd "$BOOT_JDK/.."; pwd` 12164 if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then 12165 # Looks like we found ourselves an JDK 12166 BOOT_JDK_FOUND=maybe 12167 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5 12168 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;} 12169 fi 12170 fi 12171 12172 12173 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12174 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12175 # Do we have a bin/java? 12176 if test ! -x "$BOOT_JDK/bin/java"; then 12177 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12179 BOOT_JDK_FOUND=no 12180 else 12181 # Do we have a bin/javac? 12182 if test ! -x "$BOOT_JDK/bin/javac"; then 12183 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12185 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12186 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12187 BOOT_JDK_FOUND=no 12188 else 12189 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12190 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12191 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12192 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12193 BOOT_JDK_FOUND=no 12194 else 12195 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12196 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12197 12198 # Extra M4 quote needed to protect [] in grep expression. 12199 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12200 if test "x$FOUND_VERSION_78" = x; then 12201 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12202 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12203 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12204 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12205 BOOT_JDK_FOUND=no 12206 else 12207 # We're done! :-) 12208 BOOT_JDK_FOUND=yes 12209 12210 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12211 12212 # Input might be given as Windows format, start by converting to 12213 # unix format. 12214 path="$BOOT_JDK" 12215 new_path=`$CYGPATH -u "$path"` 12216 12217 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12218 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12219 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12220 # "foo.exe" is OK but "foo" is an error. 12221 # 12222 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12223 # It is also a way to make sure we got the proper file name for the real test later on. 12224 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12225 if test "x$test_shortpath" = x; then 12226 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12227 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12228 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12229 fi 12230 12231 # Call helper function which possibly converts this using DOS-style short mode. 12232 # If so, the updated path is stored in $new_path. 12233 12234 input_path="$new_path" 12235 # Check if we need to convert this using DOS-style short mode. If the path 12236 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12237 # take no chances and rewrite it. 12238 # Note: m4 eats our [], so we need to use [ and ] instead. 12239 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12240 if test "x$has_forbidden_chars" != x; then 12241 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12242 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12243 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12244 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12245 # Going to short mode and back again did indeed matter. Since short mode is 12246 # case insensitive, let's make it lowercase to improve readability. 12247 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12248 # Now convert it back to Unix-stile (cygpath) 12249 input_path=`$CYGPATH -u "$shortmode_path"` 12250 new_path="$input_path" 12251 fi 12252 fi 12253 12254 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12255 if test "x$test_cygdrive_prefix" = x; then 12256 # As a simple fix, exclude /usr/bin since it's not a real path. 12257 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12258 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12259 # a path prefixed by /cygdrive for fixpath to work. 12260 new_path="$CYGWIN_ROOT_PATH$input_path" 12261 fi 12262 fi 12263 12264 12265 if test "x$path" != "x$new_path"; then 12266 BOOT_JDK="$new_path" 12267 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12268 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12269 fi 12270 12271 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12272 12273 path="$BOOT_JDK" 12274 has_colon=`$ECHO $path | $GREP ^.:` 12275 new_path="$path" 12276 if test "x$has_colon" = x; then 12277 # Not in mixed or Windows style, start by that. 12278 new_path=`cmd //c echo $path` 12279 fi 12280 12281 12282 input_path="$new_path" 12283 # Check if we need to convert this using DOS-style short mode. If the path 12284 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12285 # take no chances and rewrite it. 12286 # Note: m4 eats our [], so we need to use [ and ] instead. 12287 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12288 if test "x$has_forbidden_chars" != x; then 12289 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12290 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12291 fi 12292 12293 12294 windows_path="$new_path" 12295 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12296 unix_path=`$CYGPATH -u "$windows_path"` 12297 new_path="$unix_path" 12298 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12299 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12300 new_path="$unix_path" 12301 fi 12302 12303 if test "x$path" != "x$new_path"; then 12304 BOOT_JDK="$new_path" 12305 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12306 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12307 fi 12308 12309 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12310 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12311 12312 else 12313 # We're on a posix platform. Hooray! :) 12314 path="$BOOT_JDK" 12315 12316 if test ! -f "$path" && test ! -d "$path"; then 12317 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12318 fi 12319 12320 has_space=`$ECHO "$path" | $GREP " "` 12321 if test "x$has_space" != x; then 12322 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12323 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12324 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12325 fi 12326 fi 12327 12328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12329 $as_echo_n "checking for Boot JDK... " >&6; } 12330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12331 $as_echo "$BOOT_JDK" >&6; } 12332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12333 $as_echo_n "checking Boot JDK version... " >&6; } 12334 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12336 $as_echo "$BOOT_JDK_VERSION" >&6; } 12337 fi # end check jdk version 12338 fi # end check rt.jar 12339 fi # end check javac 12340 fi # end check java 12341 fi # end check boot jdk found 12342 fi 12343 12344 12345 # Test: Is there a JDK installed in default, well-known locations? 12346 12347 if test "x$BOOT_JDK_FOUND" = xno; then 12348 # Now execute the test 12349 12350 if test "x$OPENJDK_TARGET_OS" = xwindows; then 12351 12352 if test "x$BOOT_JDK_FOUND" = xno; then 12353 # Now execute the test 12354 12355 if test "x$ProgramW6432" != x; then 12356 VIRTUAL_DIR="$ProgramW6432/Java" 12357 12358 windows_path="$VIRTUAL_DIR" 12359 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12360 unix_path=`$CYGPATH -u "$windows_path"` 12361 VIRTUAL_DIR="$unix_path" 12362 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12363 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12364 VIRTUAL_DIR="$unix_path" 12365 fi 12366 12367 12368 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 12369 BOOT_JDK_SUFFIX="" 12370 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 12371 if test "x$ALL_JDKS_FOUND" != x; then 12372 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 12373 12374 if test "x$BOOT_JDK_FOUND" = xno; then 12375 # Now execute the test 12376 12377 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 12378 if test -d "$BOOT_JDK"; then 12379 BOOT_JDK_FOUND=maybe 12380 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 12381 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 12382 fi 12383 12384 12385 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12386 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12387 # Do we have a bin/java? 12388 if test ! -x "$BOOT_JDK/bin/java"; then 12389 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12390 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12391 BOOT_JDK_FOUND=no 12392 else 12393 # Do we have a bin/javac? 12394 if test ! -x "$BOOT_JDK/bin/javac"; then 12395 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12396 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12397 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12398 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12399 BOOT_JDK_FOUND=no 12400 else 12401 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12402 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12403 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12404 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12405 BOOT_JDK_FOUND=no 12406 else 12407 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12408 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12409 12410 # Extra M4 quote needed to protect [] in grep expression. 12411 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12412 if test "x$FOUND_VERSION_78" = x; then 12413 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12414 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12415 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12416 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12417 BOOT_JDK_FOUND=no 12418 else 12419 # We're done! :-) 12420 BOOT_JDK_FOUND=yes 12421 12422 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12423 12424 # Input might be given as Windows format, start by converting to 12425 # unix format. 12426 path="$BOOT_JDK" 12427 new_path=`$CYGPATH -u "$path"` 12428 12429 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12430 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12431 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12432 # "foo.exe" is OK but "foo" is an error. 12433 # 12434 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12435 # It is also a way to make sure we got the proper file name for the real test later on. 12436 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12437 if test "x$test_shortpath" = x; then 12438 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12439 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12440 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12441 fi 12442 12443 # Call helper function which possibly converts this using DOS-style short mode. 12444 # If so, the updated path is stored in $new_path. 12445 12446 input_path="$new_path" 12447 # Check if we need to convert this using DOS-style short mode. If the path 12448 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12449 # take no chances and rewrite it. 12450 # Note: m4 eats our [], so we need to use [ and ] instead. 12451 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12452 if test "x$has_forbidden_chars" != x; then 12453 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12454 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12455 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12456 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12457 # Going to short mode and back again did indeed matter. Since short mode is 12458 # case insensitive, let's make it lowercase to improve readability. 12459 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12460 # Now convert it back to Unix-stile (cygpath) 12461 input_path=`$CYGPATH -u "$shortmode_path"` 12462 new_path="$input_path" 12463 fi 12464 fi 12465 12466 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12467 if test "x$test_cygdrive_prefix" = x; then 12468 # As a simple fix, exclude /usr/bin since it's not a real path. 12469 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12470 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12471 # a path prefixed by /cygdrive for fixpath to work. 12472 new_path="$CYGWIN_ROOT_PATH$input_path" 12473 fi 12474 fi 12475 12476 12477 if test "x$path" != "x$new_path"; then 12478 BOOT_JDK="$new_path" 12479 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12480 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12481 fi 12482 12483 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12484 12485 path="$BOOT_JDK" 12486 has_colon=`$ECHO $path | $GREP ^.:` 12487 new_path="$path" 12488 if test "x$has_colon" = x; then 12489 # Not in mixed or Windows style, start by that. 12490 new_path=`cmd //c echo $path` 12491 fi 12492 12493 12494 input_path="$new_path" 12495 # Check if we need to convert this using DOS-style short mode. If the path 12496 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12497 # take no chances and rewrite it. 12498 # Note: m4 eats our [], so we need to use [ and ] instead. 12499 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12500 if test "x$has_forbidden_chars" != x; then 12501 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12502 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12503 fi 12504 12505 12506 windows_path="$new_path" 12507 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12508 unix_path=`$CYGPATH -u "$windows_path"` 12509 new_path="$unix_path" 12510 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12511 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12512 new_path="$unix_path" 12513 fi 12514 12515 if test "x$path" != "x$new_path"; then 12516 BOOT_JDK="$new_path" 12517 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12518 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12519 fi 12520 12521 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12522 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12523 12524 else 12525 # We're on a posix platform. Hooray! :) 12526 path="$BOOT_JDK" 12527 12528 if test ! -f "$path" && test ! -d "$path"; then 12529 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12530 fi 12531 12532 has_space=`$ECHO "$path" | $GREP " "` 12533 if test "x$has_space" != x; then 12534 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12535 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12536 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12537 fi 12538 fi 12539 12540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12541 $as_echo_n "checking for Boot JDK... " >&6; } 12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12543 $as_echo "$BOOT_JDK" >&6; } 12544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12545 $as_echo_n "checking Boot JDK version... " >&6; } 12546 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12548 $as_echo "$BOOT_JDK_VERSION" >&6; } 12549 fi # end check jdk version 12550 fi # end check rt.jar 12551 fi # end check javac 12552 fi # end check java 12553 fi # end check boot jdk found 12554 fi 12555 12556 done 12557 fi 12558 12559 fi 12560 12561 12562 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12563 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12564 # Do we have a bin/java? 12565 if test ! -x "$BOOT_JDK/bin/java"; then 12566 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12568 BOOT_JDK_FOUND=no 12569 else 12570 # Do we have a bin/javac? 12571 if test ! -x "$BOOT_JDK/bin/javac"; then 12572 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12573 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12574 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12575 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12576 BOOT_JDK_FOUND=no 12577 else 12578 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12579 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12580 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12581 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12582 BOOT_JDK_FOUND=no 12583 else 12584 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12585 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12586 12587 # Extra M4 quote needed to protect [] in grep expression. 12588 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12589 if test "x$FOUND_VERSION_78" = x; then 12590 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12592 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12593 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12594 BOOT_JDK_FOUND=no 12595 else 12596 # We're done! :-) 12597 BOOT_JDK_FOUND=yes 12598 12599 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12600 12601 # Input might be given as Windows format, start by converting to 12602 # unix format. 12603 path="$BOOT_JDK" 12604 new_path=`$CYGPATH -u "$path"` 12605 12606 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12607 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12608 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12609 # "foo.exe" is OK but "foo" is an error. 12610 # 12611 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12612 # It is also a way to make sure we got the proper file name for the real test later on. 12613 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12614 if test "x$test_shortpath" = x; then 12615 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12616 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12617 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12618 fi 12619 12620 # Call helper function which possibly converts this using DOS-style short mode. 12621 # If so, the updated path is stored in $new_path. 12622 12623 input_path="$new_path" 12624 # Check if we need to convert this using DOS-style short mode. If the path 12625 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12626 # take no chances and rewrite it. 12627 # Note: m4 eats our [], so we need to use [ and ] instead. 12628 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12629 if test "x$has_forbidden_chars" != x; then 12630 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12631 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12632 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12633 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12634 # Going to short mode and back again did indeed matter. Since short mode is 12635 # case insensitive, let's make it lowercase to improve readability. 12636 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12637 # Now convert it back to Unix-stile (cygpath) 12638 input_path=`$CYGPATH -u "$shortmode_path"` 12639 new_path="$input_path" 12640 fi 12641 fi 12642 12643 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12644 if test "x$test_cygdrive_prefix" = x; then 12645 # As a simple fix, exclude /usr/bin since it's not a real path. 12646 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12647 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12648 # a path prefixed by /cygdrive for fixpath to work. 12649 new_path="$CYGWIN_ROOT_PATH$input_path" 12650 fi 12651 fi 12652 12653 12654 if test "x$path" != "x$new_path"; then 12655 BOOT_JDK="$new_path" 12656 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12657 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12658 fi 12659 12660 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12661 12662 path="$BOOT_JDK" 12663 has_colon=`$ECHO $path | $GREP ^.:` 12664 new_path="$path" 12665 if test "x$has_colon" = x; then 12666 # Not in mixed or Windows style, start by that. 12667 new_path=`cmd //c echo $path` 12668 fi 12669 12670 12671 input_path="$new_path" 12672 # Check if we need to convert this using DOS-style short mode. If the path 12673 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12674 # take no chances and rewrite it. 12675 # Note: m4 eats our [], so we need to use [ and ] instead. 12676 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12677 if test "x$has_forbidden_chars" != x; then 12678 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12679 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12680 fi 12681 12682 12683 windows_path="$new_path" 12684 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12685 unix_path=`$CYGPATH -u "$windows_path"` 12686 new_path="$unix_path" 12687 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12688 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12689 new_path="$unix_path" 12690 fi 12691 12692 if test "x$path" != "x$new_path"; then 12693 BOOT_JDK="$new_path" 12694 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12695 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12696 fi 12697 12698 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12699 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12700 12701 else 12702 # We're on a posix platform. Hooray! :) 12703 path="$BOOT_JDK" 12704 12705 if test ! -f "$path" && test ! -d "$path"; then 12706 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12707 fi 12708 12709 has_space=`$ECHO "$path" | $GREP " "` 12710 if test "x$has_space" != x; then 12711 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12712 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12713 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12714 fi 12715 fi 12716 12717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12718 $as_echo_n "checking for Boot JDK... " >&6; } 12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12720 $as_echo "$BOOT_JDK" >&6; } 12721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12722 $as_echo_n "checking Boot JDK version... " >&6; } 12723 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12725 $as_echo "$BOOT_JDK_VERSION" >&6; } 12726 fi # end check jdk version 12727 fi # end check rt.jar 12728 fi # end check javac 12729 fi # end check java 12730 fi # end check boot jdk found 12731 fi 12732 12733 12734 if test "x$BOOT_JDK_FOUND" = xno; then 12735 # Now execute the test 12736 12737 if test "x$PROGRAMW6432" != x; then 12738 VIRTUAL_DIR="$PROGRAMW6432/Java" 12739 12740 windows_path="$VIRTUAL_DIR" 12741 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12742 unix_path=`$CYGPATH -u "$windows_path"` 12743 VIRTUAL_DIR="$unix_path" 12744 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12745 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12746 VIRTUAL_DIR="$unix_path" 12747 fi 12748 12749 12750 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 12751 BOOT_JDK_SUFFIX="" 12752 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 12753 if test "x$ALL_JDKS_FOUND" != x; then 12754 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 12755 12756 if test "x$BOOT_JDK_FOUND" = xno; then 12757 # Now execute the test 12758 12759 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 12760 if test -d "$BOOT_JDK"; then 12761 BOOT_JDK_FOUND=maybe 12762 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 12763 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 12764 fi 12765 12766 12767 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12768 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12769 # Do we have a bin/java? 12770 if test ! -x "$BOOT_JDK/bin/java"; then 12771 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12773 BOOT_JDK_FOUND=no 12774 else 12775 # Do we have a bin/javac? 12776 if test ! -x "$BOOT_JDK/bin/javac"; then 12777 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12778 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12779 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12780 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12781 BOOT_JDK_FOUND=no 12782 else 12783 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12784 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12785 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12786 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12787 BOOT_JDK_FOUND=no 12788 else 12789 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12790 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12791 12792 # Extra M4 quote needed to protect [] in grep expression. 12793 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12794 if test "x$FOUND_VERSION_78" = x; then 12795 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12796 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12797 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12798 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12799 BOOT_JDK_FOUND=no 12800 else 12801 # We're done! :-) 12802 BOOT_JDK_FOUND=yes 12803 12804 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12805 12806 # Input might be given as Windows format, start by converting to 12807 # unix format. 12808 path="$BOOT_JDK" 12809 new_path=`$CYGPATH -u "$path"` 12810 12811 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12812 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12813 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12814 # "foo.exe" is OK but "foo" is an error. 12815 # 12816 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12817 # It is also a way to make sure we got the proper file name for the real test later on. 12818 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12819 if test "x$test_shortpath" = x; then 12820 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12821 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12822 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 12823 fi 12824 12825 # Call helper function which possibly converts this using DOS-style short mode. 12826 # If so, the updated path is stored in $new_path. 12827 12828 input_path="$new_path" 12829 # Check if we need to convert this using DOS-style short mode. If the path 12830 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12831 # take no chances and rewrite it. 12832 # Note: m4 eats our [], so we need to use [ and ] instead. 12833 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 12834 if test "x$has_forbidden_chars" != x; then 12835 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12836 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 12837 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 12838 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 12839 # Going to short mode and back again did indeed matter. Since short mode is 12840 # case insensitive, let's make it lowercase to improve readability. 12841 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12842 # Now convert it back to Unix-stile (cygpath) 12843 input_path=`$CYGPATH -u "$shortmode_path"` 12844 new_path="$input_path" 12845 fi 12846 fi 12847 12848 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 12849 if test "x$test_cygdrive_prefix" = x; then 12850 # As a simple fix, exclude /usr/bin since it's not a real path. 12851 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 12852 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 12853 # a path prefixed by /cygdrive for fixpath to work. 12854 new_path="$CYGWIN_ROOT_PATH$input_path" 12855 fi 12856 fi 12857 12858 12859 if test "x$path" != "x$new_path"; then 12860 BOOT_JDK="$new_path" 12861 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12862 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12863 fi 12864 12865 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12866 12867 path="$BOOT_JDK" 12868 has_colon=`$ECHO $path | $GREP ^.:` 12869 new_path="$path" 12870 if test "x$has_colon" = x; then 12871 # Not in mixed or Windows style, start by that. 12872 new_path=`cmd //c echo $path` 12873 fi 12874 12875 12876 input_path="$new_path" 12877 # Check if we need to convert this using DOS-style short mode. If the path 12878 # contains just simple characters, use it. Otherwise (spaces, weird characters), 12879 # take no chances and rewrite it. 12880 # Note: m4 eats our [], so we need to use [ and ] instead. 12881 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 12882 if test "x$has_forbidden_chars" != x; then 12883 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 12884 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 12885 fi 12886 12887 12888 windows_path="$new_path" 12889 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12890 unix_path=`$CYGPATH -u "$windows_path"` 12891 new_path="$unix_path" 12892 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 12893 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 12894 new_path="$unix_path" 12895 fi 12896 12897 if test "x$path" != "x$new_path"; then 12898 BOOT_JDK="$new_path" 12899 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 12900 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 12901 fi 12902 12903 # Save the first 10 bytes of this path to the storage, so fixpath can work. 12904 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 12905 12906 else 12907 # We're on a posix platform. Hooray! :) 12908 path="$BOOT_JDK" 12909 12910 if test ! -f "$path" && test ! -d "$path"; then 12911 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 12912 fi 12913 12914 has_space=`$ECHO "$path" | $GREP " "` 12915 if test "x$has_space" != x; then 12916 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12917 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12918 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 12919 fi 12920 fi 12921 12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 12923 $as_echo_n "checking for Boot JDK... " >&6; } 12924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 12925 $as_echo "$BOOT_JDK" >&6; } 12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 12927 $as_echo_n "checking Boot JDK version... " >&6; } 12928 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 12929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 12930 $as_echo "$BOOT_JDK_VERSION" >&6; } 12931 fi # end check jdk version 12932 fi # end check rt.jar 12933 fi # end check javac 12934 fi # end check java 12935 fi # end check boot jdk found 12936 fi 12937 12938 done 12939 fi 12940 12941 fi 12942 12943 12944 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 12945 if test "x$BOOT_JDK_FOUND" = xmaybe; then 12946 # Do we have a bin/java? 12947 if test ! -x "$BOOT_JDK/bin/java"; then 12948 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 12949 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 12950 BOOT_JDK_FOUND=no 12951 else 12952 # Do we have a bin/javac? 12953 if test ! -x "$BOOT_JDK/bin/javac"; then 12954 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 12955 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 12956 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 12957 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 12958 BOOT_JDK_FOUND=no 12959 else 12960 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 12961 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 12962 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 12963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 12964 BOOT_JDK_FOUND=no 12965 else 12966 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 12967 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 12968 12969 # Extra M4 quote needed to protect [] in grep expression. 12970 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 12971 if test "x$FOUND_VERSION_78" = x; then 12972 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 12973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 12974 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 12975 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 12976 BOOT_JDK_FOUND=no 12977 else 12978 # We're done! :-) 12979 BOOT_JDK_FOUND=yes 12980 12981 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 12982 12983 # Input might be given as Windows format, start by converting to 12984 # unix format. 12985 path="$BOOT_JDK" 12986 new_path=`$CYGPATH -u "$path"` 12987 12988 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 12989 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 12990 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 12991 # "foo.exe" is OK but "foo" is an error. 12992 # 12993 # This test is therefore slightly more accurate than "test -f" to check for file precense. 12994 # It is also a way to make sure we got the proper file name for the real test later on. 12995 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 12996 if test "x$test_shortpath" = x; then 12997 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 12998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 12999 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13000 fi 13001 13002 # Call helper function which possibly converts this using DOS-style short mode. 13003 # If so, the updated path is stored in $new_path. 13004 13005 input_path="$new_path" 13006 # Check if we need to convert this using DOS-style short mode. If the path 13007 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13008 # take no chances and rewrite it. 13009 # Note: m4 eats our [], so we need to use [ and ] instead. 13010 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13011 if test "x$has_forbidden_chars" != x; then 13012 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13013 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13014 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13015 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13016 # Going to short mode and back again did indeed matter. Since short mode is 13017 # case insensitive, let's make it lowercase to improve readability. 13018 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13019 # Now convert it back to Unix-stile (cygpath) 13020 input_path=`$CYGPATH -u "$shortmode_path"` 13021 new_path="$input_path" 13022 fi 13023 fi 13024 13025 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13026 if test "x$test_cygdrive_prefix" = x; then 13027 # As a simple fix, exclude /usr/bin since it's not a real path. 13028 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13029 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13030 # a path prefixed by /cygdrive for fixpath to work. 13031 new_path="$CYGWIN_ROOT_PATH$input_path" 13032 fi 13033 fi 13034 13035 13036 if test "x$path" != "x$new_path"; then 13037 BOOT_JDK="$new_path" 13038 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13039 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13040 fi 13041 13042 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13043 13044 path="$BOOT_JDK" 13045 has_colon=`$ECHO $path | $GREP ^.:` 13046 new_path="$path" 13047 if test "x$has_colon" = x; then 13048 # Not in mixed or Windows style, start by that. 13049 new_path=`cmd //c echo $path` 13050 fi 13051 13052 13053 input_path="$new_path" 13054 # Check if we need to convert this using DOS-style short mode. If the path 13055 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13056 # take no chances and rewrite it. 13057 # Note: m4 eats our [], so we need to use [ and ] instead. 13058 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13059 if test "x$has_forbidden_chars" != x; then 13060 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13061 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13062 fi 13063 13064 13065 windows_path="$new_path" 13066 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13067 unix_path=`$CYGPATH -u "$windows_path"` 13068 new_path="$unix_path" 13069 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13070 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13071 new_path="$unix_path" 13072 fi 13073 13074 if test "x$path" != "x$new_path"; then 13075 BOOT_JDK="$new_path" 13076 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13077 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13078 fi 13079 13080 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13081 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13082 13083 else 13084 # We're on a posix platform. Hooray! :) 13085 path="$BOOT_JDK" 13086 13087 if test ! -f "$path" && test ! -d "$path"; then 13088 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13089 fi 13090 13091 has_space=`$ECHO "$path" | $GREP " "` 13092 if test "x$has_space" != x; then 13093 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13094 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13095 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13096 fi 13097 fi 13098 13099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13100 $as_echo_n "checking for Boot JDK... " >&6; } 13101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13102 $as_echo "$BOOT_JDK" >&6; } 13103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13104 $as_echo_n "checking Boot JDK version... " >&6; } 13105 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13107 $as_echo "$BOOT_JDK_VERSION" >&6; } 13108 fi # end check jdk version 13109 fi # end check rt.jar 13110 fi # end check javac 13111 fi # end check java 13112 fi # end check boot jdk found 13113 fi 13114 13115 13116 if test "x$BOOT_JDK_FOUND" = xno; then 13117 # Now execute the test 13118 13119 if test "x$PROGRAMFILES" != x; then 13120 VIRTUAL_DIR="$PROGRAMFILES/Java" 13121 13122 windows_path="$VIRTUAL_DIR" 13123 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13124 unix_path=`$CYGPATH -u "$windows_path"` 13125 VIRTUAL_DIR="$unix_path" 13126 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13127 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13128 VIRTUAL_DIR="$unix_path" 13129 fi 13130 13131 13132 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 13133 BOOT_JDK_SUFFIX="" 13134 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13135 if test "x$ALL_JDKS_FOUND" != x; then 13136 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13137 13138 if test "x$BOOT_JDK_FOUND" = xno; then 13139 # Now execute the test 13140 13141 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13142 if test -d "$BOOT_JDK"; then 13143 BOOT_JDK_FOUND=maybe 13144 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13145 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13146 fi 13147 13148 13149 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13150 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13151 # Do we have a bin/java? 13152 if test ! -x "$BOOT_JDK/bin/java"; then 13153 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13154 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13155 BOOT_JDK_FOUND=no 13156 else 13157 # Do we have a bin/javac? 13158 if test ! -x "$BOOT_JDK/bin/javac"; then 13159 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13161 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13162 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13163 BOOT_JDK_FOUND=no 13164 else 13165 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13166 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13167 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13169 BOOT_JDK_FOUND=no 13170 else 13171 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13172 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13173 13174 # Extra M4 quote needed to protect [] in grep expression. 13175 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13176 if test "x$FOUND_VERSION_78" = x; then 13177 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13179 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13180 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13181 BOOT_JDK_FOUND=no 13182 else 13183 # We're done! :-) 13184 BOOT_JDK_FOUND=yes 13185 13186 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13187 13188 # Input might be given as Windows format, start by converting to 13189 # unix format. 13190 path="$BOOT_JDK" 13191 new_path=`$CYGPATH -u "$path"` 13192 13193 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13194 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13195 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13196 # "foo.exe" is OK but "foo" is an error. 13197 # 13198 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13199 # It is also a way to make sure we got the proper file name for the real test later on. 13200 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13201 if test "x$test_shortpath" = x; then 13202 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13203 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13204 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13205 fi 13206 13207 # Call helper function which possibly converts this using DOS-style short mode. 13208 # If so, the updated path is stored in $new_path. 13209 13210 input_path="$new_path" 13211 # Check if we need to convert this using DOS-style short mode. If the path 13212 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13213 # take no chances and rewrite it. 13214 # Note: m4 eats our [], so we need to use [ and ] instead. 13215 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13216 if test "x$has_forbidden_chars" != x; then 13217 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13218 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13219 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13220 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13221 # Going to short mode and back again did indeed matter. Since short mode is 13222 # case insensitive, let's make it lowercase to improve readability. 13223 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13224 # Now convert it back to Unix-stile (cygpath) 13225 input_path=`$CYGPATH -u "$shortmode_path"` 13226 new_path="$input_path" 13227 fi 13228 fi 13229 13230 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13231 if test "x$test_cygdrive_prefix" = x; then 13232 # As a simple fix, exclude /usr/bin since it's not a real path. 13233 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13234 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13235 # a path prefixed by /cygdrive for fixpath to work. 13236 new_path="$CYGWIN_ROOT_PATH$input_path" 13237 fi 13238 fi 13239 13240 13241 if test "x$path" != "x$new_path"; then 13242 BOOT_JDK="$new_path" 13243 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13244 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13245 fi 13246 13247 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13248 13249 path="$BOOT_JDK" 13250 has_colon=`$ECHO $path | $GREP ^.:` 13251 new_path="$path" 13252 if test "x$has_colon" = x; then 13253 # Not in mixed or Windows style, start by that. 13254 new_path=`cmd //c echo $path` 13255 fi 13256 13257 13258 input_path="$new_path" 13259 # Check if we need to convert this using DOS-style short mode. If the path 13260 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13261 # take no chances and rewrite it. 13262 # Note: m4 eats our [], so we need to use [ and ] instead. 13263 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13264 if test "x$has_forbidden_chars" != x; then 13265 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13266 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13267 fi 13268 13269 13270 windows_path="$new_path" 13271 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13272 unix_path=`$CYGPATH -u "$windows_path"` 13273 new_path="$unix_path" 13274 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13275 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13276 new_path="$unix_path" 13277 fi 13278 13279 if test "x$path" != "x$new_path"; then 13280 BOOT_JDK="$new_path" 13281 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13282 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13283 fi 13284 13285 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13286 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13287 13288 else 13289 # We're on a posix platform. Hooray! :) 13290 path="$BOOT_JDK" 13291 13292 if test ! -f "$path" && test ! -d "$path"; then 13293 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13294 fi 13295 13296 has_space=`$ECHO "$path" | $GREP " "` 13297 if test "x$has_space" != x; then 13298 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13299 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13300 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13301 fi 13302 fi 13303 13304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13305 $as_echo_n "checking for Boot JDK... " >&6; } 13306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13307 $as_echo "$BOOT_JDK" >&6; } 13308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13309 $as_echo_n "checking Boot JDK version... " >&6; } 13310 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13312 $as_echo "$BOOT_JDK_VERSION" >&6; } 13313 fi # end check jdk version 13314 fi # end check rt.jar 13315 fi # end check javac 13316 fi # end check java 13317 fi # end check boot jdk found 13318 fi 13319 13320 done 13321 fi 13322 13323 fi 13324 13325 13326 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13327 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13328 # Do we have a bin/java? 13329 if test ! -x "$BOOT_JDK/bin/java"; then 13330 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13331 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13332 BOOT_JDK_FOUND=no 13333 else 13334 # Do we have a bin/javac? 13335 if test ! -x "$BOOT_JDK/bin/javac"; then 13336 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13337 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13338 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13339 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13340 BOOT_JDK_FOUND=no 13341 else 13342 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13343 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13344 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13345 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13346 BOOT_JDK_FOUND=no 13347 else 13348 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13349 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13350 13351 # Extra M4 quote needed to protect [] in grep expression. 13352 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13353 if test "x$FOUND_VERSION_78" = x; then 13354 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13356 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13357 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13358 BOOT_JDK_FOUND=no 13359 else 13360 # We're done! :-) 13361 BOOT_JDK_FOUND=yes 13362 13363 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13364 13365 # Input might be given as Windows format, start by converting to 13366 # unix format. 13367 path="$BOOT_JDK" 13368 new_path=`$CYGPATH -u "$path"` 13369 13370 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13371 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13372 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13373 # "foo.exe" is OK but "foo" is an error. 13374 # 13375 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13376 # It is also a way to make sure we got the proper file name for the real test later on. 13377 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13378 if test "x$test_shortpath" = x; then 13379 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13380 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13381 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13382 fi 13383 13384 # Call helper function which possibly converts this using DOS-style short mode. 13385 # If so, the updated path is stored in $new_path. 13386 13387 input_path="$new_path" 13388 # Check if we need to convert this using DOS-style short mode. If the path 13389 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13390 # take no chances and rewrite it. 13391 # Note: m4 eats our [], so we need to use [ and ] instead. 13392 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13393 if test "x$has_forbidden_chars" != x; then 13394 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13395 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13396 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13397 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13398 # Going to short mode and back again did indeed matter. Since short mode is 13399 # case insensitive, let's make it lowercase to improve readability. 13400 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13401 # Now convert it back to Unix-stile (cygpath) 13402 input_path=`$CYGPATH -u "$shortmode_path"` 13403 new_path="$input_path" 13404 fi 13405 fi 13406 13407 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13408 if test "x$test_cygdrive_prefix" = x; then 13409 # As a simple fix, exclude /usr/bin since it's not a real path. 13410 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13411 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13412 # a path prefixed by /cygdrive for fixpath to work. 13413 new_path="$CYGWIN_ROOT_PATH$input_path" 13414 fi 13415 fi 13416 13417 13418 if test "x$path" != "x$new_path"; then 13419 BOOT_JDK="$new_path" 13420 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13421 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13422 fi 13423 13424 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13425 13426 path="$BOOT_JDK" 13427 has_colon=`$ECHO $path | $GREP ^.:` 13428 new_path="$path" 13429 if test "x$has_colon" = x; then 13430 # Not in mixed or Windows style, start by that. 13431 new_path=`cmd //c echo $path` 13432 fi 13433 13434 13435 input_path="$new_path" 13436 # Check if we need to convert this using DOS-style short mode. If the path 13437 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13438 # take no chances and rewrite it. 13439 # Note: m4 eats our [], so we need to use [ and ] instead. 13440 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13441 if test "x$has_forbidden_chars" != x; then 13442 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13443 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13444 fi 13445 13446 13447 windows_path="$new_path" 13448 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13449 unix_path=`$CYGPATH -u "$windows_path"` 13450 new_path="$unix_path" 13451 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13452 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13453 new_path="$unix_path" 13454 fi 13455 13456 if test "x$path" != "x$new_path"; then 13457 BOOT_JDK="$new_path" 13458 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13459 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13460 fi 13461 13462 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13463 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13464 13465 else 13466 # We're on a posix platform. Hooray! :) 13467 path="$BOOT_JDK" 13468 13469 if test ! -f "$path" && test ! -d "$path"; then 13470 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13471 fi 13472 13473 has_space=`$ECHO "$path" | $GREP " "` 13474 if test "x$has_space" != x; then 13475 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13476 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13477 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13478 fi 13479 fi 13480 13481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13482 $as_echo_n "checking for Boot JDK... " >&6; } 13483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13484 $as_echo "$BOOT_JDK" >&6; } 13485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13486 $as_echo_n "checking Boot JDK version... " >&6; } 13487 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13489 $as_echo "$BOOT_JDK_VERSION" >&6; } 13490 fi # end check jdk version 13491 fi # end check rt.jar 13492 fi # end check javac 13493 fi # end check java 13494 fi # end check boot jdk found 13495 fi 13496 13497 13498 if test "x$BOOT_JDK_FOUND" = xno; then 13499 # Now execute the test 13500 13501 if test "x$ProgramFiles" != x; then 13502 VIRTUAL_DIR="$ProgramFiles/Java" 13503 13504 windows_path="$VIRTUAL_DIR" 13505 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13506 unix_path=`$CYGPATH -u "$windows_path"` 13507 VIRTUAL_DIR="$unix_path" 13508 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13509 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13510 VIRTUAL_DIR="$unix_path" 13511 fi 13512 13513 13514 BOOT_JDK_PREFIX="$VIRTUAL_DIR" 13515 BOOT_JDK_SUFFIX="" 13516 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13517 if test "x$ALL_JDKS_FOUND" != x; then 13518 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13519 13520 if test "x$BOOT_JDK_FOUND" = xno; then 13521 # Now execute the test 13522 13523 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13524 if test -d "$BOOT_JDK"; then 13525 BOOT_JDK_FOUND=maybe 13526 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13527 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13528 fi 13529 13530 13531 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13532 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13533 # Do we have a bin/java? 13534 if test ! -x "$BOOT_JDK/bin/java"; then 13535 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13536 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13537 BOOT_JDK_FOUND=no 13538 else 13539 # Do we have a bin/javac? 13540 if test ! -x "$BOOT_JDK/bin/javac"; then 13541 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13543 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13544 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13545 BOOT_JDK_FOUND=no 13546 else 13547 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13548 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13549 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13550 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13551 BOOT_JDK_FOUND=no 13552 else 13553 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13554 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13555 13556 # Extra M4 quote needed to protect [] in grep expression. 13557 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13558 if test "x$FOUND_VERSION_78" = x; then 13559 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13560 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13561 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13562 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13563 BOOT_JDK_FOUND=no 13564 else 13565 # We're done! :-) 13566 BOOT_JDK_FOUND=yes 13567 13568 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13569 13570 # Input might be given as Windows format, start by converting to 13571 # unix format. 13572 path="$BOOT_JDK" 13573 new_path=`$CYGPATH -u "$path"` 13574 13575 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13576 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13577 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13578 # "foo.exe" is OK but "foo" is an error. 13579 # 13580 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13581 # It is also a way to make sure we got the proper file name for the real test later on. 13582 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13583 if test "x$test_shortpath" = x; then 13584 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13585 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13586 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13587 fi 13588 13589 # Call helper function which possibly converts this using DOS-style short mode. 13590 # If so, the updated path is stored in $new_path. 13591 13592 input_path="$new_path" 13593 # Check if we need to convert this using DOS-style short mode. If the path 13594 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13595 # take no chances and rewrite it. 13596 # Note: m4 eats our [], so we need to use [ and ] instead. 13597 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13598 if test "x$has_forbidden_chars" != x; then 13599 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13600 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13601 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13602 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13603 # Going to short mode and back again did indeed matter. Since short mode is 13604 # case insensitive, let's make it lowercase to improve readability. 13605 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13606 # Now convert it back to Unix-stile (cygpath) 13607 input_path=`$CYGPATH -u "$shortmode_path"` 13608 new_path="$input_path" 13609 fi 13610 fi 13611 13612 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13613 if test "x$test_cygdrive_prefix" = x; then 13614 # As a simple fix, exclude /usr/bin since it's not a real path. 13615 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13616 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13617 # a path prefixed by /cygdrive for fixpath to work. 13618 new_path="$CYGWIN_ROOT_PATH$input_path" 13619 fi 13620 fi 13621 13622 13623 if test "x$path" != "x$new_path"; then 13624 BOOT_JDK="$new_path" 13625 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13627 fi 13628 13629 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13630 13631 path="$BOOT_JDK" 13632 has_colon=`$ECHO $path | $GREP ^.:` 13633 new_path="$path" 13634 if test "x$has_colon" = x; then 13635 # Not in mixed or Windows style, start by that. 13636 new_path=`cmd //c echo $path` 13637 fi 13638 13639 13640 input_path="$new_path" 13641 # Check if we need to convert this using DOS-style short mode. If the path 13642 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13643 # take no chances and rewrite it. 13644 # Note: m4 eats our [], so we need to use [ and ] instead. 13645 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13646 if test "x$has_forbidden_chars" != x; then 13647 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13648 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13649 fi 13650 13651 13652 windows_path="$new_path" 13653 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13654 unix_path=`$CYGPATH -u "$windows_path"` 13655 new_path="$unix_path" 13656 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13657 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13658 new_path="$unix_path" 13659 fi 13660 13661 if test "x$path" != "x$new_path"; then 13662 BOOT_JDK="$new_path" 13663 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13664 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13665 fi 13666 13667 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13668 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13669 13670 else 13671 # We're on a posix platform. Hooray! :) 13672 path="$BOOT_JDK" 13673 13674 if test ! -f "$path" && test ! -d "$path"; then 13675 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13676 fi 13677 13678 has_space=`$ECHO "$path" | $GREP " "` 13679 if test "x$has_space" != x; then 13680 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13681 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13682 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13683 fi 13684 fi 13685 13686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13687 $as_echo_n "checking for Boot JDK... " >&6; } 13688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13689 $as_echo "$BOOT_JDK" >&6; } 13690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13691 $as_echo_n "checking Boot JDK version... " >&6; } 13692 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13694 $as_echo "$BOOT_JDK_VERSION" >&6; } 13695 fi # end check jdk version 13696 fi # end check rt.jar 13697 fi # end check javac 13698 fi # end check java 13699 fi # end check boot jdk found 13700 fi 13701 13702 done 13703 fi 13704 13705 fi 13706 13707 13708 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13709 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13710 # Do we have a bin/java? 13711 if test ! -x "$BOOT_JDK/bin/java"; then 13712 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13713 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13714 BOOT_JDK_FOUND=no 13715 else 13716 # Do we have a bin/javac? 13717 if test ! -x "$BOOT_JDK/bin/javac"; then 13718 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13719 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13720 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13721 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13722 BOOT_JDK_FOUND=no 13723 else 13724 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13725 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13726 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13728 BOOT_JDK_FOUND=no 13729 else 13730 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13731 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13732 13733 # Extra M4 quote needed to protect [] in grep expression. 13734 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13735 if test "x$FOUND_VERSION_78" = x; then 13736 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13738 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13739 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13740 BOOT_JDK_FOUND=no 13741 else 13742 # We're done! :-) 13743 BOOT_JDK_FOUND=yes 13744 13745 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13746 13747 # Input might be given as Windows format, start by converting to 13748 # unix format. 13749 path="$BOOT_JDK" 13750 new_path=`$CYGPATH -u "$path"` 13751 13752 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13753 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13754 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13755 # "foo.exe" is OK but "foo" is an error. 13756 # 13757 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13758 # It is also a way to make sure we got the proper file name for the real test later on. 13759 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13760 if test "x$test_shortpath" = x; then 13761 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13762 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13763 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13764 fi 13765 13766 # Call helper function which possibly converts this using DOS-style short mode. 13767 # If so, the updated path is stored in $new_path. 13768 13769 input_path="$new_path" 13770 # Check if we need to convert this using DOS-style short mode. If the path 13771 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13772 # take no chances and rewrite it. 13773 # Note: m4 eats our [], so we need to use [ and ] instead. 13774 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13775 if test "x$has_forbidden_chars" != x; then 13776 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13777 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13778 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13779 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13780 # Going to short mode and back again did indeed matter. Since short mode is 13781 # case insensitive, let's make it lowercase to improve readability. 13782 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13783 # Now convert it back to Unix-stile (cygpath) 13784 input_path=`$CYGPATH -u "$shortmode_path"` 13785 new_path="$input_path" 13786 fi 13787 fi 13788 13789 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13790 if test "x$test_cygdrive_prefix" = x; then 13791 # As a simple fix, exclude /usr/bin since it's not a real path. 13792 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13793 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13794 # a path prefixed by /cygdrive for fixpath to work. 13795 new_path="$CYGWIN_ROOT_PATH$input_path" 13796 fi 13797 fi 13798 13799 13800 if test "x$path" != "x$new_path"; then 13801 BOOT_JDK="$new_path" 13802 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13803 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13804 fi 13805 13806 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13807 13808 path="$BOOT_JDK" 13809 has_colon=`$ECHO $path | $GREP ^.:` 13810 new_path="$path" 13811 if test "x$has_colon" = x; then 13812 # Not in mixed or Windows style, start by that. 13813 new_path=`cmd //c echo $path` 13814 fi 13815 13816 13817 input_path="$new_path" 13818 # Check if we need to convert this using DOS-style short mode. If the path 13819 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13820 # take no chances and rewrite it. 13821 # Note: m4 eats our [], so we need to use [ and ] instead. 13822 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 13823 if test "x$has_forbidden_chars" != x; then 13824 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13825 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13826 fi 13827 13828 13829 windows_path="$new_path" 13830 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13831 unix_path=`$CYGPATH -u "$windows_path"` 13832 new_path="$unix_path" 13833 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13834 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 13835 new_path="$unix_path" 13836 fi 13837 13838 if test "x$path" != "x$new_path"; then 13839 BOOT_JDK="$new_path" 13840 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13841 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13842 fi 13843 13844 # Save the first 10 bytes of this path to the storage, so fixpath can work. 13845 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 13846 13847 else 13848 # We're on a posix platform. Hooray! :) 13849 path="$BOOT_JDK" 13850 13851 if test ! -f "$path" && test ! -d "$path"; then 13852 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 13853 fi 13854 13855 has_space=`$ECHO "$path" | $GREP " "` 13856 if test "x$has_space" != x; then 13857 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13858 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13859 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 13860 fi 13861 fi 13862 13863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 13864 $as_echo_n "checking for Boot JDK... " >&6; } 13865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 13866 $as_echo "$BOOT_JDK" >&6; } 13867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 13868 $as_echo_n "checking Boot JDK version... " >&6; } 13869 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 13870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 13871 $as_echo "$BOOT_JDK_VERSION" >&6; } 13872 fi # end check jdk version 13873 fi # end check rt.jar 13874 fi # end check javac 13875 fi # end check java 13876 fi # end check boot jdk found 13877 fi 13878 13879 13880 if test "x$BOOT_JDK_FOUND" = xno; then 13881 # Now execute the test 13882 13883 BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java" 13884 BOOT_JDK_SUFFIX="" 13885 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 13886 if test "x$ALL_JDKS_FOUND" != x; then 13887 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 13888 13889 if test "x$BOOT_JDK_FOUND" = xno; then 13890 # Now execute the test 13891 13892 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 13893 if test -d "$BOOT_JDK"; then 13894 BOOT_JDK_FOUND=maybe 13895 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 13896 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 13897 fi 13898 13899 13900 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 13901 if test "x$BOOT_JDK_FOUND" = xmaybe; then 13902 # Do we have a bin/java? 13903 if test ! -x "$BOOT_JDK/bin/java"; then 13904 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 13905 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 13906 BOOT_JDK_FOUND=no 13907 else 13908 # Do we have a bin/javac? 13909 if test ! -x "$BOOT_JDK/bin/javac"; then 13910 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 13911 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 13912 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 13913 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 13914 BOOT_JDK_FOUND=no 13915 else 13916 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 13917 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 13918 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 13919 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 13920 BOOT_JDK_FOUND=no 13921 else 13922 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 13923 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 13924 13925 # Extra M4 quote needed to protect [] in grep expression. 13926 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 13927 if test "x$FOUND_VERSION_78" = x; then 13928 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 13929 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 13930 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 13931 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 13932 BOOT_JDK_FOUND=no 13933 else 13934 # We're done! :-) 13935 BOOT_JDK_FOUND=yes 13936 13937 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 13938 13939 # Input might be given as Windows format, start by converting to 13940 # unix format. 13941 path="$BOOT_JDK" 13942 new_path=`$CYGPATH -u "$path"` 13943 13944 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 13945 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 13946 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 13947 # "foo.exe" is OK but "foo" is an error. 13948 # 13949 # This test is therefore slightly more accurate than "test -f" to check for file precense. 13950 # It is also a way to make sure we got the proper file name for the real test later on. 13951 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 13952 if test "x$test_shortpath" = x; then 13953 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 13954 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 13955 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 13956 fi 13957 13958 # Call helper function which possibly converts this using DOS-style short mode. 13959 # If so, the updated path is stored in $new_path. 13960 13961 input_path="$new_path" 13962 # Check if we need to convert this using DOS-style short mode. If the path 13963 # contains just simple characters, use it. Otherwise (spaces, weird characters), 13964 # take no chances and rewrite it. 13965 # Note: m4 eats our [], so we need to use [ and ] instead. 13966 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 13967 if test "x$has_forbidden_chars" != x; then 13968 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 13969 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 13970 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 13971 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 13972 # Going to short mode and back again did indeed matter. Since short mode is 13973 # case insensitive, let's make it lowercase to improve readability. 13974 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 13975 # Now convert it back to Unix-stile (cygpath) 13976 input_path=`$CYGPATH -u "$shortmode_path"` 13977 new_path="$input_path" 13978 fi 13979 fi 13980 13981 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 13982 if test "x$test_cygdrive_prefix" = x; then 13983 # As a simple fix, exclude /usr/bin since it's not a real path. 13984 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 13985 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 13986 # a path prefixed by /cygdrive for fixpath to work. 13987 new_path="$CYGWIN_ROOT_PATH$input_path" 13988 fi 13989 fi 13990 13991 13992 if test "x$path" != "x$new_path"; then 13993 BOOT_JDK="$new_path" 13994 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 13995 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 13996 fi 13997 13998 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 13999 14000 path="$BOOT_JDK" 14001 has_colon=`$ECHO $path | $GREP ^.:` 14002 new_path="$path" 14003 if test "x$has_colon" = x; then 14004 # Not in mixed or Windows style, start by that. 14005 new_path=`cmd //c echo $path` 14006 fi 14007 14008 14009 input_path="$new_path" 14010 # Check if we need to convert this using DOS-style short mode. If the path 14011 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14012 # take no chances and rewrite it. 14013 # Note: m4 eats our [], so we need to use [ and ] instead. 14014 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14015 if test "x$has_forbidden_chars" != x; then 14016 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14017 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14018 fi 14019 14020 14021 windows_path="$new_path" 14022 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14023 unix_path=`$CYGPATH -u "$windows_path"` 14024 new_path="$unix_path" 14025 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14026 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14027 new_path="$unix_path" 14028 fi 14029 14030 if test "x$path" != "x$new_path"; then 14031 BOOT_JDK="$new_path" 14032 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14033 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14034 fi 14035 14036 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14037 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14038 14039 else 14040 # We're on a posix platform. Hooray! :) 14041 path="$BOOT_JDK" 14042 14043 if test ! -f "$path" && test ! -d "$path"; then 14044 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14045 fi 14046 14047 has_space=`$ECHO "$path" | $GREP " "` 14048 if test "x$has_space" != x; then 14049 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14050 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14051 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14052 fi 14053 fi 14054 14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14056 $as_echo_n "checking for Boot JDK... " >&6; } 14057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14058 $as_echo "$BOOT_JDK" >&6; } 14059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14060 $as_echo_n "checking Boot JDK version... " >&6; } 14061 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14063 $as_echo "$BOOT_JDK_VERSION" >&6; } 14064 fi # end check jdk version 14065 fi # end check rt.jar 14066 fi # end check javac 14067 fi # end check java 14068 fi # end check boot jdk found 14069 fi 14070 14071 done 14072 fi 14073 14074 14075 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14076 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14077 # Do we have a bin/java? 14078 if test ! -x "$BOOT_JDK/bin/java"; then 14079 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14081 BOOT_JDK_FOUND=no 14082 else 14083 # Do we have a bin/javac? 14084 if test ! -x "$BOOT_JDK/bin/javac"; then 14085 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14087 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14088 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14089 BOOT_JDK_FOUND=no 14090 else 14091 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14092 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14093 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14094 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14095 BOOT_JDK_FOUND=no 14096 else 14097 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14098 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14099 14100 # Extra M4 quote needed to protect [] in grep expression. 14101 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14102 if test "x$FOUND_VERSION_78" = x; then 14103 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14104 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14105 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14106 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14107 BOOT_JDK_FOUND=no 14108 else 14109 # We're done! :-) 14110 BOOT_JDK_FOUND=yes 14111 14112 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14113 14114 # Input might be given as Windows format, start by converting to 14115 # unix format. 14116 path="$BOOT_JDK" 14117 new_path=`$CYGPATH -u "$path"` 14118 14119 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14120 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14121 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14122 # "foo.exe" is OK but "foo" is an error. 14123 # 14124 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14125 # It is also a way to make sure we got the proper file name for the real test later on. 14126 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14127 if test "x$test_shortpath" = x; then 14128 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14130 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14131 fi 14132 14133 # Call helper function which possibly converts this using DOS-style short mode. 14134 # If so, the updated path is stored in $new_path. 14135 14136 input_path="$new_path" 14137 # Check if we need to convert this using DOS-style short mode. If the path 14138 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14139 # take no chances and rewrite it. 14140 # Note: m4 eats our [], so we need to use [ and ] instead. 14141 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14142 if test "x$has_forbidden_chars" != x; then 14143 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14144 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14145 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14146 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14147 # Going to short mode and back again did indeed matter. Since short mode is 14148 # case insensitive, let's make it lowercase to improve readability. 14149 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14150 # Now convert it back to Unix-stile (cygpath) 14151 input_path=`$CYGPATH -u "$shortmode_path"` 14152 new_path="$input_path" 14153 fi 14154 fi 14155 14156 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14157 if test "x$test_cygdrive_prefix" = x; then 14158 # As a simple fix, exclude /usr/bin since it's not a real path. 14159 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14160 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14161 # a path prefixed by /cygdrive for fixpath to work. 14162 new_path="$CYGWIN_ROOT_PATH$input_path" 14163 fi 14164 fi 14165 14166 14167 if test "x$path" != "x$new_path"; then 14168 BOOT_JDK="$new_path" 14169 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14170 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14171 fi 14172 14173 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14174 14175 path="$BOOT_JDK" 14176 has_colon=`$ECHO $path | $GREP ^.:` 14177 new_path="$path" 14178 if test "x$has_colon" = x; then 14179 # Not in mixed or Windows style, start by that. 14180 new_path=`cmd //c echo $path` 14181 fi 14182 14183 14184 input_path="$new_path" 14185 # Check if we need to convert this using DOS-style short mode. If the path 14186 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14187 # take no chances and rewrite it. 14188 # Note: m4 eats our [], so we need to use [ and ] instead. 14189 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14190 if test "x$has_forbidden_chars" != x; then 14191 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14192 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14193 fi 14194 14195 14196 windows_path="$new_path" 14197 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14198 unix_path=`$CYGPATH -u "$windows_path"` 14199 new_path="$unix_path" 14200 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14201 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14202 new_path="$unix_path" 14203 fi 14204 14205 if test "x$path" != "x$new_path"; then 14206 BOOT_JDK="$new_path" 14207 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14208 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14209 fi 14210 14211 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14212 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14213 14214 else 14215 # We're on a posix platform. Hooray! :) 14216 path="$BOOT_JDK" 14217 14218 if test ! -f "$path" && test ! -d "$path"; then 14219 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14220 fi 14221 14222 has_space=`$ECHO "$path" | $GREP " "` 14223 if test "x$has_space" != x; then 14224 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14226 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14227 fi 14228 fi 14229 14230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14231 $as_echo_n "checking for Boot JDK... " >&6; } 14232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14233 $as_echo "$BOOT_JDK" >&6; } 14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14235 $as_echo_n "checking Boot JDK version... " >&6; } 14236 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14238 $as_echo "$BOOT_JDK_VERSION" >&6; } 14239 fi # end check jdk version 14240 fi # end check rt.jar 14241 fi # end check javac 14242 fi # end check java 14243 fi # end check boot jdk found 14244 fi 14245 14246 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then 14247 14248 if test "x$BOOT_JDK_FOUND" = xno; then 14249 # Now execute the test 14250 14251 BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines" 14252 BOOT_JDK_SUFFIX="/Contents/Home" 14253 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14254 if test "x$ALL_JDKS_FOUND" != x; then 14255 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14256 14257 if test "x$BOOT_JDK_FOUND" = xno; then 14258 # Now execute the test 14259 14260 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14261 if test -d "$BOOT_JDK"; then 14262 BOOT_JDK_FOUND=maybe 14263 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14264 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14265 fi 14266 14267 14268 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14269 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14270 # Do we have a bin/java? 14271 if test ! -x "$BOOT_JDK/bin/java"; then 14272 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14273 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14274 BOOT_JDK_FOUND=no 14275 else 14276 # Do we have a bin/javac? 14277 if test ! -x "$BOOT_JDK/bin/javac"; then 14278 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14279 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14280 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14281 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14282 BOOT_JDK_FOUND=no 14283 else 14284 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14285 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14286 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14287 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14288 BOOT_JDK_FOUND=no 14289 else 14290 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14291 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14292 14293 # Extra M4 quote needed to protect [] in grep expression. 14294 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14295 if test "x$FOUND_VERSION_78" = x; then 14296 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14297 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14298 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14299 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14300 BOOT_JDK_FOUND=no 14301 else 14302 # We're done! :-) 14303 BOOT_JDK_FOUND=yes 14304 14305 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14306 14307 # Input might be given as Windows format, start by converting to 14308 # unix format. 14309 path="$BOOT_JDK" 14310 new_path=`$CYGPATH -u "$path"` 14311 14312 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14313 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14314 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14315 # "foo.exe" is OK but "foo" is an error. 14316 # 14317 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14318 # It is also a way to make sure we got the proper file name for the real test later on. 14319 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14320 if test "x$test_shortpath" = x; then 14321 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14322 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14323 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14324 fi 14325 14326 # Call helper function which possibly converts this using DOS-style short mode. 14327 # If so, the updated path is stored in $new_path. 14328 14329 input_path="$new_path" 14330 # Check if we need to convert this using DOS-style short mode. If the path 14331 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14332 # take no chances and rewrite it. 14333 # Note: m4 eats our [], so we need to use [ and ] instead. 14334 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14335 if test "x$has_forbidden_chars" != x; then 14336 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14337 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14338 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14339 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14340 # Going to short mode and back again did indeed matter. Since short mode is 14341 # case insensitive, let's make it lowercase to improve readability. 14342 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14343 # Now convert it back to Unix-stile (cygpath) 14344 input_path=`$CYGPATH -u "$shortmode_path"` 14345 new_path="$input_path" 14346 fi 14347 fi 14348 14349 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14350 if test "x$test_cygdrive_prefix" = x; then 14351 # As a simple fix, exclude /usr/bin since it's not a real path. 14352 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14353 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14354 # a path prefixed by /cygdrive for fixpath to work. 14355 new_path="$CYGWIN_ROOT_PATH$input_path" 14356 fi 14357 fi 14358 14359 14360 if test "x$path" != "x$new_path"; then 14361 BOOT_JDK="$new_path" 14362 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14363 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14364 fi 14365 14366 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14367 14368 path="$BOOT_JDK" 14369 has_colon=`$ECHO $path | $GREP ^.:` 14370 new_path="$path" 14371 if test "x$has_colon" = x; then 14372 # Not in mixed or Windows style, start by that. 14373 new_path=`cmd //c echo $path` 14374 fi 14375 14376 14377 input_path="$new_path" 14378 # Check if we need to convert this using DOS-style short mode. If the path 14379 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14380 # take no chances and rewrite it. 14381 # Note: m4 eats our [], so we need to use [ and ] instead. 14382 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14383 if test "x$has_forbidden_chars" != x; then 14384 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14385 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14386 fi 14387 14388 14389 windows_path="$new_path" 14390 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14391 unix_path=`$CYGPATH -u "$windows_path"` 14392 new_path="$unix_path" 14393 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14394 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14395 new_path="$unix_path" 14396 fi 14397 14398 if test "x$path" != "x$new_path"; then 14399 BOOT_JDK="$new_path" 14400 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14401 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14402 fi 14403 14404 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14405 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14406 14407 else 14408 # We're on a posix platform. Hooray! :) 14409 path="$BOOT_JDK" 14410 14411 if test ! -f "$path" && test ! -d "$path"; then 14412 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14413 fi 14414 14415 has_space=`$ECHO "$path" | $GREP " "` 14416 if test "x$has_space" != x; then 14417 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14418 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14419 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14420 fi 14421 fi 14422 14423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14424 $as_echo_n "checking for Boot JDK... " >&6; } 14425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14426 $as_echo "$BOOT_JDK" >&6; } 14427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14428 $as_echo_n "checking Boot JDK version... " >&6; } 14429 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14431 $as_echo "$BOOT_JDK_VERSION" >&6; } 14432 fi # end check jdk version 14433 fi # end check rt.jar 14434 fi # end check javac 14435 fi # end check java 14436 fi # end check boot jdk found 14437 fi 14438 14439 done 14440 fi 14441 14442 14443 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14444 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14445 # Do we have a bin/java? 14446 if test ! -x "$BOOT_JDK/bin/java"; then 14447 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14448 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14449 BOOT_JDK_FOUND=no 14450 else 14451 # Do we have a bin/javac? 14452 if test ! -x "$BOOT_JDK/bin/javac"; then 14453 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14455 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14456 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14457 BOOT_JDK_FOUND=no 14458 else 14459 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14460 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14461 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14462 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14463 BOOT_JDK_FOUND=no 14464 else 14465 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14466 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14467 14468 # Extra M4 quote needed to protect [] in grep expression. 14469 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14470 if test "x$FOUND_VERSION_78" = x; then 14471 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14472 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14473 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14474 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14475 BOOT_JDK_FOUND=no 14476 else 14477 # We're done! :-) 14478 BOOT_JDK_FOUND=yes 14479 14480 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14481 14482 # Input might be given as Windows format, start by converting to 14483 # unix format. 14484 path="$BOOT_JDK" 14485 new_path=`$CYGPATH -u "$path"` 14486 14487 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14488 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14489 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14490 # "foo.exe" is OK but "foo" is an error. 14491 # 14492 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14493 # It is also a way to make sure we got the proper file name for the real test later on. 14494 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14495 if test "x$test_shortpath" = x; then 14496 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14497 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14498 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14499 fi 14500 14501 # Call helper function which possibly converts this using DOS-style short mode. 14502 # If so, the updated path is stored in $new_path. 14503 14504 input_path="$new_path" 14505 # Check if we need to convert this using DOS-style short mode. If the path 14506 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14507 # take no chances and rewrite it. 14508 # Note: m4 eats our [], so we need to use [ and ] instead. 14509 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14510 if test "x$has_forbidden_chars" != x; then 14511 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14512 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14513 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14514 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14515 # Going to short mode and back again did indeed matter. Since short mode is 14516 # case insensitive, let's make it lowercase to improve readability. 14517 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14518 # Now convert it back to Unix-stile (cygpath) 14519 input_path=`$CYGPATH -u "$shortmode_path"` 14520 new_path="$input_path" 14521 fi 14522 fi 14523 14524 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14525 if test "x$test_cygdrive_prefix" = x; then 14526 # As a simple fix, exclude /usr/bin since it's not a real path. 14527 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14528 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14529 # a path prefixed by /cygdrive for fixpath to work. 14530 new_path="$CYGWIN_ROOT_PATH$input_path" 14531 fi 14532 fi 14533 14534 14535 if test "x$path" != "x$new_path"; then 14536 BOOT_JDK="$new_path" 14537 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14538 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14539 fi 14540 14541 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14542 14543 path="$BOOT_JDK" 14544 has_colon=`$ECHO $path | $GREP ^.:` 14545 new_path="$path" 14546 if test "x$has_colon" = x; then 14547 # Not in mixed or Windows style, start by that. 14548 new_path=`cmd //c echo $path` 14549 fi 14550 14551 14552 input_path="$new_path" 14553 # Check if we need to convert this using DOS-style short mode. If the path 14554 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14555 # take no chances and rewrite it. 14556 # Note: m4 eats our [], so we need to use [ and ] instead. 14557 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14558 if test "x$has_forbidden_chars" != x; then 14559 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14560 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14561 fi 14562 14563 14564 windows_path="$new_path" 14565 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14566 unix_path=`$CYGPATH -u "$windows_path"` 14567 new_path="$unix_path" 14568 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14569 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14570 new_path="$unix_path" 14571 fi 14572 14573 if test "x$path" != "x$new_path"; then 14574 BOOT_JDK="$new_path" 14575 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14576 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14577 fi 14578 14579 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14580 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14581 14582 else 14583 # We're on a posix platform. Hooray! :) 14584 path="$BOOT_JDK" 14585 14586 if test ! -f "$path" && test ! -d "$path"; then 14587 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14588 fi 14589 14590 has_space=`$ECHO "$path" | $GREP " "` 14591 if test "x$has_space" != x; then 14592 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14593 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14594 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14595 fi 14596 fi 14597 14598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14599 $as_echo_n "checking for Boot JDK... " >&6; } 14600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14601 $as_echo "$BOOT_JDK" >&6; } 14602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14603 $as_echo_n "checking Boot JDK version... " >&6; } 14604 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14606 $as_echo "$BOOT_JDK_VERSION" >&6; } 14607 fi # end check jdk version 14608 fi # end check rt.jar 14609 fi # end check javac 14610 fi # end check java 14611 fi # end check boot jdk found 14612 fi 14613 14614 14615 if test "x$BOOT_JDK_FOUND" = xno; then 14616 # Now execute the test 14617 14618 BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines" 14619 BOOT_JDK_SUFFIX="/Contents/Home" 14620 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14621 if test "x$ALL_JDKS_FOUND" != x; then 14622 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14623 14624 if test "x$BOOT_JDK_FOUND" = xno; then 14625 # Now execute the test 14626 14627 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14628 if test -d "$BOOT_JDK"; then 14629 BOOT_JDK_FOUND=maybe 14630 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14631 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 14632 fi 14633 14634 14635 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14636 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14637 # Do we have a bin/java? 14638 if test ! -x "$BOOT_JDK/bin/java"; then 14639 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14641 BOOT_JDK_FOUND=no 14642 else 14643 # Do we have a bin/javac? 14644 if test ! -x "$BOOT_JDK/bin/javac"; then 14645 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14646 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14647 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14648 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14649 BOOT_JDK_FOUND=no 14650 else 14651 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14652 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14653 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14654 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14655 BOOT_JDK_FOUND=no 14656 else 14657 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14658 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14659 14660 # Extra M4 quote needed to protect [] in grep expression. 14661 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14662 if test "x$FOUND_VERSION_78" = x; then 14663 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14664 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14665 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14666 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14667 BOOT_JDK_FOUND=no 14668 else 14669 # We're done! :-) 14670 BOOT_JDK_FOUND=yes 14671 14672 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14673 14674 # Input might be given as Windows format, start by converting to 14675 # unix format. 14676 path="$BOOT_JDK" 14677 new_path=`$CYGPATH -u "$path"` 14678 14679 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14680 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14681 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14682 # "foo.exe" is OK but "foo" is an error. 14683 # 14684 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14685 # It is also a way to make sure we got the proper file name for the real test later on. 14686 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14687 if test "x$test_shortpath" = x; then 14688 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14689 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14690 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14691 fi 14692 14693 # Call helper function which possibly converts this using DOS-style short mode. 14694 # If so, the updated path is stored in $new_path. 14695 14696 input_path="$new_path" 14697 # Check if we need to convert this using DOS-style short mode. If the path 14698 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14699 # take no chances and rewrite it. 14700 # Note: m4 eats our [], so we need to use [ and ] instead. 14701 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14702 if test "x$has_forbidden_chars" != x; then 14703 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14704 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14705 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14706 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14707 # Going to short mode and back again did indeed matter. Since short mode is 14708 # case insensitive, let's make it lowercase to improve readability. 14709 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14710 # Now convert it back to Unix-stile (cygpath) 14711 input_path=`$CYGPATH -u "$shortmode_path"` 14712 new_path="$input_path" 14713 fi 14714 fi 14715 14716 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14717 if test "x$test_cygdrive_prefix" = x; then 14718 # As a simple fix, exclude /usr/bin since it's not a real path. 14719 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14720 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14721 # a path prefixed by /cygdrive for fixpath to work. 14722 new_path="$CYGWIN_ROOT_PATH$input_path" 14723 fi 14724 fi 14725 14726 14727 if test "x$path" != "x$new_path"; then 14728 BOOT_JDK="$new_path" 14729 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14730 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14731 fi 14732 14733 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14734 14735 path="$BOOT_JDK" 14736 has_colon=`$ECHO $path | $GREP ^.:` 14737 new_path="$path" 14738 if test "x$has_colon" = x; then 14739 # Not in mixed or Windows style, start by that. 14740 new_path=`cmd //c echo $path` 14741 fi 14742 14743 14744 input_path="$new_path" 14745 # Check if we need to convert this using DOS-style short mode. If the path 14746 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14747 # take no chances and rewrite it. 14748 # Note: m4 eats our [], so we need to use [ and ] instead. 14749 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14750 if test "x$has_forbidden_chars" != x; then 14751 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14752 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14753 fi 14754 14755 14756 windows_path="$new_path" 14757 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14758 unix_path=`$CYGPATH -u "$windows_path"` 14759 new_path="$unix_path" 14760 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14761 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14762 new_path="$unix_path" 14763 fi 14764 14765 if test "x$path" != "x$new_path"; then 14766 BOOT_JDK="$new_path" 14767 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14768 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14769 fi 14770 14771 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14772 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14773 14774 else 14775 # We're on a posix platform. Hooray! :) 14776 path="$BOOT_JDK" 14777 14778 if test ! -f "$path" && test ! -d "$path"; then 14779 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14780 fi 14781 14782 has_space=`$ECHO "$path" | $GREP " "` 14783 if test "x$has_space" != x; then 14784 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14785 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14786 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14787 fi 14788 fi 14789 14790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14791 $as_echo_n "checking for Boot JDK... " >&6; } 14792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14793 $as_echo "$BOOT_JDK" >&6; } 14794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14795 $as_echo_n "checking Boot JDK version... " >&6; } 14796 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14798 $as_echo "$BOOT_JDK_VERSION" >&6; } 14799 fi # end check jdk version 14800 fi # end check rt.jar 14801 fi # end check javac 14802 fi # end check java 14803 fi # end check boot jdk found 14804 fi 14805 14806 done 14807 fi 14808 14809 14810 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 14811 if test "x$BOOT_JDK_FOUND" = xmaybe; then 14812 # Do we have a bin/java? 14813 if test ! -x "$BOOT_JDK/bin/java"; then 14814 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 14815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 14816 BOOT_JDK_FOUND=no 14817 else 14818 # Do we have a bin/javac? 14819 if test ! -x "$BOOT_JDK/bin/javac"; then 14820 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 14821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 14822 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 14823 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 14824 BOOT_JDK_FOUND=no 14825 else 14826 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 14827 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 14828 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 14829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 14830 BOOT_JDK_FOUND=no 14831 else 14832 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 14833 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 14834 14835 # Extra M4 quote needed to protect [] in grep expression. 14836 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 14837 if test "x$FOUND_VERSION_78" = x; then 14838 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 14839 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 14840 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 14841 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 14842 BOOT_JDK_FOUND=no 14843 else 14844 # We're done! :-) 14845 BOOT_JDK_FOUND=yes 14846 14847 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14848 14849 # Input might be given as Windows format, start by converting to 14850 # unix format. 14851 path="$BOOT_JDK" 14852 new_path=`$CYGPATH -u "$path"` 14853 14854 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 14855 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 14856 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 14857 # "foo.exe" is OK but "foo" is an error. 14858 # 14859 # This test is therefore slightly more accurate than "test -f" to check for file precense. 14860 # It is also a way to make sure we got the proper file name for the real test later on. 14861 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 14862 if test "x$test_shortpath" = x; then 14863 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14864 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14865 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 14866 fi 14867 14868 # Call helper function which possibly converts this using DOS-style short mode. 14869 # If so, the updated path is stored in $new_path. 14870 14871 input_path="$new_path" 14872 # Check if we need to convert this using DOS-style short mode. If the path 14873 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14874 # take no chances and rewrite it. 14875 # Note: m4 eats our [], so we need to use [ and ] instead. 14876 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 14877 if test "x$has_forbidden_chars" != x; then 14878 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14879 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 14880 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 14881 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 14882 # Going to short mode and back again did indeed matter. Since short mode is 14883 # case insensitive, let's make it lowercase to improve readability. 14884 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14885 # Now convert it back to Unix-stile (cygpath) 14886 input_path=`$CYGPATH -u "$shortmode_path"` 14887 new_path="$input_path" 14888 fi 14889 fi 14890 14891 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 14892 if test "x$test_cygdrive_prefix" = x; then 14893 # As a simple fix, exclude /usr/bin since it's not a real path. 14894 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 14895 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 14896 # a path prefixed by /cygdrive for fixpath to work. 14897 new_path="$CYGWIN_ROOT_PATH$input_path" 14898 fi 14899 fi 14900 14901 14902 if test "x$path" != "x$new_path"; then 14903 BOOT_JDK="$new_path" 14904 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14905 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14906 fi 14907 14908 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14909 14910 path="$BOOT_JDK" 14911 has_colon=`$ECHO $path | $GREP ^.:` 14912 new_path="$path" 14913 if test "x$has_colon" = x; then 14914 # Not in mixed or Windows style, start by that. 14915 new_path=`cmd //c echo $path` 14916 fi 14917 14918 14919 input_path="$new_path" 14920 # Check if we need to convert this using DOS-style short mode. If the path 14921 # contains just simple characters, use it. Otherwise (spaces, weird characters), 14922 # take no chances and rewrite it. 14923 # Note: m4 eats our [], so we need to use [ and ] instead. 14924 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 14925 if test "x$has_forbidden_chars" != x; then 14926 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 14927 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 14928 fi 14929 14930 14931 windows_path="$new_path" 14932 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 14933 unix_path=`$CYGPATH -u "$windows_path"` 14934 new_path="$unix_path" 14935 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 14936 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 14937 new_path="$unix_path" 14938 fi 14939 14940 if test "x$path" != "x$new_path"; then 14941 BOOT_JDK="$new_path" 14942 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 14943 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 14944 fi 14945 14946 # Save the first 10 bytes of this path to the storage, so fixpath can work. 14947 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 14948 14949 else 14950 # We're on a posix platform. Hooray! :) 14951 path="$BOOT_JDK" 14952 14953 if test ! -f "$path" && test ! -d "$path"; then 14954 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 14955 fi 14956 14957 has_space=`$ECHO "$path" | $GREP " "` 14958 if test "x$has_space" != x; then 14959 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 14960 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 14961 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 14962 fi 14963 fi 14964 14965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 14966 $as_echo_n "checking for Boot JDK... " >&6; } 14967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 14968 $as_echo "$BOOT_JDK" >&6; } 14969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 14970 $as_echo_n "checking Boot JDK version... " >&6; } 14971 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 14972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 14973 $as_echo "$BOOT_JDK_VERSION" >&6; } 14974 fi # end check jdk version 14975 fi # end check rt.jar 14976 fi # end check javac 14977 fi # end check java 14978 fi # end check boot jdk found 14979 fi 14980 14981 elif test "x$OPENJDK_TARGET_OS" = xlinux; then 14982 14983 if test "x$BOOT_JDK_FOUND" = xno; then 14984 # Now execute the test 14985 14986 BOOT_JDK_PREFIX="/usr/lib/jvm" 14987 BOOT_JDK_SUFFIX="" 14988 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` 14989 if test "x$ALL_JDKS_FOUND" != x; then 14990 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do 14991 14992 if test "x$BOOT_JDK_FOUND" = xno; then 14993 # Now execute the test 14994 14995 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" 14996 if test -d "$BOOT_JDK"; then 14997 BOOT_JDK_FOUND=maybe 14998 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5 14999 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;} 15000 fi 15001 15002 15003 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15004 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15005 # Do we have a bin/java? 15006 if test ! -x "$BOOT_JDK/bin/java"; then 15007 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15009 BOOT_JDK_FOUND=no 15010 else 15011 # Do we have a bin/javac? 15012 if test ! -x "$BOOT_JDK/bin/javac"; then 15013 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15014 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15015 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15016 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15017 BOOT_JDK_FOUND=no 15018 else 15019 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15020 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15021 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15023 BOOT_JDK_FOUND=no 15024 else 15025 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15026 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15027 15028 # Extra M4 quote needed to protect [] in grep expression. 15029 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15030 if test "x$FOUND_VERSION_78" = x; then 15031 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15032 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15033 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15034 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15035 BOOT_JDK_FOUND=no 15036 else 15037 # We're done! :-) 15038 BOOT_JDK_FOUND=yes 15039 15040 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15041 15042 # Input might be given as Windows format, start by converting to 15043 # unix format. 15044 path="$BOOT_JDK" 15045 new_path=`$CYGPATH -u "$path"` 15046 15047 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15048 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15049 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15050 # "foo.exe" is OK but "foo" is an error. 15051 # 15052 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15053 # It is also a way to make sure we got the proper file name for the real test later on. 15054 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15055 if test "x$test_shortpath" = x; then 15056 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15057 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15058 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15059 fi 15060 15061 # Call helper function which possibly converts this using DOS-style short mode. 15062 # If so, the updated path is stored in $new_path. 15063 15064 input_path="$new_path" 15065 # Check if we need to convert this using DOS-style short mode. If the path 15066 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15067 # take no chances and rewrite it. 15068 # Note: m4 eats our [], so we need to use [ and ] instead. 15069 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15070 if test "x$has_forbidden_chars" != x; then 15071 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15072 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15073 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15074 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15075 # Going to short mode and back again did indeed matter. Since short mode is 15076 # case insensitive, let's make it lowercase to improve readability. 15077 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15078 # Now convert it back to Unix-stile (cygpath) 15079 input_path=`$CYGPATH -u "$shortmode_path"` 15080 new_path="$input_path" 15081 fi 15082 fi 15083 15084 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15085 if test "x$test_cygdrive_prefix" = x; then 15086 # As a simple fix, exclude /usr/bin since it's not a real path. 15087 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15088 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15089 # a path prefixed by /cygdrive for fixpath to work. 15090 new_path="$CYGWIN_ROOT_PATH$input_path" 15091 fi 15092 fi 15093 15094 15095 if test "x$path" != "x$new_path"; then 15096 BOOT_JDK="$new_path" 15097 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15098 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15099 fi 15100 15101 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15102 15103 path="$BOOT_JDK" 15104 has_colon=`$ECHO $path | $GREP ^.:` 15105 new_path="$path" 15106 if test "x$has_colon" = x; then 15107 # Not in mixed or Windows style, start by that. 15108 new_path=`cmd //c echo $path` 15109 fi 15110 15111 15112 input_path="$new_path" 15113 # Check if we need to convert this using DOS-style short mode. If the path 15114 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15115 # take no chances and rewrite it. 15116 # Note: m4 eats our [], so we need to use [ and ] instead. 15117 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15118 if test "x$has_forbidden_chars" != x; then 15119 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15120 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15121 fi 15122 15123 15124 windows_path="$new_path" 15125 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15126 unix_path=`$CYGPATH -u "$windows_path"` 15127 new_path="$unix_path" 15128 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15129 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15130 new_path="$unix_path" 15131 fi 15132 15133 if test "x$path" != "x$new_path"; then 15134 BOOT_JDK="$new_path" 15135 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15136 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15137 fi 15138 15139 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15140 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15141 15142 else 15143 # We're on a posix platform. Hooray! :) 15144 path="$BOOT_JDK" 15145 15146 if test ! -f "$path" && test ! -d "$path"; then 15147 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15148 fi 15149 15150 has_space=`$ECHO "$path" | $GREP " "` 15151 if test "x$has_space" != x; then 15152 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15153 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15154 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15155 fi 15156 fi 15157 15158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15159 $as_echo_n "checking for Boot JDK... " >&6; } 15160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15161 $as_echo "$BOOT_JDK" >&6; } 15162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15163 $as_echo_n "checking Boot JDK version... " >&6; } 15164 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15166 $as_echo "$BOOT_JDK_VERSION" >&6; } 15167 fi # end check jdk version 15168 fi # end check rt.jar 15169 fi # end check javac 15170 fi # end check java 15171 fi # end check boot jdk found 15172 fi 15173 15174 done 15175 fi 15176 15177 15178 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15179 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15180 # Do we have a bin/java? 15181 if test ! -x "$BOOT_JDK/bin/java"; then 15182 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15183 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15184 BOOT_JDK_FOUND=no 15185 else 15186 # Do we have a bin/javac? 15187 if test ! -x "$BOOT_JDK/bin/javac"; then 15188 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15189 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15190 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15191 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15192 BOOT_JDK_FOUND=no 15193 else 15194 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15195 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15196 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15198 BOOT_JDK_FOUND=no 15199 else 15200 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15201 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15202 15203 # Extra M4 quote needed to protect [] in grep expression. 15204 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15205 if test "x$FOUND_VERSION_78" = x; then 15206 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15207 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15208 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15209 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15210 BOOT_JDK_FOUND=no 15211 else 15212 # We're done! :-) 15213 BOOT_JDK_FOUND=yes 15214 15215 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15216 15217 # Input might be given as Windows format, start by converting to 15218 # unix format. 15219 path="$BOOT_JDK" 15220 new_path=`$CYGPATH -u "$path"` 15221 15222 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15223 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15224 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15225 # "foo.exe" is OK but "foo" is an error. 15226 # 15227 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15228 # It is also a way to make sure we got the proper file name for the real test later on. 15229 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15230 if test "x$test_shortpath" = x; then 15231 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15232 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15233 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15234 fi 15235 15236 # Call helper function which possibly converts this using DOS-style short mode. 15237 # If so, the updated path is stored in $new_path. 15238 15239 input_path="$new_path" 15240 # Check if we need to convert this using DOS-style short mode. If the path 15241 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15242 # take no chances and rewrite it. 15243 # Note: m4 eats our [], so we need to use [ and ] instead. 15244 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15245 if test "x$has_forbidden_chars" != x; then 15246 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15247 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15248 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15249 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15250 # Going to short mode and back again did indeed matter. Since short mode is 15251 # case insensitive, let's make it lowercase to improve readability. 15252 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15253 # Now convert it back to Unix-stile (cygpath) 15254 input_path=`$CYGPATH -u "$shortmode_path"` 15255 new_path="$input_path" 15256 fi 15257 fi 15258 15259 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15260 if test "x$test_cygdrive_prefix" = x; then 15261 # As a simple fix, exclude /usr/bin since it's not a real path. 15262 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15263 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15264 # a path prefixed by /cygdrive for fixpath to work. 15265 new_path="$CYGWIN_ROOT_PATH$input_path" 15266 fi 15267 fi 15268 15269 15270 if test "x$path" != "x$new_path"; then 15271 BOOT_JDK="$new_path" 15272 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15273 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15274 fi 15275 15276 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15277 15278 path="$BOOT_JDK" 15279 has_colon=`$ECHO $path | $GREP ^.:` 15280 new_path="$path" 15281 if test "x$has_colon" = x; then 15282 # Not in mixed or Windows style, start by that. 15283 new_path=`cmd //c echo $path` 15284 fi 15285 15286 15287 input_path="$new_path" 15288 # Check if we need to convert this using DOS-style short mode. If the path 15289 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15290 # take no chances and rewrite it. 15291 # Note: m4 eats our [], so we need to use [ and ] instead. 15292 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15293 if test "x$has_forbidden_chars" != x; then 15294 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15295 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15296 fi 15297 15298 15299 windows_path="$new_path" 15300 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15301 unix_path=`$CYGPATH -u "$windows_path"` 15302 new_path="$unix_path" 15303 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15304 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15305 new_path="$unix_path" 15306 fi 15307 15308 if test "x$path" != "x$new_path"; then 15309 BOOT_JDK="$new_path" 15310 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15311 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15312 fi 15313 15314 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15315 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15316 15317 else 15318 # We're on a posix platform. Hooray! :) 15319 path="$BOOT_JDK" 15320 15321 if test ! -f "$path" && test ! -d "$path"; then 15322 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15323 fi 15324 15325 has_space=`$ECHO "$path" | $GREP " "` 15326 if test "x$has_space" != x; then 15327 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15328 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15329 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15330 fi 15331 fi 15332 15333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15334 $as_echo_n "checking for Boot JDK... " >&6; } 15335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15336 $as_echo "$BOOT_JDK" >&6; } 15337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15338 $as_echo_n "checking Boot JDK version... " >&6; } 15339 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15341 $as_echo "$BOOT_JDK_VERSION" >&6; } 15342 fi # end check jdk version 15343 fi # end check rt.jar 15344 fi # end check javac 15345 fi # end check java 15346 fi # end check boot jdk found 15347 fi 15348 15349 fi 15350 15351 15352 # If previous step claimed to have found a JDK, check it to see if it seems to be valid. 15353 if test "x$BOOT_JDK_FOUND" = xmaybe; then 15354 # Do we have a bin/java? 15355 if test ! -x "$BOOT_JDK/bin/java"; then 15356 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5 15357 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;} 15358 BOOT_JDK_FOUND=no 15359 else 15360 # Do we have a bin/javac? 15361 if test ! -x "$BOOT_JDK/bin/javac"; then 15362 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5 15363 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;} 15364 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5 15365 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;} 15366 BOOT_JDK_FOUND=no 15367 else 15368 # Do we have an rt.jar? (On MacOSX it is called classes.jar) 15369 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then 15370 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5 15371 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;} 15372 BOOT_JDK_FOUND=no 15373 else 15374 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? 15375 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` 15376 15377 # Extra M4 quote needed to protect [] in grep expression. 15378 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'` 15379 if test "x$FOUND_VERSION_78" = x; then 15380 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5 15381 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;} 15382 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5 15383 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;} 15384 BOOT_JDK_FOUND=no 15385 else 15386 # We're done! :-) 15387 BOOT_JDK_FOUND=yes 15388 15389 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15390 15391 # Input might be given as Windows format, start by converting to 15392 # unix format. 15393 path="$BOOT_JDK" 15394 new_path=`$CYGPATH -u "$path"` 15395 15396 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 15397 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 15398 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 15399 # "foo.exe" is OK but "foo" is an error. 15400 # 15401 # This test is therefore slightly more accurate than "test -f" to check for file precense. 15402 # It is also a way to make sure we got the proper file name for the real test later on. 15403 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 15404 if test "x$test_shortpath" = x; then 15405 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15406 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15407 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5 15408 fi 15409 15410 # Call helper function which possibly converts this using DOS-style short mode. 15411 # If so, the updated path is stored in $new_path. 15412 15413 input_path="$new_path" 15414 # Check if we need to convert this using DOS-style short mode. If the path 15415 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15416 # take no chances and rewrite it. 15417 # Note: m4 eats our [], so we need to use [ and ] instead. 15418 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 15419 if test "x$has_forbidden_chars" != x; then 15420 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15421 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 15422 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 15423 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 15424 # Going to short mode and back again did indeed matter. Since short mode is 15425 # case insensitive, let's make it lowercase to improve readability. 15426 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15427 # Now convert it back to Unix-stile (cygpath) 15428 input_path=`$CYGPATH -u "$shortmode_path"` 15429 new_path="$input_path" 15430 fi 15431 fi 15432 15433 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 15434 if test "x$test_cygdrive_prefix" = x; then 15435 # As a simple fix, exclude /usr/bin since it's not a real path. 15436 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 15437 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 15438 # a path prefixed by /cygdrive for fixpath to work. 15439 new_path="$CYGWIN_ROOT_PATH$input_path" 15440 fi 15441 fi 15442 15443 15444 if test "x$path" != "x$new_path"; then 15445 BOOT_JDK="$new_path" 15446 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15447 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15448 fi 15449 15450 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15451 15452 path="$BOOT_JDK" 15453 has_colon=`$ECHO $path | $GREP ^.:` 15454 new_path="$path" 15455 if test "x$has_colon" = x; then 15456 # Not in mixed or Windows style, start by that. 15457 new_path=`cmd //c echo $path` 15458 fi 15459 15460 15461 input_path="$new_path" 15462 # Check if we need to convert this using DOS-style short mode. If the path 15463 # contains just simple characters, use it. Otherwise (spaces, weird characters), 15464 # take no chances and rewrite it. 15465 # Note: m4 eats our [], so we need to use [ and ] instead. 15466 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 15467 if test "x$has_forbidden_chars" != x; then 15468 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 15469 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 15470 fi 15471 15472 15473 windows_path="$new_path" 15474 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 15475 unix_path=`$CYGPATH -u "$windows_path"` 15476 new_path="$unix_path" 15477 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 15478 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 15479 new_path="$unix_path" 15480 fi 15481 15482 if test "x$path" != "x$new_path"; then 15483 BOOT_JDK="$new_path" 15484 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5 15485 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;} 15486 fi 15487 15488 # Save the first 10 bytes of this path to the storage, so fixpath can work. 15489 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 15490 15491 else 15492 # We're on a posix platform. Hooray! :) 15493 path="$BOOT_JDK" 15494 15495 if test ! -f "$path" && test ! -d "$path"; then 15496 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5 15497 fi 15498 15499 has_space=`$ECHO "$path" | $GREP " "` 15500 if test "x$has_space" != x; then 15501 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5 15502 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;} 15503 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 15504 fi 15505 fi 15506 15507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5 15508 $as_echo_n "checking for Boot JDK... " >&6; } 15509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5 15510 $as_echo "$BOOT_JDK" >&6; } 15511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5 15512 $as_echo_n "checking Boot JDK version... " >&6; } 15513 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` 15514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5 15515 $as_echo "$BOOT_JDK_VERSION" >&6; } 15516 fi # end check jdk version 15517 fi # end check rt.jar 15518 fi # end check javac 15519 fi # end check java 15520 fi # end check boot jdk found 15521 fi 15522 15523 15524 # If we haven't found anything yet, we've truly lost. Give up. 15525 if test "x$BOOT_JDK_FOUND" = xno; then 15526 15527 # Print a helpful message on how to acquire the necessary build dependency. 15528 # openjdk is the help tag: freetyp2, cups, pulse, alsa etc 15529 MISSING_DEPENDENCY=openjdk 15530 PKGHANDLER_COMMAND= 15531 15532 case $PKGHANDLER in 15533 apt-get) 15534 apt_help $MISSING_DEPENDENCY ;; 15535 yum) 15536 yum_help $MISSING_DEPENDENCY ;; 15537 port) 15538 port_help $MISSING_DEPENDENCY ;; 15539 pkgutil) 15540 pkgutil_help $MISSING_DEPENDENCY ;; 15541 pkgadd) 15542 pkgadd_help $MISSING_DEPENDENCY ;; 15543 * ) 15544 break ;; 15545 esac 15546 15547 if test "x$PKGHANDLER_COMMAND" != x; then 15548 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 15549 fi 15550 15551 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5 15552 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;} 15553 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5 15554 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15555 as_fn_error $? "Cannot continue" "$LINENO" 5 15556 fi 15557 15558 # Setup proper paths for what we found 15559 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" 15560 if test ! -f "$BOOT_RTJAR"; then 15561 # On MacOSX it is called classes.jar 15562 BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar" 15563 if test -f "$BOOT_RTJAR"; then 15564 # Remove the .. 15565 BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" 15566 fi 15567 fi 15568 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" 15569 BOOT_JDK="$BOOT_JDK" 15570 15571 15572 15573 15574 # Setup tools from the Boot JDK. 15575 15576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5 15577 $as_echo_n "checking for java in Boot JDK... " >&6; } 15578 JAVA=$BOOT_JDK/bin/java 15579 if test ! -x $JAVA; then 15580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15581 $as_echo "not found" >&6; } 15582 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15583 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15584 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5 15585 fi 15586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15587 $as_echo "ok" >&6; } 15588 15589 15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5 15591 $as_echo_n "checking for javac in Boot JDK... " >&6; } 15592 JAVAC=$BOOT_JDK/bin/javac 15593 if test ! -x $JAVAC; then 15594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15595 $as_echo "not found" >&6; } 15596 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15597 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15598 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5 15599 fi 15600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15601 $as_echo "ok" >&6; } 15602 15603 15604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5 15605 $as_echo_n "checking for javah in Boot JDK... " >&6; } 15606 JAVAH=$BOOT_JDK/bin/javah 15607 if test ! -x $JAVAH; then 15608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15609 $as_echo "not found" >&6; } 15610 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15611 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15612 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5 15613 fi 15614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15615 $as_echo "ok" >&6; } 15616 15617 15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5 15619 $as_echo_n "checking for javap in Boot JDK... " >&6; } 15620 JAVAP=$BOOT_JDK/bin/javap 15621 if test ! -x $JAVAP; then 15622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15623 $as_echo "not found" >&6; } 15624 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15625 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15626 as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5 15627 fi 15628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15629 $as_echo "ok" >&6; } 15630 15631 15632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5 15633 $as_echo_n "checking for jar in Boot JDK... " >&6; } 15634 JAR=$BOOT_JDK/bin/jar 15635 if test ! -x $JAR; then 15636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15637 $as_echo "not found" >&6; } 15638 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15639 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15640 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5 15641 fi 15642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15643 $as_echo "ok" >&6; } 15644 15645 15646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5 15647 $as_echo_n "checking for rmic in Boot JDK... " >&6; } 15648 RMIC=$BOOT_JDK/bin/rmic 15649 if test ! -x $RMIC; then 15650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15651 $as_echo "not found" >&6; } 15652 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15653 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15654 as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5 15655 fi 15656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15657 $as_echo "ok" >&6; } 15658 15659 15660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5 15661 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; } 15662 NATIVE2ASCII=$BOOT_JDK/bin/native2ascii 15663 if test ! -x $NATIVE2ASCII; then 15664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 15665 $as_echo "not found" >&6; } 15666 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5 15667 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;} 15668 as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5 15669 fi 15670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 15671 $as_echo "ok" >&6; } 15672 15673 15674 # Finally, set some other options... 15675 15676 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility. 15677 BOOT_JDK_SOURCETARGET="-source 7 -target 7" 15678 15679 15680 15681 15682 ############################################################################## 15683 # 15684 # Specify options for anything that is run with the Boot JDK. 15685 # 15686 15687 # Check whether --with-boot-jdk-jvmargs was given. 15688 if test "${with_boot_jdk_jvmargs+set}" = set; then : 15689 withval=$with_boot_jdk_jvmargs; 15690 fi 15691 15692 15693 if test "x$with_boot_jdk_jvmargs" = x; then 15694 # Not all JVM:s accept the same arguments on the command line. 15695 # OpenJDK specific increase in thread stack for JDK build, 15696 # well more specifically, when running javac. 15697 if test "x$BUILD_NUM_BITS" = x32; then 15698 STACK_SIZE=768 15699 else 15700 # Running Javac on a JVM on a 64-bit machine, the stack takes more space 15701 # since 64-bit pointers are pushed on the stach. Apparently, we need 15702 # to increase the stack space when javacing the JDK.... 15703 STACK_SIZE=1536 15704 fi 15705 15706 # Minimum amount of heap memory. 15707 15708 # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15709 # If so, then append -Xms64M to boot_jdk_jvmargs 15710 FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn` 15711 FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""` 15712 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15713 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M" 15714 fi 15715 15716 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 15717 # Why does macosx need more heap? Its the huge JDK batch. 15718 15719 # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15720 # If so, then append -Xmx1600M to boot_jdk_jvmargs 15721 FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn` 15722 FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""` 15723 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15724 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M" 15725 fi 15726 15727 else 15728 15729 # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15730 # If so, then append -Xmx1100M to boot_jdk_jvmargs 15731 FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn` 15732 FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""` 15733 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15734 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M" 15735 fi 15736 15737 fi 15738 # When is adding -client something that speeds up the JVM? 15739 # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) 15740 15741 # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15742 # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs 15743 FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn` 15744 FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""` 15745 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15746 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m" 15747 fi 15748 15749 15750 # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15751 # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs 15752 FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn` 15753 FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""` 15754 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15755 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m" 15756 fi 15757 15758 15759 # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15760 # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs 15761 FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn` 15762 FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""` 15763 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15764 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE" 15765 fi 15766 15767 # Disable special log output when a debug build is used as Boot JDK... 15768 15769 # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 15770 # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs 15771 FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn` 15772 FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""` 15773 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 15774 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" 15775 fi 15776 15777 fi 15778 15779 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs 15780 15781 15782 15783 ############################################################################### 15784 # 15785 # Configure the sources to use. We can add or override individual directories. 15786 # 15787 ############################################################################### 15788 15789 15790 15791 # Where are the sources. Any of these can be overridden 15792 # using --with-override-corba and the likes. 15793 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" 15794 CORBA_TOPDIR="$SRC_ROOT/corba" 15795 JAXP_TOPDIR="$SRC_ROOT/jaxp" 15796 JAXWS_TOPDIR="$SRC_ROOT/jaxws" 15797 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" 15798 NASHORN_TOPDIR="$SRC_ROOT/nashorn" 15799 JDK_TOPDIR="$SRC_ROOT/jdk" 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 ############################################################################### 15811 # 15812 # Pickup additional source for a component from outside of the source root 15813 # or override source for a component. 15814 # 15815 15816 # Check whether --with-add-source-root was given. 15817 if test "${with_add_source_root+set}" = set; then : 15818 withval=$with_add_source_root; 15819 fi 15820 15821 15822 15823 # Check whether --with-override-source-root was given. 15824 if test "${with_override_source_root+set}" = set; then : 15825 withval=$with_override_source_root; 15826 fi 15827 15828 15829 15830 # Check whether --with-adds-and-overrides was given. 15831 if test "${with_adds_and_overrides+set}" = set; then : 15832 withval=$with_adds_and_overrides; 15833 fi 15834 15835 15836 if test "x$with_adds_and_overrides" != x; then 15837 with_add_source_root="$with_adds_and_overrides/adds" 15838 with_override_source_root="$with_adds_and_overrides/overrides" 15839 fi 15840 15841 if test "x$with_add_source_root" != x; then 15842 if ! test -d $with_add_source_root; then 15843 as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5 15844 fi 15845 CURDIR="$PWD" 15846 cd "$with_add_source_root" 15847 ADD_SRC_ROOT="`pwd`" 15848 cd "$CURDIR" 15849 # Verify that the addon source root does not have any root makefiles. 15850 # If it does, then it is usually an error, prevent this. 15851 if test -f $with_add_source_root/langtools/makefiles/Makefile || \ 15852 test -f $with_add_source_root/langtools/make/Makefile; then 15853 as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5 15854 fi 15855 if test -f $with_add_source_root/corba/makefiles/Makefile || \ 15856 test -f $with_add_source_root/corba/make/Makefile; then 15857 as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5 15858 fi 15859 if test -f $with_add_source_root/jaxp/makefiles/Makefile || \ 15860 test -f $with_add_source_root/jaxp/make/Makefile; then 15861 as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5 15862 fi 15863 if test -f $with_add_source_root/jaxws/makefiles/Makefile || \ 15864 test -f $with_add_source_root/jaxws/make/Makefile; then 15865 as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5 15866 fi 15867 if test -f $with_add_source_root/hotspot/makefiles/Makefile || \ 15868 test -f $with_add_source_root/hotspot/make/Makefile; then 15869 as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5 15870 fi 15871 if test -f $with_add_source_root/jdk/makefiles/Makefile || \ 15872 test -f $with_add_source_root/jdk/make/Makefile; then 15873 as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5 15874 fi 15875 fi 15876 15877 15878 if test "x$with_override_source_root" != x; then 15879 if ! test -d $with_override_source_root; then 15880 as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5 15881 fi 15882 CURDIR="$PWD" 15883 cd "$with_override_source_root" 15884 OVERRIDE_SRC_ROOT="`pwd`" 15885 cd "$CURDIR" 15886 if test -f $with_override_source_root/langtools/makefiles/Makefile || \ 15887 test -f $with_override_source_root/langtools/make/Makefile; then 15888 as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5 15889 fi 15890 if test -f $with_override_source_root/corba/makefiles/Makefile || \ 15891 test -f $with_override_source_root/corba/make/Makefile; then 15892 as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5 15893 fi 15894 if test -f $with_override_source_root/jaxp/makefiles/Makefile || \ 15895 test -f $with_override_source_root/jaxp/make/Makefile; then 15896 as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5 15897 fi 15898 if test -f $with_override_source_root/jaxws/makefiles/Makefile || \ 15899 test -f $with_override_source_root/jaxws/make/Makefile; then 15900 as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5 15901 fi 15902 if test -f $with_override_source_root/hotspot/makefiles/Makefile || \ 15903 test -f $with_override_source_root/hotspot/make/Makefile; then 15904 as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5 15905 fi 15906 if test -f $with_override_source_root/jdk/makefiles/Makefile || \ 15907 test -f $with_override_source_root/jdk/make/Makefile; then 15908 as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5 15909 fi 15910 fi 15911 15912 15913 ############################################################################### 15914 # 15915 # Override a repo completely, this is used for example when you have 3 small 15916 # development sandboxes of the langtools sources and want to avoid having 3 full 15917 # OpenJDK sources checked out on disk. 15918 # 15919 # Assuming that the 3 langtools sandboxes are located here: 15920 # /home/fredrik/sandbox1/langtools 15921 # /home/fredrik/sandbox2/langtools 15922 # /home/fredrik/sandbox3/langtools 15923 # 15924 # From the source root you create build subdirs manually: 15925 # mkdir -p build1 build2 build3 15926 # in each build directory run: 15927 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) 15928 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) 15929 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) 15930 # 15931 15932 15933 # Check whether --with-override-langtools was given. 15934 if test "${with_override_langtools+set}" = set; then : 15935 withval=$with_override_langtools; 15936 fi 15937 15938 15939 15940 # Check whether --with-override-corba was given. 15941 if test "${with_override_corba+set}" = set; then : 15942 withval=$with_override_corba; 15943 fi 15944 15945 15946 15947 # Check whether --with-override-jaxp was given. 15948 if test "${with_override_jaxp+set}" = set; then : 15949 withval=$with_override_jaxp; 15950 fi 15951 15952 15953 15954 # Check whether --with-override-jaxws was given. 15955 if test "${with_override_jaxws+set}" = set; then : 15956 withval=$with_override_jaxws; 15957 fi 15958 15959 15960 15961 # Check whether --with-override-hotspot was given. 15962 if test "${with_override_hotspot+set}" = set; then : 15963 withval=$with_override_hotspot; 15964 fi 15965 15966 15967 15968 # Check whether --with-override-jdk was given. 15969 if test "${with_override_jdk+set}" = set; then : 15970 withval=$with_override_jdk; 15971 fi 15972 15973 15974 if test "x$with_override_langtools" != x; then 15975 CURDIR="$PWD" 15976 cd "$with_override_langtools" 15977 LANGTOOLS_TOPDIR="`pwd`" 15978 cd "$CURDIR" 15979 if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then 15980 as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5 15981 fi 15982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5 15983 $as_echo_n "checking if langtools should be overridden... " >&6; } 15984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5 15985 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; } 15986 fi 15987 if test "x$with_override_corba" != x; then 15988 CURDIR="$PWD" 15989 cd "$with_override_corba" 15990 CORBA_TOPDIR="`pwd`" 15991 cd "$CURDIR" 15992 if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then 15993 as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5 15994 fi 15995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5 15996 $as_echo_n "checking if corba should be overridden... " >&6; } 15997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5 15998 $as_echo "yes with $CORBA_TOPDIR" >&6; } 15999 fi 16000 if test "x$with_override_jaxp" != x; then 16001 CURDIR="$PWD" 16002 cd "$with_override_jaxp" 16003 JAXP_TOPDIR="`pwd`" 16004 cd "$CURDIR" 16005 if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then 16006 as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5 16007 fi 16008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5 16009 $as_echo_n "checking if jaxp should be overridden... " >&6; } 16010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5 16011 $as_echo "yes with $JAXP_TOPDIR" >&6; } 16012 fi 16013 if test "x$with_override_jaxws" != x; then 16014 CURDIR="$PWD" 16015 cd "$with_override_jaxws" 16016 JAXWS_TOPDIR="`pwd`" 16017 cd "$CURDIR" 16018 if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then 16019 as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5 16020 fi 16021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5 16022 $as_echo_n "checking if jaxws should be overridden... " >&6; } 16023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5 16024 $as_echo "yes with $JAXWS_TOPDIR" >&6; } 16025 fi 16026 if test "x$with_override_hotspot" != x; then 16027 CURDIR="$PWD" 16028 cd "$with_override_hotspot" 16029 HOTSPOT_TOPDIR="`pwd`" 16030 cd "$CURDIR" 16031 if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \ 16032 ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then 16033 as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5 16034 fi 16035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5 16036 $as_echo_n "checking if hotspot should be overridden... " >&6; } 16037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5 16038 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; } 16039 fi 16040 if test "x$with_override_nashorn" != x; then 16041 CURDIR="$PWD" 16042 cd "$with_override_nashorn" 16043 NASHORN_TOPDIR="`pwd`" 16044 cd "$CURDIR" 16045 if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then 16046 as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5 16047 fi 16048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5 16049 $as_echo_n "checking if nashorn should be overridden... " >&6; } 16050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5 16051 $as_echo "yes with $NASHORN_TOPDIR" >&6; } 16052 fi 16053 if test "x$with_override_jdk" != x; then 16054 CURDIR="$PWD" 16055 cd "$with_override_jdk" 16056 JDK_TOPDIR="`pwd`" 16057 cd "$CURDIR" 16058 if ! test -f $JDK_TOPDIR/makefiles/Makefile; then 16059 as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5 16060 fi 16061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5 16062 $as_echo_n "checking if JDK should be overridden... " >&6; } 16063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5 16064 $as_echo "yes with $JDK_TOPDIR" >&6; } 16065 fi 16066 16067 16068 16069 BUILD_OUTPUT="$OUTPUT_ROOT" 16070 16071 16072 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" 16073 BUILD_HOTSPOT=true 16074 16075 16076 16077 # Check whether --with-import-hotspot was given. 16078 if test "${with_import_hotspot+set}" = set; then : 16079 withval=$with_import_hotspot; 16080 fi 16081 16082 if test "x$with_import_hotspot" != x; then 16083 CURDIR="$PWD" 16084 cd "$with_import_hotspot" 16085 HOTSPOT_DIST="`pwd`" 16086 cd "$CURDIR" 16087 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then 16088 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5 16089 fi 16090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5 16091 $as_echo_n "checking if hotspot should be imported... " >&6; } 16092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5 16093 $as_echo "yes from $HOTSPOT_DIST" >&6; } 16094 BUILD_HOTSPOT=false 16095 fi 16096 16097 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" 16098 16099 16100 ############################################################################### 16101 # 16102 # Setup the toolchain (compilers etc), i.e. the tools that need to be 16103 # cross-compilation aware. 16104 # 16105 ############################################################################### 16106 16107 16108 ############################################################################### 16109 # 16110 # Configure the development tool paths and potential sysroot. 16111 # 16112 ac_ext=cpp 16113 ac_cpp='$CXXCPP $CPPFLAGS' 16114 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 16115 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 16116 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 16117 16118 16119 # The option used to specify the target .o,.a or .so file. 16120 # When compiling, how to specify the to be created object file. 16121 CC_OUT_OPTION='-o$(SPACE)' 16122 # When linking, how to specify the to be created executable. 16123 EXE_OUT_OPTION='-o$(SPACE)' 16124 # When linking, how to specify the to be created dynamically linkable library. 16125 LD_OUT_OPTION='-o$(SPACE)' 16126 # When archiving, how to specify the to be create static archive for object files. 16127 AR_OUT_OPTION='rcs$(SPACE)' 16128 16129 16130 16131 16132 16133 # Locate the actual tools 16134 16135 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 16136 16137 # Store path to cygwin link.exe to help excluding it when searching for 16138 # VS linker. This must be done before changing the PATH when looking for VS. 16139 # Extract the first word of "link", so it can be a program name with args. 16140 set dummy link; ac_word=$2 16141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 16142 $as_echo_n "checking for $ac_word... " >&6; } 16143 if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then : 16144 $as_echo_n "(cached) " >&6 16145 else 16146 case $CYGWIN_LINK in 16147 [\\/]* | ?:[\\/]*) 16148 ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path. 16149 ;; 16150 *) 16151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 16152 for as_dir in $PATH 16153 do 16154 IFS=$as_save_IFS 16155 test -z "$as_dir" && as_dir=. 16156 for ac_exec_ext in '' $ac_executable_extensions; do 16157 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 16158 ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext" 16159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 16160 break 2 16161 fi 16162 done 16163 done 16164 IFS=$as_save_IFS 16165 16166 ;; 16167 esac 16168 fi 16169 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK 16170 if test -n "$CYGWIN_LINK"; then 16171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5 16172 $as_echo "$CYGWIN_LINK" >&6; } 16173 else 16174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16175 $as_echo "no" >&6; } 16176 fi 16177 16178 16179 if test "x$CYGWIN_LINK" != x; then 16180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5 16181 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; } 16182 "$CYGWIN_LINK" --version > /dev/null 16183 if test $? -eq 0 ; then 16184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 16185 $as_echo "yes" >&6; } 16186 else 16187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16188 $as_echo "no" >&6; } 16189 # This might be the VS linker. Don't exclude it later on. 16190 CYGWIN_LINK="" 16191 fi 16192 fi 16193 16194 # First-hand choice is to locate and run the vsvars bat file. 16195 16196 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16197 VCVARSFILE="vc/bin/vcvars32.bat" 16198 else 16199 VCVARSFILE="vc/bin/amd64/vcvars64.bat" 16200 fi 16201 16202 VS_ENV_CMD="" 16203 VS_ENV_ARGS="" 16204 if test "x$with_toolsdir" != x; then 16205 16206 if test "x$VS_ENV_CMD" = x; then 16207 VS100BASE="$with_toolsdir/../.." 16208 METHOD="--with-tools-dir" 16209 16210 windows_path="$VS100BASE" 16211 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16212 unix_path=`$CYGPATH -u "$windows_path"` 16213 VS100BASE="$unix_path" 16214 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16215 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16216 VS100BASE="$unix_path" 16217 fi 16218 16219 if test -d "$VS100BASE"; then 16220 if test -f "$VS100BASE/$VCVARSFILE"; then 16221 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16222 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16223 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16224 else 16225 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16226 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16227 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16228 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16229 fi 16230 fi 16231 fi 16232 16233 fi 16234 16235 if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then 16236 # Having specified an argument which is incorrect will produce an instant failure; 16237 # we should not go on looking 16238 { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5 16239 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;} 16240 { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5 16241 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;} 16242 as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5 16243 fi 16244 16245 if test "x$ProgramW6432" != x; then 16246 16247 if test "x$VS_ENV_CMD" = x; then 16248 WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin" 16249 METHOD="well-known name" 16250 16251 windows_path="$WIN_SDK_BASE" 16252 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16253 unix_path=`$CYGPATH -u "$windows_path"` 16254 WIN_SDK_BASE="$unix_path" 16255 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16256 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16257 WIN_SDK_BASE="$unix_path" 16258 fi 16259 16260 if test -d "$WIN_SDK_BASE"; then 16261 # There have been cases of partial or broken SDK installations. A missing 16262 # lib dir is not going to work. 16263 if test ! -d "$WIN_SDK_BASE/../lib"; then 16264 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16265 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16266 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16267 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16268 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16269 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16270 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16271 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16272 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16273 VS_ENV_ARGS="/x86" 16274 else 16275 VS_ENV_ARGS="/x64" 16276 fi 16277 else 16278 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16279 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16280 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16281 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16282 fi 16283 fi 16284 fi 16285 16286 fi 16287 if test "x$PROGRAMW6432" != x; then 16288 16289 if test "x$VS_ENV_CMD" = x; then 16290 WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin" 16291 METHOD="well-known name" 16292 16293 windows_path="$WIN_SDK_BASE" 16294 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16295 unix_path=`$CYGPATH -u "$windows_path"` 16296 WIN_SDK_BASE="$unix_path" 16297 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16298 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16299 WIN_SDK_BASE="$unix_path" 16300 fi 16301 16302 if test -d "$WIN_SDK_BASE"; then 16303 # There have been cases of partial or broken SDK installations. A missing 16304 # lib dir is not going to work. 16305 if test ! -d "$WIN_SDK_BASE/../lib"; then 16306 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16307 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16308 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16309 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16310 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16311 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16312 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16313 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16314 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16315 VS_ENV_ARGS="/x86" 16316 else 16317 VS_ENV_ARGS="/x64" 16318 fi 16319 else 16320 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16321 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16322 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16323 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16324 fi 16325 fi 16326 fi 16327 16328 fi 16329 if test "x$PROGRAMFILES" != x; then 16330 16331 if test "x$VS_ENV_CMD" = x; then 16332 WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin" 16333 METHOD="well-known name" 16334 16335 windows_path="$WIN_SDK_BASE" 16336 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16337 unix_path=`$CYGPATH -u "$windows_path"` 16338 WIN_SDK_BASE="$unix_path" 16339 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16340 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16341 WIN_SDK_BASE="$unix_path" 16342 fi 16343 16344 if test -d "$WIN_SDK_BASE"; then 16345 # There have been cases of partial or broken SDK installations. A missing 16346 # lib dir is not going to work. 16347 if test ! -d "$WIN_SDK_BASE/../lib"; then 16348 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16349 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16350 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16351 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16352 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16353 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16354 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16355 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16356 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16357 VS_ENV_ARGS="/x86" 16358 else 16359 VS_ENV_ARGS="/x64" 16360 fi 16361 else 16362 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16363 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16364 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16365 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16366 fi 16367 fi 16368 fi 16369 16370 fi 16371 16372 if test "x$VS_ENV_CMD" = x; then 16373 WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin" 16374 METHOD="well-known name" 16375 16376 windows_path="$WIN_SDK_BASE" 16377 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16378 unix_path=`$CYGPATH -u "$windows_path"` 16379 WIN_SDK_BASE="$unix_path" 16380 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16381 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16382 WIN_SDK_BASE="$unix_path" 16383 fi 16384 16385 if test -d "$WIN_SDK_BASE"; then 16386 # There have been cases of partial or broken SDK installations. A missing 16387 # lib dir is not going to work. 16388 if test ! -d "$WIN_SDK_BASE/../lib"; then 16389 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16390 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16391 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16392 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16393 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16394 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16395 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16396 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16397 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16398 VS_ENV_ARGS="/x86" 16399 else 16400 VS_ENV_ARGS="/x64" 16401 fi 16402 else 16403 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16404 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16405 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16406 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16407 fi 16408 fi 16409 fi 16410 16411 16412 if test "x$VS_ENV_CMD" = x; then 16413 WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin" 16414 METHOD="well-known name" 16415 16416 windows_path="$WIN_SDK_BASE" 16417 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16418 unix_path=`$CYGPATH -u "$windows_path"` 16419 WIN_SDK_BASE="$unix_path" 16420 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16421 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16422 WIN_SDK_BASE="$unix_path" 16423 fi 16424 16425 if test -d "$WIN_SDK_BASE"; then 16426 # There have been cases of partial or broken SDK installations. A missing 16427 # lib dir is not going to work. 16428 if test ! -d "$WIN_SDK_BASE/../lib"; then 16429 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16430 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16431 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5 16432 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;} 16433 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then 16434 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16435 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16436 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd" 16437 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 16438 VS_ENV_ARGS="/x86" 16439 else 16440 VS_ENV_ARGS="/x64" 16441 fi 16442 else 16443 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5 16444 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;} 16445 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5 16446 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;} 16447 fi 16448 fi 16449 fi 16450 16451 16452 if test "x$VS100COMNTOOLS" != x; then 16453 16454 if test "x$VS_ENV_CMD" = x; then 16455 VS100BASE="$VS100COMNTOOLS/../.." 16456 METHOD="VS100COMNTOOLS variable" 16457 16458 windows_path="$VS100BASE" 16459 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16460 unix_path=`$CYGPATH -u "$windows_path"` 16461 VS100BASE="$unix_path" 16462 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16463 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16464 VS100BASE="$unix_path" 16465 fi 16466 16467 if test -d "$VS100BASE"; then 16468 if test -f "$VS100BASE/$VCVARSFILE"; then 16469 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16470 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16471 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16472 else 16473 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16474 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16475 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16476 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16477 fi 16478 fi 16479 fi 16480 16481 fi 16482 if test "x$PROGRAMFILES" != x; then 16483 16484 if test "x$VS_ENV_CMD" = x; then 16485 VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0" 16486 METHOD="well-known name" 16487 16488 windows_path="$VS100BASE" 16489 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16490 unix_path=`$CYGPATH -u "$windows_path"` 16491 VS100BASE="$unix_path" 16492 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16493 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16494 VS100BASE="$unix_path" 16495 fi 16496 16497 if test -d "$VS100BASE"; then 16498 if test -f "$VS100BASE/$VCVARSFILE"; then 16499 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16500 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16501 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16502 else 16503 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16504 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16505 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16506 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16507 fi 16508 fi 16509 fi 16510 16511 fi 16512 16513 if test "x$VS_ENV_CMD" = x; then 16514 VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0" 16515 METHOD="well-known name" 16516 16517 windows_path="$VS100BASE" 16518 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16519 unix_path=`$CYGPATH -u "$windows_path"` 16520 VS100BASE="$unix_path" 16521 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16522 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16523 VS100BASE="$unix_path" 16524 fi 16525 16526 if test -d "$VS100BASE"; then 16527 if test -f "$VS100BASE/$VCVARSFILE"; then 16528 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16529 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16530 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16531 else 16532 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16533 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16534 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16535 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16536 fi 16537 fi 16538 fi 16539 16540 16541 if test "x$VS_ENV_CMD" = x; then 16542 VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0" 16543 METHOD="well-known name" 16544 16545 windows_path="$VS100BASE" 16546 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16547 unix_path=`$CYGPATH -u "$windows_path"` 16548 VS100BASE="$unix_path" 16549 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16550 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16551 VS100BASE="$unix_path" 16552 fi 16553 16554 if test -d "$VS100BASE"; then 16555 if test -f "$VS100BASE/$VCVARSFILE"; then 16556 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16557 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16558 VS_ENV_CMD="$VS100BASE/$VCVARSFILE" 16559 else 16560 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 16561 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} 16562 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 16563 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 16564 fi 16565 fi 16566 fi 16567 16568 16569 if test "x$VS_ENV_CMD" != x; then 16570 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file. 16571 16572 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16573 16574 # First separate the path from the arguments. This will split at the first 16575 # space. 16576 complete="$VS_ENV_CMD" 16577 path="${complete%% *}" 16578 tmp="$complete EOL" 16579 arguments="${tmp#* }" 16580 16581 # Input might be given as Windows format, start by converting to 16582 # unix format. 16583 new_path=`$CYGPATH -u "$path"` 16584 16585 # Now try to locate executable using which 16586 new_path=`$WHICH "$new_path" 2> /dev/null` 16587 # bat and cmd files are not always considered executable in cygwin causing which 16588 # to not find them 16589 if test "x$new_path" = x \ 16590 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 16591 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 16592 new_path=`$CYGPATH -u "$path"` 16593 fi 16594 if test "x$new_path" = x; then 16595 # Oops. Which didn't find the executable. 16596 # The splitting of arguments from the executable at a space might have been incorrect, 16597 # since paths with space are more likely in Windows. Give it another try with the whole 16598 # argument. 16599 path="$complete" 16600 arguments="EOL" 16601 new_path=`$CYGPATH -u "$path"` 16602 new_path=`$WHICH "$new_path" 2> /dev/null` 16603 # bat and cmd files are not always considered executable in cygwin causing which 16604 # to not find them 16605 if test "x$new_path" = x \ 16606 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 16607 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 16608 new_path=`$CYGPATH -u "$path"` 16609 fi 16610 if test "x$new_path" = x; then 16611 # It's still not found. Now this is an unrecoverable error. 16612 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 16613 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 16614 has_space=`$ECHO "$complete" | $GREP " "` 16615 if test "x$has_space" != x; then 16616 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 16617 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 16618 fi 16619 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16620 fi 16621 fi 16622 16623 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 16624 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 16625 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 16626 # "foo.exe" is OK but "foo" is an error. 16627 # 16628 # This test is therefore slightly more accurate than "test -f" to check for file precense. 16629 # It is also a way to make sure we got the proper file name for the real test later on. 16630 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 16631 if test "x$test_shortpath" = x; then 16632 # Short path failed, file does not exist as specified. 16633 # Try adding .exe or .cmd 16634 if test -f "${new_path}.exe"; then 16635 input_to_shortpath="${new_path}.exe" 16636 elif test -f "${new_path}.cmd"; then 16637 input_to_shortpath="${new_path}.cmd" 16638 else 16639 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5 16640 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;} 16641 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 16642 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 16643 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16644 fi 16645 else 16646 input_to_shortpath="$new_path" 16647 fi 16648 16649 # Call helper function which possibly converts this using DOS-style short mode. 16650 # If so, the updated path is stored in $new_path. 16651 new_path="$input_to_shortpath" 16652 16653 input_path="$input_to_shortpath" 16654 # Check if we need to convert this using DOS-style short mode. If the path 16655 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16656 # take no chances and rewrite it. 16657 # Note: m4 eats our [], so we need to use [ and ] instead. 16658 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 16659 if test "x$has_forbidden_chars" != x; then 16660 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16661 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 16662 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 16663 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 16664 # Going to short mode and back again did indeed matter. Since short mode is 16665 # case insensitive, let's make it lowercase to improve readability. 16666 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16667 # Now convert it back to Unix-stile (cygpath) 16668 input_path=`$CYGPATH -u "$shortmode_path"` 16669 new_path="$input_path" 16670 fi 16671 fi 16672 16673 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 16674 if test "x$test_cygdrive_prefix" = x; then 16675 # As a simple fix, exclude /usr/bin since it's not a real path. 16676 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 16677 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 16678 # a path prefixed by /cygdrive for fixpath to work. 16679 new_path="$CYGWIN_ROOT_PATH$input_path" 16680 fi 16681 fi 16682 16683 # remove trailing .exe if any 16684 new_path="${new_path/%.exe/}" 16685 16686 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16687 16688 # First separate the path from the arguments. This will split at the first 16689 # space. 16690 complete="$VS_ENV_CMD" 16691 path="${complete%% *}" 16692 tmp="$complete EOL" 16693 arguments="${tmp#* }" 16694 16695 # Input might be given as Windows format, start by converting to 16696 # unix format. 16697 new_path="$path" 16698 16699 windows_path="$new_path" 16700 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16701 unix_path=`$CYGPATH -u "$windows_path"` 16702 new_path="$unix_path" 16703 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16704 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16705 new_path="$unix_path" 16706 fi 16707 16708 16709 # Now try to locate executable using which 16710 new_path=`$WHICH "$new_path" 2> /dev/null` 16711 16712 if test "x$new_path" = x; then 16713 # Oops. Which didn't find the executable. 16714 # The splitting of arguments from the executable at a space might have been incorrect, 16715 # since paths with space are more likely in Windows. Give it another try with the whole 16716 # argument. 16717 path="$complete" 16718 arguments="EOL" 16719 new_path="$path" 16720 16721 windows_path="$new_path" 16722 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16723 unix_path=`$CYGPATH -u "$windows_path"` 16724 new_path="$unix_path" 16725 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16726 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16727 new_path="$unix_path" 16728 fi 16729 16730 16731 new_path=`$WHICH "$new_path" 2> /dev/null` 16732 16733 if test "x$new_path" = x; then 16734 # It's still not found. Now this is an unrecoverable error. 16735 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 16736 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 16737 has_space=`$ECHO "$complete" | $GREP " "` 16738 if test "x$has_space" != x; then 16739 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 16740 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 16741 fi 16742 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16743 fi 16744 fi 16745 16746 # Now new_path has a complete unix path to the binary 16747 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 16748 # Keep paths in /bin as-is, but remove trailing .exe if any 16749 new_path="${new_path/%.exe/}" 16750 # Do not save /bin paths to all_fixpath_prefixes! 16751 else 16752 # Not in mixed or Windows style, start by that. 16753 new_path=`cmd //c echo $new_path` 16754 16755 input_path="$new_path" 16756 # Check if we need to convert this using DOS-style short mode. If the path 16757 # contains just simple characters, use it. Otherwise (spaces, weird characters), 16758 # take no chances and rewrite it. 16759 # Note: m4 eats our [], so we need to use [ and ] instead. 16760 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 16761 if test "x$has_forbidden_chars" != x; then 16762 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 16763 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 16764 fi 16765 16766 # Output is in $new_path 16767 16768 windows_path="$new_path" 16769 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16770 unix_path=`$CYGPATH -u "$windows_path"` 16771 new_path="$unix_path" 16772 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 16773 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 16774 new_path="$unix_path" 16775 fi 16776 16777 # remove trailing .exe if any 16778 new_path="${new_path/%.exe/}" 16779 16780 # Save the first 10 bytes of this path to the storage, so fixpath can work. 16781 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 16782 fi 16783 16784 else 16785 # We're on a posix platform. Hooray! :) 16786 # First separate the path from the arguments. This will split at the first 16787 # space. 16788 complete="$VS_ENV_CMD" 16789 path="${complete%% *}" 16790 tmp="$complete EOL" 16791 arguments="${tmp#* }" 16792 16793 # Cannot rely on the command "which" here since it doesn't always work. 16794 is_absolute_path=`$ECHO "$path" | $GREP ^/` 16795 if test -z "$is_absolute_path"; then 16796 # Path to executable is not absolute. Find it. 16797 IFS_save="$IFS" 16798 IFS=: 16799 for p in $PATH; do 16800 if test -f "$p/$path" && test -x "$p/$path"; then 16801 new_path="$p/$path" 16802 break 16803 fi 16804 done 16805 IFS="$IFS_save" 16806 else 16807 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5 16808 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;} 16809 new_path="$path" 16810 fi 16811 16812 if test "x$new_path" = x; then 16813 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 16814 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} 16815 has_space=`$ECHO "$complete" | $GREP " "` 16816 if test "x$has_space" != x; then 16817 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 16818 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 16819 fi 16820 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 16821 fi 16822 fi 16823 16824 # Now join together the path and the arguments once again 16825 if test "x$arguments" != xEOL; then 16826 new_complete="$new_path ${arguments% *}" 16827 else 16828 new_complete="$new_path" 16829 fi 16830 16831 if test "x$complete" != "x$new_complete"; then 16832 VS_ENV_CMD="$new_complete" 16833 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5 16834 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;} 16835 fi 16836 16837 16838 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat 16839 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5 16840 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;} 16841 cd $OUTPUT_ROOT 16842 # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted 16843 # to autoconf standards. 16844 16845 #---- 16846 16847 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment) 16848 # but calculate the difference in Cygwin environment before/after running it and then 16849 # apply the diff. 16850 16851 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 16852 _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"` 16853 _dosvs10varsall=`cygpath -a -w -s $_vs10varsall` 16854 _dosbash=`cygpath -a -w -s \`which bash\`.*` 16855 else 16856 _dosvs10varsall=`cmd //c echo $VS_ENV_CMD` 16857 _dosbash=`cmd //c echo \`which bash\`` 16858 fi 16859 16860 # generate the set of exported vars before/after the vs10 setup 16861 $ECHO "@echo off" > localdevenvtmp.bat 16862 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat 16863 $ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat 16864 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat 16865 16866 # Now execute the newly created bat file. 16867 # The | cat is to stop SetEnv.Cmd to mess with system colors on msys 16868 cmd /c localdevenvtmp.bat | cat 16869 16870 # apply the diff (less some non-vs10 vars named by "!") 16871 $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort 16872 $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort 16873 $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh 16874 16875 # cleanup 16876 $RM localdevenvtmp* 16877 #---- 16878 cd $CURDIR 16879 if test ! -s $OUTPUT_ROOT/localdevenv.sh; then 16880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16881 $as_echo "no" >&6; } 16882 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5 16883 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;} 16884 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 16885 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} 16886 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 16887 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} 16888 as_fn_error $? "Cannot continue" "$LINENO" 5 16889 fi 16890 16891 # Now set all paths and other env variables. This will allow the rest of 16892 # the configure script to find and run the compiler in the proper way. 16893 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5 16894 $as_echo "$as_me: Setting extracted environment variables" >&6;} 16895 . $OUTPUT_ROOT/localdevenv.sh 16896 else 16897 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. 16898 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5 16899 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;} 16900 fi 16901 16902 # At this point, we should have corrent variables in the environment, or we can't continue. 16903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5 16904 $as_echo_n "checking for Visual Studio variables... " >&6; } 16905 16906 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then 16907 if test "x$INCLUDE" = x || test "x$LIB" = x; then 16908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5 16909 $as_echo "present but broken" >&6; } 16910 as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5 16911 else 16912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 16913 $as_echo "ok" >&6; } 16914 # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk. 16915 VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'` 16916 VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'` 16917 VS_PATH="$PATH" 16918 16919 16920 16921 fi 16922 else 16923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 16924 $as_echo "not found" >&6; } 16925 16926 if test "x$VS_ENV_CMD" = x; then 16927 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5 16928 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;} 16929 { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5 16930 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;} 16931 else 16932 { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5 16933 $as_echo "$as_me: Running the extraction script failed." >&6;} 16934 fi 16935 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 16936 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} 16937 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 16938 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} 16939 as_fn_error $? "Cannot continue" "$LINENO" 5 16940 fi 16941 16942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 16943 $as_echo_n "checking for msvcr100.dll... " >&6; } 16944 16945 # Check whether --with-msvcr-dll was given. 16946 if test "${with_msvcr_dll+set}" = set; then : 16947 withval=$with_msvcr_dll; 16948 fi 16949 16950 if test "x$with_msvcr_dll" != x; then 16951 MSVCR_DLL="$with_msvcr_dll" 16952 else 16953 if test "x$VCINSTALLDIR" != x; then 16954 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 16955 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1` 16956 else 16957 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1` 16958 if test "x$MSVCR_DLL" = x; then 16959 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1` 16960 fi 16961 fi 16962 if test "x$MSVCR_DLL" != x; then 16963 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5 16964 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;} 16965 else 16966 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5 16967 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;} 16968 fi 16969 fi 16970 if test "x$MSVCR_DLL" = x; then 16971 if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then 16972 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5 16973 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;} 16974 MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll" 16975 fi 16976 fi 16977 fi 16978 if test "x$MSVCR_DLL" = x; then 16979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16980 $as_echo "no" >&6; } 16981 as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5 16982 fi 16983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 16984 $as_echo "$MSVCR_DLL" >&6; } 16985 16986 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 16987 16988 # Input might be given as Windows format, start by converting to 16989 # unix format. 16990 path="$MSVCR_DLL" 16991 new_path=`$CYGPATH -u "$path"` 16992 16993 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 16994 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 16995 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 16996 # "foo.exe" is OK but "foo" is an error. 16997 # 16998 # This test is therefore slightly more accurate than "test -f" to check for file precense. 16999 # It is also a way to make sure we got the proper file name for the real test later on. 17000 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17001 if test "x$test_shortpath" = x; then 17002 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 17003 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} 17004 as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5 17005 fi 17006 17007 # Call helper function which possibly converts this using DOS-style short mode. 17008 # If so, the updated path is stored in $new_path. 17009 17010 input_path="$new_path" 17011 # Check if we need to convert this using DOS-style short mode. If the path 17012 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17013 # take no chances and rewrite it. 17014 # Note: m4 eats our [], so we need to use [ and ] instead. 17015 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17016 if test "x$has_forbidden_chars" != x; then 17017 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17018 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17019 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17020 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17021 # Going to short mode and back again did indeed matter. Since short mode is 17022 # case insensitive, let's make it lowercase to improve readability. 17023 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17024 # Now convert it back to Unix-stile (cygpath) 17025 input_path=`$CYGPATH -u "$shortmode_path"` 17026 new_path="$input_path" 17027 fi 17028 fi 17029 17030 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17031 if test "x$test_cygdrive_prefix" = x; then 17032 # As a simple fix, exclude /usr/bin since it's not a real path. 17033 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17034 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17035 # a path prefixed by /cygdrive for fixpath to work. 17036 new_path="$CYGWIN_ROOT_PATH$input_path" 17037 fi 17038 fi 17039 17040 17041 if test "x$path" != "x$new_path"; then 17042 MSVCR_DLL="$new_path" 17043 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 17044 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} 17045 fi 17046 17047 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17048 17049 path="$MSVCR_DLL" 17050 has_colon=`$ECHO $path | $GREP ^.:` 17051 new_path="$path" 17052 if test "x$has_colon" = x; then 17053 # Not in mixed or Windows style, start by that. 17054 new_path=`cmd //c echo $path` 17055 fi 17056 17057 17058 input_path="$new_path" 17059 # Check if we need to convert this using DOS-style short mode. If the path 17060 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17061 # take no chances and rewrite it. 17062 # Note: m4 eats our [], so we need to use [ and ] instead. 17063 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17064 if test "x$has_forbidden_chars" != x; then 17065 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17066 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17067 fi 17068 17069 17070 windows_path="$new_path" 17071 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17072 unix_path=`$CYGPATH -u "$windows_path"` 17073 new_path="$unix_path" 17074 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17075 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17076 new_path="$unix_path" 17077 fi 17078 17079 if test "x$path" != "x$new_path"; then 17080 MSVCR_DLL="$new_path" 17081 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 17082 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} 17083 fi 17084 17085 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17086 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17087 17088 else 17089 # We're on a posix platform. Hooray! :) 17090 path="$MSVCR_DLL" 17091 17092 if test ! -f "$path" && test ! -d "$path"; then 17093 as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 17094 fi 17095 17096 has_space=`$ECHO "$path" | $GREP " "` 17097 if test "x$has_space" != x; then 17098 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 17099 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} 17100 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17101 fi 17102 fi 17103 17104 17105 17106 17107 # Check whether --with-dxsdk was given. 17108 if test "${with_dxsdk+set}" = set; then : 17109 withval=$with_dxsdk; 17110 fi 17111 17112 17113 # Check whether --with-dxsdk-lib was given. 17114 if test "${with_dxsdk_lib+set}" = set; then : 17115 withval=$with_dxsdk_lib; 17116 fi 17117 17118 17119 # Check whether --with-dxsdk-include was given. 17120 if test "${with_dxsdk_include+set}" = set; then : 17121 withval=$with_dxsdk_include; 17122 fi 17123 17124 17125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5 17126 $as_echo_n "checking for DirectX SDK... " >&6; } 17127 17128 if test "x$with_dxsdk" != x; then 17129 dxsdk_path="$with_dxsdk" 17130 elif test "x$DXSDK_DIR" != x; then 17131 dxsdk_path="$DXSDK_DIR" 17132 elif test -d "C:/DXSDK"; then 17133 dxsdk_path="C:/DXSDK" 17134 else 17135 as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5 17136 fi 17137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5 17138 $as_echo "$dxsdk_path" >&6; } 17139 17140 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17141 17142 # Input might be given as Windows format, start by converting to 17143 # unix format. 17144 path="$dxsdk_path" 17145 new_path=`$CYGPATH -u "$path"` 17146 17147 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17148 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17149 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17150 # "foo.exe" is OK but "foo" is an error. 17151 # 17152 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17153 # It is also a way to make sure we got the proper file name for the real test later on. 17154 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17155 if test "x$test_shortpath" = x; then 17156 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5 17157 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;} 17158 as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5 17159 fi 17160 17161 # Call helper function which possibly converts this using DOS-style short mode. 17162 # If so, the updated path is stored in $new_path. 17163 17164 input_path="$new_path" 17165 # Check if we need to convert this using DOS-style short mode. If the path 17166 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17167 # take no chances and rewrite it. 17168 # Note: m4 eats our [], so we need to use [ and ] instead. 17169 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17170 if test "x$has_forbidden_chars" != x; then 17171 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17172 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17173 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17174 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17175 # Going to short mode and back again did indeed matter. Since short mode is 17176 # case insensitive, let's make it lowercase to improve readability. 17177 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17178 # Now convert it back to Unix-stile (cygpath) 17179 input_path=`$CYGPATH -u "$shortmode_path"` 17180 new_path="$input_path" 17181 fi 17182 fi 17183 17184 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17185 if test "x$test_cygdrive_prefix" = x; then 17186 # As a simple fix, exclude /usr/bin since it's not a real path. 17187 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17188 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17189 # a path prefixed by /cygdrive for fixpath to work. 17190 new_path="$CYGWIN_ROOT_PATH$input_path" 17191 fi 17192 fi 17193 17194 17195 if test "x$path" != "x$new_path"; then 17196 dxsdk_path="$new_path" 17197 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5 17198 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;} 17199 fi 17200 17201 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17202 17203 path="$dxsdk_path" 17204 has_colon=`$ECHO $path | $GREP ^.:` 17205 new_path="$path" 17206 if test "x$has_colon" = x; then 17207 # Not in mixed or Windows style, start by that. 17208 new_path=`cmd //c echo $path` 17209 fi 17210 17211 17212 input_path="$new_path" 17213 # Check if we need to convert this using DOS-style short mode. If the path 17214 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17215 # take no chances and rewrite it. 17216 # Note: m4 eats our [], so we need to use [ and ] instead. 17217 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17218 if test "x$has_forbidden_chars" != x; then 17219 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17220 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17221 fi 17222 17223 17224 windows_path="$new_path" 17225 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17226 unix_path=`$CYGPATH -u "$windows_path"` 17227 new_path="$unix_path" 17228 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17229 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17230 new_path="$unix_path" 17231 fi 17232 17233 if test "x$path" != "x$new_path"; then 17234 dxsdk_path="$new_path" 17235 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5 17236 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;} 17237 fi 17238 17239 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17240 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17241 17242 else 17243 # We're on a posix platform. Hooray! :) 17244 path="$dxsdk_path" 17245 17246 if test ! -f "$path" && test ! -d "$path"; then 17247 as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5 17248 fi 17249 17250 has_space=`$ECHO "$path" | $GREP " "` 17251 if test "x$has_space" != x; then 17252 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5 17253 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;} 17254 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17255 fi 17256 fi 17257 17258 17259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5 17260 $as_echo_n "checking for DirectX SDK lib dir... " >&6; } 17261 if test "x$with_dxsdk_lib" != x; then 17262 DXSDK_LIB_PATH="$with_dxsdk_lib" 17263 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 17264 DXSDK_LIB_PATH="$dxsdk_path/Lib/x64" 17265 else 17266 DXSDK_LIB_PATH="$dxsdk_path/Lib" 17267 fi 17268 # dsound.lib is linked to in jsoundds 17269 if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then 17270 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5 17271 fi 17272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5 17273 $as_echo "$DXSDK_LIB_PATH" >&6; } 17274 17275 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17276 17277 # Input might be given as Windows format, start by converting to 17278 # unix format. 17279 path="$DXSDK_LIB_PATH" 17280 new_path=`$CYGPATH -u "$path"` 17281 17282 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17283 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17284 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17285 # "foo.exe" is OK but "foo" is an error. 17286 # 17287 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17288 # It is also a way to make sure we got the proper file name for the real test later on. 17289 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17290 if test "x$test_shortpath" = x; then 17291 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5 17292 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 17293 as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5 17294 fi 17295 17296 # Call helper function which possibly converts this using DOS-style short mode. 17297 # If so, the updated path is stored in $new_path. 17298 17299 input_path="$new_path" 17300 # Check if we need to convert this using DOS-style short mode. If the path 17301 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17302 # take no chances and rewrite it. 17303 # Note: m4 eats our [], so we need to use [ and ] instead. 17304 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17305 if test "x$has_forbidden_chars" != x; then 17306 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17307 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17308 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17309 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17310 # Going to short mode and back again did indeed matter. Since short mode is 17311 # case insensitive, let's make it lowercase to improve readability. 17312 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17313 # Now convert it back to Unix-stile (cygpath) 17314 input_path=`$CYGPATH -u "$shortmode_path"` 17315 new_path="$input_path" 17316 fi 17317 fi 17318 17319 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17320 if test "x$test_cygdrive_prefix" = x; then 17321 # As a simple fix, exclude /usr/bin since it's not a real path. 17322 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17323 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17324 # a path prefixed by /cygdrive for fixpath to work. 17325 new_path="$CYGWIN_ROOT_PATH$input_path" 17326 fi 17327 fi 17328 17329 17330 if test "x$path" != "x$new_path"; then 17331 DXSDK_LIB_PATH="$new_path" 17332 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5 17333 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;} 17334 fi 17335 17336 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17337 17338 path="$DXSDK_LIB_PATH" 17339 has_colon=`$ECHO $path | $GREP ^.:` 17340 new_path="$path" 17341 if test "x$has_colon" = x; then 17342 # Not in mixed or Windows style, start by that. 17343 new_path=`cmd //c echo $path` 17344 fi 17345 17346 17347 input_path="$new_path" 17348 # Check if we need to convert this using DOS-style short mode. If the path 17349 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17350 # take no chances and rewrite it. 17351 # Note: m4 eats our [], so we need to use [ and ] instead. 17352 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17353 if test "x$has_forbidden_chars" != x; then 17354 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17355 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17356 fi 17357 17358 17359 windows_path="$new_path" 17360 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17361 unix_path=`$CYGPATH -u "$windows_path"` 17362 new_path="$unix_path" 17363 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17364 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17365 new_path="$unix_path" 17366 fi 17367 17368 if test "x$path" != "x$new_path"; then 17369 DXSDK_LIB_PATH="$new_path" 17370 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5 17371 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;} 17372 fi 17373 17374 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17375 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17376 17377 else 17378 # We're on a posix platform. Hooray! :) 17379 path="$DXSDK_LIB_PATH" 17380 17381 if test ! -f "$path" && test ! -d "$path"; then 17382 as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 17383 fi 17384 17385 has_space=`$ECHO "$path" | $GREP " "` 17386 if test "x$has_space" != x; then 17387 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5 17388 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 17389 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17390 fi 17391 fi 17392 17393 17394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5 17395 $as_echo_n "checking for DirectX SDK include dir... " >&6; } 17396 if test "x$with_dxsdk_include" != x; then 17397 DXSDK_INCLUDE_PATH="$with_dxsdk_include" 17398 else 17399 DXSDK_INCLUDE_PATH="$dxsdk_path/Include" 17400 fi 17401 # dsound.h is included in jsoundds 17402 if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then 17403 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5 17404 fi 17405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5 17406 $as_echo "$DXSDK_INCLUDE_PATH" >&6; } 17407 17408 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17409 17410 # Input might be given as Windows format, start by converting to 17411 # unix format. 17412 path="$DXSDK_INCLUDE_PATH" 17413 new_path=`$CYGPATH -u "$path"` 17414 17415 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17416 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17417 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17418 # "foo.exe" is OK but "foo" is an error. 17419 # 17420 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17421 # It is also a way to make sure we got the proper file name for the real test later on. 17422 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17423 if test "x$test_shortpath" = x; then 17424 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 17425 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 17426 as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5 17427 fi 17428 17429 # Call helper function which possibly converts this using DOS-style short mode. 17430 # If so, the updated path is stored in $new_path. 17431 17432 input_path="$new_path" 17433 # Check if we need to convert this using DOS-style short mode. If the path 17434 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17435 # take no chances and rewrite it. 17436 # Note: m4 eats our [], so we need to use [ and ] instead. 17437 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17438 if test "x$has_forbidden_chars" != x; then 17439 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17440 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17441 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17442 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17443 # Going to short mode and back again did indeed matter. Since short mode is 17444 # case insensitive, let's make it lowercase to improve readability. 17445 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17446 # Now convert it back to Unix-stile (cygpath) 17447 input_path=`$CYGPATH -u "$shortmode_path"` 17448 new_path="$input_path" 17449 fi 17450 fi 17451 17452 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17453 if test "x$test_cygdrive_prefix" = x; then 17454 # As a simple fix, exclude /usr/bin since it's not a real path. 17455 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 17456 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17457 # a path prefixed by /cygdrive for fixpath to work. 17458 new_path="$CYGWIN_ROOT_PATH$input_path" 17459 fi 17460 fi 17461 17462 17463 if test "x$path" != "x$new_path"; then 17464 DXSDK_INCLUDE_PATH="$new_path" 17465 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5 17466 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;} 17467 fi 17468 17469 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17470 17471 path="$DXSDK_INCLUDE_PATH" 17472 has_colon=`$ECHO $path | $GREP ^.:` 17473 new_path="$path" 17474 if test "x$has_colon" = x; then 17475 # Not in mixed or Windows style, start by that. 17476 new_path=`cmd //c echo $path` 17477 fi 17478 17479 17480 input_path="$new_path" 17481 # Check if we need to convert this using DOS-style short mode. If the path 17482 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17483 # take no chances and rewrite it. 17484 # Note: m4 eats our [], so we need to use [ and ] instead. 17485 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17486 if test "x$has_forbidden_chars" != x; then 17487 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17488 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17489 fi 17490 17491 17492 windows_path="$new_path" 17493 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17494 unix_path=`$CYGPATH -u "$windows_path"` 17495 new_path="$unix_path" 17496 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17497 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17498 new_path="$unix_path" 17499 fi 17500 17501 if test "x$path" != "x$new_path"; then 17502 DXSDK_INCLUDE_PATH="$new_path" 17503 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5 17504 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;} 17505 fi 17506 17507 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17508 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17509 17510 else 17511 # We're on a posix platform. Hooray! :) 17512 path="$DXSDK_INCLUDE_PATH" 17513 17514 if test ! -f "$path" && test ! -d "$path"; then 17515 as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 17516 fi 17517 17518 has_space=`$ECHO "$path" | $GREP " "` 17519 if test "x$has_space" != x; then 17520 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 17521 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 17522 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 17523 fi 17524 fi 17525 17526 17527 17528 17529 LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH" 17530 17531 fi 17532 17533 17534 17535 # If --build AND --host is set, then the configure script will find any 17536 # cross compilation tools in the PATH. Cross compilation tools 17537 # follows the cross compilation standard where they are prefixed with ${host}. 17538 # For example the binary i686-sun-solaris2.10-gcc 17539 # will cross compile for i686-sun-solaris2.10 17540 # If neither of build and host is not set, then build=host and the 17541 # default compiler found in the path will be used. 17542 # Setting only --host, does not seem to be really supported. 17543 # Please set both --build and --host if you want to cross compile. 17544 17545 if test "x$COMPILE_TYPE" = "xcross"; then 17546 # Now we to find a C/C++ compiler that can build executables for the build 17547 # platform. We can't use the AC_PROG_CC macro, since it can only be used 17548 # once. Also, we need to do this before adding a tools dir to the path, 17549 # otherwise we might pick up cross-compilers which don't use standard naming. 17550 # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have 17551 # to wait until they are properly discovered. 17552 for ac_prog in cl cc gcc 17553 do 17554 # Extract the first word of "$ac_prog", so it can be a program name with args. 17555 set dummy $ac_prog; ac_word=$2 17556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 17557 $as_echo_n "checking for $ac_word... " >&6; } 17558 if test "${ac_cv_path_BUILD_CC+set}" = set; then : 17559 $as_echo_n "(cached) " >&6 17560 else 17561 case $BUILD_CC in 17562 [\\/]* | ?:[\\/]*) 17563 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. 17564 ;; 17565 *) 17566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 17567 for as_dir in $PATH 17568 do 17569 IFS=$as_save_IFS 17570 test -z "$as_dir" && as_dir=. 17571 for ac_exec_ext in '' $ac_executable_extensions; do 17572 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 17573 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" 17574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 17575 break 2 17576 fi 17577 done 17578 done 17579 IFS=$as_save_IFS 17580 17581 ;; 17582 esac 17583 fi 17584 BUILD_CC=$ac_cv_path_BUILD_CC 17585 if test -n "$BUILD_CC"; then 17586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 17587 $as_echo "$BUILD_CC" >&6; } 17588 else 17589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17590 $as_echo "no" >&6; } 17591 fi 17592 17593 17594 test -n "$BUILD_CC" && break 17595 done 17596 17597 17598 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17599 17600 # First separate the path from the arguments. This will split at the first 17601 # space. 17602 complete="$BUILD_CC" 17603 path="${complete%% *}" 17604 tmp="$complete EOL" 17605 arguments="${tmp#* }" 17606 17607 # Input might be given as Windows format, start by converting to 17608 # unix format. 17609 new_path=`$CYGPATH -u "$path"` 17610 17611 # Now try to locate executable using which 17612 new_path=`$WHICH "$new_path" 2> /dev/null` 17613 # bat and cmd files are not always considered executable in cygwin causing which 17614 # to not find them 17615 if test "x$new_path" = x \ 17616 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17617 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17618 new_path=`$CYGPATH -u "$path"` 17619 fi 17620 if test "x$new_path" = x; then 17621 # Oops. Which didn't find the executable. 17622 # The splitting of arguments from the executable at a space might have been incorrect, 17623 # since paths with space are more likely in Windows. Give it another try with the whole 17624 # argument. 17625 path="$complete" 17626 arguments="EOL" 17627 new_path=`$CYGPATH -u "$path"` 17628 new_path=`$WHICH "$new_path" 2> /dev/null` 17629 # bat and cmd files are not always considered executable in cygwin causing which 17630 # to not find them 17631 if test "x$new_path" = x \ 17632 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17633 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17634 new_path=`$CYGPATH -u "$path"` 17635 fi 17636 if test "x$new_path" = x; then 17637 # It's still not found. Now this is an unrecoverable error. 17638 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 17639 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 17640 has_space=`$ECHO "$complete" | $GREP " "` 17641 if test "x$has_space" != x; then 17642 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17644 fi 17645 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17646 fi 17647 fi 17648 17649 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17650 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17651 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17652 # "foo.exe" is OK but "foo" is an error. 17653 # 17654 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17655 # It is also a way to make sure we got the proper file name for the real test later on. 17656 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17657 if test "x$test_shortpath" = x; then 17658 # Short path failed, file does not exist as specified. 17659 # Try adding .exe or .cmd 17660 if test -f "${new_path}.exe"; then 17661 input_to_shortpath="${new_path}.exe" 17662 elif test -f "${new_path}.cmd"; then 17663 input_to_shortpath="${new_path}.cmd" 17664 else 17665 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5 17666 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;} 17667 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 17668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 17669 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17670 fi 17671 else 17672 input_to_shortpath="$new_path" 17673 fi 17674 17675 # Call helper function which possibly converts this using DOS-style short mode. 17676 # If so, the updated path is stored in $new_path. 17677 new_path="$input_to_shortpath" 17678 17679 input_path="$input_to_shortpath" 17680 # Check if we need to convert this using DOS-style short mode. If the path 17681 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17682 # take no chances and rewrite it. 17683 # Note: m4 eats our [], so we need to use [ and ] instead. 17684 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17685 if test "x$has_forbidden_chars" != x; then 17686 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17687 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17688 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 17689 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 17690 # Going to short mode and back again did indeed matter. Since short mode is 17691 # case insensitive, let's make it lowercase to improve readability. 17692 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17693 # Now convert it back to Unix-stile (cygpath) 17694 input_path=`$CYGPATH -u "$shortmode_path"` 17695 new_path="$input_path" 17696 fi 17697 fi 17698 17699 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 17700 if test "x$test_cygdrive_prefix" = x; then 17701 # As a simple fix, exclude /usr/bin since it's not a real path. 17702 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 17703 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 17704 # a path prefixed by /cygdrive for fixpath to work. 17705 new_path="$CYGWIN_ROOT_PATH$input_path" 17706 fi 17707 fi 17708 17709 # remove trailing .exe if any 17710 new_path="${new_path/%.exe/}" 17711 17712 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17713 17714 # First separate the path from the arguments. This will split at the first 17715 # space. 17716 complete="$BUILD_CC" 17717 path="${complete%% *}" 17718 tmp="$complete EOL" 17719 arguments="${tmp#* }" 17720 17721 # Input might be given as Windows format, start by converting to 17722 # unix format. 17723 new_path="$path" 17724 17725 windows_path="$new_path" 17726 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17727 unix_path=`$CYGPATH -u "$windows_path"` 17728 new_path="$unix_path" 17729 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17730 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17731 new_path="$unix_path" 17732 fi 17733 17734 17735 # Now try to locate executable using which 17736 new_path=`$WHICH "$new_path" 2> /dev/null` 17737 17738 if test "x$new_path" = x; then 17739 # Oops. Which didn't find the executable. 17740 # The splitting of arguments from the executable at a space might have been incorrect, 17741 # since paths with space are more likely in Windows. Give it another try with the whole 17742 # argument. 17743 path="$complete" 17744 arguments="EOL" 17745 new_path="$path" 17746 17747 windows_path="$new_path" 17748 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17749 unix_path=`$CYGPATH -u "$windows_path"` 17750 new_path="$unix_path" 17751 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17752 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17753 new_path="$unix_path" 17754 fi 17755 17756 17757 new_path=`$WHICH "$new_path" 2> /dev/null` 17758 17759 if test "x$new_path" = x; then 17760 # It's still not found. Now this is an unrecoverable error. 17761 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 17762 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 17763 has_space=`$ECHO "$complete" | $GREP " "` 17764 if test "x$has_space" != x; then 17765 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17767 fi 17768 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17769 fi 17770 fi 17771 17772 # Now new_path has a complete unix path to the binary 17773 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 17774 # Keep paths in /bin as-is, but remove trailing .exe if any 17775 new_path="${new_path/%.exe/}" 17776 # Do not save /bin paths to all_fixpath_prefixes! 17777 else 17778 # Not in mixed or Windows style, start by that. 17779 new_path=`cmd //c echo $new_path` 17780 17781 input_path="$new_path" 17782 # Check if we need to convert this using DOS-style short mode. If the path 17783 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17784 # take no chances and rewrite it. 17785 # Note: m4 eats our [], so we need to use [ and ] instead. 17786 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 17787 if test "x$has_forbidden_chars" != x; then 17788 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17789 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 17790 fi 17791 17792 # Output is in $new_path 17793 17794 windows_path="$new_path" 17795 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17796 unix_path=`$CYGPATH -u "$windows_path"` 17797 new_path="$unix_path" 17798 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 17799 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 17800 new_path="$unix_path" 17801 fi 17802 17803 # remove trailing .exe if any 17804 new_path="${new_path/%.exe/}" 17805 17806 # Save the first 10 bytes of this path to the storage, so fixpath can work. 17807 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 17808 fi 17809 17810 else 17811 # We're on a posix platform. Hooray! :) 17812 # First separate the path from the arguments. This will split at the first 17813 # space. 17814 complete="$BUILD_CC" 17815 path="${complete%% *}" 17816 tmp="$complete EOL" 17817 arguments="${tmp#* }" 17818 17819 # Cannot rely on the command "which" here since it doesn't always work. 17820 is_absolute_path=`$ECHO "$path" | $GREP ^/` 17821 if test -z "$is_absolute_path"; then 17822 # Path to executable is not absolute. Find it. 17823 IFS_save="$IFS" 17824 IFS=: 17825 for p in $PATH; do 17826 if test -f "$p/$path" && test -x "$p/$path"; then 17827 new_path="$p/$path" 17828 break 17829 fi 17830 done 17831 IFS="$IFS_save" 17832 else 17833 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5 17834 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;} 17835 new_path="$path" 17836 fi 17837 17838 if test "x$new_path" = x; then 17839 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 17840 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} 17841 has_space=`$ECHO "$complete" | $GREP " "` 17842 if test "x$has_space" != x; then 17843 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 17844 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 17845 fi 17846 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 17847 fi 17848 fi 17849 17850 # Now join together the path and the arguments once again 17851 if test "x$arguments" != xEOL; then 17852 new_complete="$new_path ${arguments% *}" 17853 else 17854 new_complete="$new_path" 17855 fi 17856 17857 if test "x$complete" != "x$new_complete"; then 17858 BUILD_CC="$new_complete" 17859 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5 17860 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;} 17861 fi 17862 17863 for ac_prog in cl CC g++ 17864 do 17865 # Extract the first word of "$ac_prog", so it can be a program name with args. 17866 set dummy $ac_prog; ac_word=$2 17867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 17868 $as_echo_n "checking for $ac_word... " >&6; } 17869 if test "${ac_cv_path_BUILD_CXX+set}" = set; then : 17870 $as_echo_n "(cached) " >&6 17871 else 17872 case $BUILD_CXX in 17873 [\\/]* | ?:[\\/]*) 17874 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. 17875 ;; 17876 *) 17877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 17878 for as_dir in $PATH 17879 do 17880 IFS=$as_save_IFS 17881 test -z "$as_dir" && as_dir=. 17882 for ac_exec_ext in '' $ac_executable_extensions; do 17883 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 17884 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" 17885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 17886 break 2 17887 fi 17888 done 17889 done 17890 IFS=$as_save_IFS 17891 17892 ;; 17893 esac 17894 fi 17895 BUILD_CXX=$ac_cv_path_BUILD_CXX 17896 if test -n "$BUILD_CXX"; then 17897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 17898 $as_echo "$BUILD_CXX" >&6; } 17899 else 17900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17901 $as_echo "no" >&6; } 17902 fi 17903 17904 17905 test -n "$BUILD_CXX" && break 17906 done 17907 17908 17909 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 17910 17911 # First separate the path from the arguments. This will split at the first 17912 # space. 17913 complete="$BUILD_CXX" 17914 path="${complete%% *}" 17915 tmp="$complete EOL" 17916 arguments="${tmp#* }" 17917 17918 # Input might be given as Windows format, start by converting to 17919 # unix format. 17920 new_path=`$CYGPATH -u "$path"` 17921 17922 # Now try to locate executable using which 17923 new_path=`$WHICH "$new_path" 2> /dev/null` 17924 # bat and cmd files are not always considered executable in cygwin causing which 17925 # to not find them 17926 if test "x$new_path" = x \ 17927 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17928 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17929 new_path=`$CYGPATH -u "$path"` 17930 fi 17931 if test "x$new_path" = x; then 17932 # Oops. Which didn't find the executable. 17933 # The splitting of arguments from the executable at a space might have been incorrect, 17934 # since paths with space are more likely in Windows. Give it another try with the whole 17935 # argument. 17936 path="$complete" 17937 arguments="EOL" 17938 new_path=`$CYGPATH -u "$path"` 17939 new_path=`$WHICH "$new_path" 2> /dev/null` 17940 # bat and cmd files are not always considered executable in cygwin causing which 17941 # to not find them 17942 if test "x$new_path" = x \ 17943 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 17944 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 17945 new_path=`$CYGPATH -u "$path"` 17946 fi 17947 if test "x$new_path" = x; then 17948 # It's still not found. Now this is an unrecoverable error. 17949 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 17950 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 17951 has_space=`$ECHO "$complete" | $GREP " "` 17952 if test "x$has_space" != x; then 17953 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 17954 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 17955 fi 17956 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 17957 fi 17958 fi 17959 17960 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 17961 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 17962 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 17963 # "foo.exe" is OK but "foo" is an error. 17964 # 17965 # This test is therefore slightly more accurate than "test -f" to check for file precense. 17966 # It is also a way to make sure we got the proper file name for the real test later on. 17967 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 17968 if test "x$test_shortpath" = x; then 17969 # Short path failed, file does not exist as specified. 17970 # Try adding .exe or .cmd 17971 if test -f "${new_path}.exe"; then 17972 input_to_shortpath="${new_path}.exe" 17973 elif test -f "${new_path}.cmd"; then 17974 input_to_shortpath="${new_path}.cmd" 17975 else 17976 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5 17977 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;} 17978 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 17979 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 17980 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 17981 fi 17982 else 17983 input_to_shortpath="$new_path" 17984 fi 17985 17986 # Call helper function which possibly converts this using DOS-style short mode. 17987 # If so, the updated path is stored in $new_path. 17988 new_path="$input_to_shortpath" 17989 17990 input_path="$input_to_shortpath" 17991 # Check if we need to convert this using DOS-style short mode. If the path 17992 # contains just simple characters, use it. Otherwise (spaces, weird characters), 17993 # take no chances and rewrite it. 17994 # Note: m4 eats our [], so we need to use [ and ] instead. 17995 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 17996 if test "x$has_forbidden_chars" != x; then 17997 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 17998 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 17999 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18000 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18001 # Going to short mode and back again did indeed matter. Since short mode is 18002 # case insensitive, let's make it lowercase to improve readability. 18003 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18004 # Now convert it back to Unix-stile (cygpath) 18005 input_path=`$CYGPATH -u "$shortmode_path"` 18006 new_path="$input_path" 18007 fi 18008 fi 18009 18010 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18011 if test "x$test_cygdrive_prefix" = x; then 18012 # As a simple fix, exclude /usr/bin since it's not a real path. 18013 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18014 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18015 # a path prefixed by /cygdrive for fixpath to work. 18016 new_path="$CYGWIN_ROOT_PATH$input_path" 18017 fi 18018 fi 18019 18020 # remove trailing .exe if any 18021 new_path="${new_path/%.exe/}" 18022 18023 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18024 18025 # First separate the path from the arguments. This will split at the first 18026 # space. 18027 complete="$BUILD_CXX" 18028 path="${complete%% *}" 18029 tmp="$complete EOL" 18030 arguments="${tmp#* }" 18031 18032 # Input might be given as Windows format, start by converting to 18033 # unix format. 18034 new_path="$path" 18035 18036 windows_path="$new_path" 18037 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18038 unix_path=`$CYGPATH -u "$windows_path"` 18039 new_path="$unix_path" 18040 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18041 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18042 new_path="$unix_path" 18043 fi 18044 18045 18046 # Now try to locate executable using which 18047 new_path=`$WHICH "$new_path" 2> /dev/null` 18048 18049 if test "x$new_path" = x; then 18050 # Oops. Which didn't find the executable. 18051 # The splitting of arguments from the executable at a space might have been incorrect, 18052 # since paths with space are more likely in Windows. Give it another try with the whole 18053 # argument. 18054 path="$complete" 18055 arguments="EOL" 18056 new_path="$path" 18057 18058 windows_path="$new_path" 18059 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18060 unix_path=`$CYGPATH -u "$windows_path"` 18061 new_path="$unix_path" 18062 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18063 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18064 new_path="$unix_path" 18065 fi 18066 18067 18068 new_path=`$WHICH "$new_path" 2> /dev/null` 18069 18070 if test "x$new_path" = x; then 18071 # It's still not found. Now this is an unrecoverable error. 18072 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18073 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18074 has_space=`$ECHO "$complete" | $GREP " "` 18075 if test "x$has_space" != x; then 18076 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18077 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18078 fi 18079 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18080 fi 18081 fi 18082 18083 # Now new_path has a complete unix path to the binary 18084 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18085 # Keep paths in /bin as-is, but remove trailing .exe if any 18086 new_path="${new_path/%.exe/}" 18087 # Do not save /bin paths to all_fixpath_prefixes! 18088 else 18089 # Not in mixed or Windows style, start by that. 18090 new_path=`cmd //c echo $new_path` 18091 18092 input_path="$new_path" 18093 # Check if we need to convert this using DOS-style short mode. If the path 18094 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18095 # take no chances and rewrite it. 18096 # Note: m4 eats our [], so we need to use [ and ] instead. 18097 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18098 if test "x$has_forbidden_chars" != x; then 18099 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18100 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18101 fi 18102 18103 # Output is in $new_path 18104 18105 windows_path="$new_path" 18106 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18107 unix_path=`$CYGPATH -u "$windows_path"` 18108 new_path="$unix_path" 18109 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18110 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18111 new_path="$unix_path" 18112 fi 18113 18114 # remove trailing .exe if any 18115 new_path="${new_path/%.exe/}" 18116 18117 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18118 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18119 fi 18120 18121 else 18122 # We're on a posix platform. Hooray! :) 18123 # First separate the path from the arguments. This will split at the first 18124 # space. 18125 complete="$BUILD_CXX" 18126 path="${complete%% *}" 18127 tmp="$complete EOL" 18128 arguments="${tmp#* }" 18129 18130 # Cannot rely on the command "which" here since it doesn't always work. 18131 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18132 if test -z "$is_absolute_path"; then 18133 # Path to executable is not absolute. Find it. 18134 IFS_save="$IFS" 18135 IFS=: 18136 for p in $PATH; do 18137 if test -f "$p/$path" && test -x "$p/$path"; then 18138 new_path="$p/$path" 18139 break 18140 fi 18141 done 18142 IFS="$IFS_save" 18143 else 18144 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5 18145 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;} 18146 new_path="$path" 18147 fi 18148 18149 if test "x$new_path" = x; then 18150 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 18151 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} 18152 has_space=`$ECHO "$complete" | $GREP " "` 18153 if test "x$has_space" != x; then 18154 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18155 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18156 fi 18157 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 18158 fi 18159 fi 18160 18161 # Now join together the path and the arguments once again 18162 if test "x$arguments" != xEOL; then 18163 new_complete="$new_path ${arguments% *}" 18164 else 18165 new_complete="$new_path" 18166 fi 18167 18168 if test "x$complete" != "x$new_complete"; then 18169 BUILD_CXX="$new_complete" 18170 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5 18171 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;} 18172 fi 18173 18174 # Extract the first word of "ld", so it can be a program name with args. 18175 set dummy ld; ac_word=$2 18176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18177 $as_echo_n "checking for $ac_word... " >&6; } 18178 if test "${ac_cv_path_BUILD_LD+set}" = set; then : 18179 $as_echo_n "(cached) " >&6 18180 else 18181 case $BUILD_LD in 18182 [\\/]* | ?:[\\/]*) 18183 ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. 18184 ;; 18185 *) 18186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18187 for as_dir in $PATH 18188 do 18189 IFS=$as_save_IFS 18190 test -z "$as_dir" && as_dir=. 18191 for ac_exec_ext in '' $ac_executable_extensions; do 18192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18193 ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" 18194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18195 break 2 18196 fi 18197 done 18198 done 18199 IFS=$as_save_IFS 18200 18201 ;; 18202 esac 18203 fi 18204 BUILD_LD=$ac_cv_path_BUILD_LD 18205 if test -n "$BUILD_LD"; then 18206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 18207 $as_echo "$BUILD_LD" >&6; } 18208 else 18209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18210 $as_echo "no" >&6; } 18211 fi 18212 18213 18214 18215 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18216 18217 # First separate the path from the arguments. This will split at the first 18218 # space. 18219 complete="$BUILD_LD" 18220 path="${complete%% *}" 18221 tmp="$complete EOL" 18222 arguments="${tmp#* }" 18223 18224 # Input might be given as Windows format, start by converting to 18225 # unix format. 18226 new_path=`$CYGPATH -u "$path"` 18227 18228 # Now try to locate executable using which 18229 new_path=`$WHICH "$new_path" 2> /dev/null` 18230 # bat and cmd files are not always considered executable in cygwin causing which 18231 # to not find them 18232 if test "x$new_path" = x \ 18233 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18234 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18235 new_path=`$CYGPATH -u "$path"` 18236 fi 18237 if test "x$new_path" = x; then 18238 # Oops. Which didn't find the executable. 18239 # The splitting of arguments from the executable at a space might have been incorrect, 18240 # since paths with space are more likely in Windows. Give it another try with the whole 18241 # argument. 18242 path="$complete" 18243 arguments="EOL" 18244 new_path=`$CYGPATH -u "$path"` 18245 new_path=`$WHICH "$new_path" 2> /dev/null` 18246 # bat and cmd files are not always considered executable in cygwin causing which 18247 # to not find them 18248 if test "x$new_path" = x \ 18249 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18250 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18251 new_path=`$CYGPATH -u "$path"` 18252 fi 18253 if test "x$new_path" = x; then 18254 # It's still not found. Now this is an unrecoverable error. 18255 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18256 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18257 has_space=`$ECHO "$complete" | $GREP " "` 18258 if test "x$has_space" != x; then 18259 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18260 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18261 fi 18262 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18263 fi 18264 fi 18265 18266 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18267 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18268 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18269 # "foo.exe" is OK but "foo" is an error. 18270 # 18271 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18272 # It is also a way to make sure we got the proper file name for the real test later on. 18273 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18274 if test "x$test_shortpath" = x; then 18275 # Short path failed, file does not exist as specified. 18276 # Try adding .exe or .cmd 18277 if test -f "${new_path}.exe"; then 18278 input_to_shortpath="${new_path}.exe" 18279 elif test -f "${new_path}.cmd"; then 18280 input_to_shortpath="${new_path}.cmd" 18281 else 18282 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5 18283 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;} 18284 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18285 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18286 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18287 fi 18288 else 18289 input_to_shortpath="$new_path" 18290 fi 18291 18292 # Call helper function which possibly converts this using DOS-style short mode. 18293 # If so, the updated path is stored in $new_path. 18294 new_path="$input_to_shortpath" 18295 18296 input_path="$input_to_shortpath" 18297 # Check if we need to convert this using DOS-style short mode. If the path 18298 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18299 # take no chances and rewrite it. 18300 # Note: m4 eats our [], so we need to use [ and ] instead. 18301 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18302 if test "x$has_forbidden_chars" != x; then 18303 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18304 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18305 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18306 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18307 # Going to short mode and back again did indeed matter. Since short mode is 18308 # case insensitive, let's make it lowercase to improve readability. 18309 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18310 # Now convert it back to Unix-stile (cygpath) 18311 input_path=`$CYGPATH -u "$shortmode_path"` 18312 new_path="$input_path" 18313 fi 18314 fi 18315 18316 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18317 if test "x$test_cygdrive_prefix" = x; then 18318 # As a simple fix, exclude /usr/bin since it's not a real path. 18319 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18320 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18321 # a path prefixed by /cygdrive for fixpath to work. 18322 new_path="$CYGWIN_ROOT_PATH$input_path" 18323 fi 18324 fi 18325 18326 # remove trailing .exe if any 18327 new_path="${new_path/%.exe/}" 18328 18329 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18330 18331 # First separate the path from the arguments. This will split at the first 18332 # space. 18333 complete="$BUILD_LD" 18334 path="${complete%% *}" 18335 tmp="$complete EOL" 18336 arguments="${tmp#* }" 18337 18338 # Input might be given as Windows format, start by converting to 18339 # unix format. 18340 new_path="$path" 18341 18342 windows_path="$new_path" 18343 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18344 unix_path=`$CYGPATH -u "$windows_path"` 18345 new_path="$unix_path" 18346 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18347 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18348 new_path="$unix_path" 18349 fi 18350 18351 18352 # Now try to locate executable using which 18353 new_path=`$WHICH "$new_path" 2> /dev/null` 18354 18355 if test "x$new_path" = x; then 18356 # Oops. Which didn't find the executable. 18357 # The splitting of arguments from the executable at a space might have been incorrect, 18358 # since paths with space are more likely in Windows. Give it another try with the whole 18359 # argument. 18360 path="$complete" 18361 arguments="EOL" 18362 new_path="$path" 18363 18364 windows_path="$new_path" 18365 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18366 unix_path=`$CYGPATH -u "$windows_path"` 18367 new_path="$unix_path" 18368 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18369 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18370 new_path="$unix_path" 18371 fi 18372 18373 18374 new_path=`$WHICH "$new_path" 2> /dev/null` 18375 18376 if test "x$new_path" = x; then 18377 # It's still not found. Now this is an unrecoverable error. 18378 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18379 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18380 has_space=`$ECHO "$complete" | $GREP " "` 18381 if test "x$has_space" != x; then 18382 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18383 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18384 fi 18385 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18386 fi 18387 fi 18388 18389 # Now new_path has a complete unix path to the binary 18390 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18391 # Keep paths in /bin as-is, but remove trailing .exe if any 18392 new_path="${new_path/%.exe/}" 18393 # Do not save /bin paths to all_fixpath_prefixes! 18394 else 18395 # Not in mixed or Windows style, start by that. 18396 new_path=`cmd //c echo $new_path` 18397 18398 input_path="$new_path" 18399 # Check if we need to convert this using DOS-style short mode. If the path 18400 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18401 # take no chances and rewrite it. 18402 # Note: m4 eats our [], so we need to use [ and ] instead. 18403 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 18404 if test "x$has_forbidden_chars" != x; then 18405 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18406 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18407 fi 18408 18409 # Output is in $new_path 18410 18411 windows_path="$new_path" 18412 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18413 unix_path=`$CYGPATH -u "$windows_path"` 18414 new_path="$unix_path" 18415 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18416 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18417 new_path="$unix_path" 18418 fi 18419 18420 # remove trailing .exe if any 18421 new_path="${new_path/%.exe/}" 18422 18423 # Save the first 10 bytes of this path to the storage, so fixpath can work. 18424 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 18425 fi 18426 18427 else 18428 # We're on a posix platform. Hooray! :) 18429 # First separate the path from the arguments. This will split at the first 18430 # space. 18431 complete="$BUILD_LD" 18432 path="${complete%% *}" 18433 tmp="$complete EOL" 18434 arguments="${tmp#* }" 18435 18436 # Cannot rely on the command "which" here since it doesn't always work. 18437 is_absolute_path=`$ECHO "$path" | $GREP ^/` 18438 if test -z "$is_absolute_path"; then 18439 # Path to executable is not absolute. Find it. 18440 IFS_save="$IFS" 18441 IFS=: 18442 for p in $PATH; do 18443 if test -f "$p/$path" && test -x "$p/$path"; then 18444 new_path="$p/$path" 18445 break 18446 fi 18447 done 18448 IFS="$IFS_save" 18449 else 18450 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5 18451 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;} 18452 new_path="$path" 18453 fi 18454 18455 if test "x$new_path" = x; then 18456 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 18457 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} 18458 has_space=`$ECHO "$complete" | $GREP " "` 18459 if test "x$has_space" != x; then 18460 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 18461 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 18462 fi 18463 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 18464 fi 18465 fi 18466 18467 # Now join together the path and the arguments once again 18468 if test "x$arguments" != xEOL; then 18469 new_complete="$new_path ${arguments% *}" 18470 else 18471 new_complete="$new_path" 18472 fi 18473 18474 if test "x$complete" != "x$new_complete"; then 18475 BUILD_LD="$new_complete" 18476 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5 18477 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;} 18478 fi 18479 18480 fi 18481 18482 18483 18484 18485 # If a devkit is found on the builddeps server, then prepend its path to the 18486 # PATH variable. If there are cross compilers available in the devkit, these 18487 # will be found by AC_PROG_CC et al. 18488 DEVKIT= 18489 18490 18491 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 18492 # Source the builddeps file again, to make sure it uses the latest variables! 18493 . $builddepsfile 18494 # Look for a target and build machine specific resource! 18495 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 18496 if test "x$resource" = x; then 18497 # Ok, lets instead look for a target specific resource 18498 eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}} 18499 fi 18500 if test "x$resource" = x; then 18501 # Ok, lets instead look for a build specific resource 18502 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}} 18503 fi 18504 if test "x$resource" = x; then 18505 # Ok, lets instead look for a generic resource 18506 # (The devkit comes from M4 and not the shell, thus no need for eval here.) 18507 resource=${builddep_devkit} 18508 fi 18509 if test "x$resource" != x; then 18510 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5 18511 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;} 18512 # If the resource in the builddeps.conf file is an existing directory, 18513 # for example /java/linux/cups 18514 if test -d ${resource}; then 18515 depdir=${resource} 18516 else 18517 18518 # devkit is for example mymodule 18519 # $resource is for example libs/general/libmymod_1_2_3.zip 18520 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 18521 # $with_builddeps_dir is for example /localhome/builddeps 18522 # depdir is the name of the variable into which we store the depdir, eg MYMOD 18523 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 18524 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 18525 filename=`basename $resource` 18526 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 18527 filebase=${filename%%.*} 18528 extension=${filename#*.} 18529 installdir=$with_builddeps_dir/$filebase 18530 if test ! -f $installdir/$filename.unpacked; then 18531 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5 18532 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;} 18533 if test ! -d $installdir; then 18534 mkdir -p $installdir 18535 fi 18536 if test ! -d $installdir; then 18537 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 18538 fi 18539 tmpfile=`mktemp $installdir/devkit.XXXXXXXXX` 18540 touch $tmpfile 18541 if test ! -f $tmpfile; then 18542 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 18543 fi 18544 18545 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 18546 # $tmpfile is the local file name for the downloaded file. 18547 VALID_TOOL=no 18548 if test "x$BDEPS_FTP" = xwget; then 18549 VALID_TOOL=yes 18550 wget -O $tmpfile $with_builddeps_server/$resource 18551 fi 18552 if test "x$BDEPS_FTP" = xlftp; then 18553 VALID_TOOL=yes 18554 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 18555 fi 18556 if test "x$BDEPS_FTP" = xftp; then 18557 VALID_TOOL=yes 18558 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 18559 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 18560 FTPUSERPWD=${FTPSERVER%%@*} 18561 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 18562 FTPUSER=${userpwd%%:*} 18563 FTPPWD=${userpwd#*@} 18564 FTPSERVER=${FTPSERVER#*@} 18565 else 18566 FTPUSER=ftp 18567 FTPPWD=ftp 18568 fi 18569 # the "pass" command does not work on some 18570 # ftp clients (read ftp.exe) but if it works, 18571 # passive mode is better! 18572 (\ 18573 echo "user $FTPUSER $FTPPWD" ;\ 18574 echo "pass" ;\ 18575 echo "bin" ;\ 18576 echo "get $FTPPATH $tmpfile" ;\ 18577 ) | ftp -in $FTPSERVER 18578 fi 18579 if test "x$VALID_TOOL" != xyes; then 18580 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 18581 fi 18582 18583 mv $tmpfile $installdir/$filename 18584 if test ! -s $installdir/$filename; then 18585 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 18586 fi 18587 case "$extension" in 18588 zip) echo "Unzipping $installdir/$filename..." 18589 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 18590 ;; 18591 tar.gz) echo "Untaring $installdir/$filename..." 18592 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 18593 ;; 18594 tgz) echo "Untaring $installdir/$filename..." 18595 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 18596 ;; 18597 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 18598 ;; 18599 esac 18600 fi 18601 if test -f $installdir/$filename.unpacked; then 18602 depdir=$installdir 18603 fi 18604 18605 fi 18606 # Source the builddeps file again, because in the previous command, the depdir 18607 # was updated to point at the current build dependency install directory. 18608 . $builddepsfile 18609 # Now extract variables from the builddeps.conf files. 18610 theroot=${builddep_devkit_ROOT} 18611 thecflags=${builddep_devkit_CFLAGS} 18612 thelibs=${builddep_devkit_LIBS} 18613 if test "x$depdir" = x; then 18614 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5 18615 fi 18616 DEVKIT=$depdir 18617 if test "x$theroot" != x; then 18618 DEVKIT="$theroot" 18619 fi 18620 if test "x$thecflags" != x; then 18621 DEVKIT_CFLAGS="$thecflags" 18622 fi 18623 if test "x$thelibs" != x; then 18624 DEVKIT_LIBS="$thelibs" 18625 fi 18626 # Found devkit 18627 PATH="$DEVKIT/bin:$PATH" 18628 SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" 18629 if test "x$x_includes" = "xNONE"; then 18630 x_includes="$SYS_ROOT/usr/include/X11" 18631 fi 18632 if test "x$x_libraries" = "xNONE"; then 18633 x_libraries="$SYS_ROOT/usr/lib" 18634 fi 18635 18636 18637 fi 18638 18639 fi 18640 18641 18642 if test "x$SYS_ROOT" != "x/" ; then 18643 CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" 18644 CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" 18645 OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 18646 OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 18647 CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" 18648 LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" 18649 fi 18650 18651 # Store the CFLAGS etal passed to the configure script. 18652 ORG_CFLAGS="$CFLAGS" 18653 ORG_CXXFLAGS="$CXXFLAGS" 18654 ORG_OBJCFLAGS="$OBJCFLAGS" 18655 18656 # autoconf magic only relies on PATH, so update it if tools dir is specified 18657 OLD_PATH="$PATH" 18658 if test "x$TOOLS_DIR" != x; then 18659 PATH=$TOOLS_DIR:$PATH 18660 fi 18661 18662 18663 ### Locate C compiler (CC) 18664 18665 # On windows, only cl.exe is supported. 18666 # On Solaris, cc is preferred to gcc. 18667 # Elsewhere, gcc is preferred to cc. 18668 18669 if test "x$CC" != x; then 18670 COMPILER_CHECK_LIST="$CC" 18671 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 18672 COMPILER_CHECK_LIST="cl" 18673 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 18674 COMPILER_CHECK_LIST="cc gcc" 18675 else 18676 COMPILER_CHECK_LIST="gcc cc" 18677 fi 18678 18679 18680 COMPILER_NAME=C 18681 18682 CC= 18683 # If TOOLS_DIR is set, check for all compiler names in there first 18684 # before checking the rest of the PATH. 18685 if test -n "$TOOLS_DIR"; then 18686 PATH_save="$PATH" 18687 PATH="$TOOLS_DIR" 18688 for ac_prog in $COMPILER_CHECK_LIST 18689 do 18690 # Extract the first word of "$ac_prog", so it can be a program name with args. 18691 set dummy $ac_prog; ac_word=$2 18692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18693 $as_echo_n "checking for $ac_word... " >&6; } 18694 if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then : 18695 $as_echo_n "(cached) " >&6 18696 else 18697 case $TOOLS_DIR_CC in 18698 [\\/]* | ?:[\\/]*) 18699 ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path. 18700 ;; 18701 *) 18702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18703 for as_dir in $PATH 18704 do 18705 IFS=$as_save_IFS 18706 test -z "$as_dir" && as_dir=. 18707 for ac_exec_ext in '' $ac_executable_extensions; do 18708 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18709 ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext" 18710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18711 break 2 18712 fi 18713 done 18714 done 18715 IFS=$as_save_IFS 18716 18717 ;; 18718 esac 18719 fi 18720 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC 18721 if test -n "$TOOLS_DIR_CC"; then 18722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5 18723 $as_echo "$TOOLS_DIR_CC" >&6; } 18724 else 18725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18726 $as_echo "no" >&6; } 18727 fi 18728 18729 18730 test -n "$TOOLS_DIR_CC" && break 18731 done 18732 18733 CC=$TOOLS_DIR_CC 18734 PATH="$PATH_save" 18735 fi 18736 18737 # AC_PATH_PROGS can't be run multiple times with the same variable, 18738 # so create a new name for this run. 18739 if test "x$CC" = x; then 18740 for ac_prog in $COMPILER_CHECK_LIST 18741 do 18742 # Extract the first word of "$ac_prog", so it can be a program name with args. 18743 set dummy $ac_prog; ac_word=$2 18744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 18745 $as_echo_n "checking for $ac_word... " >&6; } 18746 if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then : 18747 $as_echo_n "(cached) " >&6 18748 else 18749 case $POTENTIAL_CC in 18750 [\\/]* | ?:[\\/]*) 18751 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path. 18752 ;; 18753 *) 18754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 18755 for as_dir in $PATH 18756 do 18757 IFS=$as_save_IFS 18758 test -z "$as_dir" && as_dir=. 18759 for ac_exec_ext in '' $ac_executable_extensions; do 18760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18761 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" 18762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 18763 break 2 18764 fi 18765 done 18766 done 18767 IFS=$as_save_IFS 18768 18769 ;; 18770 esac 18771 fi 18772 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC 18773 if test -n "$POTENTIAL_CC"; then 18774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5 18775 $as_echo "$POTENTIAL_CC" >&6; } 18776 else 18777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18778 $as_echo "no" >&6; } 18779 fi 18780 18781 18782 test -n "$POTENTIAL_CC" && break 18783 done 18784 18785 CC=$POTENTIAL_CC 18786 fi 18787 18788 if test "x$CC" = x; then 18789 18790 # Print a helpful message on how to acquire the necessary build dependency. 18791 # devkit is the help tag: freetyp2, cups, pulse, alsa etc 18792 MISSING_DEPENDENCY=devkit 18793 PKGHANDLER_COMMAND= 18794 18795 case $PKGHANDLER in 18796 apt-get) 18797 apt_help $MISSING_DEPENDENCY ;; 18798 yum) 18799 yum_help $MISSING_DEPENDENCY ;; 18800 port) 18801 port_help $MISSING_DEPENDENCY ;; 18802 pkgutil) 18803 pkgutil_help $MISSING_DEPENDENCY ;; 18804 pkgadd) 18805 pkgadd_help $MISSING_DEPENDENCY ;; 18806 * ) 18807 break ;; 18808 esac 18809 18810 if test "x$PKGHANDLER_COMMAND" != x; then 18811 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 18812 fi 18813 18814 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 18815 fi 18816 18817 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18818 18819 # First separate the path from the arguments. This will split at the first 18820 # space. 18821 complete="$CC" 18822 path="${complete%% *}" 18823 tmp="$complete EOL" 18824 arguments="${tmp#* }" 18825 18826 # Input might be given as Windows format, start by converting to 18827 # unix format. 18828 new_path=`$CYGPATH -u "$path"` 18829 18830 # Now try to locate executable using which 18831 new_path=`$WHICH "$new_path" 2> /dev/null` 18832 # bat and cmd files are not always considered executable in cygwin causing which 18833 # to not find them 18834 if test "x$new_path" = x \ 18835 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18836 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18837 new_path=`$CYGPATH -u "$path"` 18838 fi 18839 if test "x$new_path" = x; then 18840 # Oops. Which didn't find the executable. 18841 # The splitting of arguments from the executable at a space might have been incorrect, 18842 # since paths with space are more likely in Windows. Give it another try with the whole 18843 # argument. 18844 path="$complete" 18845 arguments="EOL" 18846 new_path=`$CYGPATH -u "$path"` 18847 new_path=`$WHICH "$new_path" 2> /dev/null` 18848 # bat and cmd files are not always considered executable in cygwin causing which 18849 # to not find them 18850 if test "x$new_path" = x \ 18851 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 18852 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 18853 new_path=`$CYGPATH -u "$path"` 18854 fi 18855 if test "x$new_path" = x; then 18856 # It's still not found. Now this is an unrecoverable error. 18857 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 18858 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 18859 has_space=`$ECHO "$complete" | $GREP " "` 18860 if test "x$has_space" != x; then 18861 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18862 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18863 fi 18864 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 18865 fi 18866 fi 18867 18868 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 18869 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 18870 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 18871 # "foo.exe" is OK but "foo" is an error. 18872 # 18873 # This test is therefore slightly more accurate than "test -f" to check for file precense. 18874 # It is also a way to make sure we got the proper file name for the real test later on. 18875 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 18876 if test "x$test_shortpath" = x; then 18877 # Short path failed, file does not exist as specified. 18878 # Try adding .exe or .cmd 18879 if test -f "${new_path}.exe"; then 18880 input_to_shortpath="${new_path}.exe" 18881 elif test -f "${new_path}.cmd"; then 18882 input_to_shortpath="${new_path}.cmd" 18883 else 18884 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5 18885 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;} 18886 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 18887 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 18888 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 18889 fi 18890 else 18891 input_to_shortpath="$new_path" 18892 fi 18893 18894 # Call helper function which possibly converts this using DOS-style short mode. 18895 # If so, the updated path is stored in $new_path. 18896 new_path="$input_to_shortpath" 18897 18898 input_path="$input_to_shortpath" 18899 # Check if we need to convert this using DOS-style short mode. If the path 18900 # contains just simple characters, use it. Otherwise (spaces, weird characters), 18901 # take no chances and rewrite it. 18902 # Note: m4 eats our [], so we need to use [ and ] instead. 18903 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 18904 if test "x$has_forbidden_chars" != x; then 18905 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 18906 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 18907 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 18908 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 18909 # Going to short mode and back again did indeed matter. Since short mode is 18910 # case insensitive, let's make it lowercase to improve readability. 18911 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 18912 # Now convert it back to Unix-stile (cygpath) 18913 input_path=`$CYGPATH -u "$shortmode_path"` 18914 new_path="$input_path" 18915 fi 18916 fi 18917 18918 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 18919 if test "x$test_cygdrive_prefix" = x; then 18920 # As a simple fix, exclude /usr/bin since it's not a real path. 18921 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 18922 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 18923 # a path prefixed by /cygdrive for fixpath to work. 18924 new_path="$CYGWIN_ROOT_PATH$input_path" 18925 fi 18926 fi 18927 18928 # remove trailing .exe if any 18929 new_path="${new_path/%.exe/}" 18930 18931 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18932 18933 # First separate the path from the arguments. This will split at the first 18934 # space. 18935 complete="$CC" 18936 path="${complete%% *}" 18937 tmp="$complete EOL" 18938 arguments="${tmp#* }" 18939 18940 # Input might be given as Windows format, start by converting to 18941 # unix format. 18942 new_path="$path" 18943 18944 windows_path="$new_path" 18945 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18946 unix_path=`$CYGPATH -u "$windows_path"` 18947 new_path="$unix_path" 18948 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18949 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18950 new_path="$unix_path" 18951 fi 18952 18953 18954 # Now try to locate executable using which 18955 new_path=`$WHICH "$new_path" 2> /dev/null` 18956 18957 if test "x$new_path" = x; then 18958 # Oops. Which didn't find the executable. 18959 # The splitting of arguments from the executable at a space might have been incorrect, 18960 # since paths with space are more likely in Windows. Give it another try with the whole 18961 # argument. 18962 path="$complete" 18963 arguments="EOL" 18964 new_path="$path" 18965 18966 windows_path="$new_path" 18967 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 18968 unix_path=`$CYGPATH -u "$windows_path"` 18969 new_path="$unix_path" 18970 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 18971 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 18972 new_path="$unix_path" 18973 fi 18974 18975 18976 new_path=`$WHICH "$new_path" 2> /dev/null` 18977 18978 if test "x$new_path" = x; then 18979 # It's still not found. Now this is an unrecoverable error. 18980 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 18981 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 18982 has_space=`$ECHO "$complete" | $GREP " "` 18983 if test "x$has_space" != x; then 18984 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 18985 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 18986 fi 18987 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 18988 fi 18989 fi 18990 18991 # Now new_path has a complete unix path to the binary 18992 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 18993 # Keep paths in /bin as-is, but remove trailing .exe if any 18994 new_path="${new_path/%.exe/}" 18995 # Do not save /bin paths to all_fixpath_prefixes! 18996 else 18997 # Not in mixed or Windows style, start by that. 18998 new_path=`cmd //c echo $new_path` 18999 19000 input_path="$new_path" 19001 # Check if we need to convert this using DOS-style short mode. If the path 19002 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19003 # take no chances and rewrite it. 19004 # Note: m4 eats our [], so we need to use [ and ] instead. 19005 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 19006 if test "x$has_forbidden_chars" != x; then 19007 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19008 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19009 fi 19010 19011 # Output is in $new_path 19012 19013 windows_path="$new_path" 19014 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19015 unix_path=`$CYGPATH -u "$windows_path"` 19016 new_path="$unix_path" 19017 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19018 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19019 new_path="$unix_path" 19020 fi 19021 19022 # remove trailing .exe if any 19023 new_path="${new_path/%.exe/}" 19024 19025 # Save the first 10 bytes of this path to the storage, so fixpath can work. 19026 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 19027 fi 19028 19029 else 19030 # We're on a posix platform. Hooray! :) 19031 # First separate the path from the arguments. This will split at the first 19032 # space. 19033 complete="$CC" 19034 path="${complete%% *}" 19035 tmp="$complete EOL" 19036 arguments="${tmp#* }" 19037 19038 # Cannot rely on the command "which" here since it doesn't always work. 19039 is_absolute_path=`$ECHO "$path" | $GREP ^/` 19040 if test -z "$is_absolute_path"; then 19041 # Path to executable is not absolute. Find it. 19042 IFS_save="$IFS" 19043 IFS=: 19044 for p in $PATH; do 19045 if test -f "$p/$path" && test -x "$p/$path"; then 19046 new_path="$p/$path" 19047 break 19048 fi 19049 done 19050 IFS="$IFS_save" 19051 else 19052 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5 19053 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;} 19054 new_path="$path" 19055 fi 19056 19057 if test "x$new_path" = x; then 19058 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 19059 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} 19060 has_space=`$ECHO "$complete" | $GREP " "` 19061 if test "x$has_space" != x; then 19062 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 19063 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 19064 fi 19065 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 19066 fi 19067 fi 19068 19069 # Now join together the path and the arguments once again 19070 if test "x$arguments" != xEOL; then 19071 new_complete="$new_path ${arguments% *}" 19072 else 19073 new_complete="$new_path" 19074 fi 19075 19076 if test "x$complete" != "x$new_complete"; then 19077 CC="$new_complete" 19078 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5 19079 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;} 19080 fi 19081 19082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 19083 $as_echo_n "checking resolved symbolic links for CC... " >&6; } 19084 TEST_COMPILER="$CC" 19085 19086 if test "x$OPENJDK_BUILD_OS" != xwindows; then 19087 # Follow a chain of symbolic links. Use readlink 19088 # where it exists, else fall back to horribly 19089 # complicated shell code. 19090 if test "x$READLINK_TESTED" != yes; then 19091 # On MacOSX there is a readlink tool with a different 19092 # purpose than the GNU readlink tool. Check the found readlink. 19093 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 19094 if test "x$ISGNU" = x; then 19095 # A readlink that we do not know how to use. 19096 # Are there other non-GNU readlinks out there? 19097 READLINK_TESTED=yes 19098 READLINK= 19099 fi 19100 fi 19101 19102 if test "x$READLINK" != x; then 19103 TEST_COMPILER=`$READLINK -f $TEST_COMPILER` 19104 else 19105 # Save the current directory for restoring afterwards 19106 STARTDIR=$PWD 19107 COUNTER=0 19108 sym_link_dir=`$DIRNAME $TEST_COMPILER` 19109 sym_link_file=`$BASENAME $TEST_COMPILER` 19110 # Use the system pwd and not the shell builtin to resolve directory symlinks 19111 cd $sym_link_dir 19112 cd `$THEPWDCMD` 19113 sym_link_dir=`$THEPWDCMD` 19114 # Resolve file symlinks 19115 while test $COUNTER -lt 20; do 19116 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 19117 if test "x$ISLINK" == x; then 19118 # This is not a symbolic link! We are done! 19119 break 19120 fi 19121 # Again resolve directory symlinks since the target of the just found 19122 # link could be in a different directory 19123 cd `$DIRNAME $ISLINK` 19124 sym_link_dir=`$THEPWDCMD` 19125 sym_link_file=`$BASENAME $ISLINK` 19126 let COUNTER=COUNTER+1 19127 done 19128 cd $STARTDIR 19129 TEST_COMPILER=$sym_link_dir/$sym_link_file 19130 fi 19131 fi 19132 19133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 19134 $as_echo "$TEST_COMPILER" >&6; } 19135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5 19136 $as_echo_n "checking if CC is disguised ccache... " >&6; } 19137 19138 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 19139 if test "x$COMPILER_BASENAME" = "xccache"; then 19140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 19141 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } 19142 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. 19143 # We want to control ccache invocation ourselves, so ignore this cc and try 19144 # searching again. 19145 19146 # Remove the path to the fake ccache cc from the PATH 19147 RETRY_COMPILER_SAVED_PATH="$PATH" 19148 COMPILER_DIRNAME=`$DIRNAME $CC` 19149 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" 19150 19151 # Try again looking for our compiler 19152 if test -n "$ac_tool_prefix"; then 19153 for ac_prog in $COMPILER_CHECK_LIST 19154 do 19155 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 19156 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 19157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19158 $as_echo_n "checking for $ac_word... " >&6; } 19159 if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then : 19160 $as_echo_n "(cached) " >&6 19161 else 19162 if test -n "$PROPER_COMPILER_CC"; then 19163 ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test. 19164 else 19165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19166 for as_dir in $PATH 19167 do 19168 IFS=$as_save_IFS 19169 test -z "$as_dir" && as_dir=. 19170 for ac_exec_ext in '' $ac_executable_extensions; do 19171 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19172 ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog" 19173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19174 break 2 19175 fi 19176 done 19177 done 19178 IFS=$as_save_IFS 19179 19180 fi 19181 fi 19182 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC 19183 if test -n "$PROPER_COMPILER_CC"; then 19184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 19185 $as_echo "$PROPER_COMPILER_CC" >&6; } 19186 else 19187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19188 $as_echo "no" >&6; } 19189 fi 19190 19191 19192 test -n "$PROPER_COMPILER_CC" && break 19193 done 19194 fi 19195 if test -z "$PROPER_COMPILER_CC"; then 19196 ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC 19197 for ac_prog in $COMPILER_CHECK_LIST 19198 do 19199 # Extract the first word of "$ac_prog", so it can be a program name with args. 19200 set dummy $ac_prog; ac_word=$2 19201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19202 $as_echo_n "checking for $ac_word... " >&6; } 19203 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then : 19204 $as_echo_n "(cached) " >&6 19205 else 19206 if test -n "$ac_ct_PROPER_COMPILER_CC"; then 19207 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test. 19208 else 19209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19210 for as_dir in $PATH 19211 do 19212 IFS=$as_save_IFS 19213 test -z "$as_dir" && as_dir=. 19214 for ac_exec_ext in '' $ac_executable_extensions; do 19215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19216 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog" 19217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19218 break 2 19219 fi 19220 done 19221 done 19222 IFS=$as_save_IFS 19223 19224 fi 19225 fi 19226 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC 19227 if test -n "$ac_ct_PROPER_COMPILER_CC"; then 19228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5 19229 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; } 19230 else 19231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19232 $as_echo "no" >&6; } 19233 fi 19234 19235 19236 test -n "$ac_ct_PROPER_COMPILER_CC" && break 19237 done 19238 19239 if test "x$ac_ct_PROPER_COMPILER_CC" = x; then 19240 PROPER_COMPILER_CC="" 19241 else 19242 case $cross_compiling:$ac_tool_warned in 19243 yes:) 19244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 19245 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 19246 ac_tool_warned=yes ;; 19247 esac 19248 PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC 19249 fi 19250 fi 19251 19252 19253 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19254 19255 # First separate the path from the arguments. This will split at the first 19256 # space. 19257 complete="$PROPER_COMPILER_CC" 19258 path="${complete%% *}" 19259 tmp="$complete EOL" 19260 arguments="${tmp#* }" 19261 19262 # Input might be given as Windows format, start by converting to 19263 # unix format. 19264 new_path=`$CYGPATH -u "$path"` 19265 19266 # Now try to locate executable using which 19267 new_path=`$WHICH "$new_path" 2> /dev/null` 19268 # bat and cmd files are not always considered executable in cygwin causing which 19269 # to not find them 19270 if test "x$new_path" = x \ 19271 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19272 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19273 new_path=`$CYGPATH -u "$path"` 19274 fi 19275 if test "x$new_path" = x; then 19276 # Oops. Which didn't find the executable. 19277 # The splitting of arguments from the executable at a space might have been incorrect, 19278 # since paths with space are more likely in Windows. Give it another try with the whole 19279 # argument. 19280 path="$complete" 19281 arguments="EOL" 19282 new_path=`$CYGPATH -u "$path"` 19283 new_path=`$WHICH "$new_path" 2> /dev/null` 19284 # bat and cmd files are not always considered executable in cygwin causing which 19285 # to not find them 19286 if test "x$new_path" = x \ 19287 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 19288 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 19289 new_path=`$CYGPATH -u "$path"` 19290 fi 19291 if test "x$new_path" = x; then 19292 # It's still not found. Now this is an unrecoverable error. 19293 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19294 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19295 has_space=`$ECHO "$complete" | $GREP " "` 19296 if test "x$has_space" != x; then 19297 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19298 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19299 fi 19300 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19301 fi 19302 fi 19303 19304 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 19305 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 19306 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 19307 # "foo.exe" is OK but "foo" is an error. 19308 # 19309 # This test is therefore slightly more accurate than "test -f" to check for file precense. 19310 # It is also a way to make sure we got the proper file name for the real test later on. 19311 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 19312 if test "x$test_shortpath" = x; then 19313 # Short path failed, file does not exist as specified. 19314 # Try adding .exe or .cmd 19315 if test -f "${new_path}.exe"; then 19316 input_to_shortpath="${new_path}.exe" 19317 elif test -f "${new_path}.cmd"; then 19318 input_to_shortpath="${new_path}.cmd" 19319 else 19320 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5 19321 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;} 19322 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 19323 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 19324 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19325 fi 19326 else 19327 input_to_shortpath="$new_path" 19328 fi 19329 19330 # Call helper function which possibly converts this using DOS-style short mode. 19331 # If so, the updated path is stored in $new_path. 19332 new_path="$input_to_shortpath" 19333 19334 input_path="$input_to_shortpath" 19335 # Check if we need to convert this using DOS-style short mode. If the path 19336 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19337 # take no chances and rewrite it. 19338 # Note: m4 eats our [], so we need to use [ and ] instead. 19339 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 19340 if test "x$has_forbidden_chars" != x; then 19341 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19342 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 19343 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 19344 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 19345 # Going to short mode and back again did indeed matter. Since short mode is 19346 # case insensitive, let's make it lowercase to improve readability. 19347 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19348 # Now convert it back to Unix-stile (cygpath) 19349 input_path=`$CYGPATH -u "$shortmode_path"` 19350 new_path="$input_path" 19351 fi 19352 fi 19353 19354 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 19355 if test "x$test_cygdrive_prefix" = x; then 19356 # As a simple fix, exclude /usr/bin since it's not a real path. 19357 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 19358 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 19359 # a path prefixed by /cygdrive for fixpath to work. 19360 new_path="$CYGWIN_ROOT_PATH$input_path" 19361 fi 19362 fi 19363 19364 # remove trailing .exe if any 19365 new_path="${new_path/%.exe/}" 19366 19367 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19368 19369 # First separate the path from the arguments. This will split at the first 19370 # space. 19371 complete="$PROPER_COMPILER_CC" 19372 path="${complete%% *}" 19373 tmp="$complete EOL" 19374 arguments="${tmp#* }" 19375 19376 # Input might be given as Windows format, start by converting to 19377 # unix format. 19378 new_path="$path" 19379 19380 windows_path="$new_path" 19381 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19382 unix_path=`$CYGPATH -u "$windows_path"` 19383 new_path="$unix_path" 19384 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19385 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19386 new_path="$unix_path" 19387 fi 19388 19389 19390 # Now try to locate executable using which 19391 new_path=`$WHICH "$new_path" 2> /dev/null` 19392 19393 if test "x$new_path" = x; then 19394 # Oops. Which didn't find the executable. 19395 # The splitting of arguments from the executable at a space might have been incorrect, 19396 # since paths with space are more likely in Windows. Give it another try with the whole 19397 # argument. 19398 path="$complete" 19399 arguments="EOL" 19400 new_path="$path" 19401 19402 windows_path="$new_path" 19403 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19404 unix_path=`$CYGPATH -u "$windows_path"` 19405 new_path="$unix_path" 19406 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19407 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19408 new_path="$unix_path" 19409 fi 19410 19411 19412 new_path=`$WHICH "$new_path" 2> /dev/null` 19413 19414 if test "x$new_path" = x; then 19415 # It's still not found. Now this is an unrecoverable error. 19416 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19417 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19418 has_space=`$ECHO "$complete" | $GREP " "` 19419 if test "x$has_space" != x; then 19420 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 19421 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 19422 fi 19423 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19424 fi 19425 fi 19426 19427 # Now new_path has a complete unix path to the binary 19428 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 19429 # Keep paths in /bin as-is, but remove trailing .exe if any 19430 new_path="${new_path/%.exe/}" 19431 # Do not save /bin paths to all_fixpath_prefixes! 19432 else 19433 # Not in mixed or Windows style, start by that. 19434 new_path=`cmd //c echo $new_path` 19435 19436 input_path="$new_path" 19437 # Check if we need to convert this using DOS-style short mode. If the path 19438 # contains just simple characters, use it. Otherwise (spaces, weird characters), 19439 # take no chances and rewrite it. 19440 # Note: m4 eats our [], so we need to use [ and ] instead. 19441 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 19442 if test "x$has_forbidden_chars" != x; then 19443 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 19444 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 19445 fi 19446 19447 # Output is in $new_path 19448 19449 windows_path="$new_path" 19450 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 19451 unix_path=`$CYGPATH -u "$windows_path"` 19452 new_path="$unix_path" 19453 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 19454 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 19455 new_path="$unix_path" 19456 fi 19457 19458 # remove trailing .exe if any 19459 new_path="${new_path/%.exe/}" 19460 19461 # Save the first 10 bytes of this path to the storage, so fixpath can work. 19462 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 19463 fi 19464 19465 else 19466 # We're on a posix platform. Hooray! :) 19467 # First separate the path from the arguments. This will split at the first 19468 # space. 19469 complete="$PROPER_COMPILER_CC" 19470 path="${complete%% *}" 19471 tmp="$complete EOL" 19472 arguments="${tmp#* }" 19473 19474 # Cannot rely on the command "which" here since it doesn't always work. 19475 is_absolute_path=`$ECHO "$path" | $GREP ^/` 19476 if test -z "$is_absolute_path"; then 19477 # Path to executable is not absolute. Find it. 19478 IFS_save="$IFS" 19479 IFS=: 19480 for p in $PATH; do 19481 if test -f "$p/$path" && test -x "$p/$path"; then 19482 new_path="$p/$path" 19483 break 19484 fi 19485 done 19486 IFS="$IFS_save" 19487 else 19488 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5 19489 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;} 19490 new_path="$path" 19491 fi 19492 19493 if test "x$new_path" = x; then 19494 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 19495 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} 19496 has_space=`$ECHO "$complete" | $GREP " "` 19497 if test "x$has_space" != x; then 19498 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 19499 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 19500 fi 19501 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 19502 fi 19503 fi 19504 19505 # Now join together the path and the arguments once again 19506 if test "x$arguments" != xEOL; then 19507 new_complete="$new_path ${arguments% *}" 19508 else 19509 new_complete="$new_path" 19510 fi 19511 19512 if test "x$complete" != "x$new_complete"; then 19513 PROPER_COMPILER_CC="$new_complete" 19514 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 19515 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;} 19516 fi 19517 19518 PATH="$RETRY_COMPILER_SAVED_PATH" 19519 19520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5 19521 $as_echo_n "checking for resolved symbolic links for CC... " >&6; } 19522 19523 if test "x$OPENJDK_BUILD_OS" != xwindows; then 19524 # Follow a chain of symbolic links. Use readlink 19525 # where it exists, else fall back to horribly 19526 # complicated shell code. 19527 if test "x$READLINK_TESTED" != yes; then 19528 # On MacOSX there is a readlink tool with a different 19529 # purpose than the GNU readlink tool. Check the found readlink. 19530 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 19531 if test "x$ISGNU" = x; then 19532 # A readlink that we do not know how to use. 19533 # Are there other non-GNU readlinks out there? 19534 READLINK_TESTED=yes 19535 READLINK= 19536 fi 19537 fi 19538 19539 if test "x$READLINK" != x; then 19540 PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC` 19541 else 19542 # Save the current directory for restoring afterwards 19543 STARTDIR=$PWD 19544 COUNTER=0 19545 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC` 19546 sym_link_file=`$BASENAME $PROPER_COMPILER_CC` 19547 # Use the system pwd and not the shell builtin to resolve directory symlinks 19548 cd $sym_link_dir 19549 cd `$THEPWDCMD` 19550 sym_link_dir=`$THEPWDCMD` 19551 # Resolve file symlinks 19552 while test $COUNTER -lt 20; do 19553 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 19554 if test "x$ISLINK" == x; then 19555 # This is not a symbolic link! We are done! 19556 break 19557 fi 19558 # Again resolve directory symlinks since the target of the just found 19559 # link could be in a different directory 19560 cd `$DIRNAME $ISLINK` 19561 sym_link_dir=`$THEPWDCMD` 19562 sym_link_file=`$BASENAME $ISLINK` 19563 let COUNTER=COUNTER+1 19564 done 19565 cd $STARTDIR 19566 PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file 19567 fi 19568 fi 19569 19570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 19571 $as_echo "$PROPER_COMPILER_CC" >&6; } 19572 CC="$PROPER_COMPILER_CC" 19573 else 19574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5 19575 $as_echo "no, keeping CC" >&6; } 19576 CC="$TEST_COMPILER" 19577 fi 19578 19579 COMPILER=$CC 19580 COMPILER_NAME=$COMPILER_NAME 19581 19582 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 19583 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work 19584 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` 19585 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 19586 if test $? -ne 0; then 19587 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 19588 19589 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5 19590 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} 19591 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 19592 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} 19593 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 19594 else 19595 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` 19596 COMPILER_VENDOR="Sun Studio" 19597 fi 19598 elif test "x$OPENJDK_TARGET_OS" = xwindows; then 19599 # First line typically looks something like: 19600 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 19601 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` 19602 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` 19603 COMPILER_VENDOR="Microsoft CL.EXE" 19604 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` 19605 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then 19606 if test "x$COMPILER_CPU_TEST" != "x80x86"; then 19607 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 19608 fi 19609 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 19610 if test "x$COMPILER_CPU_TEST" != "xx64"; then 19611 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 19612 fi 19613 fi 19614 else 19615 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 19616 # Check that this is likely to be GCC. 19617 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null 19618 if test $? -ne 0; then 19619 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 19620 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} 19621 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 19622 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} 19623 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 19624 fi 19625 19626 # First line typically looks something like: 19627 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 19628 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` 19629 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` 19630 fi 19631 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) 19632 CC_VERSION="$COMPILER_VERSION" 19633 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) 19634 CC_VENDOR="$COMPILER_VENDOR" 19635 19636 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 19637 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} 19638 19639 19640 # Now that we have resolved CC ourself, let autoconf have its go at it 19641 ac_ext=c 19642 ac_cpp='$CPP $CPPFLAGS' 19643 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 19644 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 19645 ac_compiler_gnu=$ac_cv_c_compiler_gnu 19646 if test -n "$ac_tool_prefix"; then 19647 for ac_prog in $CC 19648 do 19649 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 19650 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 19651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19652 $as_echo_n "checking for $ac_word... " >&6; } 19653 if test "${ac_cv_prog_CC+set}" = set; then : 19654 $as_echo_n "(cached) " >&6 19655 else 19656 if test -n "$CC"; then 19657 ac_cv_prog_CC="$CC" # Let the user override the test. 19658 else 19659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19660 for as_dir in $PATH 19661 do 19662 IFS=$as_save_IFS 19663 test -z "$as_dir" && as_dir=. 19664 for ac_exec_ext in '' $ac_executable_extensions; do 19665 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19666 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 19667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19668 break 2 19669 fi 19670 done 19671 done 19672 IFS=$as_save_IFS 19673 19674 fi 19675 fi 19676 CC=$ac_cv_prog_CC 19677 if test -n "$CC"; then 19678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 19679 $as_echo "$CC" >&6; } 19680 else 19681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19682 $as_echo "no" >&6; } 19683 fi 19684 19685 19686 test -n "$CC" && break 19687 done 19688 fi 19689 if test -z "$CC"; then 19690 ac_ct_CC=$CC 19691 for ac_prog in $CC 19692 do 19693 # Extract the first word of "$ac_prog", so it can be a program name with args. 19694 set dummy $ac_prog; ac_word=$2 19695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 19696 $as_echo_n "checking for $ac_word... " >&6; } 19697 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : 19698 $as_echo_n "(cached) " >&6 19699 else 19700 if test -n "$ac_ct_CC"; then 19701 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 19702 else 19703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 19704 for as_dir in $PATH 19705 do 19706 IFS=$as_save_IFS 19707 test -z "$as_dir" && as_dir=. 19708 for ac_exec_ext in '' $ac_executable_extensions; do 19709 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 19710 ac_cv_prog_ac_ct_CC="$ac_prog" 19711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 19712 break 2 19713 fi 19714 done 19715 done 19716 IFS=$as_save_IFS 19717 19718 fi 19719 fi 19720 ac_ct_CC=$ac_cv_prog_ac_ct_CC 19721 if test -n "$ac_ct_CC"; then 19722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 19723 $as_echo "$ac_ct_CC" >&6; } 19724 else 19725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19726 $as_echo "no" >&6; } 19727 fi 19728 19729 19730 test -n "$ac_ct_CC" && break 19731 done 19732 19733 if test "x$ac_ct_CC" = x; then 19734 CC="" 19735 else 19736 case $cross_compiling:$ac_tool_warned in 19737 yes:) 19738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 19739 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 19740 ac_tool_warned=yes ;; 19741 esac 19742 CC=$ac_ct_CC 19743 fi 19744 fi 19745 19746 19747 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19748 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19749 as_fn_error $? "no acceptable C compiler found in \$PATH 19750 See \`config.log' for more details" "$LINENO" 5 ; } 19751 19752 # Provide some information about the compiler. 19753 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 19754 set X $ac_compile 19755 ac_compiler=$2 19756 for ac_option in --version -v -V -qversion; do 19757 { { ac_try="$ac_compiler $ac_option >&5" 19758 case "(($ac_try" in 19759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19760 *) ac_try_echo=$ac_try;; 19761 esac 19762 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19763 $as_echo "$ac_try_echo"; } >&5 19764 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 19765 ac_status=$? 19766 if test -s conftest.err; then 19767 sed '10a\ 19768 ... rest of stderr output deleted ... 19769 10q' conftest.err >conftest.er1 19770 cat conftest.er1 >&5 19771 fi 19772 rm -f conftest.er1 conftest.err 19773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19774 test $ac_status = 0; } 19775 done 19776 19777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19778 /* end confdefs.h. */ 19779 19780 int 19781 main () 19782 { 19783 19784 ; 19785 return 0; 19786 } 19787 _ACEOF 19788 ac_clean_files_save=$ac_clean_files 19789 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 19790 # Try to create an executable without -o first, disregard a.out. 19791 # It will help us diagnose broken compilers, and finding out an intuition 19792 # of exeext. 19793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 19794 $as_echo_n "checking whether the C compiler works... " >&6; } 19795 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 19796 19797 # The possible output files: 19798 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 19799 19800 ac_rmfiles= 19801 for ac_file in $ac_files 19802 do 19803 case $ac_file in 19804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 19805 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 19806 esac 19807 done 19808 rm -f $ac_rmfiles 19809 19810 if { { ac_try="$ac_link_default" 19811 case "(($ac_try" in 19812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19813 *) ac_try_echo=$ac_try;; 19814 esac 19815 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19816 $as_echo "$ac_try_echo"; } >&5 19817 (eval "$ac_link_default") 2>&5 19818 ac_status=$? 19819 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19820 test $ac_status = 0; }; then : 19821 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 19822 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 19823 # in a Makefile. We should not override ac_cv_exeext if it was cached, 19824 # so that the user can short-circuit this test for compilers unknown to 19825 # Autoconf. 19826 for ac_file in $ac_files '' 19827 do 19828 test -f "$ac_file" || continue 19829 case $ac_file in 19830 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 19831 ;; 19832 [ab].out ) 19833 # We found the default executable, but exeext='' is most 19834 # certainly right. 19835 break;; 19836 *.* ) 19837 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 19838 then :; else 19839 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 19840 fi 19841 # We set ac_cv_exeext here because the later test for it is not 19842 # safe: cross compilers may not add the suffix if given an `-o' 19843 # argument, so we may need to know it at that point already. 19844 # Even if this section looks crufty: it has the advantage of 19845 # actually working. 19846 break;; 19847 * ) 19848 break;; 19849 esac 19850 done 19851 test "$ac_cv_exeext" = no && ac_cv_exeext= 19852 19853 else 19854 ac_file='' 19855 fi 19856 if test -z "$ac_file"; then : 19857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 19858 $as_echo "no" >&6; } 19859 $as_echo "$as_me: failed program was:" >&5 19860 sed 's/^/| /' conftest.$ac_ext >&5 19861 19862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19863 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19864 as_fn_error 77 "C compiler cannot create executables 19865 See \`config.log' for more details" "$LINENO" 5 ; } 19866 else 19867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 19868 $as_echo "yes" >&6; } 19869 fi 19870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 19871 $as_echo_n "checking for C compiler default output file name... " >&6; } 19872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 19873 $as_echo "$ac_file" >&6; } 19874 ac_exeext=$ac_cv_exeext 19875 19876 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 19877 ac_clean_files=$ac_clean_files_save 19878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 19879 $as_echo_n "checking for suffix of executables... " >&6; } 19880 if { { ac_try="$ac_link" 19881 case "(($ac_try" in 19882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19883 *) ac_try_echo=$ac_try;; 19884 esac 19885 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19886 $as_echo "$ac_try_echo"; } >&5 19887 (eval "$ac_link") 2>&5 19888 ac_status=$? 19889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19890 test $ac_status = 0; }; then : 19891 # If both `conftest.exe' and `conftest' are `present' (well, observable) 19892 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 19893 # work properly (i.e., refer to `conftest.exe'), while it won't with 19894 # `rm'. 19895 for ac_file in conftest.exe conftest conftest.*; do 19896 test -f "$ac_file" || continue 19897 case $ac_file in 19898 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 19899 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 19900 break;; 19901 * ) break;; 19902 esac 19903 done 19904 else 19905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19906 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19907 as_fn_error $? "cannot compute suffix of executables: cannot compile and link 19908 See \`config.log' for more details" "$LINENO" 5 ; } 19909 fi 19910 rm -f conftest conftest$ac_cv_exeext 19911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 19912 $as_echo "$ac_cv_exeext" >&6; } 19913 19914 rm -f conftest.$ac_ext 19915 EXEEXT=$ac_cv_exeext 19916 ac_exeext=$EXEEXT 19917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19918 /* end confdefs.h. */ 19919 #include <stdio.h> 19920 int 19921 main () 19922 { 19923 FILE *f = fopen ("conftest.out", "w"); 19924 return ferror (f) || fclose (f) != 0; 19925 19926 ; 19927 return 0; 19928 } 19929 _ACEOF 19930 ac_clean_files="$ac_clean_files conftest.out" 19931 # Check that the compiler produces executables we can run. If not, either 19932 # the compiler is broken, or we cross compile. 19933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 19934 $as_echo_n "checking whether we are cross compiling... " >&6; } 19935 if test "$cross_compiling" != yes; then 19936 { { ac_try="$ac_link" 19937 case "(($ac_try" in 19938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19939 *) ac_try_echo=$ac_try;; 19940 esac 19941 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19942 $as_echo "$ac_try_echo"; } >&5 19943 (eval "$ac_link") 2>&5 19944 ac_status=$? 19945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19946 test $ac_status = 0; } 19947 if { ac_try='./conftest$ac_cv_exeext' 19948 { { case "(($ac_try" in 19949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19950 *) ac_try_echo=$ac_try;; 19951 esac 19952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19953 $as_echo "$ac_try_echo"; } >&5 19954 (eval "$ac_try") 2>&5 19955 ac_status=$? 19956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19957 test $ac_status = 0; }; }; then 19958 cross_compiling=no 19959 else 19960 if test "$cross_compiling" = maybe; then 19961 cross_compiling=yes 19962 else 19963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19964 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19965 as_fn_error $? "cannot run C compiled programs. 19966 If you meant to cross compile, use \`--host'. 19967 See \`config.log' for more details" "$LINENO" 5 ; } 19968 fi 19969 fi 19970 fi 19971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 19972 $as_echo "$cross_compiling" >&6; } 19973 19974 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 19975 ac_clean_files=$ac_clean_files_save 19976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 19977 $as_echo_n "checking for suffix of object files... " >&6; } 19978 if test "${ac_cv_objext+set}" = set; then : 19979 $as_echo_n "(cached) " >&6 19980 else 19981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19982 /* end confdefs.h. */ 19983 19984 int 19985 main () 19986 { 19987 19988 ; 19989 return 0; 19990 } 19991 _ACEOF 19992 rm -f conftest.o conftest.obj 19993 if { { ac_try="$ac_compile" 19994 case "(($ac_try" in 19995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19996 *) ac_try_echo=$ac_try;; 19997 esac 19998 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 19999 $as_echo "$ac_try_echo"; } >&5 20000 (eval "$ac_compile") 2>&5 20001 ac_status=$? 20002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20003 test $ac_status = 0; }; then : 20004 for ac_file in conftest.o conftest.obj conftest.*; do 20005 test -f "$ac_file" || continue; 20006 case $ac_file in 20007 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 20008 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 20009 break;; 20010 esac 20011 done 20012 else 20013 $as_echo "$as_me: failed program was:" >&5 20014 sed 's/^/| /' conftest.$ac_ext >&5 20015 20016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 20017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 20018 as_fn_error $? "cannot compute suffix of object files: cannot compile 20019 See \`config.log' for more details" "$LINENO" 5 ; } 20020 fi 20021 rm -f conftest.$ac_cv_objext conftest.$ac_ext 20022 fi 20023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 20024 $as_echo "$ac_cv_objext" >&6; } 20025 OBJEXT=$ac_cv_objext 20026 ac_objext=$OBJEXT 20027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 20028 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 20029 if test "${ac_cv_c_compiler_gnu+set}" = set; then : 20030 $as_echo_n "(cached) " >&6 20031 else 20032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20033 /* end confdefs.h. */ 20034 20035 int 20036 main () 20037 { 20038 #ifndef __GNUC__ 20039 choke me 20040 #endif 20041 20042 ; 20043 return 0; 20044 } 20045 _ACEOF 20046 if ac_fn_c_try_compile "$LINENO"; then : 20047 ac_compiler_gnu=yes 20048 else 20049 ac_compiler_gnu=no 20050 fi 20051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20052 ac_cv_c_compiler_gnu=$ac_compiler_gnu 20053 20054 fi 20055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 20056 $as_echo "$ac_cv_c_compiler_gnu" >&6; } 20057 if test $ac_compiler_gnu = yes; then 20058 GCC=yes 20059 else 20060 GCC= 20061 fi 20062 ac_test_CFLAGS=${CFLAGS+set} 20063 ac_save_CFLAGS=$CFLAGS 20064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 20065 $as_echo_n "checking whether $CC accepts -g... " >&6; } 20066 if test "${ac_cv_prog_cc_g+set}" = set; then : 20067 $as_echo_n "(cached) " >&6 20068 else 20069 ac_save_c_werror_flag=$ac_c_werror_flag 20070 ac_c_werror_flag=yes 20071 ac_cv_prog_cc_g=no 20072 CFLAGS="-g" 20073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20074 /* end confdefs.h. */ 20075 20076 int 20077 main () 20078 { 20079 20080 ; 20081 return 0; 20082 } 20083 _ACEOF 20084 if ac_fn_c_try_compile "$LINENO"; then : 20085 ac_cv_prog_cc_g=yes 20086 else 20087 CFLAGS="" 20088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20089 /* end confdefs.h. */ 20090 20091 int 20092 main () 20093 { 20094 20095 ; 20096 return 0; 20097 } 20098 _ACEOF 20099 if ac_fn_c_try_compile "$LINENO"; then : 20100 20101 else 20102 ac_c_werror_flag=$ac_save_c_werror_flag 20103 CFLAGS="-g" 20104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20105 /* end confdefs.h. */ 20106 20107 int 20108 main () 20109 { 20110 20111 ; 20112 return 0; 20113 } 20114 _ACEOF 20115 if ac_fn_c_try_compile "$LINENO"; then : 20116 ac_cv_prog_cc_g=yes 20117 fi 20118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20119 fi 20120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20121 fi 20122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20123 ac_c_werror_flag=$ac_save_c_werror_flag 20124 fi 20125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 20126 $as_echo "$ac_cv_prog_cc_g" >&6; } 20127 if test "$ac_test_CFLAGS" = set; then 20128 CFLAGS=$ac_save_CFLAGS 20129 elif test $ac_cv_prog_cc_g = yes; then 20130 if test "$GCC" = yes; then 20131 CFLAGS="-g -O2" 20132 else 20133 CFLAGS="-g" 20134 fi 20135 else 20136 if test "$GCC" = yes; then 20137 CFLAGS="-O2" 20138 else 20139 CFLAGS= 20140 fi 20141 fi 20142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 20143 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 20144 if test "${ac_cv_prog_cc_c89+set}" = set; then : 20145 $as_echo_n "(cached) " >&6 20146 else 20147 ac_cv_prog_cc_c89=no 20148 ac_save_CC=$CC 20149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20150 /* end confdefs.h. */ 20151 #include <stdarg.h> 20152 #include <stdio.h> 20153 #include <sys/types.h> 20154 #include <sys/stat.h> 20155 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 20156 struct buf { int x; }; 20157 FILE * (*rcsopen) (struct buf *, struct stat *, int); 20158 static char *e (p, i) 20159 char **p; 20160 int i; 20161 { 20162 return p[i]; 20163 } 20164 static char *f (char * (*g) (char **, int), char **p, ...) 20165 { 20166 char *s; 20167 va_list v; 20168 va_start (v,p); 20169 s = g (p, va_arg (v,int)); 20170 va_end (v); 20171 return s; 20172 } 20173 20174 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 20175 function prototypes and stuff, but not '\xHH' hex character constants. 20176 These don't provoke an error unfortunately, instead are silently treated 20177 as 'x'. The following induces an error, until -std is added to get 20178 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 20179 array size at least. It's necessary to write '\x00'==0 to get something 20180 that's true only with -std. */ 20181 int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 20182 20183 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 20184 inside strings and character constants. */ 20185 #define FOO(x) 'x' 20186 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 20187 20188 int test (int i, double x); 20189 struct s1 {int (*f) (int a);}; 20190 struct s2 {int (*f) (double a);}; 20191 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 20192 int argc; 20193 char **argv; 20194 int 20195 main () 20196 { 20197 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 20198 ; 20199 return 0; 20200 } 20201 _ACEOF 20202 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 20203 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 20204 do 20205 CC="$ac_save_CC $ac_arg" 20206 if ac_fn_c_try_compile "$LINENO"; then : 20207 ac_cv_prog_cc_c89=$ac_arg 20208 fi 20209 rm -f core conftest.err conftest.$ac_objext 20210 test "x$ac_cv_prog_cc_c89" != "xno" && break 20211 done 20212 rm -f conftest.$ac_ext 20213 CC=$ac_save_CC 20214 20215 fi 20216 # AC_CACHE_VAL 20217 case "x$ac_cv_prog_cc_c89" in 20218 x) 20219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 20220 $as_echo "none needed" >&6; } ;; 20221 xno) 20222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 20223 $as_echo "unsupported" >&6; } ;; 20224 *) 20225 CC="$CC $ac_cv_prog_cc_c89" 20226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 20227 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 20228 esac 20229 if test "x$ac_cv_prog_cc_c89" != xno; then : 20230 20231 fi 20232 20233 ac_ext=cpp 20234 ac_cpp='$CXXCPP $CPPFLAGS' 20235 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 20236 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 20237 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 20238 20239 20240 ### Locate C++ compiler (CXX) 20241 20242 if test "x$CXX" != x; then 20243 COMPILER_CHECK_LIST="$CXX" 20244 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 20245 COMPILER_CHECK_LIST="cl" 20246 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then 20247 COMPILER_CHECK_LIST="CC g++" 20248 else 20249 COMPILER_CHECK_LIST="g++ CC" 20250 fi 20251 20252 20253 COMPILER_NAME=C++ 20254 20255 CXX= 20256 # If TOOLS_DIR is set, check for all compiler names in there first 20257 # before checking the rest of the PATH. 20258 if test -n "$TOOLS_DIR"; then 20259 PATH_save="$PATH" 20260 PATH="$TOOLS_DIR" 20261 for ac_prog in $COMPILER_CHECK_LIST 20262 do 20263 # Extract the first word of "$ac_prog", so it can be a program name with args. 20264 set dummy $ac_prog; ac_word=$2 20265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20266 $as_echo_n "checking for $ac_word... " >&6; } 20267 if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then : 20268 $as_echo_n "(cached) " >&6 20269 else 20270 case $TOOLS_DIR_CXX in 20271 [\\/]* | ?:[\\/]*) 20272 ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path. 20273 ;; 20274 *) 20275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20276 for as_dir in $PATH 20277 do 20278 IFS=$as_save_IFS 20279 test -z "$as_dir" && as_dir=. 20280 for ac_exec_ext in '' $ac_executable_extensions; do 20281 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20282 ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext" 20283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20284 break 2 20285 fi 20286 done 20287 done 20288 IFS=$as_save_IFS 20289 20290 ;; 20291 esac 20292 fi 20293 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX 20294 if test -n "$TOOLS_DIR_CXX"; then 20295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5 20296 $as_echo "$TOOLS_DIR_CXX" >&6; } 20297 else 20298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20299 $as_echo "no" >&6; } 20300 fi 20301 20302 20303 test -n "$TOOLS_DIR_CXX" && break 20304 done 20305 20306 CXX=$TOOLS_DIR_CXX 20307 PATH="$PATH_save" 20308 fi 20309 20310 # AC_PATH_PROGS can't be run multiple times with the same variable, 20311 # so create a new name for this run. 20312 if test "x$CXX" = x; then 20313 for ac_prog in $COMPILER_CHECK_LIST 20314 do 20315 # Extract the first word of "$ac_prog", so it can be a program name with args. 20316 set dummy $ac_prog; ac_word=$2 20317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20318 $as_echo_n "checking for $ac_word... " >&6; } 20319 if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then : 20320 $as_echo_n "(cached) " >&6 20321 else 20322 case $POTENTIAL_CXX in 20323 [\\/]* | ?:[\\/]*) 20324 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path. 20325 ;; 20326 *) 20327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20328 for as_dir in $PATH 20329 do 20330 IFS=$as_save_IFS 20331 test -z "$as_dir" && as_dir=. 20332 for ac_exec_ext in '' $ac_executable_extensions; do 20333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20334 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" 20335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20336 break 2 20337 fi 20338 done 20339 done 20340 IFS=$as_save_IFS 20341 20342 ;; 20343 esac 20344 fi 20345 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX 20346 if test -n "$POTENTIAL_CXX"; then 20347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5 20348 $as_echo "$POTENTIAL_CXX" >&6; } 20349 else 20350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20351 $as_echo "no" >&6; } 20352 fi 20353 20354 20355 test -n "$POTENTIAL_CXX" && break 20356 done 20357 20358 CXX=$POTENTIAL_CXX 20359 fi 20360 20361 if test "x$CXX" = x; then 20362 20363 # Print a helpful message on how to acquire the necessary build dependency. 20364 # devkit is the help tag: freetyp2, cups, pulse, alsa etc 20365 MISSING_DEPENDENCY=devkit 20366 PKGHANDLER_COMMAND= 20367 20368 case $PKGHANDLER in 20369 apt-get) 20370 apt_help $MISSING_DEPENDENCY ;; 20371 yum) 20372 yum_help $MISSING_DEPENDENCY ;; 20373 port) 20374 port_help $MISSING_DEPENDENCY ;; 20375 pkgutil) 20376 pkgutil_help $MISSING_DEPENDENCY ;; 20377 pkgadd) 20378 pkgadd_help $MISSING_DEPENDENCY ;; 20379 * ) 20380 break ;; 20381 esac 20382 20383 if test "x$PKGHANDLER_COMMAND" != x; then 20384 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 20385 fi 20386 20387 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 20388 fi 20389 20390 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20391 20392 # First separate the path from the arguments. This will split at the first 20393 # space. 20394 complete="$CXX" 20395 path="${complete%% *}" 20396 tmp="$complete EOL" 20397 arguments="${tmp#* }" 20398 20399 # Input might be given as Windows format, start by converting to 20400 # unix format. 20401 new_path=`$CYGPATH -u "$path"` 20402 20403 # Now try to locate executable using which 20404 new_path=`$WHICH "$new_path" 2> /dev/null` 20405 # bat and cmd files are not always considered executable in cygwin causing which 20406 # to not find them 20407 if test "x$new_path" = x \ 20408 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20409 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20410 new_path=`$CYGPATH -u "$path"` 20411 fi 20412 if test "x$new_path" = x; then 20413 # Oops. Which didn't find the executable. 20414 # The splitting of arguments from the executable at a space might have been incorrect, 20415 # since paths with space are more likely in Windows. Give it another try with the whole 20416 # argument. 20417 path="$complete" 20418 arguments="EOL" 20419 new_path=`$CYGPATH -u "$path"` 20420 new_path=`$WHICH "$new_path" 2> /dev/null` 20421 # bat and cmd files are not always considered executable in cygwin causing which 20422 # to not find them 20423 if test "x$new_path" = x \ 20424 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20425 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20426 new_path=`$CYGPATH -u "$path"` 20427 fi 20428 if test "x$new_path" = x; then 20429 # It's still not found. Now this is an unrecoverable error. 20430 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20431 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20432 has_space=`$ECHO "$complete" | $GREP " "` 20433 if test "x$has_space" != x; then 20434 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20436 fi 20437 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20438 fi 20439 fi 20440 20441 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 20442 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 20443 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 20444 # "foo.exe" is OK but "foo" is an error. 20445 # 20446 # This test is therefore slightly more accurate than "test -f" to check for file precense. 20447 # It is also a way to make sure we got the proper file name for the real test later on. 20448 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 20449 if test "x$test_shortpath" = x; then 20450 # Short path failed, file does not exist as specified. 20451 # Try adding .exe or .cmd 20452 if test -f "${new_path}.exe"; then 20453 input_to_shortpath="${new_path}.exe" 20454 elif test -f "${new_path}.cmd"; then 20455 input_to_shortpath="${new_path}.cmd" 20456 else 20457 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5 20458 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;} 20459 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 20460 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 20461 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20462 fi 20463 else 20464 input_to_shortpath="$new_path" 20465 fi 20466 20467 # Call helper function which possibly converts this using DOS-style short mode. 20468 # If so, the updated path is stored in $new_path. 20469 new_path="$input_to_shortpath" 20470 20471 input_path="$input_to_shortpath" 20472 # Check if we need to convert this using DOS-style short mode. If the path 20473 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20474 # take no chances and rewrite it. 20475 # Note: m4 eats our [], so we need to use [ and ] instead. 20476 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 20477 if test "x$has_forbidden_chars" != x; then 20478 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20479 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 20480 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 20481 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 20482 # Going to short mode and back again did indeed matter. Since short mode is 20483 # case insensitive, let's make it lowercase to improve readability. 20484 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20485 # Now convert it back to Unix-stile (cygpath) 20486 input_path=`$CYGPATH -u "$shortmode_path"` 20487 new_path="$input_path" 20488 fi 20489 fi 20490 20491 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 20492 if test "x$test_cygdrive_prefix" = x; then 20493 # As a simple fix, exclude /usr/bin since it's not a real path. 20494 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 20495 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 20496 # a path prefixed by /cygdrive for fixpath to work. 20497 new_path="$CYGWIN_ROOT_PATH$input_path" 20498 fi 20499 fi 20500 20501 # remove trailing .exe if any 20502 new_path="${new_path/%.exe/}" 20503 20504 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20505 20506 # First separate the path from the arguments. This will split at the first 20507 # space. 20508 complete="$CXX" 20509 path="${complete%% *}" 20510 tmp="$complete EOL" 20511 arguments="${tmp#* }" 20512 20513 # Input might be given as Windows format, start by converting to 20514 # unix format. 20515 new_path="$path" 20516 20517 windows_path="$new_path" 20518 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20519 unix_path=`$CYGPATH -u "$windows_path"` 20520 new_path="$unix_path" 20521 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20522 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20523 new_path="$unix_path" 20524 fi 20525 20526 20527 # Now try to locate executable using which 20528 new_path=`$WHICH "$new_path" 2> /dev/null` 20529 20530 if test "x$new_path" = x; then 20531 # Oops. Which didn't find the executable. 20532 # The splitting of arguments from the executable at a space might have been incorrect, 20533 # since paths with space are more likely in Windows. Give it another try with the whole 20534 # argument. 20535 path="$complete" 20536 arguments="EOL" 20537 new_path="$path" 20538 20539 windows_path="$new_path" 20540 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20541 unix_path=`$CYGPATH -u "$windows_path"` 20542 new_path="$unix_path" 20543 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20544 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20545 new_path="$unix_path" 20546 fi 20547 20548 20549 new_path=`$WHICH "$new_path" 2> /dev/null` 20550 20551 if test "x$new_path" = x; then 20552 # It's still not found. Now this is an unrecoverable error. 20553 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20554 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20555 has_space=`$ECHO "$complete" | $GREP " "` 20556 if test "x$has_space" != x; then 20557 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20558 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20559 fi 20560 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20561 fi 20562 fi 20563 20564 # Now new_path has a complete unix path to the binary 20565 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 20566 # Keep paths in /bin as-is, but remove trailing .exe if any 20567 new_path="${new_path/%.exe/}" 20568 # Do not save /bin paths to all_fixpath_prefixes! 20569 else 20570 # Not in mixed or Windows style, start by that. 20571 new_path=`cmd //c echo $new_path` 20572 20573 input_path="$new_path" 20574 # Check if we need to convert this using DOS-style short mode. If the path 20575 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20576 # take no chances and rewrite it. 20577 # Note: m4 eats our [], so we need to use [ and ] instead. 20578 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 20579 if test "x$has_forbidden_chars" != x; then 20580 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20581 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20582 fi 20583 20584 # Output is in $new_path 20585 20586 windows_path="$new_path" 20587 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20588 unix_path=`$CYGPATH -u "$windows_path"` 20589 new_path="$unix_path" 20590 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20591 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20592 new_path="$unix_path" 20593 fi 20594 20595 # remove trailing .exe if any 20596 new_path="${new_path/%.exe/}" 20597 20598 # Save the first 10 bytes of this path to the storage, so fixpath can work. 20599 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 20600 fi 20601 20602 else 20603 # We're on a posix platform. Hooray! :) 20604 # First separate the path from the arguments. This will split at the first 20605 # space. 20606 complete="$CXX" 20607 path="${complete%% *}" 20608 tmp="$complete EOL" 20609 arguments="${tmp#* }" 20610 20611 # Cannot rely on the command "which" here since it doesn't always work. 20612 is_absolute_path=`$ECHO "$path" | $GREP ^/` 20613 if test -z "$is_absolute_path"; then 20614 # Path to executable is not absolute. Find it. 20615 IFS_save="$IFS" 20616 IFS=: 20617 for p in $PATH; do 20618 if test -f "$p/$path" && test -x "$p/$path"; then 20619 new_path="$p/$path" 20620 break 20621 fi 20622 done 20623 IFS="$IFS_save" 20624 else 20625 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5 20626 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;} 20627 new_path="$path" 20628 fi 20629 20630 if test "x$new_path" = x; then 20631 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 20632 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} 20633 has_space=`$ECHO "$complete" | $GREP " "` 20634 if test "x$has_space" != x; then 20635 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 20636 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 20637 fi 20638 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 20639 fi 20640 fi 20641 20642 # Now join together the path and the arguments once again 20643 if test "x$arguments" != xEOL; then 20644 new_complete="$new_path ${arguments% *}" 20645 else 20646 new_complete="$new_path" 20647 fi 20648 20649 if test "x$complete" != "x$new_complete"; then 20650 CXX="$new_complete" 20651 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5 20652 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;} 20653 fi 20654 20655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 20656 $as_echo_n "checking resolved symbolic links for CXX... " >&6; } 20657 TEST_COMPILER="$CXX" 20658 20659 if test "x$OPENJDK_BUILD_OS" != xwindows; then 20660 # Follow a chain of symbolic links. Use readlink 20661 # where it exists, else fall back to horribly 20662 # complicated shell code. 20663 if test "x$READLINK_TESTED" != yes; then 20664 # On MacOSX there is a readlink tool with a different 20665 # purpose than the GNU readlink tool. Check the found readlink. 20666 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 20667 if test "x$ISGNU" = x; then 20668 # A readlink that we do not know how to use. 20669 # Are there other non-GNU readlinks out there? 20670 READLINK_TESTED=yes 20671 READLINK= 20672 fi 20673 fi 20674 20675 if test "x$READLINK" != x; then 20676 TEST_COMPILER=`$READLINK -f $TEST_COMPILER` 20677 else 20678 # Save the current directory for restoring afterwards 20679 STARTDIR=$PWD 20680 COUNTER=0 20681 sym_link_dir=`$DIRNAME $TEST_COMPILER` 20682 sym_link_file=`$BASENAME $TEST_COMPILER` 20683 # Use the system pwd and not the shell builtin to resolve directory symlinks 20684 cd $sym_link_dir 20685 cd `$THEPWDCMD` 20686 sym_link_dir=`$THEPWDCMD` 20687 # Resolve file symlinks 20688 while test $COUNTER -lt 20; do 20689 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 20690 if test "x$ISLINK" == x; then 20691 # This is not a symbolic link! We are done! 20692 break 20693 fi 20694 # Again resolve directory symlinks since the target of the just found 20695 # link could be in a different directory 20696 cd `$DIRNAME $ISLINK` 20697 sym_link_dir=`$THEPWDCMD` 20698 sym_link_file=`$BASENAME $ISLINK` 20699 let COUNTER=COUNTER+1 20700 done 20701 cd $STARTDIR 20702 TEST_COMPILER=$sym_link_dir/$sym_link_file 20703 fi 20704 fi 20705 20706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 20707 $as_echo "$TEST_COMPILER" >&6; } 20708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5 20709 $as_echo_n "checking if CXX is disguised ccache... " >&6; } 20710 20711 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 20712 if test "x$COMPILER_BASENAME" = "xccache"; then 20713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 20714 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } 20715 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. 20716 # We want to control ccache invocation ourselves, so ignore this cc and try 20717 # searching again. 20718 20719 # Remove the path to the fake ccache cc from the PATH 20720 RETRY_COMPILER_SAVED_PATH="$PATH" 20721 COMPILER_DIRNAME=`$DIRNAME $CXX` 20722 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" 20723 20724 # Try again looking for our compiler 20725 if test -n "$ac_tool_prefix"; then 20726 for ac_prog in $COMPILER_CHECK_LIST 20727 do 20728 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 20729 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 20730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20731 $as_echo_n "checking for $ac_word... " >&6; } 20732 if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then : 20733 $as_echo_n "(cached) " >&6 20734 else 20735 if test -n "$PROPER_COMPILER_CXX"; then 20736 ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test. 20737 else 20738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20739 for as_dir in $PATH 20740 do 20741 IFS=$as_save_IFS 20742 test -z "$as_dir" && as_dir=. 20743 for ac_exec_ext in '' $ac_executable_extensions; do 20744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20745 ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog" 20746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20747 break 2 20748 fi 20749 done 20750 done 20751 IFS=$as_save_IFS 20752 20753 fi 20754 fi 20755 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX 20756 if test -n "$PROPER_COMPILER_CXX"; then 20757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 20758 $as_echo "$PROPER_COMPILER_CXX" >&6; } 20759 else 20760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20761 $as_echo "no" >&6; } 20762 fi 20763 20764 20765 test -n "$PROPER_COMPILER_CXX" && break 20766 done 20767 fi 20768 if test -z "$PROPER_COMPILER_CXX"; then 20769 ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX 20770 for ac_prog in $COMPILER_CHECK_LIST 20771 do 20772 # Extract the first word of "$ac_prog", so it can be a program name with args. 20773 set dummy $ac_prog; ac_word=$2 20774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 20775 $as_echo_n "checking for $ac_word... " >&6; } 20776 if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then : 20777 $as_echo_n "(cached) " >&6 20778 else 20779 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then 20780 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test. 20781 else 20782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 20783 for as_dir in $PATH 20784 do 20785 IFS=$as_save_IFS 20786 test -z "$as_dir" && as_dir=. 20787 for ac_exec_ext in '' $ac_executable_extensions; do 20788 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 20789 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog" 20790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 20791 break 2 20792 fi 20793 done 20794 done 20795 IFS=$as_save_IFS 20796 20797 fi 20798 fi 20799 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX 20800 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then 20801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5 20802 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; } 20803 else 20804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 20805 $as_echo "no" >&6; } 20806 fi 20807 20808 20809 test -n "$ac_ct_PROPER_COMPILER_CXX" && break 20810 done 20811 20812 if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then 20813 PROPER_COMPILER_CXX="" 20814 else 20815 case $cross_compiling:$ac_tool_warned in 20816 yes:) 20817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 20818 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 20819 ac_tool_warned=yes ;; 20820 esac 20821 PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX 20822 fi 20823 fi 20824 20825 20826 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20827 20828 # First separate the path from the arguments. This will split at the first 20829 # space. 20830 complete="$PROPER_COMPILER_CXX" 20831 path="${complete%% *}" 20832 tmp="$complete EOL" 20833 arguments="${tmp#* }" 20834 20835 # Input might be given as Windows format, start by converting to 20836 # unix format. 20837 new_path=`$CYGPATH -u "$path"` 20838 20839 # Now try to locate executable using which 20840 new_path=`$WHICH "$new_path" 2> /dev/null` 20841 # bat and cmd files are not always considered executable in cygwin causing which 20842 # to not find them 20843 if test "x$new_path" = x \ 20844 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20845 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20846 new_path=`$CYGPATH -u "$path"` 20847 fi 20848 if test "x$new_path" = x; then 20849 # Oops. Which didn't find the executable. 20850 # The splitting of arguments from the executable at a space might have been incorrect, 20851 # since paths with space are more likely in Windows. Give it another try with the whole 20852 # argument. 20853 path="$complete" 20854 arguments="EOL" 20855 new_path=`$CYGPATH -u "$path"` 20856 new_path=`$WHICH "$new_path" 2> /dev/null` 20857 # bat and cmd files are not always considered executable in cygwin causing which 20858 # to not find them 20859 if test "x$new_path" = x \ 20860 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 20861 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 20862 new_path=`$CYGPATH -u "$path"` 20863 fi 20864 if test "x$new_path" = x; then 20865 # It's still not found. Now this is an unrecoverable error. 20866 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 20867 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 20868 has_space=`$ECHO "$complete" | $GREP " "` 20869 if test "x$has_space" != x; then 20870 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20871 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20872 fi 20873 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 20874 fi 20875 fi 20876 20877 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 20878 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 20879 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 20880 # "foo.exe" is OK but "foo" is an error. 20881 # 20882 # This test is therefore slightly more accurate than "test -f" to check for file precense. 20883 # It is also a way to make sure we got the proper file name for the real test later on. 20884 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 20885 if test "x$test_shortpath" = x; then 20886 # Short path failed, file does not exist as specified. 20887 # Try adding .exe or .cmd 20888 if test -f "${new_path}.exe"; then 20889 input_to_shortpath="${new_path}.exe" 20890 elif test -f "${new_path}.cmd"; then 20891 input_to_shortpath="${new_path}.cmd" 20892 else 20893 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5 20894 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;} 20895 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 20896 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 20897 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 20898 fi 20899 else 20900 input_to_shortpath="$new_path" 20901 fi 20902 20903 # Call helper function which possibly converts this using DOS-style short mode. 20904 # If so, the updated path is stored in $new_path. 20905 new_path="$input_to_shortpath" 20906 20907 input_path="$input_to_shortpath" 20908 # Check if we need to convert this using DOS-style short mode. If the path 20909 # contains just simple characters, use it. Otherwise (spaces, weird characters), 20910 # take no chances and rewrite it. 20911 # Note: m4 eats our [], so we need to use [ and ] instead. 20912 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 20913 if test "x$has_forbidden_chars" != x; then 20914 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 20915 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 20916 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 20917 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 20918 # Going to short mode and back again did indeed matter. Since short mode is 20919 # case insensitive, let's make it lowercase to improve readability. 20920 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 20921 # Now convert it back to Unix-stile (cygpath) 20922 input_path=`$CYGPATH -u "$shortmode_path"` 20923 new_path="$input_path" 20924 fi 20925 fi 20926 20927 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 20928 if test "x$test_cygdrive_prefix" = x; then 20929 # As a simple fix, exclude /usr/bin since it's not a real path. 20930 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 20931 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 20932 # a path prefixed by /cygdrive for fixpath to work. 20933 new_path="$CYGWIN_ROOT_PATH$input_path" 20934 fi 20935 fi 20936 20937 # remove trailing .exe if any 20938 new_path="${new_path/%.exe/}" 20939 20940 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20941 20942 # First separate the path from the arguments. This will split at the first 20943 # space. 20944 complete="$PROPER_COMPILER_CXX" 20945 path="${complete%% *}" 20946 tmp="$complete EOL" 20947 arguments="${tmp#* }" 20948 20949 # Input might be given as Windows format, start by converting to 20950 # unix format. 20951 new_path="$path" 20952 20953 windows_path="$new_path" 20954 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20955 unix_path=`$CYGPATH -u "$windows_path"` 20956 new_path="$unix_path" 20957 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20958 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20959 new_path="$unix_path" 20960 fi 20961 20962 20963 # Now try to locate executable using which 20964 new_path=`$WHICH "$new_path" 2> /dev/null` 20965 20966 if test "x$new_path" = x; then 20967 # Oops. Which didn't find the executable. 20968 # The splitting of arguments from the executable at a space might have been incorrect, 20969 # since paths with space are more likely in Windows. Give it another try with the whole 20970 # argument. 20971 path="$complete" 20972 arguments="EOL" 20973 new_path="$path" 20974 20975 windows_path="$new_path" 20976 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 20977 unix_path=`$CYGPATH -u "$windows_path"` 20978 new_path="$unix_path" 20979 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 20980 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 20981 new_path="$unix_path" 20982 fi 20983 20984 20985 new_path=`$WHICH "$new_path" 2> /dev/null` 20986 20987 if test "x$new_path" = x; then 20988 # It's still not found. Now this is an unrecoverable error. 20989 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 20990 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 20991 has_space=`$ECHO "$complete" | $GREP " "` 20992 if test "x$has_space" != x; then 20993 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 20994 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 20995 fi 20996 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 20997 fi 20998 fi 20999 21000 # Now new_path has a complete unix path to the binary 21001 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 21002 # Keep paths in /bin as-is, but remove trailing .exe if any 21003 new_path="${new_path/%.exe/}" 21004 # Do not save /bin paths to all_fixpath_prefixes! 21005 else 21006 # Not in mixed or Windows style, start by that. 21007 new_path=`cmd //c echo $new_path` 21008 21009 input_path="$new_path" 21010 # Check if we need to convert this using DOS-style short mode. If the path 21011 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21012 # take no chances and rewrite it. 21013 # Note: m4 eats our [], so we need to use [ and ] instead. 21014 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 21015 if test "x$has_forbidden_chars" != x; then 21016 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21017 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21018 fi 21019 21020 # Output is in $new_path 21021 21022 windows_path="$new_path" 21023 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21024 unix_path=`$CYGPATH -u "$windows_path"` 21025 new_path="$unix_path" 21026 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21027 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21028 new_path="$unix_path" 21029 fi 21030 21031 # remove trailing .exe if any 21032 new_path="${new_path/%.exe/}" 21033 21034 # Save the first 10 bytes of this path to the storage, so fixpath can work. 21035 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 21036 fi 21037 21038 else 21039 # We're on a posix platform. Hooray! :) 21040 # First separate the path from the arguments. This will split at the first 21041 # space. 21042 complete="$PROPER_COMPILER_CXX" 21043 path="${complete%% *}" 21044 tmp="$complete EOL" 21045 arguments="${tmp#* }" 21046 21047 # Cannot rely on the command "which" here since it doesn't always work. 21048 is_absolute_path=`$ECHO "$path" | $GREP ^/` 21049 if test -z "$is_absolute_path"; then 21050 # Path to executable is not absolute. Find it. 21051 IFS_save="$IFS" 21052 IFS=: 21053 for p in $PATH; do 21054 if test -f "$p/$path" && test -x "$p/$path"; then 21055 new_path="$p/$path" 21056 break 21057 fi 21058 done 21059 IFS="$IFS_save" 21060 else 21061 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5 21062 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;} 21063 new_path="$path" 21064 fi 21065 21066 if test "x$new_path" = x; then 21067 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 21068 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} 21069 has_space=`$ECHO "$complete" | $GREP " "` 21070 if test "x$has_space" != x; then 21071 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 21072 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 21073 fi 21074 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 21075 fi 21076 fi 21077 21078 # Now join together the path and the arguments once again 21079 if test "x$arguments" != xEOL; then 21080 new_complete="$new_path ${arguments% *}" 21081 else 21082 new_complete="$new_path" 21083 fi 21084 21085 if test "x$complete" != "x$new_complete"; then 21086 PROPER_COMPILER_CXX="$new_complete" 21087 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 21088 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;} 21089 fi 21090 21091 PATH="$RETRY_COMPILER_SAVED_PATH" 21092 21093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5 21094 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; } 21095 21096 if test "x$OPENJDK_BUILD_OS" != xwindows; then 21097 # Follow a chain of symbolic links. Use readlink 21098 # where it exists, else fall back to horribly 21099 # complicated shell code. 21100 if test "x$READLINK_TESTED" != yes; then 21101 # On MacOSX there is a readlink tool with a different 21102 # purpose than the GNU readlink tool. Check the found readlink. 21103 ISGNU=`$READLINK --version 2>&1 | $GREP GNU` 21104 if test "x$ISGNU" = x; then 21105 # A readlink that we do not know how to use. 21106 # Are there other non-GNU readlinks out there? 21107 READLINK_TESTED=yes 21108 READLINK= 21109 fi 21110 fi 21111 21112 if test "x$READLINK" != x; then 21113 PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX` 21114 else 21115 # Save the current directory for restoring afterwards 21116 STARTDIR=$PWD 21117 COUNTER=0 21118 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX` 21119 sym_link_file=`$BASENAME $PROPER_COMPILER_CXX` 21120 # Use the system pwd and not the shell builtin to resolve directory symlinks 21121 cd $sym_link_dir 21122 cd `$THEPWDCMD` 21123 sym_link_dir=`$THEPWDCMD` 21124 # Resolve file symlinks 21125 while test $COUNTER -lt 20; do 21126 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 21127 if test "x$ISLINK" == x; then 21128 # This is not a symbolic link! We are done! 21129 break 21130 fi 21131 # Again resolve directory symlinks since the target of the just found 21132 # link could be in a different directory 21133 cd `$DIRNAME $ISLINK` 21134 sym_link_dir=`$THEPWDCMD` 21135 sym_link_file=`$BASENAME $ISLINK` 21136 let COUNTER=COUNTER+1 21137 done 21138 cd $STARTDIR 21139 PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file 21140 fi 21141 fi 21142 21143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 21144 $as_echo "$PROPER_COMPILER_CXX" >&6; } 21145 CXX="$PROPER_COMPILER_CXX" 21146 else 21147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5 21148 $as_echo "no, keeping CXX" >&6; } 21149 CXX="$TEST_COMPILER" 21150 fi 21151 21152 COMPILER=$CXX 21153 COMPILER_NAME=$COMPILER_NAME 21154 21155 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 21156 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work 21157 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` 21158 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 21159 if test $? -ne 0; then 21160 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 21161 21162 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5 21163 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} 21164 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 21165 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} 21166 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 21167 else 21168 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` 21169 COMPILER_VENDOR="Sun Studio" 21170 fi 21171 elif test "x$OPENJDK_TARGET_OS" = xwindows; then 21172 # First line typically looks something like: 21173 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 21174 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` 21175 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` 21176 COMPILER_VENDOR="Microsoft CL.EXE" 21177 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` 21178 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then 21179 if test "x$COMPILER_CPU_TEST" != "x80x86"; then 21180 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 21181 fi 21182 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then 21183 if test "x$COMPILER_CPU_TEST" != "xx64"; then 21184 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 21185 fi 21186 fi 21187 else 21188 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 21189 # Check that this is likely to be GCC. 21190 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null 21191 if test $? -ne 0; then 21192 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 21193 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} 21194 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 21195 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} 21196 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 21197 fi 21198 21199 # First line typically looks something like: 21200 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 21201 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` 21202 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` 21203 fi 21204 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) 21205 CXX_VERSION="$COMPILER_VERSION" 21206 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) 21207 CXX_VENDOR="$COMPILER_VENDOR" 21208 21209 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 21210 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} 21211 21212 21213 # Now that we have resolved CXX ourself, let autoconf have its go at it 21214 ac_ext=cpp 21215 ac_cpp='$CXXCPP $CPPFLAGS' 21216 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21217 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21218 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21219 if test -z "$CXX"; then 21220 if test -n "$CCC"; then 21221 CXX=$CCC 21222 else 21223 if test -n "$ac_tool_prefix"; then 21224 for ac_prog in $CXX 21225 do 21226 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21227 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21229 $as_echo_n "checking for $ac_word... " >&6; } 21230 if test "${ac_cv_prog_CXX+set}" = set; then : 21231 $as_echo_n "(cached) " >&6 21232 else 21233 if test -n "$CXX"; then 21234 ac_cv_prog_CXX="$CXX" # Let the user override the test. 21235 else 21236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21237 for as_dir in $PATH 21238 do 21239 IFS=$as_save_IFS 21240 test -z "$as_dir" && as_dir=. 21241 for ac_exec_ext in '' $ac_executable_extensions; do 21242 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21243 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 21244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21245 break 2 21246 fi 21247 done 21248 done 21249 IFS=$as_save_IFS 21250 21251 fi 21252 fi 21253 CXX=$ac_cv_prog_CXX 21254 if test -n "$CXX"; then 21255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 21256 $as_echo "$CXX" >&6; } 21257 else 21258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21259 $as_echo "no" >&6; } 21260 fi 21261 21262 21263 test -n "$CXX" && break 21264 done 21265 fi 21266 if test -z "$CXX"; then 21267 ac_ct_CXX=$CXX 21268 for ac_prog in $CXX 21269 do 21270 # Extract the first word of "$ac_prog", so it can be a program name with args. 21271 set dummy $ac_prog; ac_word=$2 21272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21273 $as_echo_n "checking for $ac_word... " >&6; } 21274 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : 21275 $as_echo_n "(cached) " >&6 21276 else 21277 if test -n "$ac_ct_CXX"; then 21278 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 21279 else 21280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21281 for as_dir in $PATH 21282 do 21283 IFS=$as_save_IFS 21284 test -z "$as_dir" && as_dir=. 21285 for ac_exec_ext in '' $ac_executable_extensions; do 21286 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21287 ac_cv_prog_ac_ct_CXX="$ac_prog" 21288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21289 break 2 21290 fi 21291 done 21292 done 21293 IFS=$as_save_IFS 21294 21295 fi 21296 fi 21297 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 21298 if test -n "$ac_ct_CXX"; then 21299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 21300 $as_echo "$ac_ct_CXX" >&6; } 21301 else 21302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21303 $as_echo "no" >&6; } 21304 fi 21305 21306 21307 test -n "$ac_ct_CXX" && break 21308 done 21309 21310 if test "x$ac_ct_CXX" = x; then 21311 CXX="g++" 21312 else 21313 case $cross_compiling:$ac_tool_warned in 21314 yes:) 21315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21316 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21317 ac_tool_warned=yes ;; 21318 esac 21319 CXX=$ac_ct_CXX 21320 fi 21321 fi 21322 21323 fi 21324 fi 21325 # Provide some information about the compiler. 21326 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 21327 set X $ac_compile 21328 ac_compiler=$2 21329 for ac_option in --version -v -V -qversion; do 21330 { { ac_try="$ac_compiler $ac_option >&5" 21331 case "(($ac_try" in 21332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21333 *) ac_try_echo=$ac_try;; 21334 esac 21335 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 21336 $as_echo "$ac_try_echo"; } >&5 21337 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 21338 ac_status=$? 21339 if test -s conftest.err; then 21340 sed '10a\ 21341 ... rest of stderr output deleted ... 21342 10q' conftest.err >conftest.er1 21343 cat conftest.er1 >&5 21344 fi 21345 rm -f conftest.er1 conftest.err 21346 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 21347 test $ac_status = 0; } 21348 done 21349 21350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 21351 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } 21352 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : 21353 $as_echo_n "(cached) " >&6 21354 else 21355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21356 /* end confdefs.h. */ 21357 21358 int 21359 main () 21360 { 21361 #ifndef __GNUC__ 21362 choke me 21363 #endif 21364 21365 ; 21366 return 0; 21367 } 21368 _ACEOF 21369 if ac_fn_cxx_try_compile "$LINENO"; then : 21370 ac_compiler_gnu=yes 21371 else 21372 ac_compiler_gnu=no 21373 fi 21374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21375 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 21376 21377 fi 21378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 21379 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } 21380 if test $ac_compiler_gnu = yes; then 21381 GXX=yes 21382 else 21383 GXX= 21384 fi 21385 ac_test_CXXFLAGS=${CXXFLAGS+set} 21386 ac_save_CXXFLAGS=$CXXFLAGS 21387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 21388 $as_echo_n "checking whether $CXX accepts -g... " >&6; } 21389 if test "${ac_cv_prog_cxx_g+set}" = set; then : 21390 $as_echo_n "(cached) " >&6 21391 else 21392 ac_save_cxx_werror_flag=$ac_cxx_werror_flag 21393 ac_cxx_werror_flag=yes 21394 ac_cv_prog_cxx_g=no 21395 CXXFLAGS="-g" 21396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21397 /* end confdefs.h. */ 21398 21399 int 21400 main () 21401 { 21402 21403 ; 21404 return 0; 21405 } 21406 _ACEOF 21407 if ac_fn_cxx_try_compile "$LINENO"; then : 21408 ac_cv_prog_cxx_g=yes 21409 else 21410 CXXFLAGS="" 21411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21412 /* end confdefs.h. */ 21413 21414 int 21415 main () 21416 { 21417 21418 ; 21419 return 0; 21420 } 21421 _ACEOF 21422 if ac_fn_cxx_try_compile "$LINENO"; then : 21423 21424 else 21425 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21426 CXXFLAGS="-g" 21427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21428 /* end confdefs.h. */ 21429 21430 int 21431 main () 21432 { 21433 21434 ; 21435 return 0; 21436 } 21437 _ACEOF 21438 if ac_fn_cxx_try_compile "$LINENO"; then : 21439 ac_cv_prog_cxx_g=yes 21440 fi 21441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21442 fi 21443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21444 fi 21445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21446 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21447 fi 21448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 21449 $as_echo "$ac_cv_prog_cxx_g" >&6; } 21450 if test "$ac_test_CXXFLAGS" = set; then 21451 CXXFLAGS=$ac_save_CXXFLAGS 21452 elif test $ac_cv_prog_cxx_g = yes; then 21453 if test "$GXX" = yes; then 21454 CXXFLAGS="-g -O2" 21455 else 21456 CXXFLAGS="-g" 21457 fi 21458 else 21459 if test "$GXX" = yes; then 21460 CXXFLAGS="-O2" 21461 else 21462 CXXFLAGS= 21463 fi 21464 fi 21465 ac_ext=cpp 21466 ac_cpp='$CXXCPP $CPPFLAGS' 21467 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21468 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21469 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21470 21471 21472 ### Locate other tools 21473 21474 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 21475 ac_ext=m 21476 ac_cpp='$OBJCPP $CPPFLAGS' 21477 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21478 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21479 ac_compiler_gnu=$ac_cv_objc_compiler_gnu 21480 if test -n "$ac_tool_prefix"; then 21481 for ac_prog in gcc objcc objc cc CC 21482 do 21483 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21484 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21486 $as_echo_n "checking for $ac_word... " >&6; } 21487 if test "${ac_cv_prog_OBJC+set}" = set; then : 21488 $as_echo_n "(cached) " >&6 21489 else 21490 if test -n "$OBJC"; then 21491 ac_cv_prog_OBJC="$OBJC" # Let the user override the test. 21492 else 21493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21494 for as_dir in $PATH 21495 do 21496 IFS=$as_save_IFS 21497 test -z "$as_dir" && as_dir=. 21498 for ac_exec_ext in '' $ac_executable_extensions; do 21499 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21500 ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" 21501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21502 break 2 21503 fi 21504 done 21505 done 21506 IFS=$as_save_IFS 21507 21508 fi 21509 fi 21510 OBJC=$ac_cv_prog_OBJC 21511 if test -n "$OBJC"; then 21512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 21513 $as_echo "$OBJC" >&6; } 21514 else 21515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21516 $as_echo "no" >&6; } 21517 fi 21518 21519 21520 test -n "$OBJC" && break 21521 done 21522 fi 21523 if test -z "$OBJC"; then 21524 ac_ct_OBJC=$OBJC 21525 for ac_prog in gcc objcc objc cc CC 21526 do 21527 # Extract the first word of "$ac_prog", so it can be a program name with args. 21528 set dummy $ac_prog; ac_word=$2 21529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21530 $as_echo_n "checking for $ac_word... " >&6; } 21531 if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then : 21532 $as_echo_n "(cached) " >&6 21533 else 21534 if test -n "$ac_ct_OBJC"; then 21535 ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. 21536 else 21537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21538 for as_dir in $PATH 21539 do 21540 IFS=$as_save_IFS 21541 test -z "$as_dir" && as_dir=. 21542 for ac_exec_ext in '' $ac_executable_extensions; do 21543 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 21544 ac_cv_prog_ac_ct_OBJC="$ac_prog" 21545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21546 break 2 21547 fi 21548 done 21549 done 21550 IFS=$as_save_IFS 21551 21552 fi 21553 fi 21554 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC 21555 if test -n "$ac_ct_OBJC"; then 21556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 21557 $as_echo "$ac_ct_OBJC" >&6; } 21558 else 21559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21560 $as_echo "no" >&6; } 21561 fi 21562 21563 21564 test -n "$ac_ct_OBJC" && break 21565 done 21566 21567 if test "x$ac_ct_OBJC" = x; then 21568 OBJC="gcc" 21569 else 21570 case $cross_compiling:$ac_tool_warned in 21571 yes:) 21572 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21573 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21574 ac_tool_warned=yes ;; 21575 esac 21576 OBJC=$ac_ct_OBJC 21577 fi 21578 fi 21579 21580 # Provide some information about the compiler. 21581 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 21582 set X $ac_compile 21583 ac_compiler=$2 21584 for ac_option in --version -v -V -qversion; do 21585 { { ac_try="$ac_compiler $ac_option >&5" 21586 case "(($ac_try" in 21587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21588 *) ac_try_echo=$ac_try;; 21589 esac 21590 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 21591 $as_echo "$ac_try_echo"; } >&5 21592 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 21593 ac_status=$? 21594 if test -s conftest.err; then 21595 sed '10a\ 21596 ... rest of stderr output deleted ... 21597 10q' conftest.err >conftest.er1 21598 cat conftest.er1 >&5 21599 fi 21600 rm -f conftest.er1 conftest.err 21601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 21602 test $ac_status = 0; } 21603 done 21604 21605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5 21606 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; } 21607 if test "${ac_cv_objc_compiler_gnu+set}" = set; then : 21608 $as_echo_n "(cached) " >&6 21609 else 21610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21611 /* end confdefs.h. */ 21612 21613 int 21614 main () 21615 { 21616 #ifndef __GNUC__ 21617 choke me 21618 #endif 21619 21620 ; 21621 return 0; 21622 } 21623 _ACEOF 21624 if ac_fn_objc_try_compile "$LINENO"; then : 21625 ac_compiler_gnu=yes 21626 else 21627 ac_compiler_gnu=no 21628 fi 21629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21630 ac_cv_objc_compiler_gnu=$ac_compiler_gnu 21631 21632 fi 21633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 21634 $as_echo "$ac_cv_objc_compiler_gnu" >&6; } 21635 if test $ac_compiler_gnu = yes; then 21636 GOBJC=yes 21637 else 21638 GOBJC= 21639 fi 21640 ac_test_OBJCFLAGS=${OBJCFLAGS+set} 21641 ac_save_OBJCFLAGS=$OBJCFLAGS 21642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 21643 $as_echo_n "checking whether $OBJC accepts -g... " >&6; } 21644 if test "${ac_cv_prog_objc_g+set}" = set; then : 21645 $as_echo_n "(cached) " >&6 21646 else 21647 ac_save_objc_werror_flag=$ac_objc_werror_flag 21648 ac_objc_werror_flag=yes 21649 ac_cv_prog_objc_g=no 21650 OBJCFLAGS="-g" 21651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21652 /* end confdefs.h. */ 21653 21654 int 21655 main () 21656 { 21657 21658 ; 21659 return 0; 21660 } 21661 _ACEOF 21662 if ac_fn_objc_try_compile "$LINENO"; then : 21663 ac_cv_prog_objc_g=yes 21664 else 21665 OBJCFLAGS="" 21666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21667 /* end confdefs.h. */ 21668 21669 int 21670 main () 21671 { 21672 21673 ; 21674 return 0; 21675 } 21676 _ACEOF 21677 if ac_fn_objc_try_compile "$LINENO"; then : 21678 21679 else 21680 ac_objc_werror_flag=$ac_save_objc_werror_flag 21681 OBJCFLAGS="-g" 21682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21683 /* end confdefs.h. */ 21684 21685 int 21686 main () 21687 { 21688 21689 ; 21690 return 0; 21691 } 21692 _ACEOF 21693 if ac_fn_objc_try_compile "$LINENO"; then : 21694 ac_cv_prog_objc_g=yes 21695 fi 21696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21697 fi 21698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21699 fi 21700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21701 ac_objc_werror_flag=$ac_save_objc_werror_flag 21702 fi 21703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 21704 $as_echo "$ac_cv_prog_objc_g" >&6; } 21705 if test "$ac_test_OBJCFLAGS" = set; then 21706 OBJCFLAGS=$ac_save_OBJCFLAGS 21707 elif test $ac_cv_prog_objc_g = yes; then 21708 if test "$GOBJC" = yes; then 21709 OBJCFLAGS="-g -O2" 21710 else 21711 OBJCFLAGS="-g" 21712 fi 21713 else 21714 if test "$GOBJC" = yes; then 21715 OBJCFLAGS="-O2" 21716 else 21717 OBJCFLAGS= 21718 fi 21719 fi 21720 ac_ext=cpp 21721 ac_cpp='$CXXCPP $CPPFLAGS' 21722 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21723 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21724 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21725 21726 21727 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21728 21729 # First separate the path from the arguments. This will split at the first 21730 # space. 21731 complete="$OBJC" 21732 path="${complete%% *}" 21733 tmp="$complete EOL" 21734 arguments="${tmp#* }" 21735 21736 # Input might be given as Windows format, start by converting to 21737 # unix format. 21738 new_path=`$CYGPATH -u "$path"` 21739 21740 # Now try to locate executable using which 21741 new_path=`$WHICH "$new_path" 2> /dev/null` 21742 # bat and cmd files are not always considered executable in cygwin causing which 21743 # to not find them 21744 if test "x$new_path" = x \ 21745 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 21746 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 21747 new_path=`$CYGPATH -u "$path"` 21748 fi 21749 if test "x$new_path" = x; then 21750 # Oops. Which didn't find the executable. 21751 # The splitting of arguments from the executable at a space might have been incorrect, 21752 # since paths with space are more likely in Windows. Give it another try with the whole 21753 # argument. 21754 path="$complete" 21755 arguments="EOL" 21756 new_path=`$CYGPATH -u "$path"` 21757 new_path=`$WHICH "$new_path" 2> /dev/null` 21758 # bat and cmd files are not always considered executable in cygwin causing which 21759 # to not find them 21760 if test "x$new_path" = x \ 21761 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 21762 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 21763 new_path=`$CYGPATH -u "$path"` 21764 fi 21765 if test "x$new_path" = x; then 21766 # It's still not found. Now this is an unrecoverable error. 21767 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 21768 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 21769 has_space=`$ECHO "$complete" | $GREP " "` 21770 if test "x$has_space" != x; then 21771 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21772 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21773 fi 21774 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 21775 fi 21776 fi 21777 21778 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 21779 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 21780 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 21781 # "foo.exe" is OK but "foo" is an error. 21782 # 21783 # This test is therefore slightly more accurate than "test -f" to check for file precense. 21784 # It is also a way to make sure we got the proper file name for the real test later on. 21785 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 21786 if test "x$test_shortpath" = x; then 21787 # Short path failed, file does not exist as specified. 21788 # Try adding .exe or .cmd 21789 if test -f "${new_path}.exe"; then 21790 input_to_shortpath="${new_path}.exe" 21791 elif test -f "${new_path}.cmd"; then 21792 input_to_shortpath="${new_path}.cmd" 21793 else 21794 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5 21795 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;} 21796 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 21797 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 21798 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 21799 fi 21800 else 21801 input_to_shortpath="$new_path" 21802 fi 21803 21804 # Call helper function which possibly converts this using DOS-style short mode. 21805 # If so, the updated path is stored in $new_path. 21806 new_path="$input_to_shortpath" 21807 21808 input_path="$input_to_shortpath" 21809 # Check if we need to convert this using DOS-style short mode. If the path 21810 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21811 # take no chances and rewrite it. 21812 # Note: m4 eats our [], so we need to use [ and ] instead. 21813 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 21814 if test "x$has_forbidden_chars" != x; then 21815 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21816 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 21817 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 21818 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 21819 # Going to short mode and back again did indeed matter. Since short mode is 21820 # case insensitive, let's make it lowercase to improve readability. 21821 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21822 # Now convert it back to Unix-stile (cygpath) 21823 input_path=`$CYGPATH -u "$shortmode_path"` 21824 new_path="$input_path" 21825 fi 21826 fi 21827 21828 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 21829 if test "x$test_cygdrive_prefix" = x; then 21830 # As a simple fix, exclude /usr/bin since it's not a real path. 21831 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 21832 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 21833 # a path prefixed by /cygdrive for fixpath to work. 21834 new_path="$CYGWIN_ROOT_PATH$input_path" 21835 fi 21836 fi 21837 21838 # remove trailing .exe if any 21839 new_path="${new_path/%.exe/}" 21840 21841 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21842 21843 # First separate the path from the arguments. This will split at the first 21844 # space. 21845 complete="$OBJC" 21846 path="${complete%% *}" 21847 tmp="$complete EOL" 21848 arguments="${tmp#* }" 21849 21850 # Input might be given as Windows format, start by converting to 21851 # unix format. 21852 new_path="$path" 21853 21854 windows_path="$new_path" 21855 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21856 unix_path=`$CYGPATH -u "$windows_path"` 21857 new_path="$unix_path" 21858 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21859 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21860 new_path="$unix_path" 21861 fi 21862 21863 21864 # Now try to locate executable using which 21865 new_path=`$WHICH "$new_path" 2> /dev/null` 21866 21867 if test "x$new_path" = x; then 21868 # Oops. Which didn't find the executable. 21869 # The splitting of arguments from the executable at a space might have been incorrect, 21870 # since paths with space are more likely in Windows. Give it another try with the whole 21871 # argument. 21872 path="$complete" 21873 arguments="EOL" 21874 new_path="$path" 21875 21876 windows_path="$new_path" 21877 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21878 unix_path=`$CYGPATH -u "$windows_path"` 21879 new_path="$unix_path" 21880 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21881 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21882 new_path="$unix_path" 21883 fi 21884 21885 21886 new_path=`$WHICH "$new_path" 2> /dev/null` 21887 21888 if test "x$new_path" = x; then 21889 # It's still not found. Now this is an unrecoverable error. 21890 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 21891 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 21892 has_space=`$ECHO "$complete" | $GREP " "` 21893 if test "x$has_space" != x; then 21894 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 21895 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 21896 fi 21897 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 21898 fi 21899 fi 21900 21901 # Now new_path has a complete unix path to the binary 21902 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 21903 # Keep paths in /bin as-is, but remove trailing .exe if any 21904 new_path="${new_path/%.exe/}" 21905 # Do not save /bin paths to all_fixpath_prefixes! 21906 else 21907 # Not in mixed or Windows style, start by that. 21908 new_path=`cmd //c echo $new_path` 21909 21910 input_path="$new_path" 21911 # Check if we need to convert this using DOS-style short mode. If the path 21912 # contains just simple characters, use it. Otherwise (spaces, weird characters), 21913 # take no chances and rewrite it. 21914 # Note: m4 eats our [], so we need to use [ and ] instead. 21915 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 21916 if test "x$has_forbidden_chars" != x; then 21917 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 21918 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 21919 fi 21920 21921 # Output is in $new_path 21922 21923 windows_path="$new_path" 21924 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 21925 unix_path=`$CYGPATH -u "$windows_path"` 21926 new_path="$unix_path" 21927 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 21928 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 21929 new_path="$unix_path" 21930 fi 21931 21932 # remove trailing .exe if any 21933 new_path="${new_path/%.exe/}" 21934 21935 # Save the first 10 bytes of this path to the storage, so fixpath can work. 21936 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 21937 fi 21938 21939 else 21940 # We're on a posix platform. Hooray! :) 21941 # First separate the path from the arguments. This will split at the first 21942 # space. 21943 complete="$OBJC" 21944 path="${complete%% *}" 21945 tmp="$complete EOL" 21946 arguments="${tmp#* }" 21947 21948 # Cannot rely on the command "which" here since it doesn't always work. 21949 is_absolute_path=`$ECHO "$path" | $GREP ^/` 21950 if test -z "$is_absolute_path"; then 21951 # Path to executable is not absolute. Find it. 21952 IFS_save="$IFS" 21953 IFS=: 21954 for p in $PATH; do 21955 if test -f "$p/$path" && test -x "$p/$path"; then 21956 new_path="$p/$path" 21957 break 21958 fi 21959 done 21960 IFS="$IFS_save" 21961 else 21962 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5 21963 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;} 21964 new_path="$path" 21965 fi 21966 21967 if test "x$new_path" = x; then 21968 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 21969 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} 21970 has_space=`$ECHO "$complete" | $GREP " "` 21971 if test "x$has_space" != x; then 21972 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 21973 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 21974 fi 21975 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 21976 fi 21977 fi 21978 21979 # Now join together the path and the arguments once again 21980 if test "x$arguments" != xEOL; then 21981 new_complete="$new_path ${arguments% *}" 21982 else 21983 new_complete="$new_path" 21984 fi 21985 21986 if test "x$complete" != "x$new_complete"; then 21987 OBJC="$new_complete" 21988 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5 21989 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;} 21990 fi 21991 21992 else 21993 OBJC= 21994 fi 21995 21996 # Restore the flags to the user specified values. 21997 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" 21998 CFLAGS="$ORG_CFLAGS" 21999 CXXFLAGS="$ORG_CXXFLAGS" 22000 OBJCFLAGS="$ORG_OBJCFLAGS" 22001 22002 LD="$CC" 22003 LDEXE="$CC" 22004 LDCXX="$CXX" 22005 LDEXECXX="$CXX" 22006 22007 # LDEXE is the linker to use, when creating executables. 22008 22009 # Linking C++ libraries. 22010 22011 # Linking C++ executables. 22012 22013 22014 if test "x$OPENJDK_TARGET_OS" != xwindows; then 22015 if test -n "$ac_tool_prefix"; then 22016 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 22017 set dummy ${ac_tool_prefix}ar; ac_word=$2 22018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22019 $as_echo_n "checking for $ac_word... " >&6; } 22020 if test "${ac_cv_prog_AR+set}" = set; then : 22021 $as_echo_n "(cached) " >&6 22022 else 22023 if test -n "$AR"; then 22024 ac_cv_prog_AR="$AR" # Let the user override the test. 22025 else 22026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22027 for as_dir in $PATH 22028 do 22029 IFS=$as_save_IFS 22030 test -z "$as_dir" && as_dir=. 22031 for ac_exec_ext in '' $ac_executable_extensions; do 22032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22033 ac_cv_prog_AR="${ac_tool_prefix}ar" 22034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22035 break 2 22036 fi 22037 done 22038 done 22039 IFS=$as_save_IFS 22040 22041 fi 22042 fi 22043 AR=$ac_cv_prog_AR 22044 if test -n "$AR"; then 22045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 22046 $as_echo "$AR" >&6; } 22047 else 22048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22049 $as_echo "no" >&6; } 22050 fi 22051 22052 22053 fi 22054 if test -z "$ac_cv_prog_AR"; then 22055 ac_ct_AR=$AR 22056 # Extract the first word of "ar", so it can be a program name with args. 22057 set dummy ar; ac_word=$2 22058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22059 $as_echo_n "checking for $ac_word... " >&6; } 22060 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : 22061 $as_echo_n "(cached) " >&6 22062 else 22063 if test -n "$ac_ct_AR"; then 22064 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 22065 else 22066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22067 for as_dir in $PATH 22068 do 22069 IFS=$as_save_IFS 22070 test -z "$as_dir" && as_dir=. 22071 for ac_exec_ext in '' $ac_executable_extensions; do 22072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22073 ac_cv_prog_ac_ct_AR="ar" 22074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22075 break 2 22076 fi 22077 done 22078 done 22079 IFS=$as_save_IFS 22080 22081 fi 22082 fi 22083 ac_ct_AR=$ac_cv_prog_ac_ct_AR 22084 if test -n "$ac_ct_AR"; then 22085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 22086 $as_echo "$ac_ct_AR" >&6; } 22087 else 22088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22089 $as_echo "no" >&6; } 22090 fi 22091 22092 if test "x$ac_ct_AR" = x; then 22093 AR="" 22094 else 22095 case $cross_compiling:$ac_tool_warned in 22096 yes:) 22097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 22098 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 22099 ac_tool_warned=yes ;; 22100 esac 22101 AR=$ac_ct_AR 22102 fi 22103 else 22104 AR="$ac_cv_prog_AR" 22105 fi 22106 22107 22108 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22109 22110 # First separate the path from the arguments. This will split at the first 22111 # space. 22112 complete="$AR" 22113 path="${complete%% *}" 22114 tmp="$complete EOL" 22115 arguments="${tmp#* }" 22116 22117 # Input might be given as Windows format, start by converting to 22118 # unix format. 22119 new_path=`$CYGPATH -u "$path"` 22120 22121 # Now try to locate executable using which 22122 new_path=`$WHICH "$new_path" 2> /dev/null` 22123 # bat and cmd files are not always considered executable in cygwin causing which 22124 # to not find them 22125 if test "x$new_path" = x \ 22126 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22127 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22128 new_path=`$CYGPATH -u "$path"` 22129 fi 22130 if test "x$new_path" = x; then 22131 # Oops. Which didn't find the executable. 22132 # The splitting of arguments from the executable at a space might have been incorrect, 22133 # since paths with space are more likely in Windows. Give it another try with the whole 22134 # argument. 22135 path="$complete" 22136 arguments="EOL" 22137 new_path=`$CYGPATH -u "$path"` 22138 new_path=`$WHICH "$new_path" 2> /dev/null` 22139 # bat and cmd files are not always considered executable in cygwin causing which 22140 # to not find them 22141 if test "x$new_path" = x \ 22142 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22143 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22144 new_path=`$CYGPATH -u "$path"` 22145 fi 22146 if test "x$new_path" = x; then 22147 # It's still not found. Now this is an unrecoverable error. 22148 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22149 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22150 has_space=`$ECHO "$complete" | $GREP " "` 22151 if test "x$has_space" != x; then 22152 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22153 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22154 fi 22155 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22156 fi 22157 fi 22158 22159 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22160 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22161 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22162 # "foo.exe" is OK but "foo" is an error. 22163 # 22164 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22165 # It is also a way to make sure we got the proper file name for the real test later on. 22166 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22167 if test "x$test_shortpath" = x; then 22168 # Short path failed, file does not exist as specified. 22169 # Try adding .exe or .cmd 22170 if test -f "${new_path}.exe"; then 22171 input_to_shortpath="${new_path}.exe" 22172 elif test -f "${new_path}.cmd"; then 22173 input_to_shortpath="${new_path}.cmd" 22174 else 22175 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5 22176 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;} 22177 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22178 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22179 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22180 fi 22181 else 22182 input_to_shortpath="$new_path" 22183 fi 22184 22185 # Call helper function which possibly converts this using DOS-style short mode. 22186 # If so, the updated path is stored in $new_path. 22187 new_path="$input_to_shortpath" 22188 22189 input_path="$input_to_shortpath" 22190 # Check if we need to convert this using DOS-style short mode. If the path 22191 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22192 # take no chances and rewrite it. 22193 # Note: m4 eats our [], so we need to use [ and ] instead. 22194 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22195 if test "x$has_forbidden_chars" != x; then 22196 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22197 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22198 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22199 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22200 # Going to short mode and back again did indeed matter. Since short mode is 22201 # case insensitive, let's make it lowercase to improve readability. 22202 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22203 # Now convert it back to Unix-stile (cygpath) 22204 input_path=`$CYGPATH -u "$shortmode_path"` 22205 new_path="$input_path" 22206 fi 22207 fi 22208 22209 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22210 if test "x$test_cygdrive_prefix" = x; then 22211 # As a simple fix, exclude /usr/bin since it's not a real path. 22212 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22213 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22214 # a path prefixed by /cygdrive for fixpath to work. 22215 new_path="$CYGWIN_ROOT_PATH$input_path" 22216 fi 22217 fi 22218 22219 # remove trailing .exe if any 22220 new_path="${new_path/%.exe/}" 22221 22222 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22223 22224 # First separate the path from the arguments. This will split at the first 22225 # space. 22226 complete="$AR" 22227 path="${complete%% *}" 22228 tmp="$complete EOL" 22229 arguments="${tmp#* }" 22230 22231 # Input might be given as Windows format, start by converting to 22232 # unix format. 22233 new_path="$path" 22234 22235 windows_path="$new_path" 22236 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22237 unix_path=`$CYGPATH -u "$windows_path"` 22238 new_path="$unix_path" 22239 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22240 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22241 new_path="$unix_path" 22242 fi 22243 22244 22245 # Now try to locate executable using which 22246 new_path=`$WHICH "$new_path" 2> /dev/null` 22247 22248 if test "x$new_path" = x; then 22249 # Oops. Which didn't find the executable. 22250 # The splitting of arguments from the executable at a space might have been incorrect, 22251 # since paths with space are more likely in Windows. Give it another try with the whole 22252 # argument. 22253 path="$complete" 22254 arguments="EOL" 22255 new_path="$path" 22256 22257 windows_path="$new_path" 22258 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22259 unix_path=`$CYGPATH -u "$windows_path"` 22260 new_path="$unix_path" 22261 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22262 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22263 new_path="$unix_path" 22264 fi 22265 22266 22267 new_path=`$WHICH "$new_path" 2> /dev/null` 22268 22269 if test "x$new_path" = x; then 22270 # It's still not found. Now this is an unrecoverable error. 22271 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22272 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22273 has_space=`$ECHO "$complete" | $GREP " "` 22274 if test "x$has_space" != x; then 22275 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22276 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22277 fi 22278 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22279 fi 22280 fi 22281 22282 # Now new_path has a complete unix path to the binary 22283 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22284 # Keep paths in /bin as-is, but remove trailing .exe if any 22285 new_path="${new_path/%.exe/}" 22286 # Do not save /bin paths to all_fixpath_prefixes! 22287 else 22288 # Not in mixed or Windows style, start by that. 22289 new_path=`cmd //c echo $new_path` 22290 22291 input_path="$new_path" 22292 # Check if we need to convert this using DOS-style short mode. If the path 22293 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22294 # take no chances and rewrite it. 22295 # Note: m4 eats our [], so we need to use [ and ] instead. 22296 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22297 if test "x$has_forbidden_chars" != x; then 22298 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22299 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22300 fi 22301 22302 # Output is in $new_path 22303 22304 windows_path="$new_path" 22305 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22306 unix_path=`$CYGPATH -u "$windows_path"` 22307 new_path="$unix_path" 22308 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22309 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22310 new_path="$unix_path" 22311 fi 22312 22313 # remove trailing .exe if any 22314 new_path="${new_path/%.exe/}" 22315 22316 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22317 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22318 fi 22319 22320 else 22321 # We're on a posix platform. Hooray! :) 22322 # First separate the path from the arguments. This will split at the first 22323 # space. 22324 complete="$AR" 22325 path="${complete%% *}" 22326 tmp="$complete EOL" 22327 arguments="${tmp#* }" 22328 22329 # Cannot rely on the command "which" here since it doesn't always work. 22330 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22331 if test -z "$is_absolute_path"; then 22332 # Path to executable is not absolute. Find it. 22333 IFS_save="$IFS" 22334 IFS=: 22335 for p in $PATH; do 22336 if test -f "$p/$path" && test -x "$p/$path"; then 22337 new_path="$p/$path" 22338 break 22339 fi 22340 done 22341 IFS="$IFS_save" 22342 else 22343 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5 22344 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;} 22345 new_path="$path" 22346 fi 22347 22348 if test "x$new_path" = x; then 22349 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 22350 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} 22351 has_space=`$ECHO "$complete" | $GREP " "` 22352 if test "x$has_space" != x; then 22353 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 22354 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 22355 fi 22356 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 22357 fi 22358 fi 22359 22360 # Now join together the path and the arguments once again 22361 if test "x$arguments" != xEOL; then 22362 new_complete="$new_path ${arguments% *}" 22363 else 22364 new_complete="$new_path" 22365 fi 22366 22367 if test "x$complete" != "x$new_complete"; then 22368 AR="$new_complete" 22369 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5 22370 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;} 22371 fi 22372 22373 fi 22374 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 22375 ARFLAGS="-r" 22376 else 22377 ARFLAGS="" 22378 fi 22379 22380 22381 # For hotspot, we need these in Windows mixed path; other platforms keep them the same 22382 HOTSPOT_CXX="$CXX" 22383 HOTSPOT_LD="$LD" 22384 22385 22386 22387 COMPILER_NAME=gcc 22388 COMPILER_TYPE=CC 22389 if test "x$OPENJDK_TARGET_OS" = xwindows; then : 22390 22391 # For now, assume that we are always compiling using cl.exe. 22392 CC_OUT_OPTION=-Fo 22393 EXE_OUT_OPTION=-out: 22394 LD_OUT_OPTION=-out: 22395 AR_OUT_OPTION=-out: 22396 # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin 22397 # program for something completely different. 22398 # Extract the first word of "link", so it can be a program name with args. 22399 set dummy link; ac_word=$2 22400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22401 $as_echo_n "checking for $ac_word... " >&6; } 22402 if test "${ac_cv_prog_WINLD+set}" = set; then : 22403 $as_echo_n "(cached) " >&6 22404 else 22405 if test -n "$WINLD"; then 22406 ac_cv_prog_WINLD="$WINLD" # Let the user override the test. 22407 else 22408 ac_prog_rejected=no 22409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22410 for as_dir in $PATH 22411 do 22412 IFS=$as_save_IFS 22413 test -z "$as_dir" && as_dir=. 22414 for ac_exec_ext in '' $ac_executable_extensions; do 22415 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22416 if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then 22417 ac_prog_rejected=yes 22418 continue 22419 fi 22420 ac_cv_prog_WINLD="link" 22421 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22422 break 2 22423 fi 22424 done 22425 done 22426 IFS=$as_save_IFS 22427 22428 if test $ac_prog_rejected = yes; then 22429 # We found a bogon in the path, so make sure we never use it. 22430 set dummy $ac_cv_prog_WINLD 22431 shift 22432 if test $# != 0; then 22433 # We chose a different compiler from the bogus one. 22434 # However, it has the same basename, so the bogon will be chosen 22435 # first if we set WINLD to just the basename; use the full file name. 22436 shift 22437 ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@" 22438 fi 22439 fi 22440 fi 22441 fi 22442 WINLD=$ac_cv_prog_WINLD 22443 if test -n "$WINLD"; then 22444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5 22445 $as_echo "$WINLD" >&6; } 22446 else 22447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22448 $as_echo "no" >&6; } 22449 fi 22450 22451 22452 # Since we must ignore the first found link, WINLD will contain 22453 # the full path to the link.exe program. 22454 22455 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22456 22457 # First separate the path from the arguments. This will split at the first 22458 # space. 22459 complete="$WINLD" 22460 path="${complete%% *}" 22461 tmp="$complete EOL" 22462 arguments="${tmp#* }" 22463 22464 # Input might be given as Windows format, start by converting to 22465 # unix format. 22466 new_path=`$CYGPATH -u "$path"` 22467 22468 # Now try to locate executable using which 22469 new_path=`$WHICH "$new_path" 2> /dev/null` 22470 # bat and cmd files are not always considered executable in cygwin causing which 22471 # to not find them 22472 if test "x$new_path" = x \ 22473 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22474 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22475 new_path=`$CYGPATH -u "$path"` 22476 fi 22477 if test "x$new_path" = x; then 22478 # Oops. Which didn't find the executable. 22479 # The splitting of arguments from the executable at a space might have been incorrect, 22480 # since paths with space are more likely in Windows. Give it another try with the whole 22481 # argument. 22482 path="$complete" 22483 arguments="EOL" 22484 new_path=`$CYGPATH -u "$path"` 22485 new_path=`$WHICH "$new_path" 2> /dev/null` 22486 # bat and cmd files are not always considered executable in cygwin causing which 22487 # to not find them 22488 if test "x$new_path" = x \ 22489 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22490 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22491 new_path=`$CYGPATH -u "$path"` 22492 fi 22493 if test "x$new_path" = x; then 22494 # It's still not found. Now this is an unrecoverable error. 22495 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22496 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22497 has_space=`$ECHO "$complete" | $GREP " "` 22498 if test "x$has_space" != x; then 22499 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22500 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22501 fi 22502 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22503 fi 22504 fi 22505 22506 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22507 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22508 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22509 # "foo.exe" is OK but "foo" is an error. 22510 # 22511 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22512 # It is also a way to make sure we got the proper file name for the real test later on. 22513 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22514 if test "x$test_shortpath" = x; then 22515 # Short path failed, file does not exist as specified. 22516 # Try adding .exe or .cmd 22517 if test -f "${new_path}.exe"; then 22518 input_to_shortpath="${new_path}.exe" 22519 elif test -f "${new_path}.cmd"; then 22520 input_to_shortpath="${new_path}.cmd" 22521 else 22522 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5 22523 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;} 22524 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22525 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22526 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22527 fi 22528 else 22529 input_to_shortpath="$new_path" 22530 fi 22531 22532 # Call helper function which possibly converts this using DOS-style short mode. 22533 # If so, the updated path is stored in $new_path. 22534 new_path="$input_to_shortpath" 22535 22536 input_path="$input_to_shortpath" 22537 # Check if we need to convert this using DOS-style short mode. If the path 22538 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22539 # take no chances and rewrite it. 22540 # Note: m4 eats our [], so we need to use [ and ] instead. 22541 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22542 if test "x$has_forbidden_chars" != x; then 22543 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22544 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22545 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22546 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22547 # Going to short mode and back again did indeed matter. Since short mode is 22548 # case insensitive, let's make it lowercase to improve readability. 22549 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22550 # Now convert it back to Unix-stile (cygpath) 22551 input_path=`$CYGPATH -u "$shortmode_path"` 22552 new_path="$input_path" 22553 fi 22554 fi 22555 22556 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22557 if test "x$test_cygdrive_prefix" = x; then 22558 # As a simple fix, exclude /usr/bin since it's not a real path. 22559 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22560 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22561 # a path prefixed by /cygdrive for fixpath to work. 22562 new_path="$CYGWIN_ROOT_PATH$input_path" 22563 fi 22564 fi 22565 22566 # remove trailing .exe if any 22567 new_path="${new_path/%.exe/}" 22568 22569 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22570 22571 # First separate the path from the arguments. This will split at the first 22572 # space. 22573 complete="$WINLD" 22574 path="${complete%% *}" 22575 tmp="$complete EOL" 22576 arguments="${tmp#* }" 22577 22578 # Input might be given as Windows format, start by converting to 22579 # unix format. 22580 new_path="$path" 22581 22582 windows_path="$new_path" 22583 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22584 unix_path=`$CYGPATH -u "$windows_path"` 22585 new_path="$unix_path" 22586 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22587 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22588 new_path="$unix_path" 22589 fi 22590 22591 22592 # Now try to locate executable using which 22593 new_path=`$WHICH "$new_path" 2> /dev/null` 22594 22595 if test "x$new_path" = x; then 22596 # Oops. Which didn't find the executable. 22597 # The splitting of arguments from the executable at a space might have been incorrect, 22598 # since paths with space are more likely in Windows. Give it another try with the whole 22599 # argument. 22600 path="$complete" 22601 arguments="EOL" 22602 new_path="$path" 22603 22604 windows_path="$new_path" 22605 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22606 unix_path=`$CYGPATH -u "$windows_path"` 22607 new_path="$unix_path" 22608 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22609 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22610 new_path="$unix_path" 22611 fi 22612 22613 22614 new_path=`$WHICH "$new_path" 2> /dev/null` 22615 22616 if test "x$new_path" = x; then 22617 # It's still not found. Now this is an unrecoverable error. 22618 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22619 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22620 has_space=`$ECHO "$complete" | $GREP " "` 22621 if test "x$has_space" != x; then 22622 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22623 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22624 fi 22625 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22626 fi 22627 fi 22628 22629 # Now new_path has a complete unix path to the binary 22630 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22631 # Keep paths in /bin as-is, but remove trailing .exe if any 22632 new_path="${new_path/%.exe/}" 22633 # Do not save /bin paths to all_fixpath_prefixes! 22634 else 22635 # Not in mixed or Windows style, start by that. 22636 new_path=`cmd //c echo $new_path` 22637 22638 input_path="$new_path" 22639 # Check if we need to convert this using DOS-style short mode. If the path 22640 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22641 # take no chances and rewrite it. 22642 # Note: m4 eats our [], so we need to use [ and ] instead. 22643 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22644 if test "x$has_forbidden_chars" != x; then 22645 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22646 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22647 fi 22648 22649 # Output is in $new_path 22650 22651 windows_path="$new_path" 22652 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22653 unix_path=`$CYGPATH -u "$windows_path"` 22654 new_path="$unix_path" 22655 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22656 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22657 new_path="$unix_path" 22658 fi 22659 22660 # remove trailing .exe if any 22661 new_path="${new_path/%.exe/}" 22662 22663 # Save the first 10 bytes of this path to the storage, so fixpath can work. 22664 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 22665 fi 22666 22667 else 22668 # We're on a posix platform. Hooray! :) 22669 # First separate the path from the arguments. This will split at the first 22670 # space. 22671 complete="$WINLD" 22672 path="${complete%% *}" 22673 tmp="$complete EOL" 22674 arguments="${tmp#* }" 22675 22676 # Cannot rely on the command "which" here since it doesn't always work. 22677 is_absolute_path=`$ECHO "$path" | $GREP ^/` 22678 if test -z "$is_absolute_path"; then 22679 # Path to executable is not absolute. Find it. 22680 IFS_save="$IFS" 22681 IFS=: 22682 for p in $PATH; do 22683 if test -f "$p/$path" && test -x "$p/$path"; then 22684 new_path="$p/$path" 22685 break 22686 fi 22687 done 22688 IFS="$IFS_save" 22689 else 22690 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5 22691 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;} 22692 new_path="$path" 22693 fi 22694 22695 if test "x$new_path" = x; then 22696 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 22697 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} 22698 has_space=`$ECHO "$complete" | $GREP " "` 22699 if test "x$has_space" != x; then 22700 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 22701 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 22702 fi 22703 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 22704 fi 22705 fi 22706 22707 # Now join together the path and the arguments once again 22708 if test "x$arguments" != xEOL; then 22709 new_complete="$new_path ${arguments% *}" 22710 else 22711 new_complete="$new_path" 22712 fi 22713 22714 if test "x$complete" != "x$new_complete"; then 22715 WINLD="$new_complete" 22716 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5 22717 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;} 22718 fi 22719 22720 printf "Windows linker was found at $WINLD\n" 22721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5 22722 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; } 22723 "$WINLD" --version > /dev/null 22724 if test $? -eq 0 ; then 22725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22726 $as_echo "no" >&6; } 22727 as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5 22728 else 22729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22730 $as_echo "yes" >&6; } 22731 fi 22732 LD="$WINLD" 22733 LDEXE="$WINLD" 22734 LDCXX="$WINLD" 22735 LDEXECXX="$WINLD" 22736 22737 # Extract the first word of "mt", so it can be a program name with args. 22738 set dummy mt; ac_word=$2 22739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22740 $as_echo_n "checking for $ac_word... " >&6; } 22741 if test "${ac_cv_prog_MT+set}" = set; then : 22742 $as_echo_n "(cached) " >&6 22743 else 22744 if test -n "$MT"; then 22745 ac_cv_prog_MT="$MT" # Let the user override the test. 22746 else 22747 ac_prog_rejected=no 22748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22749 for as_dir in $PATH 22750 do 22751 IFS=$as_save_IFS 22752 test -z "$as_dir" && as_dir=. 22753 for ac_exec_ext in '' $ac_executable_extensions; do 22754 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 22755 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then 22756 ac_prog_rejected=yes 22757 continue 22758 fi 22759 ac_cv_prog_MT="mt" 22760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22761 break 2 22762 fi 22763 done 22764 done 22765 IFS=$as_save_IFS 22766 22767 if test $ac_prog_rejected = yes; then 22768 # We found a bogon in the path, so make sure we never use it. 22769 set dummy $ac_cv_prog_MT 22770 shift 22771 if test $# != 0; then 22772 # We chose a different compiler from the bogus one. 22773 # However, it has the same basename, so the bogon will be chosen 22774 # first if we set MT to just the basename; use the full file name. 22775 shift 22776 ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@" 22777 fi 22778 fi 22779 fi 22780 fi 22781 MT=$ac_cv_prog_MT 22782 if test -n "$MT"; then 22783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5 22784 $as_echo "$MT" >&6; } 22785 else 22786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22787 $as_echo "no" >&6; } 22788 fi 22789 22790 22791 22792 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22793 22794 # First separate the path from the arguments. This will split at the first 22795 # space. 22796 complete="$MT" 22797 path="${complete%% *}" 22798 tmp="$complete EOL" 22799 arguments="${tmp#* }" 22800 22801 # Input might be given as Windows format, start by converting to 22802 # unix format. 22803 new_path=`$CYGPATH -u "$path"` 22804 22805 # Now try to locate executable using which 22806 new_path=`$WHICH "$new_path" 2> /dev/null` 22807 # bat and cmd files are not always considered executable in cygwin causing which 22808 # to not find them 22809 if test "x$new_path" = x \ 22810 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22811 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22812 new_path=`$CYGPATH -u "$path"` 22813 fi 22814 if test "x$new_path" = x; then 22815 # Oops. Which didn't find the executable. 22816 # The splitting of arguments from the executable at a space might have been incorrect, 22817 # since paths with space are more likely in Windows. Give it another try with the whole 22818 # argument. 22819 path="$complete" 22820 arguments="EOL" 22821 new_path=`$CYGPATH -u "$path"` 22822 new_path=`$WHICH "$new_path" 2> /dev/null` 22823 # bat and cmd files are not always considered executable in cygwin causing which 22824 # to not find them 22825 if test "x$new_path" = x \ 22826 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 22827 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 22828 new_path=`$CYGPATH -u "$path"` 22829 fi 22830 if test "x$new_path" = x; then 22831 # It's still not found. Now this is an unrecoverable error. 22832 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 22833 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 22834 has_space=`$ECHO "$complete" | $GREP " "` 22835 if test "x$has_space" != x; then 22836 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22838 fi 22839 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 22840 fi 22841 fi 22842 22843 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 22844 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 22845 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 22846 # "foo.exe" is OK but "foo" is an error. 22847 # 22848 # This test is therefore slightly more accurate than "test -f" to check for file precense. 22849 # It is also a way to make sure we got the proper file name for the real test later on. 22850 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 22851 if test "x$test_shortpath" = x; then 22852 # Short path failed, file does not exist as specified. 22853 # Try adding .exe or .cmd 22854 if test -f "${new_path}.exe"; then 22855 input_to_shortpath="${new_path}.exe" 22856 elif test -f "${new_path}.cmd"; then 22857 input_to_shortpath="${new_path}.cmd" 22858 else 22859 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5 22860 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;} 22861 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 22862 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 22863 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 22864 fi 22865 else 22866 input_to_shortpath="$new_path" 22867 fi 22868 22869 # Call helper function which possibly converts this using DOS-style short mode. 22870 # If so, the updated path is stored in $new_path. 22871 new_path="$input_to_shortpath" 22872 22873 input_path="$input_to_shortpath" 22874 # Check if we need to convert this using DOS-style short mode. If the path 22875 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22876 # take no chances and rewrite it. 22877 # Note: m4 eats our [], so we need to use [ and ] instead. 22878 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 22879 if test "x$has_forbidden_chars" != x; then 22880 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22881 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 22882 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 22883 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 22884 # Going to short mode and back again did indeed matter. Since short mode is 22885 # case insensitive, let's make it lowercase to improve readability. 22886 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22887 # Now convert it back to Unix-stile (cygpath) 22888 input_path=`$CYGPATH -u "$shortmode_path"` 22889 new_path="$input_path" 22890 fi 22891 fi 22892 22893 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 22894 if test "x$test_cygdrive_prefix" = x; then 22895 # As a simple fix, exclude /usr/bin since it's not a real path. 22896 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 22897 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 22898 # a path prefixed by /cygdrive for fixpath to work. 22899 new_path="$CYGWIN_ROOT_PATH$input_path" 22900 fi 22901 fi 22902 22903 # remove trailing .exe if any 22904 new_path="${new_path/%.exe/}" 22905 22906 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22907 22908 # First separate the path from the arguments. This will split at the first 22909 # space. 22910 complete="$MT" 22911 path="${complete%% *}" 22912 tmp="$complete EOL" 22913 arguments="${tmp#* }" 22914 22915 # Input might be given as Windows format, start by converting to 22916 # unix format. 22917 new_path="$path" 22918 22919 windows_path="$new_path" 22920 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22921 unix_path=`$CYGPATH -u "$windows_path"` 22922 new_path="$unix_path" 22923 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22924 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22925 new_path="$unix_path" 22926 fi 22927 22928 22929 # Now try to locate executable using which 22930 new_path=`$WHICH "$new_path" 2> /dev/null` 22931 22932 if test "x$new_path" = x; then 22933 # Oops. Which didn't find the executable. 22934 # The splitting of arguments from the executable at a space might have been incorrect, 22935 # since paths with space are more likely in Windows. Give it another try with the whole 22936 # argument. 22937 path="$complete" 22938 arguments="EOL" 22939 new_path="$path" 22940 22941 windows_path="$new_path" 22942 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22943 unix_path=`$CYGPATH -u "$windows_path"` 22944 new_path="$unix_path" 22945 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22946 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22947 new_path="$unix_path" 22948 fi 22949 22950 22951 new_path=`$WHICH "$new_path" 2> /dev/null` 22952 22953 if test "x$new_path" = x; then 22954 # It's still not found. Now this is an unrecoverable error. 22955 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 22956 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 22957 has_space=`$ECHO "$complete" | $GREP " "` 22958 if test "x$has_space" != x; then 22959 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 22960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 22961 fi 22962 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 22963 fi 22964 fi 22965 22966 # Now new_path has a complete unix path to the binary 22967 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 22968 # Keep paths in /bin as-is, but remove trailing .exe if any 22969 new_path="${new_path/%.exe/}" 22970 # Do not save /bin paths to all_fixpath_prefixes! 22971 else 22972 # Not in mixed or Windows style, start by that. 22973 new_path=`cmd //c echo $new_path` 22974 22975 input_path="$new_path" 22976 # Check if we need to convert this using DOS-style short mode. If the path 22977 # contains just simple characters, use it. Otherwise (spaces, weird characters), 22978 # take no chances and rewrite it. 22979 # Note: m4 eats our [], so we need to use [ and ] instead. 22980 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 22981 if test "x$has_forbidden_chars" != x; then 22982 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 22983 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 22984 fi 22985 22986 # Output is in $new_path 22987 22988 windows_path="$new_path" 22989 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 22990 unix_path=`$CYGPATH -u "$windows_path"` 22991 new_path="$unix_path" 22992 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 22993 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 22994 new_path="$unix_path" 22995 fi 22996 22997 # remove trailing .exe if any 22998 new_path="${new_path/%.exe/}" 22999 23000 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23001 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23002 fi 23003 23004 else 23005 # We're on a posix platform. Hooray! :) 23006 # First separate the path from the arguments. This will split at the first 23007 # space. 23008 complete="$MT" 23009 path="${complete%% *}" 23010 tmp="$complete EOL" 23011 arguments="${tmp#* }" 23012 23013 # Cannot rely on the command "which" here since it doesn't always work. 23014 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23015 if test -z "$is_absolute_path"; then 23016 # Path to executable is not absolute. Find it. 23017 IFS_save="$IFS" 23018 IFS=: 23019 for p in $PATH; do 23020 if test -f "$p/$path" && test -x "$p/$path"; then 23021 new_path="$p/$path" 23022 break 23023 fi 23024 done 23025 IFS="$IFS_save" 23026 else 23027 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5 23028 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;} 23029 new_path="$path" 23030 fi 23031 23032 if test "x$new_path" = x; then 23033 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 23034 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} 23035 has_space=`$ECHO "$complete" | $GREP " "` 23036 if test "x$has_space" != x; then 23037 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23038 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23039 fi 23040 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 23041 fi 23042 fi 23043 23044 # Now join together the path and the arguments once again 23045 if test "x$arguments" != xEOL; then 23046 new_complete="$new_path ${arguments% *}" 23047 else 23048 new_complete="$new_path" 23049 fi 23050 23051 if test "x$complete" != "x$new_complete"; then 23052 MT="$new_complete" 23053 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5 23054 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;} 23055 fi 23056 23057 # The resource compiler 23058 # Extract the first word of "rc", so it can be a program name with args. 23059 set dummy rc; ac_word=$2 23060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23061 $as_echo_n "checking for $ac_word... " >&6; } 23062 if test "${ac_cv_prog_RC+set}" = set; then : 23063 $as_echo_n "(cached) " >&6 23064 else 23065 if test -n "$RC"; then 23066 ac_cv_prog_RC="$RC" # Let the user override the test. 23067 else 23068 ac_prog_rejected=no 23069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23070 for as_dir in $PATH 23071 do 23072 IFS=$as_save_IFS 23073 test -z "$as_dir" && as_dir=. 23074 for ac_exec_ext in '' $ac_executable_extensions; do 23075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23076 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then 23077 ac_prog_rejected=yes 23078 continue 23079 fi 23080 ac_cv_prog_RC="rc" 23081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23082 break 2 23083 fi 23084 done 23085 done 23086 IFS=$as_save_IFS 23087 23088 if test $ac_prog_rejected = yes; then 23089 # We found a bogon in the path, so make sure we never use it. 23090 set dummy $ac_cv_prog_RC 23091 shift 23092 if test $# != 0; then 23093 # We chose a different compiler from the bogus one. 23094 # However, it has the same basename, so the bogon will be chosen 23095 # first if we set RC to just the basename; use the full file name. 23096 shift 23097 ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@" 23098 fi 23099 fi 23100 fi 23101 fi 23102 RC=$ac_cv_prog_RC 23103 if test -n "$RC"; then 23104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 23105 $as_echo "$RC" >&6; } 23106 else 23107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23108 $as_echo "no" >&6; } 23109 fi 23110 23111 23112 23113 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23114 23115 # First separate the path from the arguments. This will split at the first 23116 # space. 23117 complete="$RC" 23118 path="${complete%% *}" 23119 tmp="$complete EOL" 23120 arguments="${tmp#* }" 23121 23122 # Input might be given as Windows format, start by converting to 23123 # unix format. 23124 new_path=`$CYGPATH -u "$path"` 23125 23126 # Now try to locate executable using which 23127 new_path=`$WHICH "$new_path" 2> /dev/null` 23128 # bat and cmd files are not always considered executable in cygwin causing which 23129 # to not find them 23130 if test "x$new_path" = x \ 23131 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23132 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23133 new_path=`$CYGPATH -u "$path"` 23134 fi 23135 if test "x$new_path" = x; then 23136 # Oops. Which didn't find the executable. 23137 # The splitting of arguments from the executable at a space might have been incorrect, 23138 # since paths with space are more likely in Windows. Give it another try with the whole 23139 # argument. 23140 path="$complete" 23141 arguments="EOL" 23142 new_path=`$CYGPATH -u "$path"` 23143 new_path=`$WHICH "$new_path" 2> /dev/null` 23144 # bat and cmd files are not always considered executable in cygwin causing which 23145 # to not find them 23146 if test "x$new_path" = x \ 23147 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23148 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23149 new_path=`$CYGPATH -u "$path"` 23150 fi 23151 if test "x$new_path" = x; then 23152 # It's still not found. Now this is an unrecoverable error. 23153 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23154 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23155 has_space=`$ECHO "$complete" | $GREP " "` 23156 if test "x$has_space" != x; then 23157 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23158 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23159 fi 23160 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23161 fi 23162 fi 23163 23164 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23165 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23166 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23167 # "foo.exe" is OK but "foo" is an error. 23168 # 23169 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23170 # It is also a way to make sure we got the proper file name for the real test later on. 23171 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23172 if test "x$test_shortpath" = x; then 23173 # Short path failed, file does not exist as specified. 23174 # Try adding .exe or .cmd 23175 if test -f "${new_path}.exe"; then 23176 input_to_shortpath="${new_path}.exe" 23177 elif test -f "${new_path}.cmd"; then 23178 input_to_shortpath="${new_path}.cmd" 23179 else 23180 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5 23181 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;} 23182 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23183 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23184 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23185 fi 23186 else 23187 input_to_shortpath="$new_path" 23188 fi 23189 23190 # Call helper function which possibly converts this using DOS-style short mode. 23191 # If so, the updated path is stored in $new_path. 23192 new_path="$input_to_shortpath" 23193 23194 input_path="$input_to_shortpath" 23195 # Check if we need to convert this using DOS-style short mode. If the path 23196 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23197 # take no chances and rewrite it. 23198 # Note: m4 eats our [], so we need to use [ and ] instead. 23199 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23200 if test "x$has_forbidden_chars" != x; then 23201 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23202 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23203 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23204 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23205 # Going to short mode and back again did indeed matter. Since short mode is 23206 # case insensitive, let's make it lowercase to improve readability. 23207 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23208 # Now convert it back to Unix-stile (cygpath) 23209 input_path=`$CYGPATH -u "$shortmode_path"` 23210 new_path="$input_path" 23211 fi 23212 fi 23213 23214 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23215 if test "x$test_cygdrive_prefix" = x; then 23216 # As a simple fix, exclude /usr/bin since it's not a real path. 23217 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23218 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23219 # a path prefixed by /cygdrive for fixpath to work. 23220 new_path="$CYGWIN_ROOT_PATH$input_path" 23221 fi 23222 fi 23223 23224 # remove trailing .exe if any 23225 new_path="${new_path/%.exe/}" 23226 23227 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23228 23229 # First separate the path from the arguments. This will split at the first 23230 # space. 23231 complete="$RC" 23232 path="${complete%% *}" 23233 tmp="$complete EOL" 23234 arguments="${tmp#* }" 23235 23236 # Input might be given as Windows format, start by converting to 23237 # unix format. 23238 new_path="$path" 23239 23240 windows_path="$new_path" 23241 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23242 unix_path=`$CYGPATH -u "$windows_path"` 23243 new_path="$unix_path" 23244 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23245 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23246 new_path="$unix_path" 23247 fi 23248 23249 23250 # Now try to locate executable using which 23251 new_path=`$WHICH "$new_path" 2> /dev/null` 23252 23253 if test "x$new_path" = x; then 23254 # Oops. Which didn't find the executable. 23255 # The splitting of arguments from the executable at a space might have been incorrect, 23256 # since paths with space are more likely in Windows. Give it another try with the whole 23257 # argument. 23258 path="$complete" 23259 arguments="EOL" 23260 new_path="$path" 23261 23262 windows_path="$new_path" 23263 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23264 unix_path=`$CYGPATH -u "$windows_path"` 23265 new_path="$unix_path" 23266 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23267 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23268 new_path="$unix_path" 23269 fi 23270 23271 23272 new_path=`$WHICH "$new_path" 2> /dev/null` 23273 23274 if test "x$new_path" = x; then 23275 # It's still not found. Now this is an unrecoverable error. 23276 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23277 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23278 has_space=`$ECHO "$complete" | $GREP " "` 23279 if test "x$has_space" != x; then 23280 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23281 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23282 fi 23283 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23284 fi 23285 fi 23286 23287 # Now new_path has a complete unix path to the binary 23288 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23289 # Keep paths in /bin as-is, but remove trailing .exe if any 23290 new_path="${new_path/%.exe/}" 23291 # Do not save /bin paths to all_fixpath_prefixes! 23292 else 23293 # Not in mixed or Windows style, start by that. 23294 new_path=`cmd //c echo $new_path` 23295 23296 input_path="$new_path" 23297 # Check if we need to convert this using DOS-style short mode. If the path 23298 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23299 # take no chances and rewrite it. 23300 # Note: m4 eats our [], so we need to use [ and ] instead. 23301 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23302 if test "x$has_forbidden_chars" != x; then 23303 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23304 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23305 fi 23306 23307 # Output is in $new_path 23308 23309 windows_path="$new_path" 23310 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23311 unix_path=`$CYGPATH -u "$windows_path"` 23312 new_path="$unix_path" 23313 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23314 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23315 new_path="$unix_path" 23316 fi 23317 23318 # remove trailing .exe if any 23319 new_path="${new_path/%.exe/}" 23320 23321 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23322 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23323 fi 23324 23325 else 23326 # We're on a posix platform. Hooray! :) 23327 # First separate the path from the arguments. This will split at the first 23328 # space. 23329 complete="$RC" 23330 path="${complete%% *}" 23331 tmp="$complete EOL" 23332 arguments="${tmp#* }" 23333 23334 # Cannot rely on the command "which" here since it doesn't always work. 23335 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23336 if test -z "$is_absolute_path"; then 23337 # Path to executable is not absolute. Find it. 23338 IFS_save="$IFS" 23339 IFS=: 23340 for p in $PATH; do 23341 if test -f "$p/$path" && test -x "$p/$path"; then 23342 new_path="$p/$path" 23343 break 23344 fi 23345 done 23346 IFS="$IFS_save" 23347 else 23348 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5 23349 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;} 23350 new_path="$path" 23351 fi 23352 23353 if test "x$new_path" = x; then 23354 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 23355 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} 23356 has_space=`$ECHO "$complete" | $GREP " "` 23357 if test "x$has_space" != x; then 23358 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23359 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23360 fi 23361 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 23362 fi 23363 fi 23364 23365 # Now join together the path and the arguments once again 23366 if test "x$arguments" != xEOL; then 23367 new_complete="$new_path ${arguments% *}" 23368 else 23369 new_complete="$new_path" 23370 fi 23371 23372 if test "x$complete" != "x$new_complete"; then 23373 RC="$new_complete" 23374 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5 23375 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;} 23376 fi 23377 23378 23379 # For hotspot, we need these in Windows mixed path, 23380 # so rewrite them all. Need added .exe suffix. 23381 HOTSPOT_CXX="$CXX.exe" 23382 HOTSPOT_LD="$LD.exe" 23383 HOTSPOT_MT="$MT.exe" 23384 HOTSPOT_RC="$RC.exe" 23385 23386 unix_path="$HOTSPOT_CXX" 23387 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23388 windows_path=`$CYGPATH -m "$unix_path"` 23389 HOTSPOT_CXX="$windows_path" 23390 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23391 windows_path=`cmd //c echo $unix_path` 23392 HOTSPOT_CXX="$windows_path" 23393 fi 23394 23395 23396 unix_path="$HOTSPOT_LD" 23397 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23398 windows_path=`$CYGPATH -m "$unix_path"` 23399 HOTSPOT_LD="$windows_path" 23400 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23401 windows_path=`cmd //c echo $unix_path` 23402 HOTSPOT_LD="$windows_path" 23403 fi 23404 23405 23406 unix_path="$HOTSPOT_MT" 23407 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23408 windows_path=`$CYGPATH -m "$unix_path"` 23409 HOTSPOT_MT="$windows_path" 23410 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23411 windows_path=`cmd //c echo $unix_path` 23412 HOTSPOT_MT="$windows_path" 23413 fi 23414 23415 23416 unix_path="$HOTSPOT_RC" 23417 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23418 windows_path=`$CYGPATH -m "$unix_path"` 23419 HOTSPOT_RC="$windows_path" 23420 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23421 windows_path=`cmd //c echo $unix_path` 23422 HOTSPOT_RC="$windows_path" 23423 fi 23424 23425 23426 23427 23428 RC_FLAGS="-nologo -l 0x409 -r" 23429 if test "x$VARIANT" = xOPT; then : 23430 23431 RC_FLAGS="$RC_FLAGS -d NDEBUG" 23432 23433 fi 23434 JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION 23435 if test "x$JDK_UPDATE_VERSION" = x; then : 23436 23437 JDK_UPDATE_VERSION_NOTNULL=0 23438 23439 fi 23440 RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\"" 23441 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\"" 23442 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\"" 23443 RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\"" 23444 RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\"" 23445 RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\"" 23446 RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\"" 23447 23448 # lib.exe is used to create static libraries. 23449 # Extract the first word of "lib", so it can be a program name with args. 23450 set dummy lib; ac_word=$2 23451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23452 $as_echo_n "checking for $ac_word... " >&6; } 23453 if test "${ac_cv_prog_WINAR+set}" = set; then : 23454 $as_echo_n "(cached) " >&6 23455 else 23456 if test -n "$WINAR"; then 23457 ac_cv_prog_WINAR="$WINAR" # Let the user override the test. 23458 else 23459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23460 for as_dir in $PATH 23461 do 23462 IFS=$as_save_IFS 23463 test -z "$as_dir" && as_dir=. 23464 for ac_exec_ext in '' $ac_executable_extensions; do 23465 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23466 ac_cv_prog_WINAR="lib" 23467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23468 break 2 23469 fi 23470 done 23471 done 23472 IFS=$as_save_IFS 23473 23474 fi 23475 fi 23476 WINAR=$ac_cv_prog_WINAR 23477 if test -n "$WINAR"; then 23478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5 23479 $as_echo "$WINAR" >&6; } 23480 else 23481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23482 $as_echo "no" >&6; } 23483 fi 23484 23485 23486 23487 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23488 23489 # First separate the path from the arguments. This will split at the first 23490 # space. 23491 complete="$WINAR" 23492 path="${complete%% *}" 23493 tmp="$complete EOL" 23494 arguments="${tmp#* }" 23495 23496 # Input might be given as Windows format, start by converting to 23497 # unix format. 23498 new_path=`$CYGPATH -u "$path"` 23499 23500 # Now try to locate executable using which 23501 new_path=`$WHICH "$new_path" 2> /dev/null` 23502 # bat and cmd files are not always considered executable in cygwin causing which 23503 # to not find them 23504 if test "x$new_path" = x \ 23505 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23506 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23507 new_path=`$CYGPATH -u "$path"` 23508 fi 23509 if test "x$new_path" = x; then 23510 # Oops. Which didn't find the executable. 23511 # The splitting of arguments from the executable at a space might have been incorrect, 23512 # since paths with space are more likely in Windows. Give it another try with the whole 23513 # argument. 23514 path="$complete" 23515 arguments="EOL" 23516 new_path=`$CYGPATH -u "$path"` 23517 new_path=`$WHICH "$new_path" 2> /dev/null` 23518 # bat and cmd files are not always considered executable in cygwin causing which 23519 # to not find them 23520 if test "x$new_path" = x \ 23521 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23522 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23523 new_path=`$CYGPATH -u "$path"` 23524 fi 23525 if test "x$new_path" = x; then 23526 # It's still not found. Now this is an unrecoverable error. 23527 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23528 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23529 has_space=`$ECHO "$complete" | $GREP " "` 23530 if test "x$has_space" != x; then 23531 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23532 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23533 fi 23534 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23535 fi 23536 fi 23537 23538 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23539 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23540 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23541 # "foo.exe" is OK but "foo" is an error. 23542 # 23543 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23544 # It is also a way to make sure we got the proper file name for the real test later on. 23545 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23546 if test "x$test_shortpath" = x; then 23547 # Short path failed, file does not exist as specified. 23548 # Try adding .exe or .cmd 23549 if test -f "${new_path}.exe"; then 23550 input_to_shortpath="${new_path}.exe" 23551 elif test -f "${new_path}.cmd"; then 23552 input_to_shortpath="${new_path}.cmd" 23553 else 23554 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5 23555 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;} 23556 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23557 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23558 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23559 fi 23560 else 23561 input_to_shortpath="$new_path" 23562 fi 23563 23564 # Call helper function which possibly converts this using DOS-style short mode. 23565 # If so, the updated path is stored in $new_path. 23566 new_path="$input_to_shortpath" 23567 23568 input_path="$input_to_shortpath" 23569 # Check if we need to convert this using DOS-style short mode. If the path 23570 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23571 # take no chances and rewrite it. 23572 # Note: m4 eats our [], so we need to use [ and ] instead. 23573 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23574 if test "x$has_forbidden_chars" != x; then 23575 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23576 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23577 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23578 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23579 # Going to short mode and back again did indeed matter. Since short mode is 23580 # case insensitive, let's make it lowercase to improve readability. 23581 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23582 # Now convert it back to Unix-stile (cygpath) 23583 input_path=`$CYGPATH -u "$shortmode_path"` 23584 new_path="$input_path" 23585 fi 23586 fi 23587 23588 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23589 if test "x$test_cygdrive_prefix" = x; then 23590 # As a simple fix, exclude /usr/bin since it's not a real path. 23591 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23592 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23593 # a path prefixed by /cygdrive for fixpath to work. 23594 new_path="$CYGWIN_ROOT_PATH$input_path" 23595 fi 23596 fi 23597 23598 # remove trailing .exe if any 23599 new_path="${new_path/%.exe/}" 23600 23601 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23602 23603 # First separate the path from the arguments. This will split at the first 23604 # space. 23605 complete="$WINAR" 23606 path="${complete%% *}" 23607 tmp="$complete EOL" 23608 arguments="${tmp#* }" 23609 23610 # Input might be given as Windows format, start by converting to 23611 # unix format. 23612 new_path="$path" 23613 23614 windows_path="$new_path" 23615 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23616 unix_path=`$CYGPATH -u "$windows_path"` 23617 new_path="$unix_path" 23618 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23619 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23620 new_path="$unix_path" 23621 fi 23622 23623 23624 # Now try to locate executable using which 23625 new_path=`$WHICH "$new_path" 2> /dev/null` 23626 23627 if test "x$new_path" = x; then 23628 # Oops. Which didn't find the executable. 23629 # The splitting of arguments from the executable at a space might have been incorrect, 23630 # since paths with space are more likely in Windows. Give it another try with the whole 23631 # argument. 23632 path="$complete" 23633 arguments="EOL" 23634 new_path="$path" 23635 23636 windows_path="$new_path" 23637 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23638 unix_path=`$CYGPATH -u "$windows_path"` 23639 new_path="$unix_path" 23640 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23641 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23642 new_path="$unix_path" 23643 fi 23644 23645 23646 new_path=`$WHICH "$new_path" 2> /dev/null` 23647 23648 if test "x$new_path" = x; then 23649 # It's still not found. Now this is an unrecoverable error. 23650 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23651 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23652 has_space=`$ECHO "$complete" | $GREP " "` 23653 if test "x$has_space" != x; then 23654 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23655 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23656 fi 23657 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23658 fi 23659 fi 23660 23661 # Now new_path has a complete unix path to the binary 23662 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23663 # Keep paths in /bin as-is, but remove trailing .exe if any 23664 new_path="${new_path/%.exe/}" 23665 # Do not save /bin paths to all_fixpath_prefixes! 23666 else 23667 # Not in mixed or Windows style, start by that. 23668 new_path=`cmd //c echo $new_path` 23669 23670 input_path="$new_path" 23671 # Check if we need to convert this using DOS-style short mode. If the path 23672 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23673 # take no chances and rewrite it. 23674 # Note: m4 eats our [], so we need to use [ and ] instead. 23675 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23676 if test "x$has_forbidden_chars" != x; then 23677 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23678 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23679 fi 23680 23681 # Output is in $new_path 23682 23683 windows_path="$new_path" 23684 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23685 unix_path=`$CYGPATH -u "$windows_path"` 23686 new_path="$unix_path" 23687 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23688 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23689 new_path="$unix_path" 23690 fi 23691 23692 # remove trailing .exe if any 23693 new_path="${new_path/%.exe/}" 23694 23695 # Save the first 10 bytes of this path to the storage, so fixpath can work. 23696 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 23697 fi 23698 23699 else 23700 # We're on a posix platform. Hooray! :) 23701 # First separate the path from the arguments. This will split at the first 23702 # space. 23703 complete="$WINAR" 23704 path="${complete%% *}" 23705 tmp="$complete EOL" 23706 arguments="${tmp#* }" 23707 23708 # Cannot rely on the command "which" here since it doesn't always work. 23709 is_absolute_path=`$ECHO "$path" | $GREP ^/` 23710 if test -z "$is_absolute_path"; then 23711 # Path to executable is not absolute. Find it. 23712 IFS_save="$IFS" 23713 IFS=: 23714 for p in $PATH; do 23715 if test -f "$p/$path" && test -x "$p/$path"; then 23716 new_path="$p/$path" 23717 break 23718 fi 23719 done 23720 IFS="$IFS_save" 23721 else 23722 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5 23723 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;} 23724 new_path="$path" 23725 fi 23726 23727 if test "x$new_path" = x; then 23728 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 23729 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} 23730 has_space=`$ECHO "$complete" | $GREP " "` 23731 if test "x$has_space" != x; then 23732 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 23733 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 23734 fi 23735 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 23736 fi 23737 fi 23738 23739 # Now join together the path and the arguments once again 23740 if test "x$arguments" != xEOL; then 23741 new_complete="$new_path ${arguments% *}" 23742 else 23743 new_complete="$new_path" 23744 fi 23745 23746 if test "x$complete" != "x$new_complete"; then 23747 WINAR="$new_complete" 23748 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5 23749 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;} 23750 fi 23751 23752 AR="$WINAR" 23753 ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" 23754 23755 # Extract the first word of "dumpbin", so it can be a program name with args. 23756 set dummy dumpbin; ac_word=$2 23757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23758 $as_echo_n "checking for $ac_word... " >&6; } 23759 if test "${ac_cv_prog_DUMPBIN+set}" = set; then : 23760 $as_echo_n "(cached) " >&6 23761 else 23762 if test -n "$DUMPBIN"; then 23763 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. 23764 else 23765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23766 for as_dir in $PATH 23767 do 23768 IFS=$as_save_IFS 23769 test -z "$as_dir" && as_dir=. 23770 for ac_exec_ext in '' $ac_executable_extensions; do 23771 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 23772 ac_cv_prog_DUMPBIN="dumpbin" 23773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23774 break 2 23775 fi 23776 done 23777 done 23778 IFS=$as_save_IFS 23779 23780 fi 23781 fi 23782 DUMPBIN=$ac_cv_prog_DUMPBIN 23783 if test -n "$DUMPBIN"; then 23784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 23785 $as_echo "$DUMPBIN" >&6; } 23786 else 23787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23788 $as_echo "no" >&6; } 23789 fi 23790 23791 23792 23793 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23794 23795 # First separate the path from the arguments. This will split at the first 23796 # space. 23797 complete="$DUMPBIN" 23798 path="${complete%% *}" 23799 tmp="$complete EOL" 23800 arguments="${tmp#* }" 23801 23802 # Input might be given as Windows format, start by converting to 23803 # unix format. 23804 new_path=`$CYGPATH -u "$path"` 23805 23806 # Now try to locate executable using which 23807 new_path=`$WHICH "$new_path" 2> /dev/null` 23808 # bat and cmd files are not always considered executable in cygwin causing which 23809 # to not find them 23810 if test "x$new_path" = x \ 23811 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23812 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23813 new_path=`$CYGPATH -u "$path"` 23814 fi 23815 if test "x$new_path" = x; then 23816 # Oops. Which didn't find the executable. 23817 # The splitting of arguments from the executable at a space might have been incorrect, 23818 # since paths with space are more likely in Windows. Give it another try with the whole 23819 # argument. 23820 path="$complete" 23821 arguments="EOL" 23822 new_path=`$CYGPATH -u "$path"` 23823 new_path=`$WHICH "$new_path" 2> /dev/null` 23824 # bat and cmd files are not always considered executable in cygwin causing which 23825 # to not find them 23826 if test "x$new_path" = x \ 23827 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 23828 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 23829 new_path=`$CYGPATH -u "$path"` 23830 fi 23831 if test "x$new_path" = x; then 23832 # It's still not found. Now this is an unrecoverable error. 23833 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 23834 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 23835 has_space=`$ECHO "$complete" | $GREP " "` 23836 if test "x$has_space" != x; then 23837 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23839 fi 23840 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 23841 fi 23842 fi 23843 23844 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 23845 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 23846 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 23847 # "foo.exe" is OK but "foo" is an error. 23848 # 23849 # This test is therefore slightly more accurate than "test -f" to check for file precense. 23850 # It is also a way to make sure we got the proper file name for the real test later on. 23851 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 23852 if test "x$test_shortpath" = x; then 23853 # Short path failed, file does not exist as specified. 23854 # Try adding .exe or .cmd 23855 if test -f "${new_path}.exe"; then 23856 input_to_shortpath="${new_path}.exe" 23857 elif test -f "${new_path}.cmd"; then 23858 input_to_shortpath="${new_path}.cmd" 23859 else 23860 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5 23861 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;} 23862 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 23863 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 23864 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 23865 fi 23866 else 23867 input_to_shortpath="$new_path" 23868 fi 23869 23870 # Call helper function which possibly converts this using DOS-style short mode. 23871 # If so, the updated path is stored in $new_path. 23872 new_path="$input_to_shortpath" 23873 23874 input_path="$input_to_shortpath" 23875 # Check if we need to convert this using DOS-style short mode. If the path 23876 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23877 # take no chances and rewrite it. 23878 # Note: m4 eats our [], so we need to use [ and ] instead. 23879 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 23880 if test "x$has_forbidden_chars" != x; then 23881 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23882 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 23883 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 23884 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 23885 # Going to short mode and back again did indeed matter. Since short mode is 23886 # case insensitive, let's make it lowercase to improve readability. 23887 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23888 # Now convert it back to Unix-stile (cygpath) 23889 input_path=`$CYGPATH -u "$shortmode_path"` 23890 new_path="$input_path" 23891 fi 23892 fi 23893 23894 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 23895 if test "x$test_cygdrive_prefix" = x; then 23896 # As a simple fix, exclude /usr/bin since it's not a real path. 23897 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 23898 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 23899 # a path prefixed by /cygdrive for fixpath to work. 23900 new_path="$CYGWIN_ROOT_PATH$input_path" 23901 fi 23902 fi 23903 23904 # remove trailing .exe if any 23905 new_path="${new_path/%.exe/}" 23906 23907 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23908 23909 # First separate the path from the arguments. This will split at the first 23910 # space. 23911 complete="$DUMPBIN" 23912 path="${complete%% *}" 23913 tmp="$complete EOL" 23914 arguments="${tmp#* }" 23915 23916 # Input might be given as Windows format, start by converting to 23917 # unix format. 23918 new_path="$path" 23919 23920 windows_path="$new_path" 23921 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23922 unix_path=`$CYGPATH -u "$windows_path"` 23923 new_path="$unix_path" 23924 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23925 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23926 new_path="$unix_path" 23927 fi 23928 23929 23930 # Now try to locate executable using which 23931 new_path=`$WHICH "$new_path" 2> /dev/null` 23932 23933 if test "x$new_path" = x; then 23934 # Oops. Which didn't find the executable. 23935 # The splitting of arguments from the executable at a space might have been incorrect, 23936 # since paths with space are more likely in Windows. Give it another try with the whole 23937 # argument. 23938 path="$complete" 23939 arguments="EOL" 23940 new_path="$path" 23941 23942 windows_path="$new_path" 23943 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23944 unix_path=`$CYGPATH -u "$windows_path"` 23945 new_path="$unix_path" 23946 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23947 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23948 new_path="$unix_path" 23949 fi 23950 23951 23952 new_path=`$WHICH "$new_path" 2> /dev/null` 23953 23954 if test "x$new_path" = x; then 23955 # It's still not found. Now this is an unrecoverable error. 23956 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 23957 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 23958 has_space=`$ECHO "$complete" | $GREP " "` 23959 if test "x$has_space" != x; then 23960 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 23961 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 23962 fi 23963 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 23964 fi 23965 fi 23966 23967 # Now new_path has a complete unix path to the binary 23968 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 23969 # Keep paths in /bin as-is, but remove trailing .exe if any 23970 new_path="${new_path/%.exe/}" 23971 # Do not save /bin paths to all_fixpath_prefixes! 23972 else 23973 # Not in mixed or Windows style, start by that. 23974 new_path=`cmd //c echo $new_path` 23975 23976 input_path="$new_path" 23977 # Check if we need to convert this using DOS-style short mode. If the path 23978 # contains just simple characters, use it. Otherwise (spaces, weird characters), 23979 # take no chances and rewrite it. 23980 # Note: m4 eats our [], so we need to use [ and ] instead. 23981 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 23982 if test "x$has_forbidden_chars" != x; then 23983 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 23984 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 23985 fi 23986 23987 # Output is in $new_path 23988 23989 windows_path="$new_path" 23990 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 23991 unix_path=`$CYGPATH -u "$windows_path"` 23992 new_path="$unix_path" 23993 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 23994 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 23995 new_path="$unix_path" 23996 fi 23997 23998 # remove trailing .exe if any 23999 new_path="${new_path/%.exe/}" 24000 24001 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24002 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24003 fi 24004 24005 else 24006 # We're on a posix platform. Hooray! :) 24007 # First separate the path from the arguments. This will split at the first 24008 # space. 24009 complete="$DUMPBIN" 24010 path="${complete%% *}" 24011 tmp="$complete EOL" 24012 arguments="${tmp#* }" 24013 24014 # Cannot rely on the command "which" here since it doesn't always work. 24015 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24016 if test -z "$is_absolute_path"; then 24017 # Path to executable is not absolute. Find it. 24018 IFS_save="$IFS" 24019 IFS=: 24020 for p in $PATH; do 24021 if test -f "$p/$path" && test -x "$p/$path"; then 24022 new_path="$p/$path" 24023 break 24024 fi 24025 done 24026 IFS="$IFS_save" 24027 else 24028 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5 24029 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;} 24030 new_path="$path" 24031 fi 24032 24033 if test "x$new_path" = x; then 24034 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 24035 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} 24036 has_space=`$ECHO "$complete" | $GREP " "` 24037 if test "x$has_space" != x; then 24038 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24039 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24040 fi 24041 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 24042 fi 24043 fi 24044 24045 # Now join together the path and the arguments once again 24046 if test "x$arguments" != xEOL; then 24047 new_complete="$new_path ${arguments% *}" 24048 else 24049 new_complete="$new_path" 24050 fi 24051 24052 if test "x$complete" != "x$new_complete"; then 24053 DUMPBIN="$new_complete" 24054 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5 24055 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;} 24056 fi 24057 24058 24059 COMPILER_TYPE=CL 24060 CCXXFLAGS="$CCXXFLAGS -nologo" 24061 24062 fi 24063 24064 24065 24066 ac_ext=c 24067 ac_cpp='$CPP $CPPFLAGS' 24068 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24069 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24070 ac_compiler_gnu=$ac_cv_c_compiler_gnu 24071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 24072 $as_echo_n "checking how to run the C preprocessor... " >&6; } 24073 # On Suns, sometimes $CPP names a directory. 24074 if test -n "$CPP" && test -d "$CPP"; then 24075 CPP= 24076 fi 24077 if test -z "$CPP"; then 24078 if test "${ac_cv_prog_CPP+set}" = set; then : 24079 $as_echo_n "(cached) " >&6 24080 else 24081 # Double quotes because CPP needs to be expanded 24082 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 24083 do 24084 ac_preproc_ok=false 24085 for ac_c_preproc_warn_flag in '' yes 24086 do 24087 # Use a header file that comes with gcc, so configuring glibc 24088 # with a fresh cross-compiler works. 24089 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24090 # <limits.h> exists even on freestanding compilers. 24091 # On the NeXT, cc -E runs the code through the compiler's parser, 24092 # not just through cpp. "Syntax error" is here to catch this case. 24093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24094 /* end confdefs.h. */ 24095 #ifdef __STDC__ 24096 # include <limits.h> 24097 #else 24098 # include <assert.h> 24099 #endif 24100 Syntax error 24101 _ACEOF 24102 if ac_fn_c_try_cpp "$LINENO"; then : 24103 24104 else 24105 # Broken: fails on valid input. 24106 continue 24107 fi 24108 rm -f conftest.err conftest.i conftest.$ac_ext 24109 24110 # OK, works on sane cases. Now check whether nonexistent headers 24111 # can be detected and how. 24112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24113 /* end confdefs.h. */ 24114 #include <ac_nonexistent.h> 24115 _ACEOF 24116 if ac_fn_c_try_cpp "$LINENO"; then : 24117 # Broken: success on invalid input. 24118 continue 24119 else 24120 # Passes both tests. 24121 ac_preproc_ok=: 24122 break 24123 fi 24124 rm -f conftest.err conftest.i conftest.$ac_ext 24125 24126 done 24127 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24128 rm -f conftest.i conftest.err conftest.$ac_ext 24129 if $ac_preproc_ok; then : 24130 break 24131 fi 24132 24133 done 24134 ac_cv_prog_CPP=$CPP 24135 24136 fi 24137 CPP=$ac_cv_prog_CPP 24138 else 24139 ac_cv_prog_CPP=$CPP 24140 fi 24141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 24142 $as_echo "$CPP" >&6; } 24143 ac_preproc_ok=false 24144 for ac_c_preproc_warn_flag in '' yes 24145 do 24146 # Use a header file that comes with gcc, so configuring glibc 24147 # with a fresh cross-compiler works. 24148 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24149 # <limits.h> exists even on freestanding compilers. 24150 # On the NeXT, cc -E runs the code through the compiler's parser, 24151 # not just through cpp. "Syntax error" is here to catch this case. 24152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24153 /* end confdefs.h. */ 24154 #ifdef __STDC__ 24155 # include <limits.h> 24156 #else 24157 # include <assert.h> 24158 #endif 24159 Syntax error 24160 _ACEOF 24161 if ac_fn_c_try_cpp "$LINENO"; then : 24162 24163 else 24164 # Broken: fails on valid input. 24165 continue 24166 fi 24167 rm -f conftest.err conftest.i conftest.$ac_ext 24168 24169 # OK, works on sane cases. Now check whether nonexistent headers 24170 # can be detected and how. 24171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24172 /* end confdefs.h. */ 24173 #include <ac_nonexistent.h> 24174 _ACEOF 24175 if ac_fn_c_try_cpp "$LINENO"; then : 24176 # Broken: success on invalid input. 24177 continue 24178 else 24179 # Passes both tests. 24180 ac_preproc_ok=: 24181 break 24182 fi 24183 rm -f conftest.err conftest.i conftest.$ac_ext 24184 24185 done 24186 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24187 rm -f conftest.i conftest.err conftest.$ac_ext 24188 if $ac_preproc_ok; then : 24189 24190 else 24191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 24192 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 24193 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 24194 See \`config.log' for more details" "$LINENO" 5 ; } 24195 fi 24196 24197 ac_ext=cpp 24198 ac_cpp='$CXXCPP $CPPFLAGS' 24199 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24200 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24201 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24202 24203 24204 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24205 24206 # First separate the path from the arguments. This will split at the first 24207 # space. 24208 complete="$CPP" 24209 path="${complete%% *}" 24210 tmp="$complete EOL" 24211 arguments="${tmp#* }" 24212 24213 # Input might be given as Windows format, start by converting to 24214 # unix format. 24215 new_path=`$CYGPATH -u "$path"` 24216 24217 # Now try to locate executable using which 24218 new_path=`$WHICH "$new_path" 2> /dev/null` 24219 # bat and cmd files are not always considered executable in cygwin causing which 24220 # to not find them 24221 if test "x$new_path" = x \ 24222 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24223 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24224 new_path=`$CYGPATH -u "$path"` 24225 fi 24226 if test "x$new_path" = x; then 24227 # Oops. Which didn't find the executable. 24228 # The splitting of arguments from the executable at a space might have been incorrect, 24229 # since paths with space are more likely in Windows. Give it another try with the whole 24230 # argument. 24231 path="$complete" 24232 arguments="EOL" 24233 new_path=`$CYGPATH -u "$path"` 24234 new_path=`$WHICH "$new_path" 2> /dev/null` 24235 # bat and cmd files are not always considered executable in cygwin causing which 24236 # to not find them 24237 if test "x$new_path" = x \ 24238 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24239 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24240 new_path=`$CYGPATH -u "$path"` 24241 fi 24242 if test "x$new_path" = x; then 24243 # It's still not found. Now this is an unrecoverable error. 24244 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24245 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24246 has_space=`$ECHO "$complete" | $GREP " "` 24247 if test "x$has_space" != x; then 24248 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24249 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24250 fi 24251 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24252 fi 24253 fi 24254 24255 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24256 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24257 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24258 # "foo.exe" is OK but "foo" is an error. 24259 # 24260 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24261 # It is also a way to make sure we got the proper file name for the real test later on. 24262 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24263 if test "x$test_shortpath" = x; then 24264 # Short path failed, file does not exist as specified. 24265 # Try adding .exe or .cmd 24266 if test -f "${new_path}.exe"; then 24267 input_to_shortpath="${new_path}.exe" 24268 elif test -f "${new_path}.cmd"; then 24269 input_to_shortpath="${new_path}.cmd" 24270 else 24271 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5 24272 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;} 24273 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24274 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24275 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24276 fi 24277 else 24278 input_to_shortpath="$new_path" 24279 fi 24280 24281 # Call helper function which possibly converts this using DOS-style short mode. 24282 # If so, the updated path is stored in $new_path. 24283 new_path="$input_to_shortpath" 24284 24285 input_path="$input_to_shortpath" 24286 # Check if we need to convert this using DOS-style short mode. If the path 24287 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24288 # take no chances and rewrite it. 24289 # Note: m4 eats our [], so we need to use [ and ] instead. 24290 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24291 if test "x$has_forbidden_chars" != x; then 24292 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24293 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24294 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24295 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24296 # Going to short mode and back again did indeed matter. Since short mode is 24297 # case insensitive, let's make it lowercase to improve readability. 24298 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24299 # Now convert it back to Unix-stile (cygpath) 24300 input_path=`$CYGPATH -u "$shortmode_path"` 24301 new_path="$input_path" 24302 fi 24303 fi 24304 24305 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24306 if test "x$test_cygdrive_prefix" = x; then 24307 # As a simple fix, exclude /usr/bin since it's not a real path. 24308 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24309 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24310 # a path prefixed by /cygdrive for fixpath to work. 24311 new_path="$CYGWIN_ROOT_PATH$input_path" 24312 fi 24313 fi 24314 24315 # remove trailing .exe if any 24316 new_path="${new_path/%.exe/}" 24317 24318 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24319 24320 # First separate the path from the arguments. This will split at the first 24321 # space. 24322 complete="$CPP" 24323 path="${complete%% *}" 24324 tmp="$complete EOL" 24325 arguments="${tmp#* }" 24326 24327 # Input might be given as Windows format, start by converting to 24328 # unix format. 24329 new_path="$path" 24330 24331 windows_path="$new_path" 24332 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24333 unix_path=`$CYGPATH -u "$windows_path"` 24334 new_path="$unix_path" 24335 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24336 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24337 new_path="$unix_path" 24338 fi 24339 24340 24341 # Now try to locate executable using which 24342 new_path=`$WHICH "$new_path" 2> /dev/null` 24343 24344 if test "x$new_path" = x; then 24345 # Oops. Which didn't find the executable. 24346 # The splitting of arguments from the executable at a space might have been incorrect, 24347 # since paths with space are more likely in Windows. Give it another try with the whole 24348 # argument. 24349 path="$complete" 24350 arguments="EOL" 24351 new_path="$path" 24352 24353 windows_path="$new_path" 24354 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24355 unix_path=`$CYGPATH -u "$windows_path"` 24356 new_path="$unix_path" 24357 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24358 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24359 new_path="$unix_path" 24360 fi 24361 24362 24363 new_path=`$WHICH "$new_path" 2> /dev/null` 24364 24365 if test "x$new_path" = x; then 24366 # It's still not found. Now this is an unrecoverable error. 24367 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24368 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24369 has_space=`$ECHO "$complete" | $GREP " "` 24370 if test "x$has_space" != x; then 24371 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24372 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24373 fi 24374 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24375 fi 24376 fi 24377 24378 # Now new_path has a complete unix path to the binary 24379 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24380 # Keep paths in /bin as-is, but remove trailing .exe if any 24381 new_path="${new_path/%.exe/}" 24382 # Do not save /bin paths to all_fixpath_prefixes! 24383 else 24384 # Not in mixed or Windows style, start by that. 24385 new_path=`cmd //c echo $new_path` 24386 24387 input_path="$new_path" 24388 # Check if we need to convert this using DOS-style short mode. If the path 24389 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24390 # take no chances and rewrite it. 24391 # Note: m4 eats our [], so we need to use [ and ] instead. 24392 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24393 if test "x$has_forbidden_chars" != x; then 24394 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24395 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24396 fi 24397 24398 # Output is in $new_path 24399 24400 windows_path="$new_path" 24401 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24402 unix_path=`$CYGPATH -u "$windows_path"` 24403 new_path="$unix_path" 24404 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24405 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24406 new_path="$unix_path" 24407 fi 24408 24409 # remove trailing .exe if any 24410 new_path="${new_path/%.exe/}" 24411 24412 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24413 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24414 fi 24415 24416 else 24417 # We're on a posix platform. Hooray! :) 24418 # First separate the path from the arguments. This will split at the first 24419 # space. 24420 complete="$CPP" 24421 path="${complete%% *}" 24422 tmp="$complete EOL" 24423 arguments="${tmp#* }" 24424 24425 # Cannot rely on the command "which" here since it doesn't always work. 24426 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24427 if test -z "$is_absolute_path"; then 24428 # Path to executable is not absolute. Find it. 24429 IFS_save="$IFS" 24430 IFS=: 24431 for p in $PATH; do 24432 if test -f "$p/$path" && test -x "$p/$path"; then 24433 new_path="$p/$path" 24434 break 24435 fi 24436 done 24437 IFS="$IFS_save" 24438 else 24439 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5 24440 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;} 24441 new_path="$path" 24442 fi 24443 24444 if test "x$new_path" = x; then 24445 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 24446 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} 24447 has_space=`$ECHO "$complete" | $GREP " "` 24448 if test "x$has_space" != x; then 24449 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24450 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24451 fi 24452 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 24453 fi 24454 fi 24455 24456 # Now join together the path and the arguments once again 24457 if test "x$arguments" != xEOL; then 24458 new_complete="$new_path ${arguments% *}" 24459 else 24460 new_complete="$new_path" 24461 fi 24462 24463 if test "x$complete" != "x$new_complete"; then 24464 CPP="$new_complete" 24465 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5 24466 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;} 24467 fi 24468 24469 24470 ac_ext=cpp 24471 ac_cpp='$CXXCPP $CPPFLAGS' 24472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 24476 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } 24477 if test -z "$CXXCPP"; then 24478 if test "${ac_cv_prog_CXXCPP+set}" = set; then : 24479 $as_echo_n "(cached) " >&6 24480 else 24481 # Double quotes because CXXCPP needs to be expanded 24482 for CXXCPP in "$CXX -E" "/lib/cpp" 24483 do 24484 ac_preproc_ok=false 24485 for ac_cxx_preproc_warn_flag in '' yes 24486 do 24487 # Use a header file that comes with gcc, so configuring glibc 24488 # with a fresh cross-compiler works. 24489 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24490 # <limits.h> exists even on freestanding compilers. 24491 # On the NeXT, cc -E runs the code through the compiler's parser, 24492 # not just through cpp. "Syntax error" is here to catch this case. 24493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24494 /* end confdefs.h. */ 24495 #ifdef __STDC__ 24496 # include <limits.h> 24497 #else 24498 # include <assert.h> 24499 #endif 24500 Syntax error 24501 _ACEOF 24502 if ac_fn_cxx_try_cpp "$LINENO"; then : 24503 24504 else 24505 # Broken: fails on valid input. 24506 continue 24507 fi 24508 rm -f conftest.err conftest.i conftest.$ac_ext 24509 24510 # OK, works on sane cases. Now check whether nonexistent headers 24511 # can be detected and how. 24512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24513 /* end confdefs.h. */ 24514 #include <ac_nonexistent.h> 24515 _ACEOF 24516 if ac_fn_cxx_try_cpp "$LINENO"; then : 24517 # Broken: success on invalid input. 24518 continue 24519 else 24520 # Passes both tests. 24521 ac_preproc_ok=: 24522 break 24523 fi 24524 rm -f conftest.err conftest.i conftest.$ac_ext 24525 24526 done 24527 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24528 rm -f conftest.i conftest.err conftest.$ac_ext 24529 if $ac_preproc_ok; then : 24530 break 24531 fi 24532 24533 done 24534 ac_cv_prog_CXXCPP=$CXXCPP 24535 24536 fi 24537 CXXCPP=$ac_cv_prog_CXXCPP 24538 else 24539 ac_cv_prog_CXXCPP=$CXXCPP 24540 fi 24541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 24542 $as_echo "$CXXCPP" >&6; } 24543 ac_preproc_ok=false 24544 for ac_cxx_preproc_warn_flag in '' yes 24545 do 24546 # Use a header file that comes with gcc, so configuring glibc 24547 # with a fresh cross-compiler works. 24548 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 24549 # <limits.h> exists even on freestanding compilers. 24550 # On the NeXT, cc -E runs the code through the compiler's parser, 24551 # not just through cpp. "Syntax error" is here to catch this case. 24552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24553 /* end confdefs.h. */ 24554 #ifdef __STDC__ 24555 # include <limits.h> 24556 #else 24557 # include <assert.h> 24558 #endif 24559 Syntax error 24560 _ACEOF 24561 if ac_fn_cxx_try_cpp "$LINENO"; then : 24562 24563 else 24564 # Broken: fails on valid input. 24565 continue 24566 fi 24567 rm -f conftest.err conftest.i conftest.$ac_ext 24568 24569 # OK, works on sane cases. Now check whether nonexistent headers 24570 # can be detected and how. 24571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24572 /* end confdefs.h. */ 24573 #include <ac_nonexistent.h> 24574 _ACEOF 24575 if ac_fn_cxx_try_cpp "$LINENO"; then : 24576 # Broken: success on invalid input. 24577 continue 24578 else 24579 # Passes both tests. 24580 ac_preproc_ok=: 24581 break 24582 fi 24583 rm -f conftest.err conftest.i conftest.$ac_ext 24584 24585 done 24586 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 24587 rm -f conftest.i conftest.err conftest.$ac_ext 24588 if $ac_preproc_ok; then : 24589 24590 else 24591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 24592 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 24593 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check 24594 See \`config.log' for more details" "$LINENO" 5 ; } 24595 fi 24596 24597 ac_ext=cpp 24598 ac_cpp='$CXXCPP $CPPFLAGS' 24599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 24600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 24601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 24602 24603 24604 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24605 24606 # First separate the path from the arguments. This will split at the first 24607 # space. 24608 complete="$CXXCPP" 24609 path="${complete%% *}" 24610 tmp="$complete EOL" 24611 arguments="${tmp#* }" 24612 24613 # Input might be given as Windows format, start by converting to 24614 # unix format. 24615 new_path=`$CYGPATH -u "$path"` 24616 24617 # Now try to locate executable using which 24618 new_path=`$WHICH "$new_path" 2> /dev/null` 24619 # bat and cmd files are not always considered executable in cygwin causing which 24620 # to not find them 24621 if test "x$new_path" = x \ 24622 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24623 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24624 new_path=`$CYGPATH -u "$path"` 24625 fi 24626 if test "x$new_path" = x; then 24627 # Oops. Which didn't find the executable. 24628 # The splitting of arguments from the executable at a space might have been incorrect, 24629 # since paths with space are more likely in Windows. Give it another try with the whole 24630 # argument. 24631 path="$complete" 24632 arguments="EOL" 24633 new_path=`$CYGPATH -u "$path"` 24634 new_path=`$WHICH "$new_path" 2> /dev/null` 24635 # bat and cmd files are not always considered executable in cygwin causing which 24636 # to not find them 24637 if test "x$new_path" = x \ 24638 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24639 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24640 new_path=`$CYGPATH -u "$path"` 24641 fi 24642 if test "x$new_path" = x; then 24643 # It's still not found. Now this is an unrecoverable error. 24644 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 24645 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 24646 has_space=`$ECHO "$complete" | $GREP " "` 24647 if test "x$has_space" != x; then 24648 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24649 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24650 fi 24651 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24652 fi 24653 fi 24654 24655 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24656 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24657 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24658 # "foo.exe" is OK but "foo" is an error. 24659 # 24660 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24661 # It is also a way to make sure we got the proper file name for the real test later on. 24662 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24663 if test "x$test_shortpath" = x; then 24664 # Short path failed, file does not exist as specified. 24665 # Try adding .exe or .cmd 24666 if test -f "${new_path}.exe"; then 24667 input_to_shortpath="${new_path}.exe" 24668 elif test -f "${new_path}.cmd"; then 24669 input_to_shortpath="${new_path}.cmd" 24670 else 24671 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5 24672 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;} 24673 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 24674 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 24675 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24676 fi 24677 else 24678 input_to_shortpath="$new_path" 24679 fi 24680 24681 # Call helper function which possibly converts this using DOS-style short mode. 24682 # If so, the updated path is stored in $new_path. 24683 new_path="$input_to_shortpath" 24684 24685 input_path="$input_to_shortpath" 24686 # Check if we need to convert this using DOS-style short mode. If the path 24687 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24688 # take no chances and rewrite it. 24689 # Note: m4 eats our [], so we need to use [ and ] instead. 24690 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 24691 if test "x$has_forbidden_chars" != x; then 24692 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24693 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 24694 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 24695 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 24696 # Going to short mode and back again did indeed matter. Since short mode is 24697 # case insensitive, let's make it lowercase to improve readability. 24698 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24699 # Now convert it back to Unix-stile (cygpath) 24700 input_path=`$CYGPATH -u "$shortmode_path"` 24701 new_path="$input_path" 24702 fi 24703 fi 24704 24705 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 24706 if test "x$test_cygdrive_prefix" = x; then 24707 # As a simple fix, exclude /usr/bin since it's not a real path. 24708 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 24709 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 24710 # a path prefixed by /cygdrive for fixpath to work. 24711 new_path="$CYGWIN_ROOT_PATH$input_path" 24712 fi 24713 fi 24714 24715 # remove trailing .exe if any 24716 new_path="${new_path/%.exe/}" 24717 24718 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24719 24720 # First separate the path from the arguments. This will split at the first 24721 # space. 24722 complete="$CXXCPP" 24723 path="${complete%% *}" 24724 tmp="$complete EOL" 24725 arguments="${tmp#* }" 24726 24727 # Input might be given as Windows format, start by converting to 24728 # unix format. 24729 new_path="$path" 24730 24731 windows_path="$new_path" 24732 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24733 unix_path=`$CYGPATH -u "$windows_path"` 24734 new_path="$unix_path" 24735 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24736 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24737 new_path="$unix_path" 24738 fi 24739 24740 24741 # Now try to locate executable using which 24742 new_path=`$WHICH "$new_path" 2> /dev/null` 24743 24744 if test "x$new_path" = x; then 24745 # Oops. Which didn't find the executable. 24746 # The splitting of arguments from the executable at a space might have been incorrect, 24747 # since paths with space are more likely in Windows. Give it another try with the whole 24748 # argument. 24749 path="$complete" 24750 arguments="EOL" 24751 new_path="$path" 24752 24753 windows_path="$new_path" 24754 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24755 unix_path=`$CYGPATH -u "$windows_path"` 24756 new_path="$unix_path" 24757 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24758 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24759 new_path="$unix_path" 24760 fi 24761 24762 24763 new_path=`$WHICH "$new_path" 2> /dev/null` 24764 24765 if test "x$new_path" = x; then 24766 # It's still not found. Now this is an unrecoverable error. 24767 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 24768 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 24769 has_space=`$ECHO "$complete" | $GREP " "` 24770 if test "x$has_space" != x; then 24771 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24772 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24773 fi 24774 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24775 fi 24776 fi 24777 24778 # Now new_path has a complete unix path to the binary 24779 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 24780 # Keep paths in /bin as-is, but remove trailing .exe if any 24781 new_path="${new_path/%.exe/}" 24782 # Do not save /bin paths to all_fixpath_prefixes! 24783 else 24784 # Not in mixed or Windows style, start by that. 24785 new_path=`cmd //c echo $new_path` 24786 24787 input_path="$new_path" 24788 # Check if we need to convert this using DOS-style short mode. If the path 24789 # contains just simple characters, use it. Otherwise (spaces, weird characters), 24790 # take no chances and rewrite it. 24791 # Note: m4 eats our [], so we need to use [ and ] instead. 24792 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 24793 if test "x$has_forbidden_chars" != x; then 24794 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 24795 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 24796 fi 24797 24798 # Output is in $new_path 24799 24800 windows_path="$new_path" 24801 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24802 unix_path=`$CYGPATH -u "$windows_path"` 24803 new_path="$unix_path" 24804 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 24805 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 24806 new_path="$unix_path" 24807 fi 24808 24809 # remove trailing .exe if any 24810 new_path="${new_path/%.exe/}" 24811 24812 # Save the first 10 bytes of this path to the storage, so fixpath can work. 24813 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 24814 fi 24815 24816 else 24817 # We're on a posix platform. Hooray! :) 24818 # First separate the path from the arguments. This will split at the first 24819 # space. 24820 complete="$CXXCPP" 24821 path="${complete%% *}" 24822 tmp="$complete EOL" 24823 arguments="${tmp#* }" 24824 24825 # Cannot rely on the command "which" here since it doesn't always work. 24826 is_absolute_path=`$ECHO "$path" | $GREP ^/` 24827 if test -z "$is_absolute_path"; then 24828 # Path to executable is not absolute. Find it. 24829 IFS_save="$IFS" 24830 IFS=: 24831 for p in $PATH; do 24832 if test -f "$p/$path" && test -x "$p/$path"; then 24833 new_path="$p/$path" 24834 break 24835 fi 24836 done 24837 IFS="$IFS_save" 24838 else 24839 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5 24840 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;} 24841 new_path="$path" 24842 fi 24843 24844 if test "x$new_path" = x; then 24845 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 24846 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} 24847 has_space=`$ECHO "$complete" | $GREP " "` 24848 if test "x$has_space" != x; then 24849 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 24850 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 24851 fi 24852 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 24853 fi 24854 fi 24855 24856 # Now join together the path and the arguments once again 24857 if test "x$arguments" != xEOL; then 24858 new_complete="$new_path ${arguments% *}" 24859 else 24860 new_complete="$new_path" 24861 fi 24862 24863 if test "x$complete" != "x$new_complete"; then 24864 CXXCPP="$new_complete" 24865 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5 24866 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;} 24867 fi 24868 24869 24870 if test "x$COMPILE_TYPE" != "xcross"; then 24871 # If we are not cross compiling, use the same compilers for 24872 # building the build platform executables. The cross-compilation 24873 # case needed to be done earlier, but this can only be done after 24874 # the native tools have been localized. 24875 BUILD_CC="$CC" 24876 BUILD_CXX="$CXX" 24877 BUILD_LD="$LD" 24878 fi 24879 24880 # for solaris we really need solaris tools, and not gnu equivalent 24881 # these seems to normally reside in /usr/ccs/bin so add that to path before 24882 # starting to probe 24883 # 24884 # NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH 24885 # so that it can be overriden --with-tools-dir 24886 if test "x$OPENJDK_BUILD_OS" = xsolaris; then 24887 PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" 24888 fi 24889 24890 # Find the right assembler. 24891 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 24892 # Extract the first word of "as", so it can be a program name with args. 24893 set dummy as; ac_word=$2 24894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 24895 $as_echo_n "checking for $ac_word... " >&6; } 24896 if test "${ac_cv_path_AS+set}" = set; then : 24897 $as_echo_n "(cached) " >&6 24898 else 24899 case $AS in 24900 [\\/]* | ?:[\\/]*) 24901 ac_cv_path_AS="$AS" # Let the user override the test with a path. 24902 ;; 24903 *) 24904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 24905 for as_dir in $PATH 24906 do 24907 IFS=$as_save_IFS 24908 test -z "$as_dir" && as_dir=. 24909 for ac_exec_ext in '' $ac_executable_extensions; do 24910 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 24911 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" 24912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 24913 break 2 24914 fi 24915 done 24916 done 24917 IFS=$as_save_IFS 24918 24919 ;; 24920 esac 24921 fi 24922 AS=$ac_cv_path_AS 24923 if test -n "$AS"; then 24924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 24925 $as_echo "$AS" >&6; } 24926 else 24927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 24928 $as_echo "no" >&6; } 24929 fi 24930 24931 24932 24933 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 24934 24935 # First separate the path from the arguments. This will split at the first 24936 # space. 24937 complete="$AS" 24938 path="${complete%% *}" 24939 tmp="$complete EOL" 24940 arguments="${tmp#* }" 24941 24942 # Input might be given as Windows format, start by converting to 24943 # unix format. 24944 new_path=`$CYGPATH -u "$path"` 24945 24946 # Now try to locate executable using which 24947 new_path=`$WHICH "$new_path" 2> /dev/null` 24948 # bat and cmd files are not always considered executable in cygwin causing which 24949 # to not find them 24950 if test "x$new_path" = x \ 24951 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24952 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24953 new_path=`$CYGPATH -u "$path"` 24954 fi 24955 if test "x$new_path" = x; then 24956 # Oops. Which didn't find the executable. 24957 # The splitting of arguments from the executable at a space might have been incorrect, 24958 # since paths with space are more likely in Windows. Give it another try with the whole 24959 # argument. 24960 path="$complete" 24961 arguments="EOL" 24962 new_path=`$CYGPATH -u "$path"` 24963 new_path=`$WHICH "$new_path" 2> /dev/null` 24964 # bat and cmd files are not always considered executable in cygwin causing which 24965 # to not find them 24966 if test "x$new_path" = x \ 24967 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 24968 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 24969 new_path=`$CYGPATH -u "$path"` 24970 fi 24971 if test "x$new_path" = x; then 24972 # It's still not found. Now this is an unrecoverable error. 24973 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 24974 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 24975 has_space=`$ECHO "$complete" | $GREP " "` 24976 if test "x$has_space" != x; then 24977 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 24978 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 24979 fi 24980 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 24981 fi 24982 fi 24983 24984 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 24985 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 24986 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 24987 # "foo.exe" is OK but "foo" is an error. 24988 # 24989 # This test is therefore slightly more accurate than "test -f" to check for file precense. 24990 # It is also a way to make sure we got the proper file name for the real test later on. 24991 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 24992 if test "x$test_shortpath" = x; then 24993 # Short path failed, file does not exist as specified. 24994 # Try adding .exe or .cmd 24995 if test -f "${new_path}.exe"; then 24996 input_to_shortpath="${new_path}.exe" 24997 elif test -f "${new_path}.cmd"; then 24998 input_to_shortpath="${new_path}.cmd" 24999 else 25000 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5 25001 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;} 25002 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25003 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25004 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25005 fi 25006 else 25007 input_to_shortpath="$new_path" 25008 fi 25009 25010 # Call helper function which possibly converts this using DOS-style short mode. 25011 # If so, the updated path is stored in $new_path. 25012 new_path="$input_to_shortpath" 25013 25014 input_path="$input_to_shortpath" 25015 # Check if we need to convert this using DOS-style short mode. If the path 25016 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25017 # take no chances and rewrite it. 25018 # Note: m4 eats our [], so we need to use [ and ] instead. 25019 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25020 if test "x$has_forbidden_chars" != x; then 25021 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25022 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25023 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25024 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25025 # Going to short mode and back again did indeed matter. Since short mode is 25026 # case insensitive, let's make it lowercase to improve readability. 25027 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25028 # Now convert it back to Unix-stile (cygpath) 25029 input_path=`$CYGPATH -u "$shortmode_path"` 25030 new_path="$input_path" 25031 fi 25032 fi 25033 25034 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25035 if test "x$test_cygdrive_prefix" = x; then 25036 # As a simple fix, exclude /usr/bin since it's not a real path. 25037 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25038 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25039 # a path prefixed by /cygdrive for fixpath to work. 25040 new_path="$CYGWIN_ROOT_PATH$input_path" 25041 fi 25042 fi 25043 25044 # remove trailing .exe if any 25045 new_path="${new_path/%.exe/}" 25046 25047 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25048 25049 # First separate the path from the arguments. This will split at the first 25050 # space. 25051 complete="$AS" 25052 path="${complete%% *}" 25053 tmp="$complete EOL" 25054 arguments="${tmp#* }" 25055 25056 # Input might be given as Windows format, start by converting to 25057 # unix format. 25058 new_path="$path" 25059 25060 windows_path="$new_path" 25061 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25062 unix_path=`$CYGPATH -u "$windows_path"` 25063 new_path="$unix_path" 25064 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25065 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25066 new_path="$unix_path" 25067 fi 25068 25069 25070 # Now try to locate executable using which 25071 new_path=`$WHICH "$new_path" 2> /dev/null` 25072 25073 if test "x$new_path" = x; then 25074 # Oops. Which didn't find the executable. 25075 # The splitting of arguments from the executable at a space might have been incorrect, 25076 # since paths with space are more likely in Windows. Give it another try with the whole 25077 # argument. 25078 path="$complete" 25079 arguments="EOL" 25080 new_path="$path" 25081 25082 windows_path="$new_path" 25083 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25084 unix_path=`$CYGPATH -u "$windows_path"` 25085 new_path="$unix_path" 25086 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25087 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25088 new_path="$unix_path" 25089 fi 25090 25091 25092 new_path=`$WHICH "$new_path" 2> /dev/null` 25093 25094 if test "x$new_path" = x; then 25095 # It's still not found. Now this is an unrecoverable error. 25096 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25097 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25098 has_space=`$ECHO "$complete" | $GREP " "` 25099 if test "x$has_space" != x; then 25100 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25101 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25102 fi 25103 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25104 fi 25105 fi 25106 25107 # Now new_path has a complete unix path to the binary 25108 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25109 # Keep paths in /bin as-is, but remove trailing .exe if any 25110 new_path="${new_path/%.exe/}" 25111 # Do not save /bin paths to all_fixpath_prefixes! 25112 else 25113 # Not in mixed or Windows style, start by that. 25114 new_path=`cmd //c echo $new_path` 25115 25116 input_path="$new_path" 25117 # Check if we need to convert this using DOS-style short mode. If the path 25118 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25119 # take no chances and rewrite it. 25120 # Note: m4 eats our [], so we need to use [ and ] instead. 25121 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25122 if test "x$has_forbidden_chars" != x; then 25123 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25124 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25125 fi 25126 25127 # Output is in $new_path 25128 25129 windows_path="$new_path" 25130 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25131 unix_path=`$CYGPATH -u "$windows_path"` 25132 new_path="$unix_path" 25133 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25134 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25135 new_path="$unix_path" 25136 fi 25137 25138 # remove trailing .exe if any 25139 new_path="${new_path/%.exe/}" 25140 25141 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25142 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25143 fi 25144 25145 else 25146 # We're on a posix platform. Hooray! :) 25147 # First separate the path from the arguments. This will split at the first 25148 # space. 25149 complete="$AS" 25150 path="${complete%% *}" 25151 tmp="$complete EOL" 25152 arguments="${tmp#* }" 25153 25154 # Cannot rely on the command "which" here since it doesn't always work. 25155 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25156 if test -z "$is_absolute_path"; then 25157 # Path to executable is not absolute. Find it. 25158 IFS_save="$IFS" 25159 IFS=: 25160 for p in $PATH; do 25161 if test -f "$p/$path" && test -x "$p/$path"; then 25162 new_path="$p/$path" 25163 break 25164 fi 25165 done 25166 IFS="$IFS_save" 25167 else 25168 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5 25169 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;} 25170 new_path="$path" 25171 fi 25172 25173 if test "x$new_path" = x; then 25174 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 25175 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} 25176 has_space=`$ECHO "$complete" | $GREP " "` 25177 if test "x$has_space" != x; then 25178 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25179 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25180 fi 25181 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 25182 fi 25183 fi 25184 25185 # Now join together the path and the arguments once again 25186 if test "x$arguments" != xEOL; then 25187 new_complete="$new_path ${arguments% *}" 25188 else 25189 new_complete="$new_path" 25190 fi 25191 25192 if test "x$complete" != "x$new_complete"; then 25193 AS="$new_complete" 25194 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5 25195 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;} 25196 fi 25197 25198 else 25199 AS="$CC -c" 25200 fi 25201 25202 25203 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 25204 # Extract the first word of "nm", so it can be a program name with args. 25205 set dummy nm; ac_word=$2 25206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25207 $as_echo_n "checking for $ac_word... " >&6; } 25208 if test "${ac_cv_path_NM+set}" = set; then : 25209 $as_echo_n "(cached) " >&6 25210 else 25211 case $NM in 25212 [\\/]* | ?:[\\/]*) 25213 ac_cv_path_NM="$NM" # Let the user override the test with a path. 25214 ;; 25215 *) 25216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25217 for as_dir in $PATH 25218 do 25219 IFS=$as_save_IFS 25220 test -z "$as_dir" && as_dir=. 25221 for ac_exec_ext in '' $ac_executable_extensions; do 25222 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25223 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" 25224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25225 break 2 25226 fi 25227 done 25228 done 25229 IFS=$as_save_IFS 25230 25231 ;; 25232 esac 25233 fi 25234 NM=$ac_cv_path_NM 25235 if test -n "$NM"; then 25236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 25237 $as_echo "$NM" >&6; } 25238 else 25239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25240 $as_echo "no" >&6; } 25241 fi 25242 25243 25244 25245 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25246 25247 # First separate the path from the arguments. This will split at the first 25248 # space. 25249 complete="$NM" 25250 path="${complete%% *}" 25251 tmp="$complete EOL" 25252 arguments="${tmp#* }" 25253 25254 # Input might be given as Windows format, start by converting to 25255 # unix format. 25256 new_path=`$CYGPATH -u "$path"` 25257 25258 # Now try to locate executable using which 25259 new_path=`$WHICH "$new_path" 2> /dev/null` 25260 # bat and cmd files are not always considered executable in cygwin causing which 25261 # to not find them 25262 if test "x$new_path" = x \ 25263 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25264 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25265 new_path=`$CYGPATH -u "$path"` 25266 fi 25267 if test "x$new_path" = x; then 25268 # Oops. Which didn't find the executable. 25269 # The splitting of arguments from the executable at a space might have been incorrect, 25270 # since paths with space are more likely in Windows. Give it another try with the whole 25271 # argument. 25272 path="$complete" 25273 arguments="EOL" 25274 new_path=`$CYGPATH -u "$path"` 25275 new_path=`$WHICH "$new_path" 2> /dev/null` 25276 # bat and cmd files are not always considered executable in cygwin causing which 25277 # to not find them 25278 if test "x$new_path" = x \ 25279 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25280 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25281 new_path=`$CYGPATH -u "$path"` 25282 fi 25283 if test "x$new_path" = x; then 25284 # It's still not found. Now this is an unrecoverable error. 25285 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25286 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25287 has_space=`$ECHO "$complete" | $GREP " "` 25288 if test "x$has_space" != x; then 25289 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25290 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25291 fi 25292 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25293 fi 25294 fi 25295 25296 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25297 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25298 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25299 # "foo.exe" is OK but "foo" is an error. 25300 # 25301 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25302 # It is also a way to make sure we got the proper file name for the real test later on. 25303 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25304 if test "x$test_shortpath" = x; then 25305 # Short path failed, file does not exist as specified. 25306 # Try adding .exe or .cmd 25307 if test -f "${new_path}.exe"; then 25308 input_to_shortpath="${new_path}.exe" 25309 elif test -f "${new_path}.cmd"; then 25310 input_to_shortpath="${new_path}.cmd" 25311 else 25312 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 25313 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} 25314 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25315 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25316 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25317 fi 25318 else 25319 input_to_shortpath="$new_path" 25320 fi 25321 25322 # Call helper function which possibly converts this using DOS-style short mode. 25323 # If so, the updated path is stored in $new_path. 25324 new_path="$input_to_shortpath" 25325 25326 input_path="$input_to_shortpath" 25327 # Check if we need to convert this using DOS-style short mode. If the path 25328 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25329 # take no chances and rewrite it. 25330 # Note: m4 eats our [], so we need to use [ and ] instead. 25331 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25332 if test "x$has_forbidden_chars" != x; then 25333 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25334 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25335 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25336 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25337 # Going to short mode and back again did indeed matter. Since short mode is 25338 # case insensitive, let's make it lowercase to improve readability. 25339 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25340 # Now convert it back to Unix-stile (cygpath) 25341 input_path=`$CYGPATH -u "$shortmode_path"` 25342 new_path="$input_path" 25343 fi 25344 fi 25345 25346 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25347 if test "x$test_cygdrive_prefix" = x; then 25348 # As a simple fix, exclude /usr/bin since it's not a real path. 25349 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25350 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25351 # a path prefixed by /cygdrive for fixpath to work. 25352 new_path="$CYGWIN_ROOT_PATH$input_path" 25353 fi 25354 fi 25355 25356 # remove trailing .exe if any 25357 new_path="${new_path/%.exe/}" 25358 25359 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25360 25361 # First separate the path from the arguments. This will split at the first 25362 # space. 25363 complete="$NM" 25364 path="${complete%% *}" 25365 tmp="$complete EOL" 25366 arguments="${tmp#* }" 25367 25368 # Input might be given as Windows format, start by converting to 25369 # unix format. 25370 new_path="$path" 25371 25372 windows_path="$new_path" 25373 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25374 unix_path=`$CYGPATH -u "$windows_path"` 25375 new_path="$unix_path" 25376 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25377 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25378 new_path="$unix_path" 25379 fi 25380 25381 25382 # Now try to locate executable using which 25383 new_path=`$WHICH "$new_path" 2> /dev/null` 25384 25385 if test "x$new_path" = x; then 25386 # Oops. Which didn't find the executable. 25387 # The splitting of arguments from the executable at a space might have been incorrect, 25388 # since paths with space are more likely in Windows. Give it another try with the whole 25389 # argument. 25390 path="$complete" 25391 arguments="EOL" 25392 new_path="$path" 25393 25394 windows_path="$new_path" 25395 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25396 unix_path=`$CYGPATH -u "$windows_path"` 25397 new_path="$unix_path" 25398 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25399 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25400 new_path="$unix_path" 25401 fi 25402 25403 25404 new_path=`$WHICH "$new_path" 2> /dev/null` 25405 25406 if test "x$new_path" = x; then 25407 # It's still not found. Now this is an unrecoverable error. 25408 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25409 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25410 has_space=`$ECHO "$complete" | $GREP " "` 25411 if test "x$has_space" != x; then 25412 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25414 fi 25415 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25416 fi 25417 fi 25418 25419 # Now new_path has a complete unix path to the binary 25420 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25421 # Keep paths in /bin as-is, but remove trailing .exe if any 25422 new_path="${new_path/%.exe/}" 25423 # Do not save /bin paths to all_fixpath_prefixes! 25424 else 25425 # Not in mixed or Windows style, start by that. 25426 new_path=`cmd //c echo $new_path` 25427 25428 input_path="$new_path" 25429 # Check if we need to convert this using DOS-style short mode. If the path 25430 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25431 # take no chances and rewrite it. 25432 # Note: m4 eats our [], so we need to use [ and ] instead. 25433 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25434 if test "x$has_forbidden_chars" != x; then 25435 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25436 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25437 fi 25438 25439 # Output is in $new_path 25440 25441 windows_path="$new_path" 25442 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25443 unix_path=`$CYGPATH -u "$windows_path"` 25444 new_path="$unix_path" 25445 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25446 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25447 new_path="$unix_path" 25448 fi 25449 25450 # remove trailing .exe if any 25451 new_path="${new_path/%.exe/}" 25452 25453 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25454 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25455 fi 25456 25457 else 25458 # We're on a posix platform. Hooray! :) 25459 # First separate the path from the arguments. This will split at the first 25460 # space. 25461 complete="$NM" 25462 path="${complete%% *}" 25463 tmp="$complete EOL" 25464 arguments="${tmp#* }" 25465 25466 # Cannot rely on the command "which" here since it doesn't always work. 25467 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25468 if test -z "$is_absolute_path"; then 25469 # Path to executable is not absolute. Find it. 25470 IFS_save="$IFS" 25471 IFS=: 25472 for p in $PATH; do 25473 if test -f "$p/$path" && test -x "$p/$path"; then 25474 new_path="$p/$path" 25475 break 25476 fi 25477 done 25478 IFS="$IFS_save" 25479 else 25480 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 25481 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} 25482 new_path="$path" 25483 fi 25484 25485 if test "x$new_path" = x; then 25486 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 25487 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 25488 has_space=`$ECHO "$complete" | $GREP " "` 25489 if test "x$has_space" != x; then 25490 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25491 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25492 fi 25493 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 25494 fi 25495 fi 25496 25497 # Now join together the path and the arguments once again 25498 if test "x$arguments" != xEOL; then 25499 new_complete="$new_path ${arguments% *}" 25500 else 25501 new_complete="$new_path" 25502 fi 25503 25504 if test "x$complete" != "x$new_complete"; then 25505 NM="$new_complete" 25506 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 25507 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} 25508 fi 25509 25510 # Extract the first word of "gnm", so it can be a program name with args. 25511 set dummy gnm; ac_word=$2 25512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25513 $as_echo_n "checking for $ac_word... " >&6; } 25514 if test "${ac_cv_path_GNM+set}" = set; then : 25515 $as_echo_n "(cached) " >&6 25516 else 25517 case $GNM in 25518 [\\/]* | ?:[\\/]*) 25519 ac_cv_path_GNM="$GNM" # Let the user override the test with a path. 25520 ;; 25521 *) 25522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25523 for as_dir in $PATH 25524 do 25525 IFS=$as_save_IFS 25526 test -z "$as_dir" && as_dir=. 25527 for ac_exec_ext in '' $ac_executable_extensions; do 25528 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25529 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" 25530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25531 break 2 25532 fi 25533 done 25534 done 25535 IFS=$as_save_IFS 25536 25537 ;; 25538 esac 25539 fi 25540 GNM=$ac_cv_path_GNM 25541 if test -n "$GNM"; then 25542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 25543 $as_echo "$GNM" >&6; } 25544 else 25545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25546 $as_echo "no" >&6; } 25547 fi 25548 25549 25550 25551 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25552 25553 # First separate the path from the arguments. This will split at the first 25554 # space. 25555 complete="$GNM" 25556 path="${complete%% *}" 25557 tmp="$complete EOL" 25558 arguments="${tmp#* }" 25559 25560 # Input might be given as Windows format, start by converting to 25561 # unix format. 25562 new_path=`$CYGPATH -u "$path"` 25563 25564 # Now try to locate executable using which 25565 new_path=`$WHICH "$new_path" 2> /dev/null` 25566 # bat and cmd files are not always considered executable in cygwin causing which 25567 # to not find them 25568 if test "x$new_path" = x \ 25569 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25570 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25571 new_path=`$CYGPATH -u "$path"` 25572 fi 25573 if test "x$new_path" = x; then 25574 # Oops. Which didn't find the executable. 25575 # The splitting of arguments from the executable at a space might have been incorrect, 25576 # since paths with space are more likely in Windows. Give it another try with the whole 25577 # argument. 25578 path="$complete" 25579 arguments="EOL" 25580 new_path=`$CYGPATH -u "$path"` 25581 new_path=`$WHICH "$new_path" 2> /dev/null` 25582 # bat and cmd files are not always considered executable in cygwin causing which 25583 # to not find them 25584 if test "x$new_path" = x \ 25585 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25586 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25587 new_path=`$CYGPATH -u "$path"` 25588 fi 25589 if test "x$new_path" = x; then 25590 # It's still not found. Now this is an unrecoverable error. 25591 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 25592 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 25593 has_space=`$ECHO "$complete" | $GREP " "` 25594 if test "x$has_space" != x; then 25595 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25596 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25597 fi 25598 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25599 fi 25600 fi 25601 25602 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25603 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25604 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25605 # "foo.exe" is OK but "foo" is an error. 25606 # 25607 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25608 # It is also a way to make sure we got the proper file name for the real test later on. 25609 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25610 if test "x$test_shortpath" = x; then 25611 # Short path failed, file does not exist as specified. 25612 # Try adding .exe or .cmd 25613 if test -f "${new_path}.exe"; then 25614 input_to_shortpath="${new_path}.exe" 25615 elif test -f "${new_path}.cmd"; then 25616 input_to_shortpath="${new_path}.cmd" 25617 else 25618 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5 25619 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;} 25620 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25621 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25622 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25623 fi 25624 else 25625 input_to_shortpath="$new_path" 25626 fi 25627 25628 # Call helper function which possibly converts this using DOS-style short mode. 25629 # If so, the updated path is stored in $new_path. 25630 new_path="$input_to_shortpath" 25631 25632 input_path="$input_to_shortpath" 25633 # Check if we need to convert this using DOS-style short mode. If the path 25634 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25635 # take no chances and rewrite it. 25636 # Note: m4 eats our [], so we need to use [ and ] instead. 25637 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25638 if test "x$has_forbidden_chars" != x; then 25639 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25640 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25641 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25642 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25643 # Going to short mode and back again did indeed matter. Since short mode is 25644 # case insensitive, let's make it lowercase to improve readability. 25645 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25646 # Now convert it back to Unix-stile (cygpath) 25647 input_path=`$CYGPATH -u "$shortmode_path"` 25648 new_path="$input_path" 25649 fi 25650 fi 25651 25652 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25653 if test "x$test_cygdrive_prefix" = x; then 25654 # As a simple fix, exclude /usr/bin since it's not a real path. 25655 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25656 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25657 # a path prefixed by /cygdrive for fixpath to work. 25658 new_path="$CYGWIN_ROOT_PATH$input_path" 25659 fi 25660 fi 25661 25662 # remove trailing .exe if any 25663 new_path="${new_path/%.exe/}" 25664 25665 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25666 25667 # First separate the path from the arguments. This will split at the first 25668 # space. 25669 complete="$GNM" 25670 path="${complete%% *}" 25671 tmp="$complete EOL" 25672 arguments="${tmp#* }" 25673 25674 # Input might be given as Windows format, start by converting to 25675 # unix format. 25676 new_path="$path" 25677 25678 windows_path="$new_path" 25679 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25680 unix_path=`$CYGPATH -u "$windows_path"` 25681 new_path="$unix_path" 25682 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25683 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25684 new_path="$unix_path" 25685 fi 25686 25687 25688 # Now try to locate executable using which 25689 new_path=`$WHICH "$new_path" 2> /dev/null` 25690 25691 if test "x$new_path" = x; then 25692 # Oops. Which didn't find the executable. 25693 # The splitting of arguments from the executable at a space might have been incorrect, 25694 # since paths with space are more likely in Windows. Give it another try with the whole 25695 # argument. 25696 path="$complete" 25697 arguments="EOL" 25698 new_path="$path" 25699 25700 windows_path="$new_path" 25701 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25702 unix_path=`$CYGPATH -u "$windows_path"` 25703 new_path="$unix_path" 25704 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25705 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25706 new_path="$unix_path" 25707 fi 25708 25709 25710 new_path=`$WHICH "$new_path" 2> /dev/null` 25711 25712 if test "x$new_path" = x; then 25713 # It's still not found. Now this is an unrecoverable error. 25714 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 25715 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 25716 has_space=`$ECHO "$complete" | $GREP " "` 25717 if test "x$has_space" != x; then 25718 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25719 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25720 fi 25721 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25722 fi 25723 fi 25724 25725 # Now new_path has a complete unix path to the binary 25726 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 25727 # Keep paths in /bin as-is, but remove trailing .exe if any 25728 new_path="${new_path/%.exe/}" 25729 # Do not save /bin paths to all_fixpath_prefixes! 25730 else 25731 # Not in mixed or Windows style, start by that. 25732 new_path=`cmd //c echo $new_path` 25733 25734 input_path="$new_path" 25735 # Check if we need to convert this using DOS-style short mode. If the path 25736 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25737 # take no chances and rewrite it. 25738 # Note: m4 eats our [], so we need to use [ and ] instead. 25739 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 25740 if test "x$has_forbidden_chars" != x; then 25741 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25742 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25743 fi 25744 25745 # Output is in $new_path 25746 25747 windows_path="$new_path" 25748 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25749 unix_path=`$CYGPATH -u "$windows_path"` 25750 new_path="$unix_path" 25751 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25752 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25753 new_path="$unix_path" 25754 fi 25755 25756 # remove trailing .exe if any 25757 new_path="${new_path/%.exe/}" 25758 25759 # Save the first 10 bytes of this path to the storage, so fixpath can work. 25760 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 25761 fi 25762 25763 else 25764 # We're on a posix platform. Hooray! :) 25765 # First separate the path from the arguments. This will split at the first 25766 # space. 25767 complete="$GNM" 25768 path="${complete%% *}" 25769 tmp="$complete EOL" 25770 arguments="${tmp#* }" 25771 25772 # Cannot rely on the command "which" here since it doesn't always work. 25773 is_absolute_path=`$ECHO "$path" | $GREP ^/` 25774 if test -z "$is_absolute_path"; then 25775 # Path to executable is not absolute. Find it. 25776 IFS_save="$IFS" 25777 IFS=: 25778 for p in $PATH; do 25779 if test -f "$p/$path" && test -x "$p/$path"; then 25780 new_path="$p/$path" 25781 break 25782 fi 25783 done 25784 IFS="$IFS_save" 25785 else 25786 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5 25787 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;} 25788 new_path="$path" 25789 fi 25790 25791 if test "x$new_path" = x; then 25792 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 25793 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} 25794 has_space=`$ECHO "$complete" | $GREP " "` 25795 if test "x$has_space" != x; then 25796 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 25797 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 25798 fi 25799 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 25800 fi 25801 fi 25802 25803 # Now join together the path and the arguments once again 25804 if test "x$arguments" != xEOL; then 25805 new_complete="$new_path ${arguments% *}" 25806 else 25807 new_complete="$new_path" 25808 fi 25809 25810 if test "x$complete" != "x$new_complete"; then 25811 GNM="$new_complete" 25812 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5 25813 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;} 25814 fi 25815 25816 # Extract the first word of "strip", so it can be a program name with args. 25817 set dummy strip; ac_word=$2 25818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 25819 $as_echo_n "checking for $ac_word... " >&6; } 25820 if test "${ac_cv_path_STRIP+set}" = set; then : 25821 $as_echo_n "(cached) " >&6 25822 else 25823 case $STRIP in 25824 [\\/]* | ?:[\\/]*) 25825 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. 25826 ;; 25827 *) 25828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 25829 for as_dir in $PATH 25830 do 25831 IFS=$as_save_IFS 25832 test -z "$as_dir" && as_dir=. 25833 for ac_exec_ext in '' $ac_executable_extensions; do 25834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 25835 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" 25836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 25837 break 2 25838 fi 25839 done 25840 done 25841 IFS=$as_save_IFS 25842 25843 ;; 25844 esac 25845 fi 25846 STRIP=$ac_cv_path_STRIP 25847 if test -n "$STRIP"; then 25848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 25849 $as_echo "$STRIP" >&6; } 25850 else 25851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 25852 $as_echo "no" >&6; } 25853 fi 25854 25855 25856 25857 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25858 25859 # First separate the path from the arguments. This will split at the first 25860 # space. 25861 complete="$STRIP" 25862 path="${complete%% *}" 25863 tmp="$complete EOL" 25864 arguments="${tmp#* }" 25865 25866 # Input might be given as Windows format, start by converting to 25867 # unix format. 25868 new_path=`$CYGPATH -u "$path"` 25869 25870 # Now try to locate executable using which 25871 new_path=`$WHICH "$new_path" 2> /dev/null` 25872 # bat and cmd files are not always considered executable in cygwin causing which 25873 # to not find them 25874 if test "x$new_path" = x \ 25875 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25876 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25877 new_path=`$CYGPATH -u "$path"` 25878 fi 25879 if test "x$new_path" = x; then 25880 # Oops. Which didn't find the executable. 25881 # The splitting of arguments from the executable at a space might have been incorrect, 25882 # since paths with space are more likely in Windows. Give it another try with the whole 25883 # argument. 25884 path="$complete" 25885 arguments="EOL" 25886 new_path=`$CYGPATH -u "$path"` 25887 new_path=`$WHICH "$new_path" 2> /dev/null` 25888 # bat and cmd files are not always considered executable in cygwin causing which 25889 # to not find them 25890 if test "x$new_path" = x \ 25891 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 25892 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 25893 new_path=`$CYGPATH -u "$path"` 25894 fi 25895 if test "x$new_path" = x; then 25896 # It's still not found. Now this is an unrecoverable error. 25897 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 25898 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 25899 has_space=`$ECHO "$complete" | $GREP " "` 25900 if test "x$has_space" != x; then 25901 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 25902 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 25903 fi 25904 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 25905 fi 25906 fi 25907 25908 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 25909 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 25910 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 25911 # "foo.exe" is OK but "foo" is an error. 25912 # 25913 # This test is therefore slightly more accurate than "test -f" to check for file precense. 25914 # It is also a way to make sure we got the proper file name for the real test later on. 25915 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 25916 if test "x$test_shortpath" = x; then 25917 # Short path failed, file does not exist as specified. 25918 # Try adding .exe or .cmd 25919 if test -f "${new_path}.exe"; then 25920 input_to_shortpath="${new_path}.exe" 25921 elif test -f "${new_path}.cmd"; then 25922 input_to_shortpath="${new_path}.cmd" 25923 else 25924 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 25925 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} 25926 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 25927 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 25928 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 25929 fi 25930 else 25931 input_to_shortpath="$new_path" 25932 fi 25933 25934 # Call helper function which possibly converts this using DOS-style short mode. 25935 # If so, the updated path is stored in $new_path. 25936 new_path="$input_to_shortpath" 25937 25938 input_path="$input_to_shortpath" 25939 # Check if we need to convert this using DOS-style short mode. If the path 25940 # contains just simple characters, use it. Otherwise (spaces, weird characters), 25941 # take no chances and rewrite it. 25942 # Note: m4 eats our [], so we need to use [ and ] instead. 25943 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 25944 if test "x$has_forbidden_chars" != x; then 25945 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 25946 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 25947 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 25948 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 25949 # Going to short mode and back again did indeed matter. Since short mode is 25950 # case insensitive, let's make it lowercase to improve readability. 25951 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 25952 # Now convert it back to Unix-stile (cygpath) 25953 input_path=`$CYGPATH -u "$shortmode_path"` 25954 new_path="$input_path" 25955 fi 25956 fi 25957 25958 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 25959 if test "x$test_cygdrive_prefix" = x; then 25960 # As a simple fix, exclude /usr/bin since it's not a real path. 25961 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 25962 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 25963 # a path prefixed by /cygdrive for fixpath to work. 25964 new_path="$CYGWIN_ROOT_PATH$input_path" 25965 fi 25966 fi 25967 25968 # remove trailing .exe if any 25969 new_path="${new_path/%.exe/}" 25970 25971 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25972 25973 # First separate the path from the arguments. This will split at the first 25974 # space. 25975 complete="$STRIP" 25976 path="${complete%% *}" 25977 tmp="$complete EOL" 25978 arguments="${tmp#* }" 25979 25980 # Input might be given as Windows format, start by converting to 25981 # unix format. 25982 new_path="$path" 25983 25984 windows_path="$new_path" 25985 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 25986 unix_path=`$CYGPATH -u "$windows_path"` 25987 new_path="$unix_path" 25988 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 25989 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 25990 new_path="$unix_path" 25991 fi 25992 25993 25994 # Now try to locate executable using which 25995 new_path=`$WHICH "$new_path" 2> /dev/null` 25996 25997 if test "x$new_path" = x; then 25998 # Oops. Which didn't find the executable. 25999 # The splitting of arguments from the executable at a space might have been incorrect, 26000 # since paths with space are more likely in Windows. Give it another try with the whole 26001 # argument. 26002 path="$complete" 26003 arguments="EOL" 26004 new_path="$path" 26005 26006 windows_path="$new_path" 26007 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26008 unix_path=`$CYGPATH -u "$windows_path"` 26009 new_path="$unix_path" 26010 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26011 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26012 new_path="$unix_path" 26013 fi 26014 26015 26016 new_path=`$WHICH "$new_path" 2> /dev/null` 26017 26018 if test "x$new_path" = x; then 26019 # It's still not found. Now this is an unrecoverable error. 26020 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26021 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26022 has_space=`$ECHO "$complete" | $GREP " "` 26023 if test "x$has_space" != x; then 26024 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26025 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26026 fi 26027 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26028 fi 26029 fi 26030 26031 # Now new_path has a complete unix path to the binary 26032 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26033 # Keep paths in /bin as-is, but remove trailing .exe if any 26034 new_path="${new_path/%.exe/}" 26035 # Do not save /bin paths to all_fixpath_prefixes! 26036 else 26037 # Not in mixed or Windows style, start by that. 26038 new_path=`cmd //c echo $new_path` 26039 26040 input_path="$new_path" 26041 # Check if we need to convert this using DOS-style short mode. If the path 26042 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26043 # take no chances and rewrite it. 26044 # Note: m4 eats our [], so we need to use [ and ] instead. 26045 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26046 if test "x$has_forbidden_chars" != x; then 26047 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26048 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26049 fi 26050 26051 # Output is in $new_path 26052 26053 windows_path="$new_path" 26054 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26055 unix_path=`$CYGPATH -u "$windows_path"` 26056 new_path="$unix_path" 26057 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26058 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26059 new_path="$unix_path" 26060 fi 26061 26062 # remove trailing .exe if any 26063 new_path="${new_path/%.exe/}" 26064 26065 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26066 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26067 fi 26068 26069 else 26070 # We're on a posix platform. Hooray! :) 26071 # First separate the path from the arguments. This will split at the first 26072 # space. 26073 complete="$STRIP" 26074 path="${complete%% *}" 26075 tmp="$complete EOL" 26076 arguments="${tmp#* }" 26077 26078 # Cannot rely on the command "which" here since it doesn't always work. 26079 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26080 if test -z "$is_absolute_path"; then 26081 # Path to executable is not absolute. Find it. 26082 IFS_save="$IFS" 26083 IFS=: 26084 for p in $PATH; do 26085 if test -f "$p/$path" && test -x "$p/$path"; then 26086 new_path="$p/$path" 26087 break 26088 fi 26089 done 26090 IFS="$IFS_save" 26091 else 26092 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 26093 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} 26094 new_path="$path" 26095 fi 26096 26097 if test "x$new_path" = x; then 26098 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26099 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26100 has_space=`$ECHO "$complete" | $GREP " "` 26101 if test "x$has_space" != x; then 26102 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26103 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26104 fi 26105 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26106 fi 26107 fi 26108 26109 # Now join together the path and the arguments once again 26110 if test "x$arguments" != xEOL; then 26111 new_complete="$new_path ${arguments% *}" 26112 else 26113 new_complete="$new_path" 26114 fi 26115 26116 if test "x$complete" != "x$new_complete"; then 26117 STRIP="$new_complete" 26118 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 26119 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} 26120 fi 26121 26122 # Extract the first word of "mcs", so it can be a program name with args. 26123 set dummy mcs; ac_word=$2 26124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26125 $as_echo_n "checking for $ac_word... " >&6; } 26126 if test "${ac_cv_path_MCS+set}" = set; then : 26127 $as_echo_n "(cached) " >&6 26128 else 26129 case $MCS in 26130 [\\/]* | ?:[\\/]*) 26131 ac_cv_path_MCS="$MCS" # Let the user override the test with a path. 26132 ;; 26133 *) 26134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26135 for as_dir in $PATH 26136 do 26137 IFS=$as_save_IFS 26138 test -z "$as_dir" && as_dir=. 26139 for ac_exec_ext in '' $ac_executable_extensions; do 26140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26141 ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" 26142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26143 break 2 26144 fi 26145 done 26146 done 26147 IFS=$as_save_IFS 26148 26149 ;; 26150 esac 26151 fi 26152 MCS=$ac_cv_path_MCS 26153 if test -n "$MCS"; then 26154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 26155 $as_echo "$MCS" >&6; } 26156 else 26157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26158 $as_echo "no" >&6; } 26159 fi 26160 26161 26162 26163 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26164 26165 # First separate the path from the arguments. This will split at the first 26166 # space. 26167 complete="$MCS" 26168 path="${complete%% *}" 26169 tmp="$complete EOL" 26170 arguments="${tmp#* }" 26171 26172 # Input might be given as Windows format, start by converting to 26173 # unix format. 26174 new_path=`$CYGPATH -u "$path"` 26175 26176 # Now try to locate executable using which 26177 new_path=`$WHICH "$new_path" 2> /dev/null` 26178 # bat and cmd files are not always considered executable in cygwin causing which 26179 # to not find them 26180 if test "x$new_path" = x \ 26181 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26182 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26183 new_path=`$CYGPATH -u "$path"` 26184 fi 26185 if test "x$new_path" = x; then 26186 # Oops. Which didn't find the executable. 26187 # The splitting of arguments from the executable at a space might have been incorrect, 26188 # since paths with space are more likely in Windows. Give it another try with the whole 26189 # argument. 26190 path="$complete" 26191 arguments="EOL" 26192 new_path=`$CYGPATH -u "$path"` 26193 new_path=`$WHICH "$new_path" 2> /dev/null` 26194 # bat and cmd files are not always considered executable in cygwin causing which 26195 # to not find them 26196 if test "x$new_path" = x \ 26197 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26198 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26199 new_path=`$CYGPATH -u "$path"` 26200 fi 26201 if test "x$new_path" = x; then 26202 # It's still not found. Now this is an unrecoverable error. 26203 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26204 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26205 has_space=`$ECHO "$complete" | $GREP " "` 26206 if test "x$has_space" != x; then 26207 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26209 fi 26210 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26211 fi 26212 fi 26213 26214 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26215 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26216 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26217 # "foo.exe" is OK but "foo" is an error. 26218 # 26219 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26220 # It is also a way to make sure we got the proper file name for the real test later on. 26221 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26222 if test "x$test_shortpath" = x; then 26223 # Short path failed, file does not exist as specified. 26224 # Try adding .exe or .cmd 26225 if test -f "${new_path}.exe"; then 26226 input_to_shortpath="${new_path}.exe" 26227 elif test -f "${new_path}.cmd"; then 26228 input_to_shortpath="${new_path}.cmd" 26229 else 26230 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5 26231 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;} 26232 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26233 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26234 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26235 fi 26236 else 26237 input_to_shortpath="$new_path" 26238 fi 26239 26240 # Call helper function which possibly converts this using DOS-style short mode. 26241 # If so, the updated path is stored in $new_path. 26242 new_path="$input_to_shortpath" 26243 26244 input_path="$input_to_shortpath" 26245 # Check if we need to convert this using DOS-style short mode. If the path 26246 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26247 # take no chances and rewrite it. 26248 # Note: m4 eats our [], so we need to use [ and ] instead. 26249 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26250 if test "x$has_forbidden_chars" != x; then 26251 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26252 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26253 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26254 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26255 # Going to short mode and back again did indeed matter. Since short mode is 26256 # case insensitive, let's make it lowercase to improve readability. 26257 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26258 # Now convert it back to Unix-stile (cygpath) 26259 input_path=`$CYGPATH -u "$shortmode_path"` 26260 new_path="$input_path" 26261 fi 26262 fi 26263 26264 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26265 if test "x$test_cygdrive_prefix" = x; then 26266 # As a simple fix, exclude /usr/bin since it's not a real path. 26267 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26268 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26269 # a path prefixed by /cygdrive for fixpath to work. 26270 new_path="$CYGWIN_ROOT_PATH$input_path" 26271 fi 26272 fi 26273 26274 # remove trailing .exe if any 26275 new_path="${new_path/%.exe/}" 26276 26277 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26278 26279 # First separate the path from the arguments. This will split at the first 26280 # space. 26281 complete="$MCS" 26282 path="${complete%% *}" 26283 tmp="$complete EOL" 26284 arguments="${tmp#* }" 26285 26286 # Input might be given as Windows format, start by converting to 26287 # unix format. 26288 new_path="$path" 26289 26290 windows_path="$new_path" 26291 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26292 unix_path=`$CYGPATH -u "$windows_path"` 26293 new_path="$unix_path" 26294 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26295 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26296 new_path="$unix_path" 26297 fi 26298 26299 26300 # Now try to locate executable using which 26301 new_path=`$WHICH "$new_path" 2> /dev/null` 26302 26303 if test "x$new_path" = x; then 26304 # Oops. Which didn't find the executable. 26305 # The splitting of arguments from the executable at a space might have been incorrect, 26306 # since paths with space are more likely in Windows. Give it another try with the whole 26307 # argument. 26308 path="$complete" 26309 arguments="EOL" 26310 new_path="$path" 26311 26312 windows_path="$new_path" 26313 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26314 unix_path=`$CYGPATH -u "$windows_path"` 26315 new_path="$unix_path" 26316 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26317 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26318 new_path="$unix_path" 26319 fi 26320 26321 26322 new_path=`$WHICH "$new_path" 2> /dev/null` 26323 26324 if test "x$new_path" = x; then 26325 # It's still not found. Now this is an unrecoverable error. 26326 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26327 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26328 has_space=`$ECHO "$complete" | $GREP " "` 26329 if test "x$has_space" != x; then 26330 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26331 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26332 fi 26333 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26334 fi 26335 fi 26336 26337 # Now new_path has a complete unix path to the binary 26338 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26339 # Keep paths in /bin as-is, but remove trailing .exe if any 26340 new_path="${new_path/%.exe/}" 26341 # Do not save /bin paths to all_fixpath_prefixes! 26342 else 26343 # Not in mixed or Windows style, start by that. 26344 new_path=`cmd //c echo $new_path` 26345 26346 input_path="$new_path" 26347 # Check if we need to convert this using DOS-style short mode. If the path 26348 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26349 # take no chances and rewrite it. 26350 # Note: m4 eats our [], so we need to use [ and ] instead. 26351 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26352 if test "x$has_forbidden_chars" != x; then 26353 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26354 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26355 fi 26356 26357 # Output is in $new_path 26358 26359 windows_path="$new_path" 26360 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26361 unix_path=`$CYGPATH -u "$windows_path"` 26362 new_path="$unix_path" 26363 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26364 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26365 new_path="$unix_path" 26366 fi 26367 26368 # remove trailing .exe if any 26369 new_path="${new_path/%.exe/}" 26370 26371 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26372 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26373 fi 26374 26375 else 26376 # We're on a posix platform. Hooray! :) 26377 # First separate the path from the arguments. This will split at the first 26378 # space. 26379 complete="$MCS" 26380 path="${complete%% *}" 26381 tmp="$complete EOL" 26382 arguments="${tmp#* }" 26383 26384 # Cannot rely on the command "which" here since it doesn't always work. 26385 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26386 if test -z "$is_absolute_path"; then 26387 # Path to executable is not absolute. Find it. 26388 IFS_save="$IFS" 26389 IFS=: 26390 for p in $PATH; do 26391 if test -f "$p/$path" && test -x "$p/$path"; then 26392 new_path="$p/$path" 26393 break 26394 fi 26395 done 26396 IFS="$IFS_save" 26397 else 26398 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5 26399 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;} 26400 new_path="$path" 26401 fi 26402 26403 if test "x$new_path" = x; then 26404 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 26405 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} 26406 has_space=`$ECHO "$complete" | $GREP " "` 26407 if test "x$has_space" != x; then 26408 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26409 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26410 fi 26411 as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 26412 fi 26413 fi 26414 26415 # Now join together the path and the arguments once again 26416 if test "x$arguments" != xEOL; then 26417 new_complete="$new_path ${arguments% *}" 26418 else 26419 new_complete="$new_path" 26420 fi 26421 26422 if test "x$complete" != "x$new_complete"; then 26423 MCS="$new_complete" 26424 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5 26425 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;} 26426 fi 26427 26428 elif test "x$OPENJDK_TARGET_OS" != xwindows; then 26429 if test -n "$ac_tool_prefix"; then 26430 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. 26431 set dummy ${ac_tool_prefix}nm; ac_word=$2 26432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26433 $as_echo_n "checking for $ac_word... " >&6; } 26434 if test "${ac_cv_prog_NM+set}" = set; then : 26435 $as_echo_n "(cached) " >&6 26436 else 26437 if test -n "$NM"; then 26438 ac_cv_prog_NM="$NM" # Let the user override the test. 26439 else 26440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26441 for as_dir in $PATH 26442 do 26443 IFS=$as_save_IFS 26444 test -z "$as_dir" && as_dir=. 26445 for ac_exec_ext in '' $ac_executable_extensions; do 26446 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26447 ac_cv_prog_NM="${ac_tool_prefix}nm" 26448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26449 break 2 26450 fi 26451 done 26452 done 26453 IFS=$as_save_IFS 26454 26455 fi 26456 fi 26457 NM=$ac_cv_prog_NM 26458 if test -n "$NM"; then 26459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 26460 $as_echo "$NM" >&6; } 26461 else 26462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26463 $as_echo "no" >&6; } 26464 fi 26465 26466 26467 fi 26468 if test -z "$ac_cv_prog_NM"; then 26469 ac_ct_NM=$NM 26470 # Extract the first word of "nm", so it can be a program name with args. 26471 set dummy nm; ac_word=$2 26472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26473 $as_echo_n "checking for $ac_word... " >&6; } 26474 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then : 26475 $as_echo_n "(cached) " >&6 26476 else 26477 if test -n "$ac_ct_NM"; then 26478 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. 26479 else 26480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26481 for as_dir in $PATH 26482 do 26483 IFS=$as_save_IFS 26484 test -z "$as_dir" && as_dir=. 26485 for ac_exec_ext in '' $ac_executable_extensions; do 26486 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26487 ac_cv_prog_ac_ct_NM="nm" 26488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26489 break 2 26490 fi 26491 done 26492 done 26493 IFS=$as_save_IFS 26494 26495 fi 26496 fi 26497 ac_ct_NM=$ac_cv_prog_ac_ct_NM 26498 if test -n "$ac_ct_NM"; then 26499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 26500 $as_echo "$ac_ct_NM" >&6; } 26501 else 26502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26503 $as_echo "no" >&6; } 26504 fi 26505 26506 if test "x$ac_ct_NM" = x; then 26507 NM="" 26508 else 26509 case $cross_compiling:$ac_tool_warned in 26510 yes:) 26511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 26512 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 26513 ac_tool_warned=yes ;; 26514 esac 26515 NM=$ac_ct_NM 26516 fi 26517 else 26518 NM="$ac_cv_prog_NM" 26519 fi 26520 26521 26522 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26523 26524 # First separate the path from the arguments. This will split at the first 26525 # space. 26526 complete="$NM" 26527 path="${complete%% *}" 26528 tmp="$complete EOL" 26529 arguments="${tmp#* }" 26530 26531 # Input might be given as Windows format, start by converting to 26532 # unix format. 26533 new_path=`$CYGPATH -u "$path"` 26534 26535 # Now try to locate executable using which 26536 new_path=`$WHICH "$new_path" 2> /dev/null` 26537 # bat and cmd files are not always considered executable in cygwin causing which 26538 # to not find them 26539 if test "x$new_path" = x \ 26540 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26541 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26542 new_path=`$CYGPATH -u "$path"` 26543 fi 26544 if test "x$new_path" = x; then 26545 # Oops. Which didn't find the executable. 26546 # The splitting of arguments from the executable at a space might have been incorrect, 26547 # since paths with space are more likely in Windows. Give it another try with the whole 26548 # argument. 26549 path="$complete" 26550 arguments="EOL" 26551 new_path=`$CYGPATH -u "$path"` 26552 new_path=`$WHICH "$new_path" 2> /dev/null` 26553 # bat and cmd files are not always considered executable in cygwin causing which 26554 # to not find them 26555 if test "x$new_path" = x \ 26556 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26557 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26558 new_path=`$CYGPATH -u "$path"` 26559 fi 26560 if test "x$new_path" = x; then 26561 # It's still not found. Now this is an unrecoverable error. 26562 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 26563 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 26564 has_space=`$ECHO "$complete" | $GREP " "` 26565 if test "x$has_space" != x; then 26566 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26567 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26568 fi 26569 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26570 fi 26571 fi 26572 26573 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26574 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26575 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26576 # "foo.exe" is OK but "foo" is an error. 26577 # 26578 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26579 # It is also a way to make sure we got the proper file name for the real test later on. 26580 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26581 if test "x$test_shortpath" = x; then 26582 # Short path failed, file does not exist as specified. 26583 # Try adding .exe or .cmd 26584 if test -f "${new_path}.exe"; then 26585 input_to_shortpath="${new_path}.exe" 26586 elif test -f "${new_path}.cmd"; then 26587 input_to_shortpath="${new_path}.cmd" 26588 else 26589 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 26590 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} 26591 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26592 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26593 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26594 fi 26595 else 26596 input_to_shortpath="$new_path" 26597 fi 26598 26599 # Call helper function which possibly converts this using DOS-style short mode. 26600 # If so, the updated path is stored in $new_path. 26601 new_path="$input_to_shortpath" 26602 26603 input_path="$input_to_shortpath" 26604 # Check if we need to convert this using DOS-style short mode. If the path 26605 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26606 # take no chances and rewrite it. 26607 # Note: m4 eats our [], so we need to use [ and ] instead. 26608 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26609 if test "x$has_forbidden_chars" != x; then 26610 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26611 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26612 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26613 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26614 # Going to short mode and back again did indeed matter. Since short mode is 26615 # case insensitive, let's make it lowercase to improve readability. 26616 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26617 # Now convert it back to Unix-stile (cygpath) 26618 input_path=`$CYGPATH -u "$shortmode_path"` 26619 new_path="$input_path" 26620 fi 26621 fi 26622 26623 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26624 if test "x$test_cygdrive_prefix" = x; then 26625 # As a simple fix, exclude /usr/bin since it's not a real path. 26626 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26627 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26628 # a path prefixed by /cygdrive for fixpath to work. 26629 new_path="$CYGWIN_ROOT_PATH$input_path" 26630 fi 26631 fi 26632 26633 # remove trailing .exe if any 26634 new_path="${new_path/%.exe/}" 26635 26636 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26637 26638 # First separate the path from the arguments. This will split at the first 26639 # space. 26640 complete="$NM" 26641 path="${complete%% *}" 26642 tmp="$complete EOL" 26643 arguments="${tmp#* }" 26644 26645 # Input might be given as Windows format, start by converting to 26646 # unix format. 26647 new_path="$path" 26648 26649 windows_path="$new_path" 26650 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26651 unix_path=`$CYGPATH -u "$windows_path"` 26652 new_path="$unix_path" 26653 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26654 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26655 new_path="$unix_path" 26656 fi 26657 26658 26659 # Now try to locate executable using which 26660 new_path=`$WHICH "$new_path" 2> /dev/null` 26661 26662 if test "x$new_path" = x; then 26663 # Oops. Which didn't find the executable. 26664 # The splitting of arguments from the executable at a space might have been incorrect, 26665 # since paths with space are more likely in Windows. Give it another try with the whole 26666 # argument. 26667 path="$complete" 26668 arguments="EOL" 26669 new_path="$path" 26670 26671 windows_path="$new_path" 26672 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26673 unix_path=`$CYGPATH -u "$windows_path"` 26674 new_path="$unix_path" 26675 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26676 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26677 new_path="$unix_path" 26678 fi 26679 26680 26681 new_path=`$WHICH "$new_path" 2> /dev/null` 26682 26683 if test "x$new_path" = x; then 26684 # It's still not found. Now this is an unrecoverable error. 26685 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 26686 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 26687 has_space=`$ECHO "$complete" | $GREP " "` 26688 if test "x$has_space" != x; then 26689 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26690 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26691 fi 26692 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26693 fi 26694 fi 26695 26696 # Now new_path has a complete unix path to the binary 26697 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 26698 # Keep paths in /bin as-is, but remove trailing .exe if any 26699 new_path="${new_path/%.exe/}" 26700 # Do not save /bin paths to all_fixpath_prefixes! 26701 else 26702 # Not in mixed or Windows style, start by that. 26703 new_path=`cmd //c echo $new_path` 26704 26705 input_path="$new_path" 26706 # Check if we need to convert this using DOS-style short mode. If the path 26707 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26708 # take no chances and rewrite it. 26709 # Note: m4 eats our [], so we need to use [ and ] instead. 26710 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 26711 if test "x$has_forbidden_chars" != x; then 26712 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26713 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26714 fi 26715 26716 # Output is in $new_path 26717 26718 windows_path="$new_path" 26719 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26720 unix_path=`$CYGPATH -u "$windows_path"` 26721 new_path="$unix_path" 26722 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26723 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 26724 new_path="$unix_path" 26725 fi 26726 26727 # remove trailing .exe if any 26728 new_path="${new_path/%.exe/}" 26729 26730 # Save the first 10 bytes of this path to the storage, so fixpath can work. 26731 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 26732 fi 26733 26734 else 26735 # We're on a posix platform. Hooray! :) 26736 # First separate the path from the arguments. This will split at the first 26737 # space. 26738 complete="$NM" 26739 path="${complete%% *}" 26740 tmp="$complete EOL" 26741 arguments="${tmp#* }" 26742 26743 # Cannot rely on the command "which" here since it doesn't always work. 26744 is_absolute_path=`$ECHO "$path" | $GREP ^/` 26745 if test -z "$is_absolute_path"; then 26746 # Path to executable is not absolute. Find it. 26747 IFS_save="$IFS" 26748 IFS=: 26749 for p in $PATH; do 26750 if test -f "$p/$path" && test -x "$p/$path"; then 26751 new_path="$p/$path" 26752 break 26753 fi 26754 done 26755 IFS="$IFS_save" 26756 else 26757 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 26758 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} 26759 new_path="$path" 26760 fi 26761 26762 if test "x$new_path" = x; then 26763 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 26764 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} 26765 has_space=`$ECHO "$complete" | $GREP " "` 26766 if test "x$has_space" != x; then 26767 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 26768 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 26769 fi 26770 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 26771 fi 26772 fi 26773 26774 # Now join together the path and the arguments once again 26775 if test "x$arguments" != xEOL; then 26776 new_complete="$new_path ${arguments% *}" 26777 else 26778 new_complete="$new_path" 26779 fi 26780 26781 if test "x$complete" != "x$new_complete"; then 26782 NM="$new_complete" 26783 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 26784 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} 26785 fi 26786 26787 GNM="$NM" 26788 26789 if test -n "$ac_tool_prefix"; then 26790 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 26791 set dummy ${ac_tool_prefix}strip; ac_word=$2 26792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26793 $as_echo_n "checking for $ac_word... " >&6; } 26794 if test "${ac_cv_prog_STRIP+set}" = set; then : 26795 $as_echo_n "(cached) " >&6 26796 else 26797 if test -n "$STRIP"; then 26798 ac_cv_prog_STRIP="$STRIP" # Let the user override the test. 26799 else 26800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26801 for as_dir in $PATH 26802 do 26803 IFS=$as_save_IFS 26804 test -z "$as_dir" && as_dir=. 26805 for ac_exec_ext in '' $ac_executable_extensions; do 26806 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26807 ac_cv_prog_STRIP="${ac_tool_prefix}strip" 26808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26809 break 2 26810 fi 26811 done 26812 done 26813 IFS=$as_save_IFS 26814 26815 fi 26816 fi 26817 STRIP=$ac_cv_prog_STRIP 26818 if test -n "$STRIP"; then 26819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 26820 $as_echo "$STRIP" >&6; } 26821 else 26822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26823 $as_echo "no" >&6; } 26824 fi 26825 26826 26827 fi 26828 if test -z "$ac_cv_prog_STRIP"; then 26829 ac_ct_STRIP=$STRIP 26830 # Extract the first word of "strip", so it can be a program name with args. 26831 set dummy strip; ac_word=$2 26832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 26833 $as_echo_n "checking for $ac_word... " >&6; } 26834 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : 26835 $as_echo_n "(cached) " >&6 26836 else 26837 if test -n "$ac_ct_STRIP"; then 26838 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. 26839 else 26840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 26841 for as_dir in $PATH 26842 do 26843 IFS=$as_save_IFS 26844 test -z "$as_dir" && as_dir=. 26845 for ac_exec_ext in '' $ac_executable_extensions; do 26846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26847 ac_cv_prog_ac_ct_STRIP="strip" 26848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 26849 break 2 26850 fi 26851 done 26852 done 26853 IFS=$as_save_IFS 26854 26855 fi 26856 fi 26857 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP 26858 if test -n "$ac_ct_STRIP"; then 26859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 26860 $as_echo "$ac_ct_STRIP" >&6; } 26861 else 26862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 26863 $as_echo "no" >&6; } 26864 fi 26865 26866 if test "x$ac_ct_STRIP" = x; then 26867 STRIP="" 26868 else 26869 case $cross_compiling:$ac_tool_warned in 26870 yes:) 26871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 26872 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 26873 ac_tool_warned=yes ;; 26874 esac 26875 STRIP=$ac_ct_STRIP 26876 fi 26877 else 26878 STRIP="$ac_cv_prog_STRIP" 26879 fi 26880 26881 26882 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 26883 26884 # First separate the path from the arguments. This will split at the first 26885 # space. 26886 complete="$STRIP" 26887 path="${complete%% *}" 26888 tmp="$complete EOL" 26889 arguments="${tmp#* }" 26890 26891 # Input might be given as Windows format, start by converting to 26892 # unix format. 26893 new_path=`$CYGPATH -u "$path"` 26894 26895 # Now try to locate executable using which 26896 new_path=`$WHICH "$new_path" 2> /dev/null` 26897 # bat and cmd files are not always considered executable in cygwin causing which 26898 # to not find them 26899 if test "x$new_path" = x \ 26900 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26901 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26902 new_path=`$CYGPATH -u "$path"` 26903 fi 26904 if test "x$new_path" = x; then 26905 # Oops. Which didn't find the executable. 26906 # The splitting of arguments from the executable at a space might have been incorrect, 26907 # since paths with space are more likely in Windows. Give it another try with the whole 26908 # argument. 26909 path="$complete" 26910 arguments="EOL" 26911 new_path=`$CYGPATH -u "$path"` 26912 new_path=`$WHICH "$new_path" 2> /dev/null` 26913 # bat and cmd files are not always considered executable in cygwin causing which 26914 # to not find them 26915 if test "x$new_path" = x \ 26916 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 26917 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 26918 new_path=`$CYGPATH -u "$path"` 26919 fi 26920 if test "x$new_path" = x; then 26921 # It's still not found. Now this is an unrecoverable error. 26922 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 26923 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 26924 has_space=`$ECHO "$complete" | $GREP " "` 26925 if test "x$has_space" != x; then 26926 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 26927 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 26928 fi 26929 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26930 fi 26931 fi 26932 26933 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 26934 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 26935 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 26936 # "foo.exe" is OK but "foo" is an error. 26937 # 26938 # This test is therefore slightly more accurate than "test -f" to check for file precense. 26939 # It is also a way to make sure we got the proper file name for the real test later on. 26940 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 26941 if test "x$test_shortpath" = x; then 26942 # Short path failed, file does not exist as specified. 26943 # Try adding .exe or .cmd 26944 if test -f "${new_path}.exe"; then 26945 input_to_shortpath="${new_path}.exe" 26946 elif test -f "${new_path}.cmd"; then 26947 input_to_shortpath="${new_path}.cmd" 26948 else 26949 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 26950 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} 26951 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 26952 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 26953 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 26954 fi 26955 else 26956 input_to_shortpath="$new_path" 26957 fi 26958 26959 # Call helper function which possibly converts this using DOS-style short mode. 26960 # If so, the updated path is stored in $new_path. 26961 new_path="$input_to_shortpath" 26962 26963 input_path="$input_to_shortpath" 26964 # Check if we need to convert this using DOS-style short mode. If the path 26965 # contains just simple characters, use it. Otherwise (spaces, weird characters), 26966 # take no chances and rewrite it. 26967 # Note: m4 eats our [], so we need to use [ and ] instead. 26968 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 26969 if test "x$has_forbidden_chars" != x; then 26970 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 26971 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 26972 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 26973 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 26974 # Going to short mode and back again did indeed matter. Since short mode is 26975 # case insensitive, let's make it lowercase to improve readability. 26976 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 26977 # Now convert it back to Unix-stile (cygpath) 26978 input_path=`$CYGPATH -u "$shortmode_path"` 26979 new_path="$input_path" 26980 fi 26981 fi 26982 26983 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 26984 if test "x$test_cygdrive_prefix" = x; then 26985 # As a simple fix, exclude /usr/bin since it's not a real path. 26986 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 26987 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 26988 # a path prefixed by /cygdrive for fixpath to work. 26989 new_path="$CYGWIN_ROOT_PATH$input_path" 26990 fi 26991 fi 26992 26993 # remove trailing .exe if any 26994 new_path="${new_path/%.exe/}" 26995 26996 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 26997 26998 # First separate the path from the arguments. This will split at the first 26999 # space. 27000 complete="$STRIP" 27001 path="${complete%% *}" 27002 tmp="$complete EOL" 27003 arguments="${tmp#* }" 27004 27005 # Input might be given as Windows format, start by converting to 27006 # unix format. 27007 new_path="$path" 27008 27009 windows_path="$new_path" 27010 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27011 unix_path=`$CYGPATH -u "$windows_path"` 27012 new_path="$unix_path" 27013 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27014 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27015 new_path="$unix_path" 27016 fi 27017 27018 27019 # Now try to locate executable using which 27020 new_path=`$WHICH "$new_path" 2> /dev/null` 27021 27022 if test "x$new_path" = x; then 27023 # Oops. Which didn't find the executable. 27024 # The splitting of arguments from the executable at a space might have been incorrect, 27025 # since paths with space are more likely in Windows. Give it another try with the whole 27026 # argument. 27027 path="$complete" 27028 arguments="EOL" 27029 new_path="$path" 27030 27031 windows_path="$new_path" 27032 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27033 unix_path=`$CYGPATH -u "$windows_path"` 27034 new_path="$unix_path" 27035 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27036 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27037 new_path="$unix_path" 27038 fi 27039 27040 27041 new_path=`$WHICH "$new_path" 2> /dev/null` 27042 27043 if test "x$new_path" = x; then 27044 # It's still not found. Now this is an unrecoverable error. 27045 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27046 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27047 has_space=`$ECHO "$complete" | $GREP " "` 27048 if test "x$has_space" != x; then 27049 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27050 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27051 fi 27052 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27053 fi 27054 fi 27055 27056 # Now new_path has a complete unix path to the binary 27057 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27058 # Keep paths in /bin as-is, but remove trailing .exe if any 27059 new_path="${new_path/%.exe/}" 27060 # Do not save /bin paths to all_fixpath_prefixes! 27061 else 27062 # Not in mixed or Windows style, start by that. 27063 new_path=`cmd //c echo $new_path` 27064 27065 input_path="$new_path" 27066 # Check if we need to convert this using DOS-style short mode. If the path 27067 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27068 # take no chances and rewrite it. 27069 # Note: m4 eats our [], so we need to use [ and ] instead. 27070 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27071 if test "x$has_forbidden_chars" != x; then 27072 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27073 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27074 fi 27075 27076 # Output is in $new_path 27077 27078 windows_path="$new_path" 27079 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27080 unix_path=`$CYGPATH -u "$windows_path"` 27081 new_path="$unix_path" 27082 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27083 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27084 new_path="$unix_path" 27085 fi 27086 27087 # remove trailing .exe if any 27088 new_path="${new_path/%.exe/}" 27089 27090 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27091 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27092 fi 27093 27094 else 27095 # We're on a posix platform. Hooray! :) 27096 # First separate the path from the arguments. This will split at the first 27097 # space. 27098 complete="$STRIP" 27099 path="${complete%% *}" 27100 tmp="$complete EOL" 27101 arguments="${tmp#* }" 27102 27103 # Cannot rely on the command "which" here since it doesn't always work. 27104 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27105 if test -z "$is_absolute_path"; then 27106 # Path to executable is not absolute. Find it. 27107 IFS_save="$IFS" 27108 IFS=: 27109 for p in $PATH; do 27110 if test -f "$p/$path" && test -x "$p/$path"; then 27111 new_path="$p/$path" 27112 break 27113 fi 27114 done 27115 IFS="$IFS_save" 27116 else 27117 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 27118 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} 27119 new_path="$path" 27120 fi 27121 27122 if test "x$new_path" = x; then 27123 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 27124 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} 27125 has_space=`$ECHO "$complete" | $GREP " "` 27126 if test "x$has_space" != x; then 27127 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27128 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27129 fi 27130 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 27131 fi 27132 fi 27133 27134 # Now join together the path and the arguments once again 27135 if test "x$arguments" != xEOL; then 27136 new_complete="$new_path ${arguments% *}" 27137 else 27138 new_complete="$new_path" 27139 fi 27140 27141 if test "x$complete" != "x$new_complete"; then 27142 STRIP="$new_complete" 27143 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 27144 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} 27145 fi 27146 27147 fi 27148 27149 # objcopy is used for moving debug symbols to separate files when 27150 # full debug symbols are enabled. 27151 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then 27152 if test -n "$ac_tool_prefix"; then 27153 for ac_prog in gobjcopy objcopy 27154 do 27155 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 27156 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 27157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27158 $as_echo_n "checking for $ac_word... " >&6; } 27159 if test "${ac_cv_prog_OBJCOPY+set}" = set; then : 27160 $as_echo_n "(cached) " >&6 27161 else 27162 if test -n "$OBJCOPY"; then 27163 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. 27164 else 27165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27166 for as_dir in $PATH 27167 do 27168 IFS=$as_save_IFS 27169 test -z "$as_dir" && as_dir=. 27170 for ac_exec_ext in '' $ac_executable_extensions; do 27171 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27172 ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" 27173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27174 break 2 27175 fi 27176 done 27177 done 27178 IFS=$as_save_IFS 27179 27180 fi 27181 fi 27182 OBJCOPY=$ac_cv_prog_OBJCOPY 27183 if test -n "$OBJCOPY"; then 27184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 27185 $as_echo "$OBJCOPY" >&6; } 27186 else 27187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27188 $as_echo "no" >&6; } 27189 fi 27190 27191 27192 test -n "$OBJCOPY" && break 27193 done 27194 fi 27195 if test -z "$OBJCOPY"; then 27196 ac_ct_OBJCOPY=$OBJCOPY 27197 for ac_prog in gobjcopy objcopy 27198 do 27199 # Extract the first word of "$ac_prog", so it can be a program name with args. 27200 set dummy $ac_prog; ac_word=$2 27201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27202 $as_echo_n "checking for $ac_word... " >&6; } 27203 if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then : 27204 $as_echo_n "(cached) " >&6 27205 else 27206 if test -n "$ac_ct_OBJCOPY"; then 27207 ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. 27208 else 27209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27210 for as_dir in $PATH 27211 do 27212 IFS=$as_save_IFS 27213 test -z "$as_dir" && as_dir=. 27214 for ac_exec_ext in '' $ac_executable_extensions; do 27215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27216 ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" 27217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27218 break 2 27219 fi 27220 done 27221 done 27222 IFS=$as_save_IFS 27223 27224 fi 27225 fi 27226 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY 27227 if test -n "$ac_ct_OBJCOPY"; then 27228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 27229 $as_echo "$ac_ct_OBJCOPY" >&6; } 27230 else 27231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27232 $as_echo "no" >&6; } 27233 fi 27234 27235 27236 test -n "$ac_ct_OBJCOPY" && break 27237 done 27238 27239 if test "x$ac_ct_OBJCOPY" = x; then 27240 OBJCOPY="" 27241 else 27242 case $cross_compiling:$ac_tool_warned in 27243 yes:) 27244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27245 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27246 ac_tool_warned=yes ;; 27247 esac 27248 OBJCOPY=$ac_ct_OBJCOPY 27249 fi 27250 fi 27251 27252 # Only call fixup if objcopy was found. 27253 if test -n "$OBJCOPY"; then 27254 27255 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27256 27257 # First separate the path from the arguments. This will split at the first 27258 # space. 27259 complete="$OBJCOPY" 27260 path="${complete%% *}" 27261 tmp="$complete EOL" 27262 arguments="${tmp#* }" 27263 27264 # Input might be given as Windows format, start by converting to 27265 # unix format. 27266 new_path=`$CYGPATH -u "$path"` 27267 27268 # Now try to locate executable using which 27269 new_path=`$WHICH "$new_path" 2> /dev/null` 27270 # bat and cmd files are not always considered executable in cygwin causing which 27271 # to not find them 27272 if test "x$new_path" = x \ 27273 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27274 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27275 new_path=`$CYGPATH -u "$path"` 27276 fi 27277 if test "x$new_path" = x; then 27278 # Oops. Which didn't find the executable. 27279 # The splitting of arguments from the executable at a space might have been incorrect, 27280 # since paths with space are more likely in Windows. Give it another try with the whole 27281 # argument. 27282 path="$complete" 27283 arguments="EOL" 27284 new_path=`$CYGPATH -u "$path"` 27285 new_path=`$WHICH "$new_path" 2> /dev/null` 27286 # bat and cmd files are not always considered executable in cygwin causing which 27287 # to not find them 27288 if test "x$new_path" = x \ 27289 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27290 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27291 new_path=`$CYGPATH -u "$path"` 27292 fi 27293 if test "x$new_path" = x; then 27294 # It's still not found. Now this is an unrecoverable error. 27295 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27296 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27297 has_space=`$ECHO "$complete" | $GREP " "` 27298 if test "x$has_space" != x; then 27299 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27300 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27301 fi 27302 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27303 fi 27304 fi 27305 27306 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27307 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27308 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27309 # "foo.exe" is OK but "foo" is an error. 27310 # 27311 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27312 # It is also a way to make sure we got the proper file name for the real test later on. 27313 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27314 if test "x$test_shortpath" = x; then 27315 # Short path failed, file does not exist as specified. 27316 # Try adding .exe or .cmd 27317 if test -f "${new_path}.exe"; then 27318 input_to_shortpath="${new_path}.exe" 27319 elif test -f "${new_path}.cmd"; then 27320 input_to_shortpath="${new_path}.cmd" 27321 else 27322 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5 27323 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;} 27324 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27325 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27326 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27327 fi 27328 else 27329 input_to_shortpath="$new_path" 27330 fi 27331 27332 # Call helper function which possibly converts this using DOS-style short mode. 27333 # If so, the updated path is stored in $new_path. 27334 new_path="$input_to_shortpath" 27335 27336 input_path="$input_to_shortpath" 27337 # Check if we need to convert this using DOS-style short mode. If the path 27338 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27339 # take no chances and rewrite it. 27340 # Note: m4 eats our [], so we need to use [ and ] instead. 27341 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27342 if test "x$has_forbidden_chars" != x; then 27343 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27344 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27345 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27346 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27347 # Going to short mode and back again did indeed matter. Since short mode is 27348 # case insensitive, let's make it lowercase to improve readability. 27349 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27350 # Now convert it back to Unix-stile (cygpath) 27351 input_path=`$CYGPATH -u "$shortmode_path"` 27352 new_path="$input_path" 27353 fi 27354 fi 27355 27356 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27357 if test "x$test_cygdrive_prefix" = x; then 27358 # As a simple fix, exclude /usr/bin since it's not a real path. 27359 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27360 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27361 # a path prefixed by /cygdrive for fixpath to work. 27362 new_path="$CYGWIN_ROOT_PATH$input_path" 27363 fi 27364 fi 27365 27366 # remove trailing .exe if any 27367 new_path="${new_path/%.exe/}" 27368 27369 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27370 27371 # First separate the path from the arguments. This will split at the first 27372 # space. 27373 complete="$OBJCOPY" 27374 path="${complete%% *}" 27375 tmp="$complete EOL" 27376 arguments="${tmp#* }" 27377 27378 # Input might be given as Windows format, start by converting to 27379 # unix format. 27380 new_path="$path" 27381 27382 windows_path="$new_path" 27383 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27384 unix_path=`$CYGPATH -u "$windows_path"` 27385 new_path="$unix_path" 27386 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27387 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27388 new_path="$unix_path" 27389 fi 27390 27391 27392 # Now try to locate executable using which 27393 new_path=`$WHICH "$new_path" 2> /dev/null` 27394 27395 if test "x$new_path" = x; then 27396 # Oops. Which didn't find the executable. 27397 # The splitting of arguments from the executable at a space might have been incorrect, 27398 # since paths with space are more likely in Windows. Give it another try with the whole 27399 # argument. 27400 path="$complete" 27401 arguments="EOL" 27402 new_path="$path" 27403 27404 windows_path="$new_path" 27405 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27406 unix_path=`$CYGPATH -u "$windows_path"` 27407 new_path="$unix_path" 27408 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27409 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27410 new_path="$unix_path" 27411 fi 27412 27413 27414 new_path=`$WHICH "$new_path" 2> /dev/null` 27415 27416 if test "x$new_path" = x; then 27417 # It's still not found. Now this is an unrecoverable error. 27418 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27419 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27420 has_space=`$ECHO "$complete" | $GREP " "` 27421 if test "x$has_space" != x; then 27422 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27424 fi 27425 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27426 fi 27427 fi 27428 27429 # Now new_path has a complete unix path to the binary 27430 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27431 # Keep paths in /bin as-is, but remove trailing .exe if any 27432 new_path="${new_path/%.exe/}" 27433 # Do not save /bin paths to all_fixpath_prefixes! 27434 else 27435 # Not in mixed or Windows style, start by that. 27436 new_path=`cmd //c echo $new_path` 27437 27438 input_path="$new_path" 27439 # Check if we need to convert this using DOS-style short mode. If the path 27440 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27441 # take no chances and rewrite it. 27442 # Note: m4 eats our [], so we need to use [ and ] instead. 27443 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27444 if test "x$has_forbidden_chars" != x; then 27445 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27446 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27447 fi 27448 27449 # Output is in $new_path 27450 27451 windows_path="$new_path" 27452 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27453 unix_path=`$CYGPATH -u "$windows_path"` 27454 new_path="$unix_path" 27455 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27456 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27457 new_path="$unix_path" 27458 fi 27459 27460 # remove trailing .exe if any 27461 new_path="${new_path/%.exe/}" 27462 27463 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27464 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27465 fi 27466 27467 else 27468 # We're on a posix platform. Hooray! :) 27469 # First separate the path from the arguments. This will split at the first 27470 # space. 27471 complete="$OBJCOPY" 27472 path="${complete%% *}" 27473 tmp="$complete EOL" 27474 arguments="${tmp#* }" 27475 27476 # Cannot rely on the command "which" here since it doesn't always work. 27477 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27478 if test -z "$is_absolute_path"; then 27479 # Path to executable is not absolute. Find it. 27480 IFS_save="$IFS" 27481 IFS=: 27482 for p in $PATH; do 27483 if test -f "$p/$path" && test -x "$p/$path"; then 27484 new_path="$p/$path" 27485 break 27486 fi 27487 done 27488 IFS="$IFS_save" 27489 else 27490 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5 27491 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;} 27492 new_path="$path" 27493 fi 27494 27495 if test "x$new_path" = x; then 27496 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 27497 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} 27498 has_space=`$ECHO "$complete" | $GREP " "` 27499 if test "x$has_space" != x; then 27500 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27501 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27502 fi 27503 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 27504 fi 27505 fi 27506 27507 # Now join together the path and the arguments once again 27508 if test "x$arguments" != xEOL; then 27509 new_complete="$new_path ${arguments% *}" 27510 else 27511 new_complete="$new_path" 27512 fi 27513 27514 if test "x$complete" != "x$new_complete"; then 27515 OBJCOPY="$new_complete" 27516 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5 27517 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;} 27518 fi 27519 27520 fi 27521 fi 27522 27523 if test -n "$ac_tool_prefix"; then 27524 for ac_prog in gobjdump objdump 27525 do 27526 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 27527 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 27528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27529 $as_echo_n "checking for $ac_word... " >&6; } 27530 if test "${ac_cv_prog_OBJDUMP+set}" = set; then : 27531 $as_echo_n "(cached) " >&6 27532 else 27533 if test -n "$OBJDUMP"; then 27534 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. 27535 else 27536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27537 for as_dir in $PATH 27538 do 27539 IFS=$as_save_IFS 27540 test -z "$as_dir" && as_dir=. 27541 for ac_exec_ext in '' $ac_executable_extensions; do 27542 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27543 ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" 27544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27545 break 2 27546 fi 27547 done 27548 done 27549 IFS=$as_save_IFS 27550 27551 fi 27552 fi 27553 OBJDUMP=$ac_cv_prog_OBJDUMP 27554 if test -n "$OBJDUMP"; then 27555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 27556 $as_echo "$OBJDUMP" >&6; } 27557 else 27558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27559 $as_echo "no" >&6; } 27560 fi 27561 27562 27563 test -n "$OBJDUMP" && break 27564 done 27565 fi 27566 if test -z "$OBJDUMP"; then 27567 ac_ct_OBJDUMP=$OBJDUMP 27568 for ac_prog in gobjdump objdump 27569 do 27570 # Extract the first word of "$ac_prog", so it can be a program name with args. 27571 set dummy $ac_prog; ac_word=$2 27572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27573 $as_echo_n "checking for $ac_word... " >&6; } 27574 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : 27575 $as_echo_n "(cached) " >&6 27576 else 27577 if test -n "$ac_ct_OBJDUMP"; then 27578 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. 27579 else 27580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27581 for as_dir in $PATH 27582 do 27583 IFS=$as_save_IFS 27584 test -z "$as_dir" && as_dir=. 27585 for ac_exec_ext in '' $ac_executable_extensions; do 27586 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27587 ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" 27588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27589 break 2 27590 fi 27591 done 27592 done 27593 IFS=$as_save_IFS 27594 27595 fi 27596 fi 27597 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP 27598 if test -n "$ac_ct_OBJDUMP"; then 27599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 27600 $as_echo "$ac_ct_OBJDUMP" >&6; } 27601 else 27602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27603 $as_echo "no" >&6; } 27604 fi 27605 27606 27607 test -n "$ac_ct_OBJDUMP" && break 27608 done 27609 27610 if test "x$ac_ct_OBJDUMP" = x; then 27611 OBJDUMP="" 27612 else 27613 case $cross_compiling:$ac_tool_warned in 27614 yes:) 27615 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 27616 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 27617 ac_tool_warned=yes ;; 27618 esac 27619 OBJDUMP=$ac_ct_OBJDUMP 27620 fi 27621 fi 27622 27623 if test "x$OBJDUMP" != x; then 27624 # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing. 27625 27626 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27627 27628 # First separate the path from the arguments. This will split at the first 27629 # space. 27630 complete="$OBJDUMP" 27631 path="${complete%% *}" 27632 tmp="$complete EOL" 27633 arguments="${tmp#* }" 27634 27635 # Input might be given as Windows format, start by converting to 27636 # unix format. 27637 new_path=`$CYGPATH -u "$path"` 27638 27639 # Now try to locate executable using which 27640 new_path=`$WHICH "$new_path" 2> /dev/null` 27641 # bat and cmd files are not always considered executable in cygwin causing which 27642 # to not find them 27643 if test "x$new_path" = x \ 27644 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27645 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27646 new_path=`$CYGPATH -u "$path"` 27647 fi 27648 if test "x$new_path" = x; then 27649 # Oops. Which didn't find the executable. 27650 # The splitting of arguments from the executable at a space might have been incorrect, 27651 # since paths with space are more likely in Windows. Give it another try with the whole 27652 # argument. 27653 path="$complete" 27654 arguments="EOL" 27655 new_path=`$CYGPATH -u "$path"` 27656 new_path=`$WHICH "$new_path" 2> /dev/null` 27657 # bat and cmd files are not always considered executable in cygwin causing which 27658 # to not find them 27659 if test "x$new_path" = x \ 27660 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27661 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27662 new_path=`$CYGPATH -u "$path"` 27663 fi 27664 if test "x$new_path" = x; then 27665 # It's still not found. Now this is an unrecoverable error. 27666 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 27667 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 27668 has_space=`$ECHO "$complete" | $GREP " "` 27669 if test "x$has_space" != x; then 27670 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27672 fi 27673 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27674 fi 27675 fi 27676 27677 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27678 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27679 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27680 # "foo.exe" is OK but "foo" is an error. 27681 # 27682 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27683 # It is also a way to make sure we got the proper file name for the real test later on. 27684 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27685 if test "x$test_shortpath" = x; then 27686 # Short path failed, file does not exist as specified. 27687 # Try adding .exe or .cmd 27688 if test -f "${new_path}.exe"; then 27689 input_to_shortpath="${new_path}.exe" 27690 elif test -f "${new_path}.cmd"; then 27691 input_to_shortpath="${new_path}.cmd" 27692 else 27693 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5 27694 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;} 27695 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 27696 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 27697 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27698 fi 27699 else 27700 input_to_shortpath="$new_path" 27701 fi 27702 27703 # Call helper function which possibly converts this using DOS-style short mode. 27704 # If so, the updated path is stored in $new_path. 27705 new_path="$input_to_shortpath" 27706 27707 input_path="$input_to_shortpath" 27708 # Check if we need to convert this using DOS-style short mode. If the path 27709 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27710 # take no chances and rewrite it. 27711 # Note: m4 eats our [], so we need to use [ and ] instead. 27712 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 27713 if test "x$has_forbidden_chars" != x; then 27714 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27715 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 27716 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 27717 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 27718 # Going to short mode and back again did indeed matter. Since short mode is 27719 # case insensitive, let's make it lowercase to improve readability. 27720 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27721 # Now convert it back to Unix-stile (cygpath) 27722 input_path=`$CYGPATH -u "$shortmode_path"` 27723 new_path="$input_path" 27724 fi 27725 fi 27726 27727 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 27728 if test "x$test_cygdrive_prefix" = x; then 27729 # As a simple fix, exclude /usr/bin since it's not a real path. 27730 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 27731 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 27732 # a path prefixed by /cygdrive for fixpath to work. 27733 new_path="$CYGWIN_ROOT_PATH$input_path" 27734 fi 27735 fi 27736 27737 # remove trailing .exe if any 27738 new_path="${new_path/%.exe/}" 27739 27740 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27741 27742 # First separate the path from the arguments. This will split at the first 27743 # space. 27744 complete="$OBJDUMP" 27745 path="${complete%% *}" 27746 tmp="$complete EOL" 27747 arguments="${tmp#* }" 27748 27749 # Input might be given as Windows format, start by converting to 27750 # unix format. 27751 new_path="$path" 27752 27753 windows_path="$new_path" 27754 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27755 unix_path=`$CYGPATH -u "$windows_path"` 27756 new_path="$unix_path" 27757 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27758 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27759 new_path="$unix_path" 27760 fi 27761 27762 27763 # Now try to locate executable using which 27764 new_path=`$WHICH "$new_path" 2> /dev/null` 27765 27766 if test "x$new_path" = x; then 27767 # Oops. Which didn't find the executable. 27768 # The splitting of arguments from the executable at a space might have been incorrect, 27769 # since paths with space are more likely in Windows. Give it another try with the whole 27770 # argument. 27771 path="$complete" 27772 arguments="EOL" 27773 new_path="$path" 27774 27775 windows_path="$new_path" 27776 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27777 unix_path=`$CYGPATH -u "$windows_path"` 27778 new_path="$unix_path" 27779 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27780 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27781 new_path="$unix_path" 27782 fi 27783 27784 27785 new_path=`$WHICH "$new_path" 2> /dev/null` 27786 27787 if test "x$new_path" = x; then 27788 # It's still not found. Now this is an unrecoverable error. 27789 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 27790 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 27791 has_space=`$ECHO "$complete" | $GREP " "` 27792 if test "x$has_space" != x; then 27793 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27794 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27795 fi 27796 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27797 fi 27798 fi 27799 27800 # Now new_path has a complete unix path to the binary 27801 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 27802 # Keep paths in /bin as-is, but remove trailing .exe if any 27803 new_path="${new_path/%.exe/}" 27804 # Do not save /bin paths to all_fixpath_prefixes! 27805 else 27806 # Not in mixed or Windows style, start by that. 27807 new_path=`cmd //c echo $new_path` 27808 27809 input_path="$new_path" 27810 # Check if we need to convert this using DOS-style short mode. If the path 27811 # contains just simple characters, use it. Otherwise (spaces, weird characters), 27812 # take no chances and rewrite it. 27813 # Note: m4 eats our [], so we need to use [ and ] instead. 27814 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 27815 if test "x$has_forbidden_chars" != x; then 27816 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 27817 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27818 fi 27819 27820 # Output is in $new_path 27821 27822 windows_path="$new_path" 27823 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27824 unix_path=`$CYGPATH -u "$windows_path"` 27825 new_path="$unix_path" 27826 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 27827 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 27828 new_path="$unix_path" 27829 fi 27830 27831 # remove trailing .exe if any 27832 new_path="${new_path/%.exe/}" 27833 27834 # Save the first 10 bytes of this path to the storage, so fixpath can work. 27835 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 27836 fi 27837 27838 else 27839 # We're on a posix platform. Hooray! :) 27840 # First separate the path from the arguments. This will split at the first 27841 # space. 27842 complete="$OBJDUMP" 27843 path="${complete%% *}" 27844 tmp="$complete EOL" 27845 arguments="${tmp#* }" 27846 27847 # Cannot rely on the command "which" here since it doesn't always work. 27848 is_absolute_path=`$ECHO "$path" | $GREP ^/` 27849 if test -z "$is_absolute_path"; then 27850 # Path to executable is not absolute. Find it. 27851 IFS_save="$IFS" 27852 IFS=: 27853 for p in $PATH; do 27854 if test -f "$p/$path" && test -x "$p/$path"; then 27855 new_path="$p/$path" 27856 break 27857 fi 27858 done 27859 IFS="$IFS_save" 27860 else 27861 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5 27862 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;} 27863 new_path="$path" 27864 fi 27865 27866 if test "x$new_path" = x; then 27867 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 27868 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} 27869 has_space=`$ECHO "$complete" | $GREP " "` 27870 if test "x$has_space" != x; then 27871 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 27872 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 27873 fi 27874 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 27875 fi 27876 fi 27877 27878 # Now join together the path and the arguments once again 27879 if test "x$arguments" != xEOL; then 27880 new_complete="$new_path ${arguments% *}" 27881 else 27882 new_complete="$new_path" 27883 fi 27884 27885 if test "x$complete" != "x$new_complete"; then 27886 OBJDUMP="$new_complete" 27887 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 27888 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} 27889 fi 27890 27891 fi 27892 27893 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 27894 # Extract the first word of "lipo", so it can be a program name with args. 27895 set dummy lipo; ac_word=$2 27896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 27897 $as_echo_n "checking for $ac_word... " >&6; } 27898 if test "${ac_cv_path_LIPO+set}" = set; then : 27899 $as_echo_n "(cached) " >&6 27900 else 27901 case $LIPO in 27902 [\\/]* | ?:[\\/]*) 27903 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. 27904 ;; 27905 *) 27906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 27907 for as_dir in $PATH 27908 do 27909 IFS=$as_save_IFS 27910 test -z "$as_dir" && as_dir=. 27911 for ac_exec_ext in '' $ac_executable_extensions; do 27912 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 27913 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" 27914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 27915 break 2 27916 fi 27917 done 27918 done 27919 IFS=$as_save_IFS 27920 27921 ;; 27922 esac 27923 fi 27924 LIPO=$ac_cv_path_LIPO 27925 if test -n "$LIPO"; then 27926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 27927 $as_echo "$LIPO" >&6; } 27928 else 27929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 27930 $as_echo "no" >&6; } 27931 fi 27932 27933 27934 27935 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 27936 27937 # First separate the path from the arguments. This will split at the first 27938 # space. 27939 complete="$LIPO" 27940 path="${complete%% *}" 27941 tmp="$complete EOL" 27942 arguments="${tmp#* }" 27943 27944 # Input might be given as Windows format, start by converting to 27945 # unix format. 27946 new_path=`$CYGPATH -u "$path"` 27947 27948 # Now try to locate executable using which 27949 new_path=`$WHICH "$new_path" 2> /dev/null` 27950 # bat and cmd files are not always considered executable in cygwin causing which 27951 # to not find them 27952 if test "x$new_path" = x \ 27953 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27954 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27955 new_path=`$CYGPATH -u "$path"` 27956 fi 27957 if test "x$new_path" = x; then 27958 # Oops. Which didn't find the executable. 27959 # The splitting of arguments from the executable at a space might have been incorrect, 27960 # since paths with space are more likely in Windows. Give it another try with the whole 27961 # argument. 27962 path="$complete" 27963 arguments="EOL" 27964 new_path=`$CYGPATH -u "$path"` 27965 new_path=`$WHICH "$new_path" 2> /dev/null` 27966 # bat and cmd files are not always considered executable in cygwin causing which 27967 # to not find them 27968 if test "x$new_path" = x \ 27969 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 27970 && test "x`$LS \"$path\" 2>/dev/null`" != x; then 27971 new_path=`$CYGPATH -u "$path"` 27972 fi 27973 if test "x$new_path" = x; then 27974 # It's still not found. Now this is an unrecoverable error. 27975 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 27976 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 27977 has_space=`$ECHO "$complete" | $GREP " "` 27978 if test "x$has_space" != x; then 27979 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 27980 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 27981 fi 27982 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 27983 fi 27984 fi 27985 27986 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 27987 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 27988 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 27989 # "foo.exe" is OK but "foo" is an error. 27990 # 27991 # This test is therefore slightly more accurate than "test -f" to check for file precense. 27992 # It is also a way to make sure we got the proper file name for the real test later on. 27993 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 27994 if test "x$test_shortpath" = x; then 27995 # Short path failed, file does not exist as specified. 27996 # Try adding .exe or .cmd 27997 if test -f "${new_path}.exe"; then 27998 input_to_shortpath="${new_path}.exe" 27999 elif test -f "${new_path}.cmd"; then 28000 input_to_shortpath="${new_path}.cmd" 28001 else 28002 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5 28003 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;} 28004 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 28005 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 28006 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28007 fi 28008 else 28009 input_to_shortpath="$new_path" 28010 fi 28011 28012 # Call helper function which possibly converts this using DOS-style short mode. 28013 # If so, the updated path is stored in $new_path. 28014 new_path="$input_to_shortpath" 28015 28016 input_path="$input_to_shortpath" 28017 # Check if we need to convert this using DOS-style short mode. If the path 28018 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28019 # take no chances and rewrite it. 28020 # Note: m4 eats our [], so we need to use [ and ] instead. 28021 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 28022 if test "x$has_forbidden_chars" != x; then 28023 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28024 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 28025 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 28026 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 28027 # Going to short mode and back again did indeed matter. Since short mode is 28028 # case insensitive, let's make it lowercase to improve readability. 28029 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28030 # Now convert it back to Unix-stile (cygpath) 28031 input_path=`$CYGPATH -u "$shortmode_path"` 28032 new_path="$input_path" 28033 fi 28034 fi 28035 28036 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 28037 if test "x$test_cygdrive_prefix" = x; then 28038 # As a simple fix, exclude /usr/bin since it's not a real path. 28039 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 28040 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 28041 # a path prefixed by /cygdrive for fixpath to work. 28042 new_path="$CYGWIN_ROOT_PATH$input_path" 28043 fi 28044 fi 28045 28046 # remove trailing .exe if any 28047 new_path="${new_path/%.exe/}" 28048 28049 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28050 28051 # First separate the path from the arguments. This will split at the first 28052 # space. 28053 complete="$LIPO" 28054 path="${complete%% *}" 28055 tmp="$complete EOL" 28056 arguments="${tmp#* }" 28057 28058 # Input might be given as Windows format, start by converting to 28059 # unix format. 28060 new_path="$path" 28061 28062 windows_path="$new_path" 28063 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28064 unix_path=`$CYGPATH -u "$windows_path"` 28065 new_path="$unix_path" 28066 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28067 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28068 new_path="$unix_path" 28069 fi 28070 28071 28072 # Now try to locate executable using which 28073 new_path=`$WHICH "$new_path" 2> /dev/null` 28074 28075 if test "x$new_path" = x; then 28076 # Oops. Which didn't find the executable. 28077 # The splitting of arguments from the executable at a space might have been incorrect, 28078 # since paths with space are more likely in Windows. Give it another try with the whole 28079 # argument. 28080 path="$complete" 28081 arguments="EOL" 28082 new_path="$path" 28083 28084 windows_path="$new_path" 28085 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28086 unix_path=`$CYGPATH -u "$windows_path"` 28087 new_path="$unix_path" 28088 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28089 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28090 new_path="$unix_path" 28091 fi 28092 28093 28094 new_path=`$WHICH "$new_path" 2> /dev/null` 28095 28096 if test "x$new_path" = x; then 28097 # It's still not found. Now this is an unrecoverable error. 28098 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28099 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28100 has_space=`$ECHO "$complete" | $GREP " "` 28101 if test "x$has_space" != x; then 28102 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 28103 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 28104 fi 28105 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28106 fi 28107 fi 28108 28109 # Now new_path has a complete unix path to the binary 28110 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 28111 # Keep paths in /bin as-is, but remove trailing .exe if any 28112 new_path="${new_path/%.exe/}" 28113 # Do not save /bin paths to all_fixpath_prefixes! 28114 else 28115 # Not in mixed or Windows style, start by that. 28116 new_path=`cmd //c echo $new_path` 28117 28118 input_path="$new_path" 28119 # Check if we need to convert this using DOS-style short mode. If the path 28120 # contains just simple characters, use it. Otherwise (spaces, weird characters), 28121 # take no chances and rewrite it. 28122 # Note: m4 eats our [], so we need to use [ and ] instead. 28123 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 28124 if test "x$has_forbidden_chars" != x; then 28125 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 28126 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 28127 fi 28128 28129 # Output is in $new_path 28130 28131 windows_path="$new_path" 28132 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 28133 unix_path=`$CYGPATH -u "$windows_path"` 28134 new_path="$unix_path" 28135 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 28136 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 28137 new_path="$unix_path" 28138 fi 28139 28140 # remove trailing .exe if any 28141 new_path="${new_path/%.exe/}" 28142 28143 # Save the first 10 bytes of this path to the storage, so fixpath can work. 28144 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 28145 fi 28146 28147 else 28148 # We're on a posix platform. Hooray! :) 28149 # First separate the path from the arguments. This will split at the first 28150 # space. 28151 complete="$LIPO" 28152 path="${complete%% *}" 28153 tmp="$complete EOL" 28154 arguments="${tmp#* }" 28155 28156 # Cannot rely on the command "which" here since it doesn't always work. 28157 is_absolute_path=`$ECHO "$path" | $GREP ^/` 28158 if test -z "$is_absolute_path"; then 28159 # Path to executable is not absolute. Find it. 28160 IFS_save="$IFS" 28161 IFS=: 28162 for p in $PATH; do 28163 if test -f "$p/$path" && test -x "$p/$path"; then 28164 new_path="$p/$path" 28165 break 28166 fi 28167 done 28168 IFS="$IFS_save" 28169 else 28170 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5 28171 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;} 28172 new_path="$path" 28173 fi 28174 28175 if test "x$new_path" = x; then 28176 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 28177 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 28178 has_space=`$ECHO "$complete" | $GREP " "` 28179 if test "x$has_space" != x; then 28180 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 28181 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 28182 fi 28183 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 28184 fi 28185 fi 28186 28187 # Now join together the path and the arguments once again 28188 if test "x$arguments" != xEOL; then 28189 new_complete="$new_path ${arguments% *}" 28190 else 28191 new_complete="$new_path" 28192 fi 28193 28194 if test "x$complete" != "x$new_complete"; then 28195 LIPO="$new_complete" 28196 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 28197 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} 28198 fi 28199 28200 fi 28201 28202 # Restore old path without tools dir 28203 PATH="$OLD_PATH" 28204 28205 28206 # FIXME: Currently we must test this after paths but before flags. Fix! 28207 28208 # And we can test some aspects on the target using configure macros. 28209 28210 28211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 28212 $as_echo_n "checking for ANSI C header files... " >&6; } 28213 if test "${ac_cv_header_stdc+set}" = set; then : 28214 $as_echo_n "(cached) " >&6 28215 else 28216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28217 /* end confdefs.h. */ 28218 #include <stdlib.h> 28219 #include <stdarg.h> 28220 #include <string.h> 28221 #include <float.h> 28222 28223 int 28224 main () 28225 { 28226 28227 ; 28228 return 0; 28229 } 28230 _ACEOF 28231 if ac_fn_cxx_try_compile "$LINENO"; then : 28232 ac_cv_header_stdc=yes 28233 else 28234 ac_cv_header_stdc=no 28235 fi 28236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28237 28238 if test $ac_cv_header_stdc = yes; then 28239 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 28240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28241 /* end confdefs.h. */ 28242 #include <string.h> 28243 28244 _ACEOF 28245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28246 $EGREP "memchr" >/dev/null 2>&1; then : 28247 28248 else 28249 ac_cv_header_stdc=no 28250 fi 28251 rm -f conftest* 28252 28253 fi 28254 28255 if test $ac_cv_header_stdc = yes; then 28256 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 28257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28258 /* end confdefs.h. */ 28259 #include <stdlib.h> 28260 28261 _ACEOF 28262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28263 $EGREP "free" >/dev/null 2>&1; then : 28264 28265 else 28266 ac_cv_header_stdc=no 28267 fi 28268 rm -f conftest* 28269 28270 fi 28271 28272 if test $ac_cv_header_stdc = yes; then 28273 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 28274 if test "$cross_compiling" = yes; then : 28275 : 28276 else 28277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28278 /* end confdefs.h. */ 28279 #include <ctype.h> 28280 #include <stdlib.h> 28281 #if ((' ' & 0x0FF) == 0x020) 28282 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 28283 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 28284 #else 28285 # define ISLOWER(c) \ 28286 (('a' <= (c) && (c) <= 'i') \ 28287 || ('j' <= (c) && (c) <= 'r') \ 28288 || ('s' <= (c) && (c) <= 'z')) 28289 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 28290 #endif 28291 28292 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 28293 int 28294 main () 28295 { 28296 int i; 28297 for (i = 0; i < 256; i++) 28298 if (XOR (islower (i), ISLOWER (i)) 28299 || toupper (i) != TOUPPER (i)) 28300 return 2; 28301 return 0; 28302 } 28303 _ACEOF 28304 if ac_fn_cxx_try_run "$LINENO"; then : 28305 28306 else 28307 ac_cv_header_stdc=no 28308 fi 28309 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28310 conftest.$ac_objext conftest.beam conftest.$ac_ext 28311 fi 28312 28313 fi 28314 fi 28315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 28316 $as_echo "$ac_cv_header_stdc" >&6; } 28317 if test $ac_cv_header_stdc = yes; then 28318 28319 $as_echo "#define STDC_HEADERS 1" >>confdefs.h 28320 28321 fi 28322 28323 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 28324 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 28325 inttypes.h stdint.h unistd.h 28326 do : 28327 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 28328 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 28329 " 28330 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 28331 cat >>confdefs.h <<_ACEOF 28332 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 28333 _ACEOF 28334 28335 fi 28336 28337 done 28338 28339 28340 28341 ############################################################################### 28342 # 28343 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. 28344 # (The JVM can use 32 or 64 bit Java pointers but that decision 28345 # is made at runtime.) 28346 # 28347 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 28348 # Always specify -m flags on Solaris 28349 28350 # keep track of c/cxx flags that we added outselves... 28351 # to prevent emitting warning... 28352 ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28353 ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28354 ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28355 28356 CFLAGS="${CFLAGS}${ADDED_CFLAGS}" 28357 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" 28358 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" 28359 28360 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" 28361 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" 28362 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" 28363 28364 elif test "x$COMPILE_TYPE" = xreduced; then 28365 if test "x$OPENJDK_TARGET_OS" != xwindows; then 28366 # Specify -m if running reduced on other Posix platforms 28367 28368 # keep track of c/cxx flags that we added outselves... 28369 # to prevent emitting warning... 28370 ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28371 ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28372 ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" 28373 28374 CFLAGS="${CFLAGS}${ADDED_CFLAGS}" 28375 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" 28376 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" 28377 28378 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" 28379 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" 28380 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" 28381 28382 fi 28383 fi 28384 28385 # Make compilation sanity check 28386 for ac_header in stdio.h 28387 do : 28388 ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" 28389 if test "x$ac_cv_header_stdio_h" = x""yes; then : 28390 cat >>confdefs.h <<_ACEOF 28391 #define HAVE_STDIO_H 1 28392 _ACEOF 28393 28394 else 28395 28396 { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5 28397 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;} 28398 if test "x$COMPILE_TYPE" = xreduced; then 28399 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5 28400 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;} 28401 elif test "x$COMPILE_TYPE" = xcross; then 28402 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5 28403 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;} 28404 fi 28405 as_fn_error $? "Cannot continue." "$LINENO" 5 28406 28407 fi 28408 28409 done 28410 28411 28412 # The cast to long int works around a bug in the HP C Compiler 28413 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 28414 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 28415 # This bug is HP SR number 8606223364. 28416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5 28417 $as_echo_n "checking size of int *... " >&6; } 28418 if test "${ac_cv_sizeof_int_p+set}" = set; then : 28419 $as_echo_n "(cached) " >&6 28420 else 28421 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then : 28422 28423 else 28424 if test "$ac_cv_type_int_p" = yes; then 28425 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 28426 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 28427 as_fn_error 77 "cannot compute sizeof (int *) 28428 See \`config.log' for more details" "$LINENO" 5 ; } 28429 else 28430 ac_cv_sizeof_int_p=0 28431 fi 28432 fi 28433 28434 fi 28435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5 28436 $as_echo "$ac_cv_sizeof_int_p" >&6; } 28437 28438 28439 28440 cat >>confdefs.h <<_ACEOF 28441 #define SIZEOF_INT_P $ac_cv_sizeof_int_p 28442 _ACEOF 28443 28444 28445 28446 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then 28447 # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html 28448 SIZEOF_INT_P="$ac_cv_sizeof_int_p" 28449 fi 28450 28451 if test "x$SIZEOF_INT_P" = x; then 28452 # The test failed, lets stick to the assumed value. 28453 { $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 28454 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;} 28455 else 28456 TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P` 28457 28458 if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then 28459 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 28460 fi 28461 fi 28462 28463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5 28464 $as_echo_n "checking for target address size... " >&6; } 28465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5 28466 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; } 28467 28468 28469 ############################################################################### 28470 # 28471 # Is the target little of big endian? 28472 # 28473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 28474 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } 28475 if test "${ac_cv_c_bigendian+set}" = set; then : 28476 $as_echo_n "(cached) " >&6 28477 else 28478 ac_cv_c_bigendian=unknown 28479 # See if we're dealing with a universal compiler. 28480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28481 /* end confdefs.h. */ 28482 #ifndef __APPLE_CC__ 28483 not a universal capable compiler 28484 #endif 28485 typedef int dummy; 28486 28487 _ACEOF 28488 if ac_fn_cxx_try_compile "$LINENO"; then : 28489 28490 # Check for potential -arch flags. It is not universal unless 28491 # there are at least two -arch flags with different values. 28492 ac_arch= 28493 ac_prev= 28494 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 28495 if test -n "$ac_prev"; then 28496 case $ac_word in 28497 i?86 | x86_64 | ppc | ppc64) 28498 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 28499 ac_arch=$ac_word 28500 else 28501 ac_cv_c_bigendian=universal 28502 break 28503 fi 28504 ;; 28505 esac 28506 ac_prev= 28507 elif test "x$ac_word" = "x-arch"; then 28508 ac_prev=arch 28509 fi 28510 done 28511 fi 28512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28513 if test $ac_cv_c_bigendian = unknown; then 28514 # See if sys/param.h defines the BYTE_ORDER macro. 28515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28516 /* end confdefs.h. */ 28517 #include <sys/types.h> 28518 #include <sys/param.h> 28519 28520 int 28521 main () 28522 { 28523 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 28524 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 28525 && LITTLE_ENDIAN) 28526 bogus endian macros 28527 #endif 28528 28529 ; 28530 return 0; 28531 } 28532 _ACEOF 28533 if ac_fn_cxx_try_compile "$LINENO"; then : 28534 # It does; now see whether it defined to BIG_ENDIAN or not. 28535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28536 /* end confdefs.h. */ 28537 #include <sys/types.h> 28538 #include <sys/param.h> 28539 28540 int 28541 main () 28542 { 28543 #if BYTE_ORDER != BIG_ENDIAN 28544 not big endian 28545 #endif 28546 28547 ; 28548 return 0; 28549 } 28550 _ACEOF 28551 if ac_fn_cxx_try_compile "$LINENO"; then : 28552 ac_cv_c_bigendian=yes 28553 else 28554 ac_cv_c_bigendian=no 28555 fi 28556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28557 fi 28558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28559 fi 28560 if test $ac_cv_c_bigendian = unknown; then 28561 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 28562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28563 /* end confdefs.h. */ 28564 #include <limits.h> 28565 28566 int 28567 main () 28568 { 28569 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 28570 bogus endian macros 28571 #endif 28572 28573 ; 28574 return 0; 28575 } 28576 _ACEOF 28577 if ac_fn_cxx_try_compile "$LINENO"; then : 28578 # It does; now see whether it defined to _BIG_ENDIAN or not. 28579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28580 /* end confdefs.h. */ 28581 #include <limits.h> 28582 28583 int 28584 main () 28585 { 28586 #ifndef _BIG_ENDIAN 28587 not big endian 28588 #endif 28589 28590 ; 28591 return 0; 28592 } 28593 _ACEOF 28594 if ac_fn_cxx_try_compile "$LINENO"; then : 28595 ac_cv_c_bigendian=yes 28596 else 28597 ac_cv_c_bigendian=no 28598 fi 28599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28600 fi 28601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28602 fi 28603 if test $ac_cv_c_bigendian = unknown; then 28604 # Compile a test program. 28605 if test "$cross_compiling" = yes; then : 28606 # Try to guess by grepping values from an object file. 28607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28608 /* end confdefs.h. */ 28609 short int ascii_mm[] = 28610 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 28611 short int ascii_ii[] = 28612 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 28613 int use_ascii (int i) { 28614 return ascii_mm[i] + ascii_ii[i]; 28615 } 28616 short int ebcdic_ii[] = 28617 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 28618 short int ebcdic_mm[] = 28619 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 28620 int use_ebcdic (int i) { 28621 return ebcdic_mm[i] + ebcdic_ii[i]; 28622 } 28623 extern int foo; 28624 28625 int 28626 main () 28627 { 28628 return use_ascii (foo) == use_ebcdic (foo); 28629 ; 28630 return 0; 28631 } 28632 _ACEOF 28633 if ac_fn_cxx_try_compile "$LINENO"; then : 28634 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 28635 ac_cv_c_bigendian=yes 28636 fi 28637 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 28638 if test "$ac_cv_c_bigendian" = unknown; then 28639 ac_cv_c_bigendian=no 28640 else 28641 # finding both strings is unlikely to happen, but who knows? 28642 ac_cv_c_bigendian=unknown 28643 fi 28644 fi 28645 fi 28646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28647 else 28648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28649 /* end confdefs.h. */ 28650 $ac_includes_default 28651 int 28652 main () 28653 { 28654 28655 /* Are we little or big endian? From Harbison&Steele. */ 28656 union 28657 { 28658 long int l; 28659 char c[sizeof (long int)]; 28660 } u; 28661 u.l = 1; 28662 return u.c[sizeof (long int) - 1] == 1; 28663 28664 ; 28665 return 0; 28666 } 28667 _ACEOF 28668 if ac_fn_cxx_try_run "$LINENO"; then : 28669 ac_cv_c_bigendian=no 28670 else 28671 ac_cv_c_bigendian=yes 28672 fi 28673 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28674 conftest.$ac_objext conftest.beam conftest.$ac_ext 28675 fi 28676 28677 fi 28678 fi 28679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 28680 $as_echo "$ac_cv_c_bigendian" >&6; } 28681 case $ac_cv_c_bigendian in #( 28682 yes) 28683 ENDIAN="big";; #( 28684 no) 28685 ENDIAN="little" ;; #( 28686 universal) 28687 ENDIAN="universal_endianness" 28688 ;; #( 28689 *) 28690 ENDIAN="unknown" ;; 28691 esac 28692 28693 28694 if test "x$ENDIAN" = xuniversal_endianness; then 28695 as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5 28696 fi 28697 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then 28698 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 28699 fi 28700 28701 28702 # Configure flags for the tools 28703 28704 28705 ############################################################################### 28706 # 28707 # How to compile shared libraries. 28708 # 28709 28710 if test "x$GCC" = xyes; then 28711 COMPILER_NAME=gcc 28712 PICFLAG="-fPIC" 28713 LIBRARY_PREFIX=lib 28714 SHARED_LIBRARY='lib$1.so' 28715 STATIC_LIBRARY='lib$1.a' 28716 SHARED_LIBRARY_FLAGS="-shared" 28717 SHARED_LIBRARY_SUFFIX='.so' 28718 STATIC_LIBRARY_SUFFIX='.a' 28719 OBJ_SUFFIX='.o' 28720 EXE_SUFFIX='' 28721 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1' 28722 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1' 28723 C_FLAG_REORDER='' 28724 CXX_FLAG_REORDER='' 28725 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1' 28726 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1' 28727 LD="$CC" 28728 LDEXE="$CC" 28729 LDCXX="$CXX" 28730 LDEXECXX="$CXX" 28731 POST_STRIP_CMD="$STRIP -g" 28732 28733 # Linking is different on MacOSX 28734 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 28735 # Might change in the future to clang. 28736 COMPILER_NAME=gcc 28737 SHARED_LIBRARY='lib$1.dylib' 28738 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" 28739 SHARED_LIBRARY_SUFFIX='.dylib' 28740 EXE_SUFFIX='' 28741 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1' 28742 SET_SHARED_LIBRARY_MAPFILE='' 28743 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' 28744 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 28745 POST_STRIP_CMD="$STRIP -S" 28746 fi 28747 else 28748 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 28749 # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler 28750 COMPILER_NAME=ossc 28751 PICFLAG="-KPIC" 28752 LIBRARY_PREFIX=lib 28753 SHARED_LIBRARY='lib$1.so' 28754 STATIC_LIBRARY='lib$1.a' 28755 SHARED_LIBRARY_FLAGS="-G" 28756 SHARED_LIBRARY_SUFFIX='.so' 28757 STATIC_LIBRARY_SUFFIX='.a' 28758 OBJ_SUFFIX='.o' 28759 EXE_SUFFIX='' 28760 SET_SHARED_LIBRARY_NAME='' 28761 SET_SHARED_LIBRARY_MAPFILE='-M$1' 28762 C_FLAG_REORDER='-xF' 28763 CXX_FLAG_REORDER='-xF' 28764 SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1' 28765 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 28766 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" 28767 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" 28768 CFLAGS_JDKLIB_EXTRA='-xstrconst' 28769 POST_STRIP_CMD="$STRIP -x" 28770 POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" 28771 fi 28772 if test "x$OPENJDK_TARGET_OS" = xwindows; then 28773 # If it is not gcc, then assume it is the MS Visual Studio compiler 28774 COMPILER_NAME=cl 28775 PICFLAG="" 28776 LIBRARY_PREFIX= 28777 SHARED_LIBRARY='$1.dll' 28778 STATIC_LIBRARY='$1.lib' 28779 SHARED_LIBRARY_FLAGS="-LD" 28780 SHARED_LIBRARY_SUFFIX='.dll' 28781 STATIC_LIBRARY_SUFFIX='.lib' 28782 OBJ_SUFFIX='.obj' 28783 EXE_SUFFIX='.exe' 28784 SET_SHARED_LIBRARY_NAME='' 28785 SET_SHARED_LIBRARY_MAPFILE='' 28786 SET_SHARED_LIBRARY_ORIGIN='' 28787 SET_EXECUTABLE_ORIGIN='' 28788 fi 28789 fi 28790 28791 28792 28793 28794 28795 28796 28797 28798 28799 28800 28801 28802 28803 28804 28805 28806 28807 28808 # The (cross) compiler is now configured, we can now test capabilities 28809 # of the target platform. 28810 28811 28812 28813 ############################################################################### 28814 # 28815 # Setup the opt flags for different compilers 28816 # and different operating systems. 28817 # 28818 28819 # 28820 # NOTE: check for -mstackrealign needs to be below potential addition of -m32 28821 # 28822 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then 28823 # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. 28824 # While waiting for a better solution, the current workaround is to use -mstackrealign. 28825 CFLAGS="$CFLAGS -mstackrealign" 28826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5 28827 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; } 28828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28829 /* end confdefs.h. */ 28830 int main() { return 0; } 28831 _ACEOF 28832 if ac_fn_cxx_try_link "$LINENO"; then : 28833 28834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 28835 $as_echo "yes" >&6; } 28836 28837 else 28838 28839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 28840 $as_echo "no" >&6; } 28841 as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5 28842 28843 fi 28844 rm -f core conftest.err conftest.$ac_objext \ 28845 conftest$ac_exeext conftest.$ac_ext 28846 fi 28847 28848 C_FLAG_DEPS="-MMD -MF" 28849 CXX_FLAG_DEPS="-MMD -MF" 28850 28851 case $COMPILER_TYPE in 28852 CC ) 28853 D_FLAG="-g" 28854 case $COMPILER_NAME in 28855 gcc ) 28856 case $OPENJDK_TARGET_OS in 28857 macosx ) 28858 # On MacOSX we optimize for size, something 28859 # we should do for all platforms? 28860 C_O_FLAG_HI="-Os" 28861 C_O_FLAG_NORM="-Os" 28862 C_O_FLAG_NONE="" 28863 ;; 28864 *) 28865 C_O_FLAG_HI="-O3" 28866 C_O_FLAG_NORM="-O2" 28867 C_O_FLAG_NONE="-O0" 28868 CFLAGS_DEBUG_SYMBOLS="-g" 28869 CXXFLAGS_DEBUG_SYMBOLS="-g" 28870 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then 28871 CFLAGS_DEBUG_SYMBOLS="-g1" 28872 CXXFLAGS_DEBUG_SYMBOLS="-g1" 28873 fi 28874 ;; 28875 esac 28876 CXX_O_FLAG_HI="$C_O_FLAG_HI" 28877 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 28878 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 28879 ;; 28880 ossc ) 28881 # 28882 # Forte has different names for this with their C++ compiler... 28883 # 28884 C_FLAG_DEPS="-xMMD -xMF" 28885 CXX_FLAG_DEPS="-xMMD -xMF" 28886 28887 # Extra options used with HIGHEST 28888 # 28889 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be 28890 # done with care, there are some assumptions below that need to 28891 # be understood about the use of pointers, and IEEE behavior. 28892 # 28893 # Use non-standard floating point mode (not IEEE 754) 28894 CC_HIGHEST="$CC_HIGHEST -fns" 28895 # Do some simplification of floating point arithmetic (not IEEE 754) 28896 CC_HIGHEST="$CC_HIGHEST -fsimple" 28897 # Use single precision floating point with 'float' 28898 CC_HIGHEST="$CC_HIGHEST -fsingle" 28899 # Assume memory references via basic pointer types do not alias 28900 # (Source with excessing pointer casting and data access with mixed 28901 # pointer types are not recommended) 28902 CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" 28903 # Use intrinsic or inline versions for math/std functions 28904 # (If you expect perfect errno behavior, do not use this) 28905 CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all" 28906 # Loop data dependency optimizations (need -xO3 or higher) 28907 CC_HIGHEST="$CC_HIGHEST -xdepend" 28908 # Pointer parameters to functions do not overlap 28909 # (Similar to -xalias_level=basic usage, but less obvious sometimes. 28910 # If you pass in multiple pointers to the same data, do not use this) 28911 CC_HIGHEST="$CC_HIGHEST -xrestrict" 28912 # Inline some library routines 28913 # (If you expect perfect errno behavior, do not use this) 28914 CC_HIGHEST="$CC_HIGHEST -xlibmil" 28915 # Use optimized math routines 28916 # (If you expect perfect errno behavior, do not use this) 28917 # Can cause undefined external on Solaris 8 X86 on __sincos, removing for now 28918 #CC_HIGHEST="$CC_HIGHEST -xlibmopt" 28919 28920 if test "x$OPENJDK_TARGET_CPU" = xsparc; then 28921 CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" 28922 CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" 28923 fi 28924 28925 case $OPENJDK_TARGET_CPU_ARCH in 28926 x86) 28927 C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr" 28928 C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr" 28929 C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr" 28930 C_O_FLAG_NONE="-xregs=no%frameptr" 28931 CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr" 28932 CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr" 28933 CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr" 28934 CXX_O_FLAG_NONE="-xregs=no%frameptr" 28935 if test "x$OPENJDK_TARGET_CPU" = xx86; then 28936 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium" 28937 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium" 28938 fi 28939 ;; 28940 sparc) 28941 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 28942 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 28943 C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 28944 C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" 28945 C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" 28946 C_O_FLAG_NONE="" 28947 CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 28948 CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 28949 CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 28950 CXX_O_FLAG_NONE="" 28951 ;; 28952 esac 28953 28954 CFLAGS_DEBUG_SYMBOLS="-g -xs" 28955 CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" 28956 esac 28957 ;; 28958 CL ) 28959 D_FLAG= 28960 C_O_FLAG_HIGHEST="-O2" 28961 C_O_FLAG_HI="-O1" 28962 C_O_FLAG_NORM="-O1" 28963 C_O_FLAG_NONE="-Od" 28964 CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" 28965 CXX_O_FLAG_HI="$C_O_FLAG_HI" 28966 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 28967 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 28968 ;; 28969 esac 28970 28971 if test -z "$C_O_FLAG_HIGHEST"; then 28972 C_O_FLAG_HIGHEST="$C_O_FLAG_HI" 28973 fi 28974 28975 if test -z "$CXX_O_FLAG_HIGHEST"; then 28976 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" 28977 fi 28978 28979 28980 28981 28982 28983 28984 28985 28986 28987 28988 28989 28990 28991 28992 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then 28993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5 28994 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;} 28995 fi 28996 28997 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then 28998 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5 28999 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;} 29000 fi 29001 29002 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then 29003 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5 29004 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;} 29005 fi 29006 29007 29008 # Check whether --with-extra-cflags was given. 29009 if test "${with_extra_cflags+set}" = set; then : 29010 withval=$with_extra_cflags; 29011 fi 29012 29013 29014 29015 # Check whether --with-extra-cxxflags was given. 29016 if test "${with_extra_cxxflags+set}" = set; then : 29017 withval=$with_extra_cxxflags; 29018 fi 29019 29020 29021 29022 # Check whether --with-extra-ldflags was given. 29023 if test "${with_extra_ldflags+set}" = set; then : 29024 withval=$with_extra_ldflags; 29025 fi 29026 29027 29028 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" 29029 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" 29030 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" 29031 29032 # Hotspot needs these set in their legacy form 29033 LEGACY_EXTRA_CFLAGS=$with_extra_cflags 29034 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags 29035 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags 29036 29037 29038 29039 29040 29041 ############################################################################### 29042 # 29043 # Now setup the CFLAGS and LDFLAGS for the JDK build. 29044 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. 29045 # 29046 case $COMPILER_NAME in 29047 gcc ) 29048 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ 29049 -pipe \ 29050 -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" 29051 case $OPENJDK_TARGET_CPU_ARCH in 29052 arm ) 29053 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing 29054 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 29055 ;; 29056 ppc ) 29057 # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing 29058 ;; 29059 * ) 29060 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" 29061 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 29062 ;; 29063 esac 29064 ;; 29065 ossc ) 29066 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" 29067 case $OPENJDK_TARGET_CPU_ARCH in 29068 x86 ) 29069 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" 29070 CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" 29071 ;; 29072 esac 29073 29074 CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal" 29075 CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib" 29076 29077 LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext" 29078 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" 29079 ;; 29080 cl ) 29081 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ 29082 -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ 29083 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ 29084 -DWIN32 -DIAL" 29085 case $OPENJDK_TARGET_CPU in 29086 x86 ) 29087 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" 29088 ;; 29089 x86_64 ) 29090 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" 29091 ;; 29092 esac 29093 ;; 29094 esac 29095 29096 ############################################################################### 29097 29098 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" 29099 29100 # The package path is used only on macosx? 29101 PACKAGE_PATH=/opt/local 29102 29103 29104 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then 29105 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the 29106 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN 29107 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). 29108 # Note: -Dmacro is the same as #define macro 1 29109 # -Dmacro= is the same as #define macro 29110 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29111 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN=" 29112 else 29113 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" 29114 fi 29115 else 29116 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" 29117 fi 29118 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29119 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" 29120 fi 29121 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29122 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" 29123 fi 29124 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29125 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" 29126 fi 29127 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29128 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" 29129 # Setting these parameters makes it an error to link to macosx APIs that are 29130 # newer than the given OS version and makes the linked binaries compatible even 29131 # if built on a newer version of the OS. 29132 # The expected format is X.Y.Z 29133 MACOSX_VERSION_MIN=10.7.0 29134 29135 # The macro takes the version with no dots, ex: 1070 29136 # Let the flags variables get resolved in make for easier override on make 29137 # command line. 29138 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" 29139 LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" 29140 fi 29141 if test "x$OPENJDK_TARGET_OS" = xbsd; then 29142 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" 29143 fi 29144 if test "x$DEBUG_LEVEL" = xrelease; then 29145 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" 29146 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29147 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" 29148 fi 29149 else 29150 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" 29151 fi 29152 29153 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" 29154 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" 29155 29156 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ 29157 -I${JDK_OUTPUTDIR}/include \ 29158 -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ 29159 -I${JDK_TOPDIR}/src/share/javavm/export \ 29160 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \ 29161 -I${JDK_TOPDIR}/src/share/native/common \ 29162 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common" 29163 29164 # The shared libraries are compiled using the picflag. 29165 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" 29166 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA " 29167 29168 # Executable flags 29169 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" 29170 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" 29171 29172 # Now this is odd. The JDK native libraries have to link against libjvm.so 29173 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server. 29174 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library 29175 # is identical for client and server? Yes. Which is picked at runtime (client or server)? 29176 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following 29177 # libraries will link to whatever is in memory. Yuck. 29178 # 29179 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. 29180 if test "x$COMPILER_NAME" = xcl; then 29181 LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" 29182 if test "x$OPENJDK_TARGET_CPU" = xx86; then 29183 LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" 29184 fi 29185 # TODO: make -debug optional "--disable-full-debug-symbols" 29186 LDFLAGS_JDK="$LDFLAGS_JDK -debug" 29187 LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib" 29188 LDFLAGS_JDKLIB_SUFFIX="" 29189 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 29190 LDFLAGS_STACK_SIZE=1048576 29191 else 29192 LDFLAGS_STACK_SIZE=327680 29193 fi 29194 LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" 29195 else 29196 if test "x$COMPILER_NAME" = xgcc; then 29197 # If this is a --hash-style=gnu system, use --hash-style=both, why? 29198 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` 29199 if test -n "$HAS_GNU_HASH"; then 29200 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " 29201 fi 29202 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29203 # And since we now know that the linker is gnu, then add -z defs, to forbid 29204 # undefined symbols in object files. 29205 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" 29206 if test "x$DEBUG_LEVEL" = "xrelease"; then 29207 # When building release libraries, tell the linker optimize them. 29208 # Should this be supplied to the OSS linker as well? 29209 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1" 29210 fi 29211 fi 29212 fi 29213 LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \ 29214 -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}" 29215 29216 # On some platforms (mac) the linker warns about non existing -L dirs. 29217 # Add server first if available. Linking aginst client does not always produce the same results. 29218 # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1. 29219 # Default to server for other variants. 29220 if test "x$JVM_VARIANT_SERVER" = xtrue; then 29221 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 29222 elif test "x$JVM_VARIANT_CLIENT" = xtrue; then 29223 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client" 29224 elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 29225 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal" 29226 else 29227 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" 29228 fi 29229 29230 LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm" 29231 if test "x$COMPILER_NAME" = xossc; then 29232 LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" 29233 fi 29234 29235 LDFLAGS_JDKEXE="${LDFLAGS_JDK}" 29236 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29237 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined" 29238 fi 29239 fi 29240 29241 # Adjust flags according to debug level. 29242 case $DEBUG_LEVEL in 29243 fastdebug ) 29244 CFLAGS="$CFLAGS $D_FLAG" 29245 JAVAC_FLAGS="$JAVAC_FLAGS -g" 29246 ;; 29247 slowdebug ) 29248 CFLAGS="$CFLAGS $D_FLAG" 29249 C_O_FLAG_HI="$C_O_FLAG_NONE" 29250 C_O_FLAG_NORM="$C_O_FLAG_NONE" 29251 CXX_O_FLAG_HI="$CXX_O_FLAG_NONE" 29252 CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" 29253 JAVAC_FLAGS="$JAVAC_FLAGS -g" 29254 ;; 29255 esac 29256 29257 29258 29259 29260 29261 29262 29263 29264 29265 29266 29267 29268 29269 29270 29271 # Setup debug symbols (need objcopy from the toolchain for that) 29272 29273 # 29274 # ENABLE_DEBUG_SYMBOLS 29275 # This must be done after the toolchain is setup, since we're looking at objcopy. 29276 # 29277 # Check whether --enable-debug-symbols was given. 29278 if test "${enable_debug_symbols+set}" = set; then : 29279 enableval=$enable_debug_symbols; 29280 fi 29281 29282 29283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5 29284 $as_echo_n "checking if we should generate debug symbols... " >&6; } 29285 29286 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then 29287 # explicit enabling of enable-debug-symbols and can't find objcopy 29288 # this is an error 29289 as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5 29290 fi 29291 29292 if test "x$enable_debug_symbols" = "xyes"; then 29293 ENABLE_DEBUG_SYMBOLS=true 29294 elif test "x$enable_debug_symbols" = "xno"; then 29295 ENABLE_DEBUG_SYMBOLS=false 29296 else 29297 # default on macosx is false 29298 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29299 ENABLE_DEBUG_SYMBOLS=false 29300 # Default is on if objcopy is found, otherwise off 29301 elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then 29302 ENABLE_DEBUG_SYMBOLS=true 29303 else 29304 ENABLE_DEBUG_SYMBOLS=false 29305 fi 29306 fi 29307 29308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5 29309 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; } 29310 29311 # 29312 # ZIP_DEBUGINFO_FILES 29313 # 29314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5 29315 $as_echo_n "checking if we should zip debug-info files... " >&6; } 29316 # Check whether --enable-zip-debug-info was given. 29317 if test "${enable_zip_debug_info+set}" = set; then : 29318 enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}" 29319 else 29320 enable_zip_debug_info="yes" 29321 fi 29322 29323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5 29324 $as_echo "${enable_zip_debug_info}" >&6; } 29325 29326 if test "x${enable_zip_debug_info}" = "xno"; then 29327 ZIP_DEBUGINFO_FILES=false 29328 else 29329 ZIP_DEBUGINFO_FILES=true 29330 fi 29331 29332 29333 29334 29335 29336 29337 29338 ############################################################################### 29339 # 29340 # Check dependencies for external and internal libraries. 29341 # 29342 ############################################################################### 29343 29344 29345 29346 ############################################################################### 29347 # 29348 # OS specific settings that we never will need to probe. 29349 # 29350 if test "x$OPENJDK_TARGET_OS" = xlinux; then 29351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5 29352 $as_echo_n "checking what is not needed on Linux?... " >&6; } 29353 PULSE_NOT_NEEDED=yes 29354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5 29355 $as_echo "pulse" >&6; } 29356 fi 29357 29358 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 29359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5 29360 $as_echo_n "checking what is not needed on Solaris?... " >&6; } 29361 ALSA_NOT_NEEDED=yes 29362 PULSE_NOT_NEEDED=yes 29363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 29364 $as_echo "alsa pulse" >&6; } 29365 fi 29366 29367 if test "x$OPENJDK_TARGET_OS" = xwindows; then 29368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5 29369 $as_echo_n "checking what is not needed on Windows?... " >&6; } 29370 CUPS_NOT_NEEDED=yes 29371 ALSA_NOT_NEEDED=yes 29372 PULSE_NOT_NEEDED=yes 29373 X11_NOT_NEEDED=yes 29374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5 29375 $as_echo "alsa cups pulse x11" >&6; } 29376 fi 29377 29378 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 29379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5 29380 $as_echo_n "checking what is not needed on MacOSX?... " >&6; } 29381 ALSA_NOT_NEEDED=yes 29382 PULSE_NOT_NEEDED=yes 29383 X11_NOT_NEEDED=yes 29384 FREETYPE2_NOT_NEEDED=yes 29385 # If the java runtime framework is disabled, then we need X11. 29386 # This will be adjusted below. 29387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5 29388 $as_echo "alsa pulse x11" >&6; } 29389 fi 29390 29391 if test "x$OPENJDK_TARGET_OS" = xbsd; then 29392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5 29393 $as_echo_n "checking what is not needed on bsd?... " >&6; } 29394 ALSA_NOT_NEEDED=yes 29395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5 29396 $as_echo "alsa" >&6; } 29397 fi 29398 29399 if test "x$OPENJDK" = "xfalse"; then 29400 FREETYPE2_NOT_NEEDED=yes 29401 fi 29402 29403 if test "x$SUPPORT_HEADFUL" = xno; then 29404 X11_NOT_NEEDED=yes 29405 fi 29406 29407 ############################################################################### 29408 # 29409 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM 29410 # that uses this API. 29411 # 29412 # Check whether --enable-macosx-runtime-support was given. 29413 if test "${enable_macosx_runtime_support+set}" = set; then : 29414 enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}" 29415 else 29416 MACOSX_RUNTIME_SUPPORT="no" 29417 fi 29418 29419 29420 USE_MACOSX_RUNTIME_SUPPORT=no 29421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5 29422 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; } 29423 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 29424 if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then 29425 MACOSX_RUNTIME_SUPPORT=yes 29426 USE_MACOSX_RUNTIME_SUPPORT=yes 29427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5 29428 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; } 29429 else 29430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5 29431 $as_echo "yes, but explicitly disabled." >&6; } 29432 fi 29433 else 29434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 29435 $as_echo "no" >&6; } 29436 fi 29437 29438 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then 29439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5 29440 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; } 29441 X11_NOT_NEEDED= 29442 FREETYPE2_NOT_NEEDED= 29443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 29444 $as_echo "alsa pulse" >&6; } 29445 fi 29446 29447 29448 29449 29450 ############################################################################### 29451 # 29452 # Check for X Windows 29453 # 29454 29455 # Check if the user has specified sysroot, but not --x-includes or --x-libraries. 29456 # Make a simple check for the libraries at the sysroot, and setup --x-includes and 29457 # --x-libraries for the sysroot, if that seems to be correct. 29458 if test "x$SYS_ROOT" != "x/"; then 29459 if test "x$x_includes" = xNONE; then 29460 if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then 29461 x_includes="$SYS_ROOT/usr/X11R6/include" 29462 fi 29463 fi 29464 if test "x$x_libraries" = xNONE; then 29465 if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then 29466 x_libraries="$SYS_ROOT/usr/X11R6/lib" 29467 fi 29468 fi 29469 fi 29470 29471 # Now let autoconf do it's magic 29472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 29473 $as_echo_n "checking for X... " >&6; } 29474 29475 29476 # Check whether --with-x was given. 29477 if test "${with_x+set}" = set; then : 29478 withval=$with_x; 29479 fi 29480 29481 # $have_x is `yes', `no', `disabled', or empty when we do not yet know. 29482 if test "x$with_x" = xno; then 29483 # The user explicitly disabled X. 29484 have_x=disabled 29485 else 29486 case $x_includes,$x_libraries in #( 29487 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( 29488 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : 29489 $as_echo_n "(cached) " >&6 29490 else 29491 # One or both of the vars are not set, and there is no cached value. 29492 ac_x_includes=no ac_x_libraries=no 29493 rm -f -r conftest.dir 29494 if mkdir conftest.dir; then 29495 cd conftest.dir 29496 cat >Imakefile <<'_ACEOF' 29497 incroot: 29498 @echo incroot='${INCROOT}' 29499 usrlibdir: 29500 @echo usrlibdir='${USRLIBDIR}' 29501 libdir: 29502 @echo libdir='${LIBDIR}' 29503 _ACEOF 29504 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then 29505 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 29506 for ac_var in incroot usrlibdir libdir; do 29507 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" 29508 done 29509 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. 29510 for ac_extension in a so sl dylib la dll; do 29511 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && 29512 test -f "$ac_im_libdir/libX11.$ac_extension"; then 29513 ac_im_usrlibdir=$ac_im_libdir; break 29514 fi 29515 done 29516 # Screen out bogus values from the imake configuration. They are 29517 # bogus both because they are the default anyway, and because 29518 # using them would break gcc on systems where it needs fixed includes. 29519 case $ac_im_incroot in 29520 /usr/include) ac_x_includes= ;; 29521 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; 29522 esac 29523 case $ac_im_usrlibdir in 29524 /usr/lib | /usr/lib64 | /lib | /lib64) ;; 29525 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; 29526 esac 29527 fi 29528 cd .. 29529 rm -f -r conftest.dir 29530 fi 29531 29532 # Standard set of common directories for X headers. 29533 # Check X11 before X11Rn because it is often a symlink to the current release. 29534 ac_x_header_dirs=' 29535 /usr/X11/include 29536 /usr/X11R7/include 29537 /usr/X11R6/include 29538 /usr/X11R5/include 29539 /usr/X11R4/include 29540 29541 /usr/include/X11 29542 /usr/include/X11R7 29543 /usr/include/X11R6 29544 /usr/include/X11R5 29545 /usr/include/X11R4 29546 29547 /usr/local/X11/include 29548 /usr/local/X11R7/include 29549 /usr/local/X11R6/include 29550 /usr/local/X11R5/include 29551 /usr/local/X11R4/include 29552 29553 /usr/local/include/X11 29554 /usr/local/include/X11R7 29555 /usr/local/include/X11R6 29556 /usr/local/include/X11R5 29557 /usr/local/include/X11R4 29558 29559 /usr/X386/include 29560 /usr/x386/include 29561 /usr/XFree86/include/X11 29562 29563 /usr/include 29564 /usr/local/include 29565 /usr/unsupported/include 29566 /usr/athena/include 29567 /usr/local/x11r5/include 29568 /usr/lpp/Xamples/include 29569 29570 /usr/openwin/include 29571 /usr/openwin/share/include' 29572 29573 if test "$ac_x_includes" = no; then 29574 # Guess where to find include files, by looking for Xlib.h. 29575 # First, try using that file with no special directory specified. 29576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29577 /* end confdefs.h. */ 29578 #include <X11/Xlib.h> 29579 _ACEOF 29580 if ac_fn_cxx_try_cpp "$LINENO"; then : 29581 # We can compile using X headers with no special include directory. 29582 ac_x_includes= 29583 else 29584 for ac_dir in $ac_x_header_dirs; do 29585 if test -r "$ac_dir/X11/Xlib.h"; then 29586 ac_x_includes=$ac_dir 29587 break 29588 fi 29589 done 29590 fi 29591 rm -f conftest.err conftest.i conftest.$ac_ext 29592 fi # $ac_x_includes = no 29593 29594 if test "$ac_x_libraries" = no; then 29595 # Check for the libraries. 29596 # See if we find them without any special options. 29597 # Don't add to $LIBS permanently. 29598 ac_save_LIBS=$LIBS 29599 LIBS="-lX11 $LIBS" 29600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29601 /* end confdefs.h. */ 29602 #include <X11/Xlib.h> 29603 int 29604 main () 29605 { 29606 XrmInitialize () 29607 ; 29608 return 0; 29609 } 29610 _ACEOF 29611 if ac_fn_cxx_try_link "$LINENO"; then : 29612 LIBS=$ac_save_LIBS 29613 # We can link X programs with no special library path. 29614 ac_x_libraries= 29615 else 29616 LIBS=$ac_save_LIBS 29617 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` 29618 do 29619 # Don't even attempt the hair of trying to link an X program! 29620 for ac_extension in a so sl dylib la dll; do 29621 if test -r "$ac_dir/libX11.$ac_extension"; then 29622 ac_x_libraries=$ac_dir 29623 break 2 29624 fi 29625 done 29626 done 29627 fi 29628 rm -f core conftest.err conftest.$ac_objext \ 29629 conftest$ac_exeext conftest.$ac_ext 29630 fi # $ac_x_libraries = no 29631 29632 case $ac_x_includes,$ac_x_libraries in #( 29633 no,* | *,no | *\'*) 29634 # Didn't find X, or a directory has "'" in its name. 29635 ac_cv_have_x="have_x=no";; #( 29636 *) 29637 # Record where we found X for the cache. 29638 ac_cv_have_x="have_x=yes\ 29639 ac_x_includes='$ac_x_includes'\ 29640 ac_x_libraries='$ac_x_libraries'" 29641 esac 29642 fi 29643 ;; #( 29644 *) have_x=yes;; 29645 esac 29646 eval "$ac_cv_have_x" 29647 fi # $with_x != no 29648 29649 if test "$have_x" != yes; then 29650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 29651 $as_echo "$have_x" >&6; } 29652 no_x=yes 29653 else 29654 # If each of the values was on the command line, it overrides each guess. 29655 test "x$x_includes" = xNONE && x_includes=$ac_x_includes 29656 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries 29657 # Update the cache value to reflect the command line values. 29658 ac_cv_have_x="have_x=yes\ 29659 ac_x_includes='$x_includes'\ 29660 ac_x_libraries='$x_libraries'" 29661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 29662 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } 29663 fi 29664 29665 if test "$no_x" = yes; then 29666 # Not all programs may use this symbol, but it does not hurt to define it. 29667 29668 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h 29669 29670 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= 29671 else 29672 if test -n "$x_includes"; then 29673 X_CFLAGS="$X_CFLAGS -I$x_includes" 29674 fi 29675 29676 # It would also be nice to do this for all -L options, not just this one. 29677 if test -n "$x_libraries"; then 29678 X_LIBS="$X_LIBS -L$x_libraries" 29679 # For Solaris; some versions of Sun CC require a space after -R and 29680 # others require no space. Words are not sufficient . . . . 29681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 29682 $as_echo_n "checking whether -R must be followed by a space... " >&6; } 29683 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" 29684 ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag 29685 ac_cxx_werror_flag=yes 29686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29687 /* end confdefs.h. */ 29688 29689 int 29690 main () 29691 { 29692 29693 ; 29694 return 0; 29695 } 29696 _ACEOF 29697 if ac_fn_cxx_try_link "$LINENO"; then : 29698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 29699 $as_echo "no" >&6; } 29700 X_LIBS="$X_LIBS -R$x_libraries" 29701 else 29702 LIBS="$ac_xsave_LIBS -R $x_libraries" 29703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29704 /* end confdefs.h. */ 29705 29706 int 29707 main () 29708 { 29709 29710 ; 29711 return 0; 29712 } 29713 _ACEOF 29714 if ac_fn_cxx_try_link "$LINENO"; then : 29715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 29716 $as_echo "yes" >&6; } 29717 X_LIBS="$X_LIBS -R $x_libraries" 29718 else 29719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 29720 $as_echo "neither works" >&6; } 29721 fi 29722 rm -f core conftest.err conftest.$ac_objext \ 29723 conftest$ac_exeext conftest.$ac_ext 29724 fi 29725 rm -f core conftest.err conftest.$ac_objext \ 29726 conftest$ac_exeext conftest.$ac_ext 29727 ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag 29728 LIBS=$ac_xsave_LIBS 29729 fi 29730 29731 # Check for system-dependent libraries X programs must link with. 29732 # Do this before checking for the system-independent R6 libraries 29733 # (-lICE), since we may need -lsocket or whatever for X linking. 29734 29735 if test "$ISC" = yes; then 29736 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" 29737 else 29738 # Martyn Johnson says this is needed for Ultrix, if the X 29739 # libraries were built with DECnet support. And Karl Berry says 29740 # the Alpha needs dnet_stub (dnet does not exist). 29741 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" 29742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29743 /* end confdefs.h. */ 29744 29745 /* Override any GCC internal prototype to avoid an error. 29746 Use char because int might match the return type of a GCC 29747 builtin and then its argument prototype would still apply. */ 29748 #ifdef __cplusplus 29749 extern "C" 29750 #endif 29751 char XOpenDisplay (); 29752 int 29753 main () 29754 { 29755 return XOpenDisplay (); 29756 ; 29757 return 0; 29758 } 29759 _ACEOF 29760 if ac_fn_cxx_try_link "$LINENO"; then : 29761 29762 else 29763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 29764 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } 29765 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : 29766 $as_echo_n "(cached) " >&6 29767 else 29768 ac_check_lib_save_LIBS=$LIBS 29769 LIBS="-ldnet $LIBS" 29770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29771 /* end confdefs.h. */ 29772 29773 /* Override any GCC internal prototype to avoid an error. 29774 Use char because int might match the return type of a GCC 29775 builtin and then its argument prototype would still apply. */ 29776 #ifdef __cplusplus 29777 extern "C" 29778 #endif 29779 char dnet_ntoa (); 29780 int 29781 main () 29782 { 29783 return dnet_ntoa (); 29784 ; 29785 return 0; 29786 } 29787 _ACEOF 29788 if ac_fn_cxx_try_link "$LINENO"; then : 29789 ac_cv_lib_dnet_dnet_ntoa=yes 29790 else 29791 ac_cv_lib_dnet_dnet_ntoa=no 29792 fi 29793 rm -f core conftest.err conftest.$ac_objext \ 29794 conftest$ac_exeext conftest.$ac_ext 29795 LIBS=$ac_check_lib_save_LIBS 29796 fi 29797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 29798 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } 29799 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : 29800 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" 29801 fi 29802 29803 if test $ac_cv_lib_dnet_dnet_ntoa = no; then 29804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 29805 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } 29806 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : 29807 $as_echo_n "(cached) " >&6 29808 else 29809 ac_check_lib_save_LIBS=$LIBS 29810 LIBS="-ldnet_stub $LIBS" 29811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29812 /* end confdefs.h. */ 29813 29814 /* Override any GCC internal prototype to avoid an error. 29815 Use char because int might match the return type of a GCC 29816 builtin and then its argument prototype would still apply. */ 29817 #ifdef __cplusplus 29818 extern "C" 29819 #endif 29820 char dnet_ntoa (); 29821 int 29822 main () 29823 { 29824 return dnet_ntoa (); 29825 ; 29826 return 0; 29827 } 29828 _ACEOF 29829 if ac_fn_cxx_try_link "$LINENO"; then : 29830 ac_cv_lib_dnet_stub_dnet_ntoa=yes 29831 else 29832 ac_cv_lib_dnet_stub_dnet_ntoa=no 29833 fi 29834 rm -f core conftest.err conftest.$ac_objext \ 29835 conftest$ac_exeext conftest.$ac_ext 29836 LIBS=$ac_check_lib_save_LIBS 29837 fi 29838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 29839 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } 29840 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : 29841 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" 29842 fi 29843 29844 fi 29845 fi 29846 rm -f core conftest.err conftest.$ac_objext \ 29847 conftest$ac_exeext conftest.$ac_ext 29848 LIBS="$ac_xsave_LIBS" 29849 29850 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, 29851 # to get the SysV transport functions. 29852 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) 29853 # needs -lnsl. 29854 # The nsl library prevents programs from opening the X display 29855 # on Irix 5.2, according to T.E. Dickey. 29856 # The functions gethostbyname, getservbyname, and inet_addr are 29857 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. 29858 ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" 29859 if test "x$ac_cv_func_gethostbyname" = x""yes; then : 29860 29861 fi 29862 29863 if test $ac_cv_func_gethostbyname = no; then 29864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 29865 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } 29866 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : 29867 $as_echo_n "(cached) " >&6 29868 else 29869 ac_check_lib_save_LIBS=$LIBS 29870 LIBS="-lnsl $LIBS" 29871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29872 /* end confdefs.h. */ 29873 29874 /* Override any GCC internal prototype to avoid an error. 29875 Use char because int might match the return type of a GCC 29876 builtin and then its argument prototype would still apply. */ 29877 #ifdef __cplusplus 29878 extern "C" 29879 #endif 29880 char gethostbyname (); 29881 int 29882 main () 29883 { 29884 return gethostbyname (); 29885 ; 29886 return 0; 29887 } 29888 _ACEOF 29889 if ac_fn_cxx_try_link "$LINENO"; then : 29890 ac_cv_lib_nsl_gethostbyname=yes 29891 else 29892 ac_cv_lib_nsl_gethostbyname=no 29893 fi 29894 rm -f core conftest.err conftest.$ac_objext \ 29895 conftest$ac_exeext conftest.$ac_ext 29896 LIBS=$ac_check_lib_save_LIBS 29897 fi 29898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 29899 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } 29900 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : 29901 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" 29902 fi 29903 29904 if test $ac_cv_lib_nsl_gethostbyname = no; then 29905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 29906 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } 29907 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : 29908 $as_echo_n "(cached) " >&6 29909 else 29910 ac_check_lib_save_LIBS=$LIBS 29911 LIBS="-lbsd $LIBS" 29912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29913 /* end confdefs.h. */ 29914 29915 /* Override any GCC internal prototype to avoid an error. 29916 Use char because int might match the return type of a GCC 29917 builtin and then its argument prototype would still apply. */ 29918 #ifdef __cplusplus 29919 extern "C" 29920 #endif 29921 char gethostbyname (); 29922 int 29923 main () 29924 { 29925 return gethostbyname (); 29926 ; 29927 return 0; 29928 } 29929 _ACEOF 29930 if ac_fn_cxx_try_link "$LINENO"; then : 29931 ac_cv_lib_bsd_gethostbyname=yes 29932 else 29933 ac_cv_lib_bsd_gethostbyname=no 29934 fi 29935 rm -f core conftest.err conftest.$ac_objext \ 29936 conftest$ac_exeext conftest.$ac_ext 29937 LIBS=$ac_check_lib_save_LIBS 29938 fi 29939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 29940 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } 29941 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : 29942 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" 29943 fi 29944 29945 fi 29946 fi 29947 29948 # lieder@skyler.mavd.honeywell.com says without -lsocket, 29949 # socket/setsockopt and other routines are undefined under SCO ODT 29950 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary 29951 # on later versions), says Simon Leinen: it contains gethostby* 29952 # variants that don't use the name server (or something). -lsocket 29953 # must be given before -lnsl if both are needed. We assume that 29954 # if connect needs -lnsl, so does gethostbyname. 29955 ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" 29956 if test "x$ac_cv_func_connect" = x""yes; then : 29957 29958 fi 29959 29960 if test $ac_cv_func_connect = no; then 29961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 29962 $as_echo_n "checking for connect in -lsocket... " >&6; } 29963 if test "${ac_cv_lib_socket_connect+set}" = set; then : 29964 $as_echo_n "(cached) " >&6 29965 else 29966 ac_check_lib_save_LIBS=$LIBS 29967 LIBS="-lsocket $X_EXTRA_LIBS $LIBS" 29968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29969 /* end confdefs.h. */ 29970 29971 /* Override any GCC internal prototype to avoid an error. 29972 Use char because int might match the return type of a GCC 29973 builtin and then its argument prototype would still apply. */ 29974 #ifdef __cplusplus 29975 extern "C" 29976 #endif 29977 char connect (); 29978 int 29979 main () 29980 { 29981 return connect (); 29982 ; 29983 return 0; 29984 } 29985 _ACEOF 29986 if ac_fn_cxx_try_link "$LINENO"; then : 29987 ac_cv_lib_socket_connect=yes 29988 else 29989 ac_cv_lib_socket_connect=no 29990 fi 29991 rm -f core conftest.err conftest.$ac_objext \ 29992 conftest$ac_exeext conftest.$ac_ext 29993 LIBS=$ac_check_lib_save_LIBS 29994 fi 29995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 29996 $as_echo "$ac_cv_lib_socket_connect" >&6; } 29997 if test "x$ac_cv_lib_socket_connect" = x""yes; then : 29998 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" 29999 fi 30000 30001 fi 30002 30003 # Guillermo Gomez says -lposix is necessary on A/UX. 30004 ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" 30005 if test "x$ac_cv_func_remove" = x""yes; then : 30006 30007 fi 30008 30009 if test $ac_cv_func_remove = no; then 30010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 30011 $as_echo_n "checking for remove in -lposix... " >&6; } 30012 if test "${ac_cv_lib_posix_remove+set}" = set; then : 30013 $as_echo_n "(cached) " >&6 30014 else 30015 ac_check_lib_save_LIBS=$LIBS 30016 LIBS="-lposix $LIBS" 30017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30018 /* end confdefs.h. */ 30019 30020 /* Override any GCC internal prototype to avoid an error. 30021 Use char because int might match the return type of a GCC 30022 builtin and then its argument prototype would still apply. */ 30023 #ifdef __cplusplus 30024 extern "C" 30025 #endif 30026 char remove (); 30027 int 30028 main () 30029 { 30030 return remove (); 30031 ; 30032 return 0; 30033 } 30034 _ACEOF 30035 if ac_fn_cxx_try_link "$LINENO"; then : 30036 ac_cv_lib_posix_remove=yes 30037 else 30038 ac_cv_lib_posix_remove=no 30039 fi 30040 rm -f core conftest.err conftest.$ac_objext \ 30041 conftest$ac_exeext conftest.$ac_ext 30042 LIBS=$ac_check_lib_save_LIBS 30043 fi 30044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 30045 $as_echo "$ac_cv_lib_posix_remove" >&6; } 30046 if test "x$ac_cv_lib_posix_remove" = x""yes; then : 30047 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" 30048 fi 30049 30050 fi 30051 30052 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. 30053 ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" 30054 if test "x$ac_cv_func_shmat" = x""yes; then : 30055 30056 fi 30057 30058 if test $ac_cv_func_shmat = no; then 30059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 30060 $as_echo_n "checking for shmat in -lipc... " >&6; } 30061 if test "${ac_cv_lib_ipc_shmat+set}" = set; then : 30062 $as_echo_n "(cached) " >&6 30063 else 30064 ac_check_lib_save_LIBS=$LIBS 30065 LIBS="-lipc $LIBS" 30066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30067 /* end confdefs.h. */ 30068 30069 /* Override any GCC internal prototype to avoid an error. 30070 Use char because int might match the return type of a GCC 30071 builtin and then its argument prototype would still apply. */ 30072 #ifdef __cplusplus 30073 extern "C" 30074 #endif 30075 char shmat (); 30076 int 30077 main () 30078 { 30079 return shmat (); 30080 ; 30081 return 0; 30082 } 30083 _ACEOF 30084 if ac_fn_cxx_try_link "$LINENO"; then : 30085 ac_cv_lib_ipc_shmat=yes 30086 else 30087 ac_cv_lib_ipc_shmat=no 30088 fi 30089 rm -f core conftest.err conftest.$ac_objext \ 30090 conftest$ac_exeext conftest.$ac_ext 30091 LIBS=$ac_check_lib_save_LIBS 30092 fi 30093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 30094 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } 30095 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : 30096 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" 30097 fi 30098 30099 fi 30100 fi 30101 30102 # Check for libraries that X11R6 Xt/Xaw programs need. 30103 ac_save_LDFLAGS=$LDFLAGS 30104 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" 30105 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to 30106 # check for ICE first), but we must link in the order -lSM -lICE or 30107 # we get undefined symbols. So assume we have SM if we have ICE. 30108 # These have to be linked with before -lX11, unlike the other 30109 # libraries we check for below, so use a different variable. 30110 # John Interrante, Karl Berry 30111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 30112 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } 30113 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : 30114 $as_echo_n "(cached) " >&6 30115 else 30116 ac_check_lib_save_LIBS=$LIBS 30117 LIBS="-lICE $X_EXTRA_LIBS $LIBS" 30118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30119 /* end confdefs.h. */ 30120 30121 /* Override any GCC internal prototype to avoid an error. 30122 Use char because int might match the return type of a GCC 30123 builtin and then its argument prototype would still apply. */ 30124 #ifdef __cplusplus 30125 extern "C" 30126 #endif 30127 char IceConnectionNumber (); 30128 int 30129 main () 30130 { 30131 return IceConnectionNumber (); 30132 ; 30133 return 0; 30134 } 30135 _ACEOF 30136 if ac_fn_cxx_try_link "$LINENO"; then : 30137 ac_cv_lib_ICE_IceConnectionNumber=yes 30138 else 30139 ac_cv_lib_ICE_IceConnectionNumber=no 30140 fi 30141 rm -f core conftest.err conftest.$ac_objext \ 30142 conftest$ac_exeext conftest.$ac_ext 30143 LIBS=$ac_check_lib_save_LIBS 30144 fi 30145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 30146 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } 30147 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : 30148 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" 30149 fi 30150 30151 LDFLAGS=$ac_save_LDFLAGS 30152 30153 fi 30154 30155 30156 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling 30157 # this doesn't make sense so we remove it. 30158 if test "x$COMPILE_TYPE" = xcross; then 30159 X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'` 30160 fi 30161 30162 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 30163 30164 # Print a helpful message on how to acquire the necessary build dependency. 30165 # x11 is the help tag: freetyp2, cups, pulse, alsa etc 30166 MISSING_DEPENDENCY=x11 30167 PKGHANDLER_COMMAND= 30168 30169 case $PKGHANDLER in 30170 apt-get) 30171 apt_help $MISSING_DEPENDENCY ;; 30172 yum) 30173 yum_help $MISSING_DEPENDENCY ;; 30174 port) 30175 port_help $MISSING_DEPENDENCY ;; 30176 pkgutil) 30177 pkgutil_help $MISSING_DEPENDENCY ;; 30178 pkgadd) 30179 pkgadd_help $MISSING_DEPENDENCY ;; 30180 * ) 30181 break ;; 30182 esac 30183 30184 if test "x$PKGHANDLER_COMMAND" != x; then 30185 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30186 fi 30187 30188 as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5 30189 fi 30190 30191 # Some of the old makefiles require a setting of OPENWIN_HOME 30192 # Since the X11R6 directory has disappeared on later Linuxes, 30193 # we need to probe for it. 30194 if test "x$OPENJDK_TARGET_OS" = xlinux; then 30195 if test -d "$SYS_ROOT/usr/X11R6"; then 30196 OPENWIN_HOME="$SYS_ROOT/usr/X11R6" 30197 fi 30198 if test -d "$SYS_ROOT/usr/include/X11"; then 30199 OPENWIN_HOME="$SYS_ROOT/usr" 30200 fi 30201 fi 30202 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 30203 OPENWIN_HOME="/usr/openwin" 30204 fi 30205 30206 30207 30208 # 30209 # Weird Sol10 something check...TODO change to try compile 30210 # 30211 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then 30212 if test "`uname -r`" = "5.10"; then 30213 if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then 30214 X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" 30215 fi 30216 fi 30217 fi 30218 30219 ac_ext=c 30220 ac_cpp='$CPP $CPPFLAGS' 30221 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 30222 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 30223 ac_compiler_gnu=$ac_cv_c_compiler_gnu 30224 30225 OLD_CFLAGS="$CFLAGS" 30226 CFLAGS="$CFLAGS $X_CFLAGS" 30227 30228 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 30229 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h 30230 do : 30231 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 30232 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h> 30233 # include <X11/Xutil.h> 30234 30235 " 30236 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 30237 cat >>confdefs.h <<_ACEOF 30238 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 30239 _ACEOF 30240 X11_A_OK=yes 30241 else 30242 X11_A_OK=no; break 30243 fi 30244 30245 done 30246 30247 30248 CFLAGS="$OLD_CFLAGS" 30249 ac_ext=cpp 30250 ac_cpp='$CXXCPP $CPPFLAGS' 30251 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 30252 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 30253 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 30254 30255 30256 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 30257 30258 # Print a helpful message on how to acquire the necessary build dependency. 30259 # x11 is the help tag: freetyp2, cups, pulse, alsa etc 30260 MISSING_DEPENDENCY=x11 30261 PKGHANDLER_COMMAND= 30262 30263 case $PKGHANDLER in 30264 apt-get) 30265 apt_help $MISSING_DEPENDENCY ;; 30266 yum) 30267 yum_help $MISSING_DEPENDENCY ;; 30268 port) 30269 port_help $MISSING_DEPENDENCY ;; 30270 pkgutil) 30271 pkgutil_help $MISSING_DEPENDENCY ;; 30272 pkgadd) 30273 pkgadd_help $MISSING_DEPENDENCY ;; 30274 * ) 30275 break ;; 30276 esac 30277 30278 if test "x$PKGHANDLER_COMMAND" != x; then 30279 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30280 fi 30281 30282 as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5 30283 fi 30284 30285 30286 30287 30288 30289 30290 ############################################################################### 30291 # 30292 # The common unix printing system cups is used to print from java. 30293 # 30294 30295 # Check whether --with-cups was given. 30296 if test "${with_cups+set}" = set; then : 30297 withval=$with_cups; 30298 fi 30299 30300 30301 # Check whether --with-cups-include was given. 30302 if test "${with_cups_include+set}" = set; then : 30303 withval=$with_cups_include; 30304 fi 30305 30306 30307 if test "x$CUPS_NOT_NEEDED" = xyes; then 30308 if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then 30309 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5 30310 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;} 30311 fi 30312 CUPS_CFLAGS= 30313 else 30314 CUPS_FOUND=no 30315 30316 if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then 30317 as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5 30318 fi 30319 30320 if test "x${with_cups}" != x; then 30321 CUPS_CFLAGS="-I${with_cups}/include" 30322 CUPS_FOUND=yes 30323 fi 30324 if test "x${with_cups_include}" != x; then 30325 CUPS_CFLAGS="-I${with_cups_include}" 30326 CUPS_FOUND=yes 30327 fi 30328 if test "x$CUPS_FOUND" = xno; then 30329 30330 30331 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 30332 # Source the builddeps file again, to make sure it uses the latest variables! 30333 . $builddepsfile 30334 # Look for a target and build machine specific resource! 30335 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 30336 if test "x$resource" = x; then 30337 # Ok, lets instead look for a target specific resource 30338 eval resource=\${builddep_cups_TARGET_${rewritten_target_var}} 30339 fi 30340 if test "x$resource" = x; then 30341 # Ok, lets instead look for a build specific resource 30342 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}} 30343 fi 30344 if test "x$resource" = x; then 30345 # Ok, lets instead look for a generic resource 30346 # (The cups comes from M4 and not the shell, thus no need for eval here.) 30347 resource=${builddep_cups} 30348 fi 30349 if test "x$resource" != x; then 30350 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5 30351 $as_echo "$as_me: Using builddeps $resource for cups" >&6;} 30352 # If the resource in the builddeps.conf file is an existing directory, 30353 # for example /java/linux/cups 30354 if test -d ${resource}; then 30355 depdir=${resource} 30356 else 30357 30358 # cups is for example mymodule 30359 # $resource is for example libs/general/libmymod_1_2_3.zip 30360 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 30361 # $with_builddeps_dir is for example /localhome/builddeps 30362 # depdir is the name of the variable into which we store the depdir, eg MYMOD 30363 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 30364 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 30365 filename=`basename $resource` 30366 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 30367 filebase=${filename%%.*} 30368 extension=${filename#*.} 30369 installdir=$with_builddeps_dir/$filebase 30370 if test ! -f $installdir/$filename.unpacked; then 30371 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5 30372 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;} 30373 if test ! -d $installdir; then 30374 mkdir -p $installdir 30375 fi 30376 if test ! -d $installdir; then 30377 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 30378 fi 30379 tmpfile=`mktemp $installdir/cups.XXXXXXXXX` 30380 touch $tmpfile 30381 if test ! -f $tmpfile; then 30382 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 30383 fi 30384 30385 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 30386 # $tmpfile is the local file name for the downloaded file. 30387 VALID_TOOL=no 30388 if test "x$BDEPS_FTP" = xwget; then 30389 VALID_TOOL=yes 30390 wget -O $tmpfile $with_builddeps_server/$resource 30391 fi 30392 if test "x$BDEPS_FTP" = xlftp; then 30393 VALID_TOOL=yes 30394 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 30395 fi 30396 if test "x$BDEPS_FTP" = xftp; then 30397 VALID_TOOL=yes 30398 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 30399 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 30400 FTPUSERPWD=${FTPSERVER%%@*} 30401 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 30402 FTPUSER=${userpwd%%:*} 30403 FTPPWD=${userpwd#*@} 30404 FTPSERVER=${FTPSERVER#*@} 30405 else 30406 FTPUSER=ftp 30407 FTPPWD=ftp 30408 fi 30409 # the "pass" command does not work on some 30410 # ftp clients (read ftp.exe) but if it works, 30411 # passive mode is better! 30412 (\ 30413 echo "user $FTPUSER $FTPPWD" ;\ 30414 echo "pass" ;\ 30415 echo "bin" ;\ 30416 echo "get $FTPPATH $tmpfile" ;\ 30417 ) | ftp -in $FTPSERVER 30418 fi 30419 if test "x$VALID_TOOL" != xyes; then 30420 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 30421 fi 30422 30423 mv $tmpfile $installdir/$filename 30424 if test ! -s $installdir/$filename; then 30425 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 30426 fi 30427 case "$extension" in 30428 zip) echo "Unzipping $installdir/$filename..." 30429 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 30430 ;; 30431 tar.gz) echo "Untaring $installdir/$filename..." 30432 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30433 ;; 30434 tgz) echo "Untaring $installdir/$filename..." 30435 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30436 ;; 30437 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 30438 ;; 30439 esac 30440 fi 30441 if test -f $installdir/$filename.unpacked; then 30442 depdir=$installdir 30443 fi 30444 30445 fi 30446 # Source the builddeps file again, because in the previous command, the depdir 30447 # was updated to point at the current build dependency install directory. 30448 . $builddepsfile 30449 # Now extract variables from the builddeps.conf files. 30450 theroot=${builddep_cups_ROOT} 30451 thecflags=${builddep_cups_CFLAGS} 30452 thelibs=${builddep_cups_LIBS} 30453 if test "x$depdir" = x; then 30454 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5 30455 fi 30456 CUPS=$depdir 30457 if test "x$theroot" != x; then 30458 CUPS="$theroot" 30459 fi 30460 if test "x$thecflags" != x; then 30461 CUPS_CFLAGS="$thecflags" 30462 fi 30463 if test "x$thelibs" != x; then 30464 CUPS_LIBS="$thelibs" 30465 fi 30466 CUPS_FOUND=yes 30467 30468 fi 30469 30470 fi 30471 30472 fi 30473 if test "x$CUPS_FOUND" = xno; then 30474 # Are the cups headers installed in the default /usr/include location? 30475 for ac_header in cups/cups.h cups/ppd.h 30476 do : 30477 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 30478 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 30479 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 30480 cat >>confdefs.h <<_ACEOF 30481 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 30482 _ACEOF 30483 CUPS_FOUND=yes 30484 CUPS_CFLAGS= 30485 DEFAULT_CUPS=yes 30486 fi 30487 30488 done 30489 30490 fi 30491 if test "x$CUPS_FOUND" = xno; then 30492 # Getting nervous now? Lets poke around for standard Solaris third-party 30493 # package installation locations. 30494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5 30495 $as_echo_n "checking for cups headers... " >&6; } 30496 if test -s /opt/sfw/cups/include/cups/cups.h; then 30497 # An SFW package seems to be installed! 30498 CUPS_FOUND=yes 30499 CUPS_CFLAGS="-I/opt/sfw/cups/include" 30500 elif test -s /opt/csw/include/cups/cups.h; then 30501 # A CSW package seems to be installed! 30502 CUPS_FOUND=yes 30503 CUPS_CFLAGS="-I/opt/csw/include" 30504 fi 30505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 30506 $as_echo "$CUPS_FOUND" >&6; } 30507 fi 30508 if test "x$CUPS_FOUND" = xno; then 30509 30510 # Print a helpful message on how to acquire the necessary build dependency. 30511 # cups is the help tag: freetyp2, cups, pulse, alsa etc 30512 MISSING_DEPENDENCY=cups 30513 PKGHANDLER_COMMAND= 30514 30515 case $PKGHANDLER in 30516 apt-get) 30517 apt_help $MISSING_DEPENDENCY ;; 30518 yum) 30519 yum_help $MISSING_DEPENDENCY ;; 30520 port) 30521 port_help $MISSING_DEPENDENCY ;; 30522 pkgutil) 30523 pkgutil_help $MISSING_DEPENDENCY ;; 30524 pkgadd) 30525 pkgadd_help $MISSING_DEPENDENCY ;; 30526 * ) 30527 break ;; 30528 esac 30529 30530 if test "x$PKGHANDLER_COMMAND" != x; then 30531 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 30532 fi 30533 30534 as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5 30535 fi 30536 fi 30537 30538 30539 30540 30541 30542 30543 ############################################################################### 30544 # 30545 # The ubiquitous freetype2 library is used to render fonts. 30546 # 30547 30548 # Check whether --with-freetype was given. 30549 if test "${with_freetype+set}" = set; then : 30550 withval=$with_freetype; 30551 fi 30552 30553 30554 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree 30555 USING_SYSTEM_FT_LIB=false 30556 30557 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then 30558 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 30559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5 30560 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;} 30561 fi 30562 FREETYPE2_CFLAGS= 30563 FREETYPE2_LIBS= 30564 FREETYPE2_LIB_PATH= 30565 else 30566 FREETYPE2_FOUND=no 30567 30568 if test "x$with_freetype" != x; then 30569 30570 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 30571 30572 # Input might be given as Windows format, start by converting to 30573 # unix format. 30574 path="$with_freetype" 30575 new_path=`$CYGPATH -u "$path"` 30576 30577 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 30578 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 30579 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 30580 # "foo.exe" is OK but "foo" is an error. 30581 # 30582 # This test is therefore slightly more accurate than "test -f" to check for file precense. 30583 # It is also a way to make sure we got the proper file name for the real test later on. 30584 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 30585 if test "x$test_shortpath" = x; then 30586 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 30587 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 30588 as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5 30589 fi 30590 30591 # Call helper function which possibly converts this using DOS-style short mode. 30592 # If so, the updated path is stored in $new_path. 30593 30594 input_path="$new_path" 30595 # Check if we need to convert this using DOS-style short mode. If the path 30596 # contains just simple characters, use it. Otherwise (spaces, weird characters), 30597 # take no chances and rewrite it. 30598 # Note: m4 eats our [], so we need to use [ and ] instead. 30599 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 30600 if test "x$has_forbidden_chars" != x; then 30601 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 30602 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 30603 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 30604 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 30605 # Going to short mode and back again did indeed matter. Since short mode is 30606 # case insensitive, let's make it lowercase to improve readability. 30607 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 30608 # Now convert it back to Unix-stile (cygpath) 30609 input_path=`$CYGPATH -u "$shortmode_path"` 30610 new_path="$input_path" 30611 fi 30612 fi 30613 30614 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 30615 if test "x$test_cygdrive_prefix" = x; then 30616 # As a simple fix, exclude /usr/bin since it's not a real path. 30617 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 30618 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 30619 # a path prefixed by /cygdrive for fixpath to work. 30620 new_path="$CYGWIN_ROOT_PATH$input_path" 30621 fi 30622 fi 30623 30624 30625 if test "x$path" != "x$new_path"; then 30626 with_freetype="$new_path" 30627 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 30628 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 30629 fi 30630 30631 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 30632 30633 path="$with_freetype" 30634 has_colon=`$ECHO $path | $GREP ^.:` 30635 new_path="$path" 30636 if test "x$has_colon" = x; then 30637 # Not in mixed or Windows style, start by that. 30638 new_path=`cmd //c echo $path` 30639 fi 30640 30641 30642 input_path="$new_path" 30643 # Check if we need to convert this using DOS-style short mode. If the path 30644 # contains just simple characters, use it. Otherwise (spaces, weird characters), 30645 # take no chances and rewrite it. 30646 # Note: m4 eats our [], so we need to use [ and ] instead. 30647 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 30648 if test "x$has_forbidden_chars" != x; then 30649 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 30650 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 30651 fi 30652 30653 30654 windows_path="$new_path" 30655 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 30656 unix_path=`$CYGPATH -u "$windows_path"` 30657 new_path="$unix_path" 30658 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 30659 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 30660 new_path="$unix_path" 30661 fi 30662 30663 if test "x$path" != "x$new_path"; then 30664 with_freetype="$new_path" 30665 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 30666 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 30667 fi 30668 30669 # Save the first 10 bytes of this path to the storage, so fixpath can work. 30670 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 30671 30672 else 30673 # We're on a posix platform. Hooray! :) 30674 path="$with_freetype" 30675 30676 if test ! -f "$path" && test ! -d "$path"; then 30677 as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5 30678 fi 30679 30680 has_space=`$ECHO "$path" | $GREP " "` 30681 if test "x$has_space" != x; then 30682 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 30683 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 30684 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 30685 fi 30686 fi 30687 30688 FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" 30689 FREETYPE2_LIB_PATH="$with_freetype/lib" 30690 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then 30691 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype" 30692 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64" 30693 fi 30694 if test "x$OPENJDK_TARGET_OS" = xwindows; then 30695 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" 30696 fi 30697 FREETYPE2_CFLAGS="-I$with_freetype/include" 30698 if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then 30699 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" 30700 fi 30701 FREETYPE2_FOUND=yes 30702 if test "x$FREETYPE2_FOUND" = xyes; then 30703 # Verify that the directories exist 30704 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then 30705 as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5 30706 fi 30707 # List the contents of the lib. 30708 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` 30709 if test "x$FREETYPELIB" = x; then 30710 as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5 30711 fi 30712 # Check one h-file 30713 if ! test -s "$with_freetype/include/ft2build.h"; then 30714 as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5 30715 fi 30716 fi 30717 fi 30718 if test "x$FREETYPE2_FOUND" = xno; then 30719 30720 30721 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 30722 # Source the builddeps file again, to make sure it uses the latest variables! 30723 . $builddepsfile 30724 # Look for a target and build machine specific resource! 30725 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 30726 if test "x$resource" = x; then 30727 # Ok, lets instead look for a target specific resource 30728 eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}} 30729 fi 30730 if test "x$resource" = x; then 30731 # Ok, lets instead look for a build specific resource 30732 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}} 30733 fi 30734 if test "x$resource" = x; then 30735 # Ok, lets instead look for a generic resource 30736 # (The freetype2 comes from M4 and not the shell, thus no need for eval here.) 30737 resource=${builddep_freetype2} 30738 fi 30739 if test "x$resource" != x; then 30740 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5 30741 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;} 30742 # If the resource in the builddeps.conf file is an existing directory, 30743 # for example /java/linux/cups 30744 if test -d ${resource}; then 30745 depdir=${resource} 30746 else 30747 30748 # freetype2 is for example mymodule 30749 # $resource is for example libs/general/libmymod_1_2_3.zip 30750 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 30751 # $with_builddeps_dir is for example /localhome/builddeps 30752 # depdir is the name of the variable into which we store the depdir, eg MYMOD 30753 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 30754 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 30755 filename=`basename $resource` 30756 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 30757 filebase=${filename%%.*} 30758 extension=${filename#*.} 30759 installdir=$with_builddeps_dir/$filebase 30760 if test ! -f $installdir/$filename.unpacked; then 30761 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5 30762 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;} 30763 if test ! -d $installdir; then 30764 mkdir -p $installdir 30765 fi 30766 if test ! -d $installdir; then 30767 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 30768 fi 30769 tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX` 30770 touch $tmpfile 30771 if test ! -f $tmpfile; then 30772 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 30773 fi 30774 30775 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 30776 # $tmpfile is the local file name for the downloaded file. 30777 VALID_TOOL=no 30778 if test "x$BDEPS_FTP" = xwget; then 30779 VALID_TOOL=yes 30780 wget -O $tmpfile $with_builddeps_server/$resource 30781 fi 30782 if test "x$BDEPS_FTP" = xlftp; then 30783 VALID_TOOL=yes 30784 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 30785 fi 30786 if test "x$BDEPS_FTP" = xftp; then 30787 VALID_TOOL=yes 30788 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 30789 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 30790 FTPUSERPWD=${FTPSERVER%%@*} 30791 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 30792 FTPUSER=${userpwd%%:*} 30793 FTPPWD=${userpwd#*@} 30794 FTPSERVER=${FTPSERVER#*@} 30795 else 30796 FTPUSER=ftp 30797 FTPPWD=ftp 30798 fi 30799 # the "pass" command does not work on some 30800 # ftp clients (read ftp.exe) but if it works, 30801 # passive mode is better! 30802 (\ 30803 echo "user $FTPUSER $FTPPWD" ;\ 30804 echo "pass" ;\ 30805 echo "bin" ;\ 30806 echo "get $FTPPATH $tmpfile" ;\ 30807 ) | ftp -in $FTPSERVER 30808 fi 30809 if test "x$VALID_TOOL" != xyes; then 30810 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 30811 fi 30812 30813 mv $tmpfile $installdir/$filename 30814 if test ! -s $installdir/$filename; then 30815 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 30816 fi 30817 case "$extension" in 30818 zip) echo "Unzipping $installdir/$filename..." 30819 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 30820 ;; 30821 tar.gz) echo "Untaring $installdir/$filename..." 30822 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30823 ;; 30824 tgz) echo "Untaring $installdir/$filename..." 30825 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 30826 ;; 30827 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 30828 ;; 30829 esac 30830 fi 30831 if test -f $installdir/$filename.unpacked; then 30832 depdir=$installdir 30833 fi 30834 30835 fi 30836 # Source the builddeps file again, because in the previous command, the depdir 30837 # was updated to point at the current build dependency install directory. 30838 . $builddepsfile 30839 # Now extract variables from the builddeps.conf files. 30840 theroot=${builddep_freetype2_ROOT} 30841 thecflags=${builddep_freetype2_CFLAGS} 30842 thelibs=${builddep_freetype2_LIBS} 30843 if test "x$depdir" = x; then 30844 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5 30845 fi 30846 FREETYPE2=$depdir 30847 if test "x$theroot" != x; then 30848 FREETYPE2="$theroot" 30849 fi 30850 if test "x$thecflags" != x; then 30851 FREETYPE2_CFLAGS="$thecflags" 30852 fi 30853 if test "x$thelibs" != x; then 30854 FREETYPE2_LIBS="$thelibs" 30855 fi 30856 FREETYPE2_FOUND=yes 30857 else FREETYPE2_FOUND=no 30858 30859 fi 30860 else FREETYPE2_FOUND=no 30861 30862 fi 30863 30864 USING_SYSTEM_FT_LIB=true 30865 fi 30866 if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then 30867 FREETYPELOCATION="$PROGRAMFILES/GnuWin32" 30868 30869 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 30870 30871 # Input might be given as Windows format, start by converting to 30872 # unix format. 30873 path="$FREETYPELOCATION" 30874 new_path=`$CYGPATH -u "$path"` 30875 30876 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 30877 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 30878 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 30879 # "foo.exe" is OK but "foo" is an error. 30880 # 30881 # This test is therefore slightly more accurate than "test -f" to check for file precense. 30882 # It is also a way to make sure we got the proper file name for the real test later on. 30883 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 30884 if test "x$test_shortpath" = x; then 30885 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 30886 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 30887 as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5 30888 fi 30889 30890 # Call helper function which possibly converts this using DOS-style short mode. 30891 # If so, the updated path is stored in $new_path. 30892 30893 input_path="$new_path" 30894 # Check if we need to convert this using DOS-style short mode. If the path 30895 # contains just simple characters, use it. Otherwise (spaces, weird characters), 30896 # take no chances and rewrite it. 30897 # Note: m4 eats our [], so we need to use [ and ] instead. 30898 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 30899 if test "x$has_forbidden_chars" != x; then 30900 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 30901 shortmode_path=`$CYGPATH -s -m -a "$input_path"` 30902 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 30903 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 30904 # Going to short mode and back again did indeed matter. Since short mode is 30905 # case insensitive, let's make it lowercase to improve readability. 30906 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 30907 # Now convert it back to Unix-stile (cygpath) 30908 input_path=`$CYGPATH -u "$shortmode_path"` 30909 new_path="$input_path" 30910 fi 30911 fi 30912 30913 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 30914 if test "x$test_cygdrive_prefix" = x; then 30915 # As a simple fix, exclude /usr/bin since it's not a real path. 30916 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 30917 # The path is in a Cygwin special directory (e.g. /home). We need this converted to 30918 # a path prefixed by /cygdrive for fixpath to work. 30919 new_path="$CYGWIN_ROOT_PATH$input_path" 30920 fi 30921 fi 30922 30923 30924 if test "x$path" != "x$new_path"; then 30925 FREETYPELOCATION="$new_path" 30926 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 30927 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 30928 fi 30929 30930 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 30931 30932 path="$FREETYPELOCATION" 30933 has_colon=`$ECHO $path | $GREP ^.:` 30934 new_path="$path" 30935 if test "x$has_colon" = x; then 30936 # Not in mixed or Windows style, start by that. 30937 new_path=`cmd //c echo $path` 30938 fi 30939 30940 30941 input_path="$new_path" 30942 # Check if we need to convert this using DOS-style short mode. If the path 30943 # contains just simple characters, use it. Otherwise (spaces, weird characters), 30944 # take no chances and rewrite it. 30945 # Note: m4 eats our [], so we need to use [ and ] instead. 30946 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 30947 if test "x$has_forbidden_chars" != x; then 30948 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 30949 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 30950 fi 30951 30952 30953 windows_path="$new_path" 30954 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 30955 unix_path=`$CYGPATH -u "$windows_path"` 30956 new_path="$unix_path" 30957 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 30958 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 30959 new_path="$unix_path" 30960 fi 30961 30962 if test "x$path" != "x$new_path"; then 30963 FREETYPELOCATION="$new_path" 30964 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 30965 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 30966 fi 30967 30968 # Save the first 10 bytes of this path to the storage, so fixpath can work. 30969 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 30970 30971 else 30972 # We're on a posix platform. Hooray! :) 30973 path="$FREETYPELOCATION" 30974 30975 if test ! -f "$path" && test ! -d "$path"; then 30976 as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5 30977 fi 30978 30979 has_space=`$ECHO "$path" | $GREP " "` 30980 if test "x$has_space" != x; then 30981 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 30982 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 30983 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 30984 fi 30985 fi 30986 30987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5 30988 $as_echo_n "checking for freetype in some standard windows locations... " >&6; } 30989 if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then 30990 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include" 30991 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib" 30992 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib" 30993 if ! test -s "$FREETYPE2_LIBS"; then 30994 as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5 30995 fi 30996 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then 30997 as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5 30998 fi 30999 USING_SYSTEM_FT_LIB=true 31000 FREETYPE2_FOUND=yes 31001 fi 31002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 31003 $as_echo "$FREETYPE2_FOUND" >&6; } 31004 fi 31005 if test "x$FREETYPE2_FOUND" = xno; then 31006 31007 pkg_failed=no 31008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5 31009 $as_echo_n "checking for FREETYPE2... " >&6; } 31010 31011 if test -n "$FREETYPE2_CFLAGS"; then 31012 pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS" 31013 elif test -n "$PKG_CONFIG"; then 31014 if test -n "$PKG_CONFIG" && \ 31015 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 31016 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 31017 ac_status=$? 31018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31019 test $ac_status = 0; }; then 31020 pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` 31021 else 31022 pkg_failed=yes 31023 fi 31024 else 31025 pkg_failed=untried 31026 fi 31027 if test -n "$FREETYPE2_LIBS"; then 31028 pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS" 31029 elif test -n "$PKG_CONFIG"; then 31030 if test -n "$PKG_CONFIG" && \ 31031 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 31032 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 31033 ac_status=$? 31034 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31035 test $ac_status = 0; }; then 31036 pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` 31037 else 31038 pkg_failed=yes 31039 fi 31040 else 31041 pkg_failed=untried 31042 fi 31043 31044 31045 31046 if test $pkg_failed = yes; then 31047 31048 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 31049 _pkg_short_errors_supported=yes 31050 else 31051 _pkg_short_errors_supported=no 31052 fi 31053 if test $_pkg_short_errors_supported = yes; then 31054 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1` 31055 else 31056 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1` 31057 fi 31058 # Put the nasty error message in config.log where it belongs 31059 echo "$FREETYPE2_PKG_ERRORS" >&5 31060 31061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 31062 $as_echo "no" >&6; } 31063 FREETYPE2_FOUND=no 31064 elif test $pkg_failed = untried; then 31065 FREETYPE2_FOUND=no 31066 else 31067 FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS 31068 FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS 31069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 31070 $as_echo "yes" >&6; } 31071 FREETYPE2_FOUND=yes 31072 fi 31073 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. 31074 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` 31075 USING_SYSTEM_FT_LIB=true 31076 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 31077 if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 31078 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'` 31079 fi 31080 fi 31081 if test "x$FREETYPE2_FOUND" = xno; then 31082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5 31083 $as_echo_n "checking for freetype in some standard locations... " >&6; } 31084 31085 if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then 31086 DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include" 31087 DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype" 31088 fi 31089 if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then 31090 DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2" 31091 DEFAULT_FREETYPE_LIBS="-lfreetype" 31092 fi 31093 31094 PREV_CXXCFLAGS="$CXXFLAGS" 31095 PREV_LDFLAGS="$LDFLAGS" 31096 CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" 31097 LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" 31098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31099 /* end confdefs.h. */ 31100 #include<ft2build.h> 31101 #include FT_FREETYPE_H 31102 int main() { return 0; } 31103 31104 _ACEOF 31105 if ac_fn_cxx_try_link "$LINENO"; then : 31106 31107 # Yes, the default cflags and libs did the trick. 31108 FREETYPE2_FOUND=yes 31109 FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" 31110 FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" 31111 31112 else 31113 31114 FREETYPE2_FOUND=no 31115 31116 fi 31117 rm -f core conftest.err conftest.$ac_objext \ 31118 conftest$ac_exeext conftest.$ac_ext 31119 CXXCFLAGS="$PREV_CXXFLAGS" 31120 LDFLAGS="$PREV_LDFLAGS" 31121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 31122 $as_echo "$FREETYPE2_FOUND" >&6; } 31123 USING_SYSTEM_FT_LIB=true 31124 fi 31125 if test "x$FREETYPE2_FOUND" = xno; then 31126 31127 # Print a helpful message on how to acquire the necessary build dependency. 31128 # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc 31129 MISSING_DEPENDENCY=freetype2 31130 PKGHANDLER_COMMAND= 31131 31132 case $PKGHANDLER in 31133 apt-get) 31134 apt_help $MISSING_DEPENDENCY ;; 31135 yum) 31136 yum_help $MISSING_DEPENDENCY ;; 31137 port) 31138 port_help $MISSING_DEPENDENCY ;; 31139 pkgutil) 31140 pkgutil_help $MISSING_DEPENDENCY ;; 31141 pkgadd) 31142 pkgadd_help $MISSING_DEPENDENCY ;; 31143 * ) 31144 break ;; 31145 esac 31146 31147 if test "x$PKGHANDLER_COMMAND" != x; then 31148 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 31149 fi 31150 31151 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 31152 fi 31153 31154 if test "x$OPENJDK_TARGET_OS" != xwindows; then 31155 # AC_CHECK_LIB does not support use of cl.exe 31156 PREV_LDFLAGS="$LDFLAGS" 31157 LDFLAGS="$FREETYPE2_LIBS" 31158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5 31159 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; } 31160 if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then : 31161 $as_echo_n "(cached) " >&6 31162 else 31163 ac_check_lib_save_LIBS=$LIBS 31164 LIBS="-lfreetype $LIBS" 31165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31166 /* end confdefs.h. */ 31167 31168 /* Override any GCC internal prototype to avoid an error. 31169 Use char because int might match the return type of a GCC 31170 builtin and then its argument prototype would still apply. */ 31171 #ifdef __cplusplus 31172 extern "C" 31173 #endif 31174 char FT_Init_FreeType (); 31175 int 31176 main () 31177 { 31178 return FT_Init_FreeType (); 31179 ; 31180 return 0; 31181 } 31182 _ACEOF 31183 if ac_fn_cxx_try_link "$LINENO"; then : 31184 ac_cv_lib_freetype_FT_Init_FreeType=yes 31185 else 31186 ac_cv_lib_freetype_FT_Init_FreeType=no 31187 fi 31188 rm -f core conftest.err conftest.$ac_objext \ 31189 conftest$ac_exeext conftest.$ac_ext 31190 LIBS=$ac_check_lib_save_LIBS 31191 fi 31192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 31193 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; } 31194 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then : 31195 FREETYPE2_FOUND=true 31196 else 31197 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 31198 fi 31199 31200 LDFLAGS="$PREV_LDFLAGS" 31201 fi 31202 fi 31203 31204 31205 31206 31207 31208 31209 31210 31211 31212 ############################################################################### 31213 # 31214 # Check for alsa headers and libraries. Used on Linux/GNU systems. 31215 # 31216 31217 # Check whether --with-alsa was given. 31218 if test "${with_alsa+set}" = set; then : 31219 withval=$with_alsa; 31220 fi 31221 31222 31223 # Check whether --with-alsa-include was given. 31224 if test "${with_alsa_include+set}" = set; then : 31225 withval=$with_alsa_include; 31226 fi 31227 31228 31229 # Check whether --with-alsa-lib was given. 31230 if test "${with_alsa_lib+set}" = set; then : 31231 withval=$with_alsa_lib; 31232 fi 31233 31234 31235 if test "x$ALSA_NOT_NEEDED" = xyes; then 31236 if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then 31237 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5 31238 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;} 31239 fi 31240 ALSA_CFLAGS= 31241 ALSA_LIBS= 31242 else 31243 ALSA_FOUND=no 31244 31245 if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then 31246 as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5 31247 fi 31248 31249 if test "x${with_alsa}" != x; then 31250 ALSA_LIBS="-L${with_alsa}/lib -lalsa" 31251 ALSA_CFLAGS="-I${with_alsa}/include" 31252 ALSA_FOUND=yes 31253 fi 31254 if test "x${with_alsa_include}" != x; then 31255 ALSA_CFLAGS="-I${with_alsa_include}" 31256 ALSA_FOUND=yes 31257 fi 31258 if test "x${with_alsa_lib}" != x; then 31259 ALSA_LIBS="-L${with_alsa_lib} -lalsa" 31260 ALSA_FOUND=yes 31261 fi 31262 if test "x$ALSA_FOUND" = xno; then 31263 31264 31265 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 31266 # Source the builddeps file again, to make sure it uses the latest variables! 31267 . $builddepsfile 31268 # Look for a target and build machine specific resource! 31269 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 31270 if test "x$resource" = x; then 31271 # Ok, lets instead look for a target specific resource 31272 eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}} 31273 fi 31274 if test "x$resource" = x; then 31275 # Ok, lets instead look for a build specific resource 31276 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}} 31277 fi 31278 if test "x$resource" = x; then 31279 # Ok, lets instead look for a generic resource 31280 # (The alsa comes from M4 and not the shell, thus no need for eval here.) 31281 resource=${builddep_alsa} 31282 fi 31283 if test "x$resource" != x; then 31284 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5 31285 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;} 31286 # If the resource in the builddeps.conf file is an existing directory, 31287 # for example /java/linux/cups 31288 if test -d ${resource}; then 31289 depdir=${resource} 31290 else 31291 31292 # alsa is for example mymodule 31293 # $resource is for example libs/general/libmymod_1_2_3.zip 31294 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 31295 # $with_builddeps_dir is for example /localhome/builddeps 31296 # depdir is the name of the variable into which we store the depdir, eg MYMOD 31297 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 31298 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 31299 filename=`basename $resource` 31300 filebase=`echo $filename | sed 's/\.[^\.]*$//'` 31301 filebase=${filename%%.*} 31302 extension=${filename#*.} 31303 installdir=$with_builddeps_dir/$filebase 31304 if test ! -f $installdir/$filename.unpacked; then 31305 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5 31306 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;} 31307 if test ! -d $installdir; then 31308 mkdir -p $installdir 31309 fi 31310 if test ! -d $installdir; then 31311 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 31312 fi 31313 tmpfile=`mktemp $installdir/alsa.XXXXXXXXX` 31314 touch $tmpfile 31315 if test ! -f $tmpfile; then 31316 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 31317 fi 31318 31319 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 31320 # $tmpfile is the local file name for the downloaded file. 31321 VALID_TOOL=no 31322 if test "x$BDEPS_FTP" = xwget; then 31323 VALID_TOOL=yes 31324 wget -O $tmpfile $with_builddeps_server/$resource 31325 fi 31326 if test "x$BDEPS_FTP" = xlftp; then 31327 VALID_TOOL=yes 31328 lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 31329 fi 31330 if test "x$BDEPS_FTP" = xftp; then 31331 VALID_TOOL=yes 31332 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 31333 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 31334 FTPUSERPWD=${FTPSERVER%%@*} 31335 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 31336 FTPUSER=${userpwd%%:*} 31337 FTPPWD=${userpwd#*@} 31338 FTPSERVER=${FTPSERVER#*@} 31339 else 31340 FTPUSER=ftp 31341 FTPPWD=ftp 31342 fi 31343 # the "pass" command does not work on some 31344 # ftp clients (read ftp.exe) but if it works, 31345 # passive mode is better! 31346 (\ 31347 echo "user $FTPUSER $FTPPWD" ;\ 31348 echo "pass" ;\ 31349 echo "bin" ;\ 31350 echo "get $FTPPATH $tmpfile" ;\ 31351 ) | ftp -in $FTPSERVER 31352 fi 31353 if test "x$VALID_TOOL" != xyes; then 31354 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 31355 fi 31356 31357 mv $tmpfile $installdir/$filename 31358 if test ! -s $installdir/$filename; then 31359 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 31360 fi 31361 case "$extension" in 31362 zip) echo "Unzipping $installdir/$filename..." 31363 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 31364 ;; 31365 tar.gz) echo "Untaring $installdir/$filename..." 31366 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31367 ;; 31368 tgz) echo "Untaring $installdir/$filename..." 31369 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 31370 ;; 31371 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 31372 ;; 31373 esac 31374 fi 31375 if test -f $installdir/$filename.unpacked; then 31376 depdir=$installdir 31377 fi 31378 31379 fi 31380 # Source the builddeps file again, because in the previous command, the depdir 31381 # was updated to point at the current build dependency install directory. 31382 . $builddepsfile 31383 # Now extract variables from the builddeps.conf files. 31384 theroot=${builddep_alsa_ROOT} 31385 thecflags=${builddep_alsa_CFLAGS} 31386 thelibs=${builddep_alsa_LIBS} 31387 if test "x$depdir" = x; then 31388 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5 31389 fi 31390 ALSA=$depdir 31391 if test "x$theroot" != x; then 31392 ALSA="$theroot" 31393 fi 31394 if test "x$thecflags" != x; then 31395 ALSA_CFLAGS="$thecflags" 31396 fi 31397 if test "x$thelibs" != x; then 31398 ALSA_LIBS="$thelibs" 31399 fi 31400 ALSA_FOUND=yes 31401 else ALSA_FOUND=no 31402 31403 fi 31404 else ALSA_FOUND=no 31405 31406 fi 31407 31408 fi 31409 if test "x$ALSA_FOUND" = xno; then 31410 31411 pkg_failed=no 31412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5 31413 $as_echo_n "checking for ALSA... " >&6; } 31414 31415 if test -n "$ALSA_CFLAGS"; then 31416 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" 31417 elif test -n "$PKG_CONFIG"; then 31418 if test -n "$PKG_CONFIG" && \ 31419 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 31420 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 31421 ac_status=$? 31422 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31423 test $ac_status = 0; }; then 31424 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` 31425 else 31426 pkg_failed=yes 31427 fi 31428 else 31429 pkg_failed=untried 31430 fi 31431 if test -n "$ALSA_LIBS"; then 31432 pkg_cv_ALSA_LIBS="$ALSA_LIBS" 31433 elif test -n "$PKG_CONFIG"; then 31434 if test -n "$PKG_CONFIG" && \ 31435 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 31436 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 31437 ac_status=$? 31438 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 31439 test $ac_status = 0; }; then 31440 pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` 31441 else 31442 pkg_failed=yes 31443 fi 31444 else 31445 pkg_failed=untried 31446 fi 31447 31448 31449 31450 if test $pkg_failed = yes; then 31451 31452 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 31453 _pkg_short_errors_supported=yes 31454 else 31455 _pkg_short_errors_supported=no 31456 fi 31457 if test $_pkg_short_errors_supported = yes; then 31458 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1` 31459 else 31460 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1` 31461 fi 31462 # Put the nasty error message in config.log where it belongs 31463 echo "$ALSA_PKG_ERRORS" >&5 31464 31465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 31466 $as_echo "no" >&6; } 31467 ALSA_FOUND=no 31468 elif test $pkg_failed = untried; then 31469 ALSA_FOUND=no 31470 else 31471 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS 31472 ALSA_LIBS=$pkg_cv_ALSA_LIBS 31473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 31474 $as_echo "yes" >&6; } 31475 ALSA_FOUND=yes 31476 fi 31477 fi 31478 if test "x$ALSA_FOUND" = xno; then 31479 for ac_header in alsa/asoundlib.h 31480 do : 31481 ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default" 31482 if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then : 31483 cat >>confdefs.h <<_ACEOF 31484 #define HAVE_ALSA_ASOUNDLIB_H 1 31485 _ACEOF 31486 ALSA_FOUND=yes 31487 ALSA_CFLAGS=-Iignoreme 31488 ALSA_LIBS=-lasound 31489 DEFAULT_ALSA=yes 31490 else 31491 ALSA_FOUND=no 31492 fi 31493 31494 done 31495 31496 fi 31497 if test "x$ALSA_FOUND" = xno; then 31498 31499 # Print a helpful message on how to acquire the necessary build dependency. 31500 # alsa is the help tag: freetyp2, cups, pulse, alsa etc 31501 MISSING_DEPENDENCY=alsa 31502 PKGHANDLER_COMMAND= 31503 31504 case $PKGHANDLER in 31505 apt-get) 31506 apt_help $MISSING_DEPENDENCY ;; 31507 yum) 31508 yum_help $MISSING_DEPENDENCY ;; 31509 port) 31510 port_help $MISSING_DEPENDENCY ;; 31511 pkgutil) 31512 pkgutil_help $MISSING_DEPENDENCY ;; 31513 pkgadd) 31514 pkgadd_help $MISSING_DEPENDENCY ;; 31515 * ) 31516 break ;; 31517 esac 31518 31519 if test "x$PKGHANDLER_COMMAND" != x; then 31520 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 31521 fi 31522 31523 as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5 31524 fi 31525 fi 31526 31527 31528 31529 31530 31531 31532 31533 ############################################################################### 31534 # 31535 # Check for the jpeg library 31536 # 31537 31538 USE_EXTERNAL_LIBJPEG=true 31539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 31540 $as_echo_n "checking for main in -ljpeg... " >&6; } 31541 if test "${ac_cv_lib_jpeg_main+set}" = set; then : 31542 $as_echo_n "(cached) " >&6 31543 else 31544 ac_check_lib_save_LIBS=$LIBS 31545 LIBS="-ljpeg $LIBS" 31546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31547 /* end confdefs.h. */ 31548 31549 31550 int 31551 main () 31552 { 31553 return main (); 31554 ; 31555 return 0; 31556 } 31557 _ACEOF 31558 if ac_fn_cxx_try_link "$LINENO"; then : 31559 ac_cv_lib_jpeg_main=yes 31560 else 31561 ac_cv_lib_jpeg_main=no 31562 fi 31563 rm -f core conftest.err conftest.$ac_objext \ 31564 conftest$ac_exeext conftest.$ac_ext 31565 LIBS=$ac_check_lib_save_LIBS 31566 fi 31567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5 31568 $as_echo "$ac_cv_lib_jpeg_main" >&6; } 31569 if test "x$ac_cv_lib_jpeg_main" = x""yes; then : 31570 cat >>confdefs.h <<_ACEOF 31571 #define HAVE_LIBJPEG 1 31572 _ACEOF 31573 31574 LIBS="-ljpeg $LIBS" 31575 31576 else 31577 USE_EXTERNAL_LIBJPEG=false 31578 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5 31579 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;} 31580 31581 fi 31582 31583 31584 31585 ############################################################################### 31586 # 31587 # Check for the gif library 31588 # 31589 31590 31591 # Check whether --with-giflib was given. 31592 if test "${with_giflib+set}" = set; then : 31593 withval=$with_giflib; 31594 fi 31595 31596 31597 31598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5 31599 $as_echo_n "checking for which giflib to use... " >&6; } 31600 31601 # default is bundled 31602 DEFAULT_GIFLIB=bundled 31603 31604 # 31605 # if user didn't specify, use DEFAULT_GIFLIB 31606 # 31607 if test "x${with_giflib}" = "x"; then 31608 with_giflib=${DEFAULT_GIFLIB} 31609 fi 31610 31611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5 31612 $as_echo "${with_giflib}" >&6; } 31613 31614 if test "x${with_giflib}" = "xbundled"; then 31615 USE_EXTERNAL_LIBGIF=false 31616 elif test "x${with_giflib}" = "xsystem"; then 31617 ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" 31618 if test "x$ac_cv_header_gif_lib_h" = x""yes; then : 31619 31620 else 31621 as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5 31622 fi 31623 31624 31625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5 31626 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; } 31627 if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then : 31628 $as_echo_n "(cached) " >&6 31629 else 31630 ac_check_lib_save_LIBS=$LIBS 31631 LIBS="-lgif $LIBS" 31632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31633 /* end confdefs.h. */ 31634 31635 /* Override any GCC internal prototype to avoid an error. 31636 Use char because int might match the return type of a GCC 31637 builtin and then its argument prototype would still apply. */ 31638 #ifdef __cplusplus 31639 extern "C" 31640 #endif 31641 char DGifGetCode (); 31642 int 31643 main () 31644 { 31645 return DGifGetCode (); 31646 ; 31647 return 0; 31648 } 31649 _ACEOF 31650 if ac_fn_cxx_try_link "$LINENO"; then : 31651 ac_cv_lib_gif_DGifGetCode=yes 31652 else 31653 ac_cv_lib_gif_DGifGetCode=no 31654 fi 31655 rm -f core conftest.err conftest.$ac_objext \ 31656 conftest$ac_exeext conftest.$ac_ext 31657 LIBS=$ac_check_lib_save_LIBS 31658 fi 31659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5 31660 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; } 31661 if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then : 31662 cat >>confdefs.h <<_ACEOF 31663 #define HAVE_LIBGIF 1 31664 _ACEOF 31665 31666 LIBS="-lgif $LIBS" 31667 31668 else 31669 as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5 31670 fi 31671 31672 31673 USE_EXTERNAL_LIBGIF=true 31674 else 31675 as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5 31676 fi 31677 31678 31679 ############################################################################### 31680 # 31681 # Check for the zlib library 31682 # 31683 31684 31685 # Check whether --with-zlib was given. 31686 if test "${with_zlib+set}" = set; then : 31687 withval=$with_zlib; 31688 fi 31689 31690 31691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 31692 $as_echo_n "checking for compress in -lz... " >&6; } 31693 if test "${ac_cv_lib_z_compress+set}" = set; then : 31694 $as_echo_n "(cached) " >&6 31695 else 31696 ac_check_lib_save_LIBS=$LIBS 31697 LIBS="-lz $LIBS" 31698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31699 /* end confdefs.h. */ 31700 31701 /* Override any GCC internal prototype to avoid an error. 31702 Use char because int might match the return type of a GCC 31703 builtin and then its argument prototype would still apply. */ 31704 #ifdef __cplusplus 31705 extern "C" 31706 #endif 31707 char compress (); 31708 int 31709 main () 31710 { 31711 return compress (); 31712 ; 31713 return 0; 31714 } 31715 _ACEOF 31716 if ac_fn_cxx_try_link "$LINENO"; then : 31717 ac_cv_lib_z_compress=yes 31718 else 31719 ac_cv_lib_z_compress=no 31720 fi 31721 rm -f core conftest.err conftest.$ac_objext \ 31722 conftest$ac_exeext conftest.$ac_ext 31723 LIBS=$ac_check_lib_save_LIBS 31724 fi 31725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 31726 $as_echo "$ac_cv_lib_z_compress" >&6; } 31727 if test "x$ac_cv_lib_z_compress" = x""yes; then : 31728 ZLIB_FOUND=yes 31729 else 31730 ZLIB_FOUND=no 31731 fi 31732 31733 31734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5 31735 $as_echo_n "checking for which zlib to use... " >&6; } 31736 31737 DEFAULT_ZLIB=bundled 31738 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 31739 # 31740 # On macosx default is system...on others default is 31741 # 31742 DEFAULT_ZLIB=system 31743 fi 31744 31745 if test "x${ZLIB_FOUND}" != "xyes"; then 31746 # 31747 # If we don't find any system...set default to bundled 31748 # 31749 DEFAULT_ZLIB=bundled 31750 fi 31751 31752 # 31753 # If user didn't specify, use DEFAULT_ZLIB 31754 # 31755 if test "x${with_zlib}" = "x"; then 31756 with_zlib=${DEFAULT_ZLIB} 31757 fi 31758 31759 if test "x${with_zlib}" = "xbundled"; then 31760 USE_EXTERNAL_LIBZ=false 31761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5 31762 $as_echo "bundled" >&6; } 31763 elif test "x${with_zlib}" = "xsystem"; then 31764 if test "x${ZLIB_FOUND}" = "xyes"; then 31765 USE_EXTERNAL_LIBZ=true 31766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 31767 $as_echo "system" >&6; } 31768 else 31769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5 31770 $as_echo "system not found" >&6; } 31771 as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5 31772 fi 31773 else 31774 as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5 31775 fi 31776 31777 31778 31779 ############################################################################### 31780 LIBZIP_CAN_USE_MMAP=true 31781 31782 31783 31784 ############################################################################### 31785 # 31786 # Check if altzone exists in time.h 31787 # 31788 31789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31790 /* end confdefs.h. */ 31791 #include <time.h> 31792 int 31793 main () 31794 { 31795 return (int)altzone; 31796 ; 31797 return 0; 31798 } 31799 _ACEOF 31800 if ac_fn_cxx_try_link "$LINENO"; then : 31801 has_altzone=yes 31802 else 31803 has_altzone=no 31804 fi 31805 rm -f core conftest.err conftest.$ac_objext \ 31806 conftest$ac_exeext conftest.$ac_ext 31807 if test "x$has_altzone" = xyes; then 31808 31809 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h 31810 31811 fi 31812 31813 ############################################################################### 31814 # 31815 # Check the maths library 31816 # 31817 31818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 31819 $as_echo_n "checking for cos in -lm... " >&6; } 31820 if test "${ac_cv_lib_m_cos+set}" = set; then : 31821 $as_echo_n "(cached) " >&6 31822 else 31823 ac_check_lib_save_LIBS=$LIBS 31824 LIBS="-lm $LIBS" 31825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31826 /* end confdefs.h. */ 31827 31828 /* Override any GCC internal prototype to avoid an error. 31829 Use char because int might match the return type of a GCC 31830 builtin and then its argument prototype would still apply. */ 31831 #ifdef __cplusplus 31832 extern "C" 31833 #endif 31834 char cos (); 31835 int 31836 main () 31837 { 31838 return cos (); 31839 ; 31840 return 0; 31841 } 31842 _ACEOF 31843 if ac_fn_cxx_try_link "$LINENO"; then : 31844 ac_cv_lib_m_cos=yes 31845 else 31846 ac_cv_lib_m_cos=no 31847 fi 31848 rm -f core conftest.err conftest.$ac_objext \ 31849 conftest$ac_exeext conftest.$ac_ext 31850 LIBS=$ac_check_lib_save_LIBS 31851 fi 31852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 31853 $as_echo "$ac_cv_lib_m_cos" >&6; } 31854 if test "x$ac_cv_lib_m_cos" = x""yes; then : 31855 cat >>confdefs.h <<_ACEOF 31856 #define HAVE_LIBM 1 31857 _ACEOF 31858 31859 LIBS="-lm $LIBS" 31860 31861 else 31862 31863 { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5 31864 $as_echo "$as_me: Maths library was not found" >&6;} 31865 31866 fi 31867 31868 31869 31870 ############################################################################### 31871 # 31872 # Check for libdl.so 31873 31874 save_LIBS="$LIBS" 31875 LIBS="" 31876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 31877 $as_echo_n "checking for dlopen in -ldl... " >&6; } 31878 if test "${ac_cv_lib_dl_dlopen+set}" = set; then : 31879 $as_echo_n "(cached) " >&6 31880 else 31881 ac_check_lib_save_LIBS=$LIBS 31882 LIBS="-ldl $LIBS" 31883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31884 /* end confdefs.h. */ 31885 31886 /* Override any GCC internal prototype to avoid an error. 31887 Use char because int might match the return type of a GCC 31888 builtin and then its argument prototype would still apply. */ 31889 #ifdef __cplusplus 31890 extern "C" 31891 #endif 31892 char dlopen (); 31893 int 31894 main () 31895 { 31896 return dlopen (); 31897 ; 31898 return 0; 31899 } 31900 _ACEOF 31901 if ac_fn_cxx_try_link "$LINENO"; then : 31902 ac_cv_lib_dl_dlopen=yes 31903 else 31904 ac_cv_lib_dl_dlopen=no 31905 fi 31906 rm -f core conftest.err conftest.$ac_objext \ 31907 conftest$ac_exeext conftest.$ac_ext 31908 LIBS=$ac_check_lib_save_LIBS 31909 fi 31910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 31911 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } 31912 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : 31913 cat >>confdefs.h <<_ACEOF 31914 #define HAVE_LIBDL 1 31915 _ACEOF 31916 31917 LIBS="-ldl $LIBS" 31918 31919 fi 31920 31921 LIBDL="$LIBS" 31922 31923 LIBS="$save_LIBS" 31924 31925 31926 31927 ############################################################################### 31928 # 31929 # statically link libstdc++ before C++ ABI is stablized on Linux unless 31930 # dynamic build is configured on command line. 31931 # 31932 31933 # Check whether --with-stdc++lib was given. 31934 if test "${with_stdc__lib+set}" = set; then : 31935 withval=$with_stdc__lib; 31936 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ 31937 && test "x$with_stdc__lib" != xdefault; then 31938 as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5 31939 fi 31940 31941 else 31942 with_stdc__lib=default 31943 31944 fi 31945 31946 31947 if test "x$OPENJDK_TARGET_OS" = xlinux; then 31948 # Test if -lstdc++ works. 31949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5 31950 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; } 31951 ac_ext=cpp 31952 ac_cpp='$CXXCPP $CPPFLAGS' 31953 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 31954 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 31955 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 31956 31957 OLD_CXXFLAGS="$CXXFLAGS" 31958 CXXFLAGS="$CXXFLAGS -lstdc++" 31959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31960 /* end confdefs.h. */ 31961 31962 int 31963 main () 31964 { 31965 return 0; 31966 ; 31967 return 0; 31968 } 31969 _ACEOF 31970 if ac_fn_cxx_try_link "$LINENO"; then : 31971 has_dynamic_libstdcxx=yes 31972 else 31973 has_dynamic_libstdcxx=no 31974 fi 31975 rm -f core conftest.err conftest.$ac_objext \ 31976 conftest$ac_exeext conftest.$ac_ext 31977 CXXFLAGS="$OLD_CXXFLAGS" 31978 ac_ext=cpp 31979 ac_cpp='$CXXCPP $CPPFLAGS' 31980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 31981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 31982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 31983 31984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5 31985 $as_echo "$has_dynamic_libstdcxx" >&6; } 31986 31987 # Test if stdc++ can be linked statically. 31988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5 31989 $as_echo_n "checking if static link of stdc++ is possible... " >&6; } 31990 STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" 31991 ac_ext=cpp 31992 ac_cpp='$CXXCPP $CPPFLAGS' 31993 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 31994 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 31995 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 31996 31997 OLD_LIBS="$LIBS" 31998 OLD_CXX="$CXX" 31999 LIBS="$STATIC_STDCXX_FLAGS" 32000 CXX="$CC" 32001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32002 /* end confdefs.h. */ 32003 32004 int 32005 main () 32006 { 32007 return 0; 32008 ; 32009 return 0; 32010 } 32011 _ACEOF 32012 if ac_fn_cxx_try_link "$LINENO"; then : 32013 has_static_libstdcxx=yes 32014 else 32015 has_static_libstdcxx=no 32016 fi 32017 rm -f core conftest.err conftest.$ac_objext \ 32018 conftest$ac_exeext conftest.$ac_ext 32019 LIBS="$OLD_LIBS" 32020 CXX="$OLD_CXX" 32021 ac_ext=cpp 32022 ac_cpp='$CXXCPP $CPPFLAGS' 32023 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 32024 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 32025 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 32026 32027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5 32028 $as_echo "$has_static_libstdcxx" >&6; } 32029 32030 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then 32031 as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5 32032 fi 32033 32034 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then 32035 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5 32036 fi 32037 32038 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then 32039 as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5 32040 fi 32041 32042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5 32043 $as_echo_n "checking how to link with libstdc++... " >&6; } 32044 # If dynamic was requested, it's available since it would fail above otherwise. 32045 # If dynamic wasn't requested, go with static unless it isn't available. 32046 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32047 LIBCXX="$LIBCXX -lstdc++" 32048 LDCXX="$CXX" 32049 STATIC_CXX_SETTING="STATIC_CXX=false" 32050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5 32051 $as_echo "dynamic" >&6; } 32052 else 32053 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" 32054 LDCXX="$CC" 32055 STATIC_CXX_SETTING="STATIC_CXX=true" 32056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 32057 $as_echo "static" >&6; } 32058 fi 32059 fi 32060 32061 32062 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32063 # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS 32064 32065 pkg_failed=no 32066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5 32067 $as_echo_n "checking for LIBFFI... " >&6; } 32068 32069 if test -n "$LIBFFI_CFLAGS"; then 32070 pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS" 32071 elif test -n "$PKG_CONFIG"; then 32072 if test -n "$PKG_CONFIG" && \ 32073 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 32074 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 32075 ac_status=$? 32076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32077 test $ac_status = 0; }; then 32078 pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null` 32079 else 32080 pkg_failed=yes 32081 fi 32082 else 32083 pkg_failed=untried 32084 fi 32085 if test -n "$LIBFFI_LIBS"; then 32086 pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS" 32087 elif test -n "$PKG_CONFIG"; then 32088 if test -n "$PKG_CONFIG" && \ 32089 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 32090 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 32091 ac_status=$? 32092 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 32093 test $ac_status = 0; }; then 32094 pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null` 32095 else 32096 pkg_failed=yes 32097 fi 32098 else 32099 pkg_failed=untried 32100 fi 32101 32102 32103 32104 if test $pkg_failed = yes; then 32105 32106 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 32107 _pkg_short_errors_supported=yes 32108 else 32109 _pkg_short_errors_supported=no 32110 fi 32111 if test $_pkg_short_errors_supported = yes; then 32112 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1` 32113 else 32114 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1` 32115 fi 32116 # Put the nasty error message in config.log where it belongs 32117 echo "$LIBFFI_PKG_ERRORS" >&5 32118 32119 as_fn_error $? "Package requirements (libffi) were not met: 32120 32121 $LIBFFI_PKG_ERRORS 32122 32123 Consider adjusting the PKG_CONFIG_PATH environment variable if you 32124 installed software in a non-standard prefix. 32125 32126 Alternatively, you may set the environment variables LIBFFI_CFLAGS 32127 and LIBFFI_LIBS to avoid the need to call pkg-config. 32128 See the pkg-config man page for more details. 32129 " "$LINENO" 5 32130 elif test $pkg_failed = untried; then 32131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 32132 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 32133 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 32134 is in your PATH or set the PKG_CONFIG environment variable to the full 32135 path to pkg-config. 32136 32137 Alternatively, you may set the environment variables LIBFFI_CFLAGS 32138 and LIBFFI_LIBS to avoid the need to call pkg-config. 32139 See the pkg-config man page for more details. 32140 32141 To get pkg-config, see <http://pkg-config.freedesktop.org/>. 32142 See \`config.log' for more details" "$LINENO" 5 ; } 32143 else 32144 LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS 32145 LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS 32146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32147 $as_echo "yes" >&6; } 32148 : 32149 fi 32150 32151 fi 32152 32153 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 32154 # Extract the first word of "llvm-config", so it can be a program name with args. 32155 set dummy llvm-config; ac_word=$2 32156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 32157 $as_echo_n "checking for $ac_word... " >&6; } 32158 if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then : 32159 $as_echo_n "(cached) " >&6 32160 else 32161 if test -n "$LLVM_CONFIG"; then 32162 ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test. 32163 else 32164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 32165 for as_dir in $PATH 32166 do 32167 IFS=$as_save_IFS 32168 test -z "$as_dir" && as_dir=. 32169 for ac_exec_ext in '' $ac_executable_extensions; do 32170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 32171 ac_cv_prog_LLVM_CONFIG="llvm-config" 32172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 32173 break 2 32174 fi 32175 done 32176 done 32177 IFS=$as_save_IFS 32178 32179 fi 32180 fi 32181 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG 32182 if test -n "$LLVM_CONFIG"; then 32183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5 32184 $as_echo "$LLVM_CONFIG" >&6; } 32185 else 32186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32187 $as_echo "no" >&6; } 32188 fi 32189 32190 32191 32192 if test "x$LLVM_CONFIG" != xllvm-config; then 32193 as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5 32194 fi 32195 32196 llvm_components="jit mcjit engine nativecodegen native" 32197 unset LLVM_CFLAGS 32198 for flag in $("$LLVM_CONFIG" --cxxflags); do 32199 if echo "${flag}" | grep -q '^-[ID]'; then 32200 if test "${flag}" != "-D_DEBUG" ; then 32201 if test "${LLVM_CFLAGS}" != "" ; then 32202 LLVM_CFLAGS="${LLVM_CFLAGS} " 32203 fi 32204 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" 32205 fi 32206 fi 32207 done 32208 llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') 32209 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" 32210 32211 unset LLVM_LDFLAGS 32212 for flag in $("${LLVM_CONFIG}" --ldflags); do 32213 if echo "${flag}" | grep -q '^-L'; then 32214 if test "${LLVM_LDFLAGS}" != ""; then 32215 LLVM_LDFLAGS="${LLVM_LDFLAGS} " 32216 fi 32217 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" 32218 fi 32219 done 32220 32221 unset LLVM_LIBS 32222 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do 32223 if echo "${flag}" | grep -q '^-l'; then 32224 if test "${LLVM_LIBS}" != ""; then 32225 LLVM_LIBS="${LLVM_LIBS} " 32226 fi 32227 LLVM_LIBS="${LLVM_LIBS}${flag}" 32228 fi 32229 done 32230 32231 32232 32233 32234 fi 32235 32236 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) 32237 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then 32238 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" 32239 fi 32240 32241 # TODO better (platform agnostic) test 32242 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then 32243 LIBCXX="-lstdc++" 32244 fi 32245 32246 32247 32248 32249 32250 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper 32251 32252 # When using cygwin or msys, we need a wrapper binary that renames 32253 # /cygdrive/c/ arguments into c:/ arguments and peeks into 32254 # @files and rewrites these too! This wrapper binary is 32255 # called fixpath. 32256 FIXPATH= 32257 if test "x$OPENJDK_BUILD_OS" = xwindows; then 32258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5 32259 $as_echo_n "checking if fixpath can be created... " >&6; } 32260 FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" 32261 FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe" 32262 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then 32263 FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC` 32264 FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN` 32265 # Important to keep the .exe suffix on Cygwin for Hotspot makefiles 32266 FIXPATH="$OUTPUT_ROOT/fixpath.exe -c" 32267 elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then 32268 FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC` 32269 FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN` 32270 32271 # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line 32272 # @ was chosen as separator to minimize risk of other tools messing around with it 32273 all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq` 32274 fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` 32275 32276 FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list" 32277 fi 32278 rm -f $OUTPUT_ROOT/fixpath* 32279 cd $OUTPUT_ROOT 32280 $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1 32281 cd $CURDIR 32282 32283 if test ! -x $OUTPUT_ROOT/fixpath.exe; then 32284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32285 $as_echo "no" >&6; } 32286 cat $OUTPUT_ROOT/fixpath1.log 32287 as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5 32288 fi 32289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32290 $as_echo "yes" >&6; } 32291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5 32292 $as_echo_n "checking if fixpath.exe works... " >&6; } 32293 cd $OUTPUT_ROOT 32294 $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 32295 cd $CURDIR 32296 if test ! -x $OUTPUT_ROOT/fixpath2.exe; then 32297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32298 $as_echo "no" >&6; } 32299 cat $OUTPUT_ROOT/fixpath2.log 32300 as_fn_error $? "fixpath did not work!" "$LINENO" 5 32301 fi 32302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32303 $as_echo "yes" >&6; } 32304 rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj 32305 fi 32306 32307 32308 32309 32310 ############################################################################### 32311 # 32312 # We need to do some final tweaking, when everything else is done. 32313 # 32314 ############################################################################### 32315 32316 32317 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" 32318 32319 32320 # The name of the Service Agent jar. 32321 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" 32322 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then 32323 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" 32324 fi 32325 32326 32327 32328 32329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5 32330 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; } 32331 32332 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then 32333 ENABLE_INTREE_EC=yes 32334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32335 $as_echo "yes" >&6; } 32336 else 32337 ENABLE_INTREE_EC=no 32338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32339 $as_echo "no" >&6; } 32340 fi 32341 32342 32343 32344 32345 ############################################################################### 32346 # 32347 # Configure parts of the build that only affect the build performance, 32348 # not the result. 32349 # 32350 ############################################################################### 32351 32352 32353 # How many cores do we have on this build system? 32354 32355 # Check whether --with-num-cores was given. 32356 if test "${with_num_cores+set}" = set; then : 32357 withval=$with_num_cores; 32358 fi 32359 32360 if test "x$with_num_cores" = x; then 32361 # The number of cores were not specified, try to probe them. 32362 32363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5 32364 $as_echo_n "checking for number of cores... " >&6; } 32365 NUM_CORES=1 32366 FOUND_CORES=no 32367 32368 if test -f /proc/cpuinfo; then 32369 # Looks like a Linux (or cygwin) system 32370 NUM_CORES=`cat /proc/cpuinfo | grep -c processor` 32371 FOUND_CORES=yes 32372 elif test -x /usr/sbin/psrinfo; then 32373 # Looks like a Solaris system 32374 NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line` 32375 FOUND_CORES=yes 32376 elif test -x /usr/sbin/system_profiler; then 32377 # Looks like a MacOSX system 32378 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'` 32379 FOUND_CORES=yes 32380 elif test -n "$NUMBER_OF_PROCESSORS"; then 32381 # On windows, look in the env 32382 NUM_CORES=$NUMBER_OF_PROCESSORS 32383 FOUND_CORES=yes 32384 fi 32385 32386 if test "x$FOUND_CORES" = xyes; then 32387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5 32388 $as_echo "$NUM_CORES" >&6; } 32389 else 32390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5 32391 $as_echo "could not detect number of cores, defaulting to 1" >&6; } 32392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5 32393 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;} 32394 fi 32395 32396 32397 else 32398 NUM_CORES=$with_num_cores 32399 fi 32400 32401 32402 32403 # How much memory do we have on this build system? 32404 32405 # Check whether --with-memory-size was given. 32406 if test "${with_memory_size+set}" = set; then : 32407 withval=$with_memory_size; 32408 fi 32409 32410 if test "x$with_memory_size" = x; then 32411 # The memory size was not specified, try to probe it. 32412 32413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5 32414 $as_echo_n "checking for memory size... " >&6; } 32415 # Default to 1024 MB 32416 MEMORY_SIZE=1024 32417 FOUND_MEM=no 32418 32419 if test -f /proc/meminfo; then 32420 # Looks like a Linux (or cygwin) system 32421 MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'` 32422 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024` 32423 FOUND_MEM=yes 32424 elif test -x /usr/sbin/prtconf; then 32425 # Looks like a Solaris system 32426 MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'` 32427 FOUND_MEM=yes 32428 elif test -x /usr/sbin/system_profiler; then 32429 # Looks like a MacOSX system 32430 MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'` 32431 MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024` 32432 FOUND_MEM=yes 32433 elif test "x$OPENJDK_BUILD_OS" = xwindows; then 32434 # Windows, but without cygwin 32435 MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-` 32436 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024` 32437 FOUND_MEM=yes 32438 fi 32439 32440 if test "x$FOUND_MEM" = xyes; then 32441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5 32442 $as_echo "$MEMORY_SIZE MB" >&6; } 32443 else 32444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5 32445 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; } 32446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5 32447 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;} 32448 fi 32449 32450 else 32451 MEMORY_SIZE=$with_memory_size 32452 fi 32453 32454 32455 32456 # Provide a decent default number of parallel jobs for make depending on 32457 # number of cores, amount of memory and machine architecture. 32458 32459 # Check whether --with-jobs was given. 32460 if test "${with_jobs+set}" = set; then : 32461 withval=$with_jobs; 32462 fi 32463 32464 if test "x$with_jobs" = x; then 32465 # Number of jobs was not specified, calculate. 32466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5 32467 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; } 32468 # Approximate memory in GB, rounding up a bit. 32469 memory_gb=`expr $MEMORY_SIZE / 1100` 32470 # Pick the lowest of memory in gb and number of cores. 32471 if test "$memory_gb" -lt "$NUM_CORES"; then 32472 JOBS="$memory_gb" 32473 else 32474 JOBS="$NUM_CORES" 32475 # On bigger machines, leave some room for other processes to run 32476 if test "$JOBS" -gt "4"; then 32477 JOBS=`expr $JOBS '*' 90 / 100` 32478 fi 32479 fi 32480 # Cap number of jobs to 16 32481 if test "$JOBS" -gt "16"; then 32482 JOBS=16 32483 fi 32484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5 32485 $as_echo "$JOBS" >&6; } 32486 else 32487 JOBS=$with_jobs 32488 fi 32489 32490 32491 32492 # Setup smart javac (after cores and memory have been setup) 32493 32494 32495 # Check whether --with-sjavac-server-java was given. 32496 if test "${with_sjavac_server_java+set}" = set; then : 32497 withval=$with_sjavac_server_java; 32498 fi 32499 32500 32501 if test "x$with_sjavac_server_java" != x; then 32502 SJAVAC_SERVER_JAVA="$with_sjavac_server_java" 32503 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""` 32504 if test "x$FOUND_VERSION" = x; then 32505 as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5 32506 fi 32507 else 32508 SJAVAC_SERVER_JAVA="" 32509 # Hotspot specific options. 32510 32511 # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 32512 # If so, then append -verbosegc to SJAVAC_SERVER_JAVA 32513 FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn` 32514 FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""` 32515 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32516 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc" 32517 fi 32518 32519 # JRockit specific options. 32520 32521 # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA) 32522 # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA 32523 FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn` 32524 FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""` 32525 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32526 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc" 32527 fi 32528 32529 SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA" 32530 fi 32531 32532 32533 32534 # Check whether --with-sjavac-server-cores was given. 32535 if test "${with_sjavac_server_cores+set}" = set; then : 32536 withval=$with_sjavac_server_cores; 32537 fi 32538 32539 if test "x$with_sjavac_server_cores" != x; then 32540 SJAVAC_SERVER_CORES="$with_sjavac_server_cores" 32541 else 32542 if test "$NUM_CORES" -gt 16; then 32543 # We set this arbitrary limit because we want to limit the heap 32544 # size of the javac server. 32545 # In the future we will make the javac compilers in the server 32546 # share more and more state, thus enabling us to use more and 32547 # more concurrent threads in the server. 32548 SJAVAC_SERVER_CORES="16" 32549 else 32550 SJAVAC_SERVER_CORES="$NUM_CORES" 32551 fi 32552 32553 if test "$MEMORY_SIZE" -gt "17000"; then 32554 MAX_HEAP_MEM=10000 32555 32556 # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32557 # If so, then append -d64 to SJAVAC_SERVER_JAVA 32558 FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn` 32559 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""` 32560 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32561 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" 32562 fi 32563 32564 32565 # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32566 # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA 32567 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn` 32568 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""` 32569 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32570 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G" 32571 fi 32572 32573 elif test "$MEMORY_SIZE" -gt "10000"; then 32574 MAX_HEAP_MEM=6000 32575 32576 # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32577 # If so, then append -d64 to SJAVAC_SERVER_JAVA 32578 FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn` 32579 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""` 32580 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32581 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" 32582 fi 32583 32584 32585 # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32586 # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA 32587 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn` 32588 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""` 32589 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32590 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G" 32591 fi 32592 32593 elif test "$MEMORY_SIZE" -gt "5000"; then 32594 MAX_HEAP_MEM=3000 32595 32596 # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32597 # If so, then append -d64 to SJAVAC_SERVER_JAVA 32598 FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn` 32599 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""` 32600 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32601 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64" 32602 fi 32603 32604 32605 # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32606 # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA 32607 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn` 32608 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""` 32609 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32610 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G" 32611 fi 32612 32613 elif test "$MEMORY_SIZE" -gt "3800"; then 32614 MAX_HEAP_MEM=2500 32615 32616 # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32617 # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA 32618 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn` 32619 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""` 32620 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32621 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M" 32622 fi 32623 32624 elif test "$MEMORY_SIZE" -gt "1900"; then 32625 MAX_HEAP_MEM=1200 32626 32627 # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32628 # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA 32629 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn` 32630 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""` 32631 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32632 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M" 32633 fi 32634 32635 elif test "$MEMORY_SIZE" -gt "1000"; then 32636 MAX_HEAP_MEM=900 32637 32638 # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32639 # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA 32640 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn` 32641 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""` 32642 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32643 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M" 32644 fi 32645 32646 else 32647 MAX_HEAP_MEM=512 32648 32649 # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32650 # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA 32651 FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn` 32652 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""` 32653 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32654 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M" 32655 fi 32656 32657 fi 32658 32659 32660 # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32661 # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA 32662 FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn` 32663 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""` 32664 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32665 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m" 32666 fi 32667 32668 32669 # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32670 # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA 32671 FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn` 32672 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""` 32673 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32674 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m" 32675 fi 32676 32677 32678 # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA) 32679 # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA 32680 FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn` 32681 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""` 32682 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then 32683 SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE" 32684 fi 32685 32686 32687 MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501` 32688 if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then 32689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5 32690 $as_echo_n "checking if number of server cores must be reduced... " >&6; } 32691 SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP" 32692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5 32693 $as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; } 32694 fi 32695 fi 32696 32697 32698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5 32699 $as_echo_n "checking whether to use sjavac... " >&6; } 32700 # Check whether --enable-sjavac was given. 32701 if test "${enable_sjavac+set}" = set; then : 32702 enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}" 32703 else 32704 ENABLE_SJAVAC='no' 32705 fi 32706 32707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5 32708 $as_echo "$ENABLE_SJAVAC" >&6; } 32709 32710 32711 if test "x$ENABLE_SJAVAC" = xyes; then 32712 SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers" 32713 else 32714 SJAVAC_SERVER_DIR= 32715 fi 32716 32717 32718 32719 32720 # Can the C/C++ compiler use precompiled headers? 32721 32722 32723 ############################################################################### 32724 # 32725 # Can the C/C++ compiler use precompiled headers? 32726 # 32727 # Check whether --enable-precompiled-headers was given. 32728 if test "${enable_precompiled_headers+set}" = set; then : 32729 enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers} 32730 else 32731 ENABLE_PRECOMPH=yes 32732 fi 32733 32734 32735 USE_PRECOMPILED_HEADER=1 32736 if test "x$ENABLE_PRECOMPH" = xno; then 32737 USE_PRECOMPILED_HEADER=0 32738 fi 32739 32740 if test "x$ENABLE_PRECOMPH" = xyes; then 32741 # Check that the compiler actually supports precomp headers. 32742 if test "x$GCC" = xyes; then 32743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5 32744 $as_echo_n "checking that precompiled headers work... " >&6; } 32745 echo "int alfa();" > conftest.h 32746 $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5 32747 if test ! -f conftest.hpp.gch; then 32748 USE_PRECOMPILED_HEADER=0 32749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32750 $as_echo "no" >&6; } 32751 else 32752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32753 $as_echo "yes" >&6; } 32754 fi 32755 rm -f conftest.h conftest.hpp.gch 32756 fi 32757 fi 32758 32759 32760 32761 32762 # Setup use of ccache, if available 32763 32764 # Check whether --enable-ccache was given. 32765 if test "${enable_ccache+set}" = set; then : 32766 enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache} 32767 else 32768 ENABLE_CCACHE=yes 32769 fi 32770 32771 if test "x$ENABLE_CCACHE" = xyes; then 32772 # Extract the first word of "ccache", so it can be a program name with args. 32773 set dummy ccache; ac_word=$2 32774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 32775 $as_echo_n "checking for $ac_word... " >&6; } 32776 if test "${ac_cv_path_CCACHE+set}" = set; then : 32777 $as_echo_n "(cached) " >&6 32778 else 32779 case $CCACHE in 32780 [\\/]* | ?:[\\/]*) 32781 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path. 32782 ;; 32783 *) 32784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 32785 for as_dir in $PATH 32786 do 32787 IFS=$as_save_IFS 32788 test -z "$as_dir" && as_dir=. 32789 for ac_exec_ext in '' $ac_executable_extensions; do 32790 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 32791 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" 32792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 32793 break 2 32794 fi 32795 done 32796 done 32797 IFS=$as_save_IFS 32798 32799 ;; 32800 esac 32801 fi 32802 CCACHE=$ac_cv_path_CCACHE 32803 if test -n "$CCACHE"; then 32804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5 32805 $as_echo "$CCACHE" >&6; } 32806 else 32807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 32808 $as_echo "no" >&6; } 32809 fi 32810 32811 32812 else 32813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5 32814 $as_echo_n "checking for ccache... " >&6; } 32815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5 32816 $as_echo "explicitly disabled" >&6; } 32817 CCACHE= 32818 fi 32819 32820 32821 32822 # Check whether --with-ccache-dir was given. 32823 if test "${with_ccache_dir+set}" = set; then : 32824 withval=$with_ccache_dir; 32825 fi 32826 32827 32828 if test "x$with_ccache_dir" != x; then 32829 # When using a non home ccache directory, assume the use is to share ccache files 32830 # with other users. Thus change the umask. 32831 SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002" 32832 fi 32833 CCACHE_FOUND="" 32834 if test "x$CCACHE" != x; then 32835 32836 if test "x$CCACHE" != x; then 32837 CCACHE_FOUND="true" 32838 # Only use ccache if it is 3.1.4 or later, which supports 32839 # precompiled headers. 32840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5 32841 $as_echo_n "checking if ccache supports precompiled headers... " >&6; } 32842 HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null` 32843 if test "x$HAS_GOOD_CCACHE" = x; then 32844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5 32845 $as_echo "no, disabling ccache" >&6; } 32846 CCACHE= 32847 else 32848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32849 $as_echo "yes" >&6; } 32850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5 32851 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; } 32852 PUSHED_FLAGS="$CXXFLAGS" 32853 CXXFLAGS="-fpch-preprocess $CXXFLAGS" 32854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32855 /* end confdefs.h. */ 32856 32857 int 32858 main () 32859 { 32860 32861 ; 32862 return 0; 32863 } 32864 _ACEOF 32865 if ac_fn_cxx_try_compile "$LINENO"; then : 32866 CC_KNOWS_CCACHE_TRICK=yes 32867 else 32868 CC_KNOWS_CCACHE_TRICK=no 32869 fi 32870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 32871 CXXFLAGS="$PUSHED_FLAGS" 32872 if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then 32873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 32874 $as_echo "yes" >&6; } 32875 else 32876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5 32877 $as_echo "no, disabling ccaching of precompiled headers" >&6; } 32878 CCACHE= 32879 fi 32880 fi 32881 fi 32882 32883 if test "x$CCACHE" != x; then 32884 CCACHE_SLOPPINESS=time_macros 32885 CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" 32886 CCACHE_FLAGS=-fpch-preprocess 32887 32888 if test "x$SET_CCACHE_DIR" != x; then 32889 mkdir -p $CCACHE_DIR > /dev/null 2>&1 32890 chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 32891 fi 32892 fi 32893 32894 fi 32895 32896 32897 ############################################################################### 32898 # 32899 # And now the finish... 32900 # 32901 ############################################################################### 32902 32903 # Check for some common pitfalls 32904 32905 if test x"$OPENJDK_BUILD_OS" = xwindows; then 32906 file_to_test="$SRC_ROOT/LICENSE" 32907 if test `$STAT -c '%a' "$file_to_test"` -lt 400; then 32908 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 32909 fi 32910 fi 32911 32912 32913 32914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5 32915 $as_echo_n "checking if build directory is on local disk... " >&6; } 32916 32917 # df -l lists only local disks; if the given directory is not found then 32918 # a non-zero exit code is given 32919 if test "x$DF" = x; then 32920 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 32921 # msys does not have df; use Windows "net use" instead. 32922 IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:` 32923 if test "x$IS_NETWORK_DISK" = x; then 32924 OUTPUT_DIR_IS_LOCAL="yes" 32925 else 32926 OUTPUT_DIR_IS_LOCAL="no" 32927 fi 32928 else 32929 # No df here, say it's local 32930 OUTPUT_DIR_IS_LOCAL="yes" 32931 fi 32932 else 32933 if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then 32934 OUTPUT_DIR_IS_LOCAL="yes" 32935 else 32936 OUTPUT_DIR_IS_LOCAL="no" 32937 fi 32938 fi 32939 32940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5 32941 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; } 32942 32943 32944 32945 # Check if the user has any old-style ALT_ variables set. 32946 FOUND_ALT_VARIABLES=`env | grep ^ALT_` 32947 32948 # Before generating output files, test if they exist. If they do, this is a reconfigure. 32949 # Since we can't properly handle the dependencies for this, warn the user about the situation 32950 if test -e $OUTPUT_ROOT/spec.gmk; then 32951 IS_RECONFIGURE=yes 32952 else 32953 IS_RECONFIGURE=no 32954 fi 32955 32956 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then 32957 HIDE_PERFORMANCE_HINTS=yes 32958 else 32959 HIDE_PERFORMANCE_HINTS=no 32960 # Hide it the next time around... 32961 $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1 32962 fi 32963 32964 32965 32966 # At the end, call the custom hook. (Dummy macro if no custom sources available) 32967 32968 32969 # We're messing a bit with internal autoconf variables to put the config.status 32970 # in the output directory instead of the current directory. 32971 CONFIG_STATUS="$OUTPUT_ROOT/config.status" 32972 # Create the actual output files. Now the main work of configure is done. 32973 cat >confcache <<\_ACEOF 32974 # This file is a shell script that caches the results of configure 32975 # tests run on this system so they can be shared between configure 32976 # scripts and configure runs, see configure's option --config-cache. 32977 # It is not useful on other systems. If it contains results you don't 32978 # want to keep, you may remove or edit it. 32979 # 32980 # config.status only pays attention to the cache file if you give it 32981 # the --recheck option to rerun configure. 32982 # 32983 # `ac_cv_env_foo' variables (set or unset) will be overridden when 32984 # loading this file, other *unset* `ac_cv_foo' will be assigned the 32985 # following values. 32986 32987 _ACEOF 32988 32989 # The following way of writing the cache mishandles newlines in values, 32990 # but we know of no workaround that is simple, portable, and efficient. 32991 # So, we kill variables containing newlines. 32992 # Ultrix sh set writes to stderr and can't be redirected directly, 32993 # and sets the high bit in the cache file unless we assign to the vars. 32994 ( 32995 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 32996 eval ac_val=\$$ac_var 32997 case $ac_val in #( 32998 *${as_nl}*) 32999 case $ac_var in #( 33000 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 33001 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 33002 esac 33003 case $ac_var in #( 33004 _ | IFS | as_nl) ;; #( 33005 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 33006 *) { eval $ac_var=; unset $ac_var;} ;; 33007 esac ;; 33008 esac 33009 done 33010 33011 (set) 2>&1 | 33012 case $as_nl`(ac_space=' '; set) 2>&1` in #( 33013 *${as_nl}ac_space=\ *) 33014 # `set' does not quote correctly, so add quotes: double-quote 33015 # substitution turns \\\\ into \\, and sed turns \\ into \. 33016 sed -n \ 33017 "s/'/'\\\\''/g; 33018 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 33019 ;; #( 33020 *) 33021 # `set' quotes correctly as required by POSIX, so do not add quotes. 33022 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 33023 ;; 33024 esac | 33025 sort 33026 ) | 33027 sed ' 33028 /^ac_cv_env_/b end 33029 t clear 33030 :clear 33031 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 33032 t end 33033 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 33034 :end' >>confcache 33035 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 33036 if test -w "$cache_file"; then 33037 test "x$cache_file" != "x/dev/null" && 33038 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 33039 $as_echo "$as_me: updating cache $cache_file" >&6;} 33040 cat confcache >$cache_file 33041 else 33042 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 33043 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 33044 fi 33045 fi 33046 rm -f confcache 33047 33048 test "x$prefix" = xNONE && prefix=$ac_default_prefix 33049 # Let make expand exec_prefix. 33050 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 33051 33052 DEFS=-DHAVE_CONFIG_H 33053 33054 ac_libobjs= 33055 ac_ltlibobjs= 33056 U= 33057 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 33058 # 1. Remove the extension, and $U if already installed. 33059 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 33060 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 33061 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 33062 # will be set to the directory where LIBOBJS objects are built. 33063 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 33064 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 33065 done 33066 LIBOBJS=$ac_libobjs 33067 33068 LTLIBOBJS=$ac_ltlibobjs 33069 33070 33071 33072 : ${CONFIG_STATUS=./config.status} 33073 ac_write_fail=0 33074 ac_clean_files_save=$ac_clean_files 33075 ac_clean_files="$ac_clean_files $CONFIG_STATUS" 33076 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 33077 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 33078 as_write_fail=0 33079 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 33080 #! $SHELL 33081 # Generated by $as_me. 33082 # Run this file to recreate the current configuration. 33083 # Compiler output produced by configure, useful for debugging 33084 # configure, is in config.log if it exists. 33085 33086 debug=false 33087 ac_cs_recheck=false 33088 ac_cs_silent=false 33089 33090 SHELL=\${CONFIG_SHELL-$SHELL} 33091 export SHELL 33092 _ASEOF 33093 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 33094 ## -------------------- ## 33095 ## M4sh Initialization. ## 33096 ## -------------------- ## 33097 33098 # Be more Bourne compatible 33099 DUALCASE=1; export DUALCASE # for MKS sh 33100 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 33101 emulate sh 33102 NULLCMD=: 33103 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 33104 # is contrary to our usage. Disable this feature. 33105 alias -g '${1+"$@"}'='"$@"' 33106 setopt NO_GLOB_SUBST 33107 else 33108 case `(set -o) 2>/dev/null` in #( 33109 *posix*) : 33110 set -o posix ;; #( 33111 *) : 33112 ;; 33113 esac 33114 fi 33115 33116 33117 as_nl=' 33118 ' 33119 export as_nl 33120 # Printing a long string crashes Solaris 7 /usr/bin/printf. 33121 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 33122 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 33123 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 33124 # Prefer a ksh shell builtin over an external printf program on Solaris, 33125 # but without wasting forks for bash or zsh. 33126 if test -z "$BASH_VERSION$ZSH_VERSION" \ 33127 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 33128 as_echo='print -r --' 33129 as_echo_n='print -rn --' 33130 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 33131 as_echo='printf %s\n' 33132 as_echo_n='printf %s' 33133 else 33134 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 33135 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 33136 as_echo_n='/usr/ucb/echo -n' 33137 else 33138 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 33139 as_echo_n_body='eval 33140 arg=$1; 33141 case $arg in #( 33142 *"$as_nl"*) 33143 expr "X$arg" : "X\\(.*\\)$as_nl"; 33144 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 33145 esac; 33146 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 33147 ' 33148 export as_echo_n_body 33149 as_echo_n='sh -c $as_echo_n_body as_echo' 33150 fi 33151 export as_echo_body 33152 as_echo='sh -c $as_echo_body as_echo' 33153 fi 33154 33155 # The user is always right. 33156 if test "${PATH_SEPARATOR+set}" != set; then 33157 PATH_SEPARATOR=: 33158 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 33159 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 33160 PATH_SEPARATOR=';' 33161 } 33162 fi 33163 33164 33165 # IFS 33166 # We need space, tab and new line, in precisely that order. Quoting is 33167 # there to prevent editors from complaining about space-tab. 33168 # (If _AS_PATH_WALK were called with IFS unset, it would disable word 33169 # splitting by setting IFS to empty value.) 33170 IFS=" "" $as_nl" 33171 33172 # Find who we are. Look in the path if we contain no directory separator. 33173 case $0 in #(( 33174 *[\\/]* ) as_myself=$0 ;; 33175 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 33176 for as_dir in $PATH 33177 do 33178 IFS=$as_save_IFS 33179 test -z "$as_dir" && as_dir=. 33180 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 33181 done 33182 IFS=$as_save_IFS 33183 33184 ;; 33185 esac 33186 # We did not find ourselves, most probably we were run as `sh COMMAND' 33187 # in which case we are not to be found in the path. 33188 if test "x$as_myself" = x; then 33189 as_myself=$0 33190 fi 33191 if test ! -f "$as_myself"; then 33192 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 33193 exit 1 33194 fi 33195 33196 # Unset variables that we do not need and which cause bugs (e.g. in 33197 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 33198 # suppresses any "Segmentation fault" message there. '((' could 33199 # trigger a bug in pdksh 5.2.14. 33200 for as_var in BASH_ENV ENV MAIL MAILPATH 33201 do eval test x\${$as_var+set} = xset \ 33202 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 33203 done 33204 PS1='$ ' 33205 PS2='> ' 33206 PS4='+ ' 33207 33208 # NLS nuisances. 33209 LC_ALL=C 33210 export LC_ALL 33211 LANGUAGE=C 33212 export LANGUAGE 33213 33214 # CDPATH. 33215 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 33216 33217 33218 # as_fn_error STATUS ERROR [LINENO LOG_FD] 33219 # ---------------------------------------- 33220 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 33221 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 33222 # script with STATUS, using 1 if that was 0. 33223 as_fn_error () 33224 { 33225 as_status=$1; test $as_status -eq 0 && as_status=1 33226 if test "$4"; then 33227 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 33228 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 33229 fi 33230 $as_echo "$as_me: error: $2" >&2 33231 as_fn_exit $as_status 33232 } # as_fn_error 33233 33234 33235 # as_fn_set_status STATUS 33236 # ----------------------- 33237 # Set $? to STATUS, without forking. 33238 as_fn_set_status () 33239 { 33240 return $1 33241 } # as_fn_set_status 33242 33243 # as_fn_exit STATUS 33244 # ----------------- 33245 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 33246 as_fn_exit () 33247 { 33248 set +e 33249 as_fn_set_status $1 33250 exit $1 33251 } # as_fn_exit 33252 33253 # as_fn_unset VAR 33254 # --------------- 33255 # Portably unset VAR. 33256 as_fn_unset () 33257 { 33258 { eval $1=; unset $1;} 33259 } 33260 as_unset=as_fn_unset 33261 # as_fn_append VAR VALUE 33262 # ---------------------- 33263 # Append the text in VALUE to the end of the definition contained in VAR. Take 33264 # advantage of any shell optimizations that allow amortized linear growth over 33265 # repeated appends, instead of the typical quadratic growth present in naive 33266 # implementations. 33267 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 33268 eval 'as_fn_append () 33269 { 33270 eval $1+=\$2 33271 }' 33272 else 33273 as_fn_append () 33274 { 33275 eval $1=\$$1\$2 33276 } 33277 fi # as_fn_append 33278 33279 # as_fn_arith ARG... 33280 # ------------------ 33281 # Perform arithmetic evaluation on the ARGs, and store the result in the 33282 # global $as_val. Take advantage of shells that can avoid forks. The arguments 33283 # must be portable across $(()) and expr. 33284 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 33285 eval 'as_fn_arith () 33286 { 33287 as_val=$(( $* )) 33288 }' 33289 else 33290 as_fn_arith () 33291 { 33292 as_val=`expr "$@" || test $? -eq 1` 33293 } 33294 fi # as_fn_arith 33295 33296 33297 if expr a : '\(a\)' >/dev/null 2>&1 && 33298 test "X`expr 00001 : '.*\(...\)'`" = X001; then 33299 as_expr=expr 33300 else 33301 as_expr=false 33302 fi 33303 33304 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 33305 as_basename=basename 33306 else 33307 as_basename=false 33308 fi 33309 33310 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 33311 as_dirname=dirname 33312 else 33313 as_dirname=false 33314 fi 33315 33316 as_me=`$as_basename -- "$0" || 33317 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 33318 X"$0" : 'X\(//\)$' \| \ 33319 X"$0" : 'X\(/\)' \| . 2>/dev/null || 33320 $as_echo X/"$0" | 33321 sed '/^.*\/\([^/][^/]*\)\/*$/{ 33322 s//\1/ 33323 q 33324 } 33325 /^X\/\(\/\/\)$/{ 33326 s//\1/ 33327 q 33328 } 33329 /^X\/\(\/\).*/{ 33330 s//\1/ 33331 q 33332 } 33333 s/.*/./; q'` 33334 33335 # Avoid depending upon Character Ranges. 33336 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 33337 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 33338 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 33339 as_cr_digits='0123456789' 33340 as_cr_alnum=$as_cr_Letters$as_cr_digits 33341 33342 ECHO_C= ECHO_N= ECHO_T= 33343 case `echo -n x` in #((((( 33344 -n*) 33345 case `echo 'xy\c'` in 33346 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 33347 xy) ECHO_C='\c';; 33348 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 33349 ECHO_T=' ';; 33350 esac;; 33351 *) 33352 ECHO_N='-n';; 33353 esac 33354 33355 rm -f conf$$ conf$$.exe conf$$.file 33356 if test -d conf$$.dir; then 33357 rm -f conf$$.dir/conf$$.file 33358 else 33359 rm -f conf$$.dir 33360 mkdir conf$$.dir 2>/dev/null 33361 fi 33362 if (echo >conf$$.file) 2>/dev/null; then 33363 if ln -s conf$$.file conf$$ 2>/dev/null; then 33364 as_ln_s='ln -s' 33365 # ... but there are two gotchas: 33366 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 33367 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 33368 # In both cases, we have to default to `cp -p'. 33369 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 33370 as_ln_s='cp -p' 33371 elif ln conf$$.file conf$$ 2>/dev/null; then 33372 as_ln_s=ln 33373 else 33374 as_ln_s='cp -p' 33375 fi 33376 else 33377 as_ln_s='cp -p' 33378 fi 33379 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 33380 rmdir conf$$.dir 2>/dev/null 33381 33382 33383 # as_fn_mkdir_p 33384 # ------------- 33385 # Create "$as_dir" as a directory, including parents if necessary. 33386 as_fn_mkdir_p () 33387 { 33388 33389 case $as_dir in #( 33390 -*) as_dir=./$as_dir;; 33391 esac 33392 test -d "$as_dir" || eval $as_mkdir_p || { 33393 as_dirs= 33394 while :; do 33395 case $as_dir in #( 33396 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 33397 *) as_qdir=$as_dir;; 33398 esac 33399 as_dirs="'$as_qdir' $as_dirs" 33400 as_dir=`$as_dirname -- "$as_dir" || 33401 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 33402 X"$as_dir" : 'X\(//\)[^/]' \| \ 33403 X"$as_dir" : 'X\(//\)$' \| \ 33404 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 33405 $as_echo X"$as_dir" | 33406 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 33407 s//\1/ 33408 q 33409 } 33410 /^X\(\/\/\)[^/].*/{ 33411 s//\1/ 33412 q 33413 } 33414 /^X\(\/\/\)$/{ 33415 s//\1/ 33416 q 33417 } 33418 /^X\(\/\).*/{ 33419 s//\1/ 33420 q 33421 } 33422 s/.*/./; q'` 33423 test -d "$as_dir" && break 33424 done 33425 test -z "$as_dirs" || eval "mkdir $as_dirs" 33426 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 33427 33428 33429 } # as_fn_mkdir_p 33430 if mkdir -p . 2>/dev/null; then 33431 as_mkdir_p='mkdir -p "$as_dir"' 33432 else 33433 test -d ./-p && rmdir ./-p 33434 as_mkdir_p=false 33435 fi 33436 33437 if test -x / >/dev/null 2>&1; then 33438 as_test_x='test -x' 33439 else 33440 if ls -dL / >/dev/null 2>&1; then 33441 as_ls_L_option=L 33442 else 33443 as_ls_L_option= 33444 fi 33445 as_test_x=' 33446 eval sh -c '\'' 33447 if test -d "$1"; then 33448 test -d "$1/."; 33449 else 33450 case $1 in #( 33451 -*)set "./$1";; 33452 esac; 33453 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( 33454 ???[sx]*):;;*)false;;esac;fi 33455 '\'' sh 33456 ' 33457 fi 33458 as_executable_p=$as_test_x 33459 33460 # Sed expression to map a string onto a valid CPP name. 33461 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 33462 33463 # Sed expression to map a string onto a valid variable name. 33464 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 33465 33466 33467 exec 6>&1 33468 ## ----------------------------------- ## 33469 ## Main body of $CONFIG_STATUS script. ## 33470 ## ----------------------------------- ## 33471 _ASEOF 33472 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 33473 33474 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33475 # Save the log message, to keep $0 and so on meaningful, and to 33476 # report actual input values of CONFIG_FILES etc. instead of their 33477 # values after options handling. 33478 ac_log=" 33479 This file was extended by OpenJDK $as_me jdk8, which was 33480 generated by GNU Autoconf 2.67. Invocation command line was 33481 33482 CONFIG_FILES = $CONFIG_FILES 33483 CONFIG_HEADERS = $CONFIG_HEADERS 33484 CONFIG_LINKS = $CONFIG_LINKS 33485 CONFIG_COMMANDS = $CONFIG_COMMANDS 33486 $ $0 $@ 33487 33488 on `(hostname || uname -n) 2>/dev/null | sed 1q` 33489 " 33490 33491 _ACEOF 33492 33493 case $ac_config_files in *" 33494 "*) set x $ac_config_files; shift; ac_config_files=$*;; 33495 esac 33496 33497 case $ac_config_headers in *" 33498 "*) set x $ac_config_headers; shift; ac_config_headers=$*;; 33499 esac 33500 33501 33502 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33503 # Files that config.status was made for. 33504 config_files="$ac_config_files" 33505 config_headers="$ac_config_headers" 33506 33507 _ACEOF 33508 33509 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33510 ac_cs_usage="\ 33511 \`$as_me' instantiates files and other configuration actions 33512 from templates according to the current configuration. Unless the files 33513 and actions are specified as TAGs, all are instantiated by default. 33514 33515 Usage: $0 [OPTION]... [TAG]... 33516 33517 -h, --help print this help, then exit 33518 -V, --version print version number and configuration settings, then exit 33519 --config print configuration, then exit 33520 -q, --quiet, --silent 33521 do not print progress messages 33522 -d, --debug don't remove temporary files 33523 --recheck update $as_me by reconfiguring in the same conditions 33524 --file=FILE[:TEMPLATE] 33525 instantiate the configuration file FILE 33526 --header=FILE[:TEMPLATE] 33527 instantiate the configuration header FILE 33528 33529 Configuration files: 33530 $config_files 33531 33532 Configuration headers: 33533 $config_headers 33534 33535 Report bugs to <build-dev@openjdk.java.net>. 33536 OpenJDK home page: <http://openjdk.java.net>." 33537 33538 _ACEOF 33539 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33540 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 33541 ac_cs_version="\\ 33542 OpenJDK config.status jdk8 33543 configured by $0, generated by GNU Autoconf 2.67, 33544 with options \\"\$ac_cs_config\\" 33545 33546 Copyright (C) 2010 Free Software Foundation, Inc. 33547 This config.status script is free software; the Free Software Foundation 33548 gives unlimited permission to copy, distribute and modify it." 33549 33550 ac_pwd='$ac_pwd' 33551 srcdir='$srcdir' 33552 AWK='$AWK' 33553 test -n "\$AWK" || AWK=awk 33554 _ACEOF 33555 33556 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33557 # The default lists apply if the user does not specify any file. 33558 ac_need_defaults=: 33559 while test $# != 0 33560 do 33561 case $1 in 33562 --*=?*) 33563 ac_option=`expr "X$1" : 'X\([^=]*\)='` 33564 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 33565 ac_shift=: 33566 ;; 33567 --*=) 33568 ac_option=`expr "X$1" : 'X\([^=]*\)='` 33569 ac_optarg= 33570 ac_shift=: 33571 ;; 33572 *) 33573 ac_option=$1 33574 ac_optarg=$2 33575 ac_shift=shift 33576 ;; 33577 esac 33578 33579 case $ac_option in 33580 # Handling of the options. 33581 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 33582 ac_cs_recheck=: ;; 33583 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 33584 $as_echo "$ac_cs_version"; exit ;; 33585 --config | --confi | --conf | --con | --co | --c ) 33586 $as_echo "$ac_cs_config"; exit ;; 33587 --debug | --debu | --deb | --de | --d | -d ) 33588 debug=: ;; 33589 --file | --fil | --fi | --f ) 33590 $ac_shift 33591 case $ac_optarg in 33592 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 33593 '') as_fn_error $? "missing file argument" ;; 33594 esac 33595 as_fn_append CONFIG_FILES " '$ac_optarg'" 33596 ac_need_defaults=false;; 33597 --header | --heade | --head | --hea ) 33598 $ac_shift 33599 case $ac_optarg in 33600 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 33601 esac 33602 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 33603 ac_need_defaults=false;; 33604 --he | --h) 33605 # Conflict between --help and --header 33606 as_fn_error $? "ambiguous option: \`$1' 33607 Try \`$0 --help' for more information.";; 33608 --help | --hel | -h ) 33609 $as_echo "$ac_cs_usage"; exit ;; 33610 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 33611 | -silent | --silent | --silen | --sile | --sil | --si | --s) 33612 ac_cs_silent=: ;; 33613 33614 # This is an error. 33615 -*) as_fn_error $? "unrecognized option: \`$1' 33616 Try \`$0 --help' for more information." ;; 33617 33618 *) as_fn_append ac_config_targets " $1" 33619 ac_need_defaults=false ;; 33620 33621 esac 33622 shift 33623 done 33624 33625 ac_configure_extra_args= 33626 33627 if $ac_cs_silent; then 33628 exec 6>/dev/null 33629 ac_configure_extra_args="$ac_configure_extra_args --silent" 33630 fi 33631 33632 _ACEOF 33633 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33634 if \$ac_cs_recheck; then 33635 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 33636 shift 33637 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 33638 CONFIG_SHELL='$SHELL' 33639 export CONFIG_SHELL 33640 exec "\$@" 33641 fi 33642 33643 _ACEOF 33644 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33645 exec 5>>config.log 33646 { 33647 echo 33648 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 33649 ## Running $as_me. ## 33650 _ASBOX 33651 $as_echo "$ac_log" 33652 } >&5 33653 33654 _ACEOF 33655 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33656 _ACEOF 33657 33658 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33659 33660 # Handling of arguments. 33661 for ac_config_target in $ac_config_targets 33662 do 33663 case $ac_config_target in 33664 "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;; 33665 "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;; 33666 "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;; 33667 "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;; 33668 "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;; 33669 "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;; 33670 "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;; 33671 33672 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; 33673 esac 33674 done 33675 33676 33677 # If the user did not use the arguments to specify the items to instantiate, 33678 # then the envvar interface is used. Set only those that are not. 33679 # We use the long form for the default assignment because of an extremely 33680 # bizarre bug on SunOS 4.1.3. 33681 if $ac_need_defaults; then 33682 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 33683 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 33684 fi 33685 33686 # Have a temporary directory for convenience. Make it in the build tree 33687 # simply because there is no reason against having it here, and in addition, 33688 # creating and moving files from /tmp can sometimes cause problems. 33689 # Hook for its removal unless debugging. 33690 # Note that there is a small window in which the directory will not be cleaned: 33691 # after its creation but before its name has been assigned to `$tmp'. 33692 $debug || 33693 { 33694 tmp= 33695 trap 'exit_status=$? 33696 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status 33697 ' 0 33698 trap 'as_fn_exit 1' 1 2 13 15 33699 } 33700 # Create a (secure) tmp directory for tmp files. 33701 33702 { 33703 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 33704 test -n "$tmp" && test -d "$tmp" 33705 } || 33706 { 33707 tmp=./conf$$-$RANDOM 33708 (umask 077 && mkdir "$tmp") 33709 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 33710 33711 # Set up the scripts for CONFIG_FILES section. 33712 # No need to generate them if there are no CONFIG_FILES. 33713 # This happens for instance with `./config.status config.h'. 33714 if test -n "$CONFIG_FILES"; then 33715 33716 33717 ac_cr=`echo X | tr X '\015'` 33718 # On cygwin, bash can eat \r inside `` if the user requested igncr. 33719 # But we know of no other shell where ac_cr would be empty at this 33720 # point, so we can use a bashism as a fallback. 33721 if test "x$ac_cr" = x; then 33722 eval ac_cr=\$\'\\r\' 33723 fi 33724 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 33725 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 33726 ac_cs_awk_cr='\\r' 33727 else 33728 ac_cs_awk_cr=$ac_cr 33729 fi 33730 33731 echo 'BEGIN {' >"$tmp/subs1.awk" && 33732 _ACEOF 33733 33734 33735 { 33736 echo "cat >conf$$subs.awk <<_ACEOF" && 33737 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 33738 echo "_ACEOF" 33739 } >conf$$subs.sh || 33740 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 33741 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 33742 ac_delim='%!_!# ' 33743 for ac_last_try in false false false false false :; do 33744 . ./conf$$subs.sh || 33745 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 33746 33747 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 33748 if test $ac_delim_n = $ac_delim_num; then 33749 break 33750 elif $ac_last_try; then 33751 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 33752 else 33753 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 33754 fi 33755 done 33756 rm -f conf$$subs.sh 33757 33758 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33759 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && 33760 _ACEOF 33761 sed -n ' 33762 h 33763 s/^/S["/; s/!.*/"]=/ 33764 p 33765 g 33766 s/^[^!]*!// 33767 :repl 33768 t repl 33769 s/'"$ac_delim"'$// 33770 t delim 33771 :nl 33772 h 33773 s/\(.\{148\}\)..*/\1/ 33774 t more1 33775 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 33776 p 33777 n 33778 b repl 33779 :more1 33780 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 33781 p 33782 g 33783 s/.\{148\}// 33784 t nl 33785 :delim 33786 h 33787 s/\(.\{148\}\)..*/\1/ 33788 t more2 33789 s/["\\]/\\&/g; s/^/"/; s/$/"/ 33790 p 33791 b 33792 :more2 33793 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 33794 p 33795 g 33796 s/.\{148\}// 33797 t delim 33798 ' <conf$$subs.awk | sed ' 33799 /^[^""]/{ 33800 N 33801 s/\n// 33802 } 33803 ' >>$CONFIG_STATUS || ac_write_fail=1 33804 rm -f conf$$subs.awk 33805 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33806 _ACAWK 33807 cat >>"\$tmp/subs1.awk" <<_ACAWK && 33808 for (key in S) S_is_set[key] = 1 33809 FS = "" 33810 33811 } 33812 { 33813 line = $ 0 33814 nfields = split(line, field, "@") 33815 substed = 0 33816 len = length(field[1]) 33817 for (i = 2; i < nfields; i++) { 33818 key = field[i] 33819 keylen = length(key) 33820 if (S_is_set[key]) { 33821 value = S[key] 33822 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 33823 len += length(value) + length(field[++i]) 33824 substed = 1 33825 } else 33826 len += 1 + keylen 33827 } 33828 33829 print line 33830 } 33831 33832 _ACAWK 33833 _ACEOF 33834 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33835 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 33836 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 33837 else 33838 cat 33839 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ 33840 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 33841 _ACEOF 33842 33843 # VPATH may cause trouble with some makes, so we remove sole $(srcdir), 33844 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 33845 # trailing colons and then remove the whole line if VPATH becomes empty 33846 # (actually we leave an empty line to preserve line numbers). 33847 if test "x$srcdir" = x.; then 33848 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 33849 h 33850 s/// 33851 s/^/:/ 33852 s/[ ]*$/:/ 33853 s/:\$(srcdir):/:/g 33854 s/:\${srcdir}:/:/g 33855 s/:@srcdir@:/:/g 33856 s/^:*// 33857 s/:*$// 33858 x 33859 s/\(=[ ]*\).*/\1/ 33860 G 33861 s/\n// 33862 s/^[^=]*=[ ]*$// 33863 }' 33864 fi 33865 33866 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33867 fi # test -n "$CONFIG_FILES" 33868 33869 # Set up the scripts for CONFIG_HEADERS section. 33870 # No need to generate them if there are no CONFIG_HEADERS. 33871 # This happens for instance with `./config.status Makefile'. 33872 if test -n "$CONFIG_HEADERS"; then 33873 cat >"$tmp/defines.awk" <<\_ACAWK || 33874 BEGIN { 33875 _ACEOF 33876 33877 # Transform confdefs.h into an awk script `defines.awk', embedded as 33878 # here-document in config.status, that substitutes the proper values into 33879 # config.h.in to produce config.h. 33880 33881 # Create a delimiter string that does not exist in confdefs.h, to ease 33882 # handling of long lines. 33883 ac_delim='%!_!# ' 33884 for ac_last_try in false false :; do 33885 ac_t=`sed -n "/$ac_delim/p" confdefs.h` 33886 if test -z "$ac_t"; then 33887 break 33888 elif $ac_last_try; then 33889 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 33890 else 33891 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 33892 fi 33893 done 33894 33895 # For the awk script, D is an array of macro values keyed by name, 33896 # likewise P contains macro parameters if any. Preserve backslash 33897 # newline sequences. 33898 33899 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 33900 sed -n ' 33901 s/.\{148\}/&'"$ac_delim"'/g 33902 t rset 33903 :rset 33904 s/^[ ]*#[ ]*define[ ][ ]*/ / 33905 t def 33906 d 33907 :def 33908 s/\\$// 33909 t bsnl 33910 s/["\\]/\\&/g 33911 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 33912 D["\1"]=" \3"/p 33913 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 33914 d 33915 :bsnl 33916 s/["\\]/\\&/g 33917 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 33918 D["\1"]=" \3\\\\\\n"\\/p 33919 t cont 33920 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 33921 t cont 33922 d 33923 :cont 33924 n 33925 s/.\{148\}/&'"$ac_delim"'/g 33926 t clear 33927 :clear 33928 s/\\$// 33929 t bsnlc 33930 s/["\\]/\\&/g; s/^/"/; s/$/"/p 33931 d 33932 :bsnlc 33933 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 33934 b cont 33935 ' <confdefs.h | sed ' 33936 s/'"$ac_delim"'/"\\\ 33937 "/g' >>$CONFIG_STATUS || ac_write_fail=1 33938 33939 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 33940 for (key in D) D_is_set[key] = 1 33941 FS = "" 33942 } 33943 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 33944 line = \$ 0 33945 split(line, arg, " ") 33946 if (arg[1] == "#") { 33947 defundef = arg[2] 33948 mac1 = arg[3] 33949 } else { 33950 defundef = substr(arg[1], 2) 33951 mac1 = arg[2] 33952 } 33953 split(mac1, mac2, "(") #) 33954 macro = mac2[1] 33955 prefix = substr(line, 1, index(line, defundef) - 1) 33956 if (D_is_set[macro]) { 33957 # Preserve the white space surrounding the "#". 33958 print prefix "define", macro P[macro] D[macro] 33959 next 33960 } else { 33961 # Replace #undef with comments. This is necessary, for example, 33962 # in the case of _POSIX_SOURCE, which is predefined and required 33963 # on some systems where configure will not decide to define it. 33964 if (defundef == "undef") { 33965 print "/*", prefix defundef, macro, "*/" 33966 next 33967 } 33968 } 33969 } 33970 { print } 33971 _ACAWK 33972 _ACEOF 33973 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 33974 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 33975 fi # test -n "$CONFIG_HEADERS" 33976 33977 33978 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " 33979 shift 33980 for ac_tag 33981 do 33982 case $ac_tag in 33983 :[FHLC]) ac_mode=$ac_tag; continue;; 33984 esac 33985 case $ac_mode$ac_tag in 33986 :[FHL]*:*);; 33987 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; 33988 :[FH]-) ac_tag=-:-;; 33989 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 33990 esac 33991 ac_save_IFS=$IFS 33992 IFS=: 33993 set x $ac_tag 33994 IFS=$ac_save_IFS 33995 shift 33996 ac_file=$1 33997 shift 33998 33999 case $ac_mode in 34000 :L) ac_source=$1;; 34001 :[FH]) 34002 ac_file_inputs= 34003 for ac_f 34004 do 34005 case $ac_f in 34006 -) ac_f="$tmp/stdin";; 34007 *) # Look for the file first in the build tree, then in the source tree 34008 # (if the path is not absolute). The absolute path cannot be DOS-style, 34009 # because $ac_f cannot contain `:'. 34010 test -f "$ac_f" || 34011 case $ac_f in 34012 [\\/$]*) false;; 34013 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 34014 esac || 34015 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; 34016 esac 34017 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 34018 as_fn_append ac_file_inputs " '$ac_f'" 34019 done 34020 34021 # Let's still pretend it is `configure' which instantiates (i.e., don't 34022 # use $as_me), people would be surprised to read: 34023 # /* config.h. Generated by config.status. */ 34024 configure_input='Generated from '` 34025 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 34026 `' by configure.' 34027 if test x"$ac_file" != x-; then 34028 configure_input="$ac_file. $configure_input" 34029 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 34030 $as_echo "$as_me: creating $ac_file" >&6;} 34031 fi 34032 # Neutralize special characters interpreted by sed in replacement strings. 34033 case $configure_input in #( 34034 *\&* | *\|* | *\\* ) 34035 ac_sed_conf_input=`$as_echo "$configure_input" | 34036 sed 's/[\\\\&|]/\\\\&/g'`;; #( 34037 *) ac_sed_conf_input=$configure_input;; 34038 esac 34039 34040 case $ac_tag in 34041 *:-:* | *:-) cat >"$tmp/stdin" \ 34042 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 34043 esac 34044 ;; 34045 esac 34046 34047 ac_dir=`$as_dirname -- "$ac_file" || 34048 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 34049 X"$ac_file" : 'X\(//\)[^/]' \| \ 34050 X"$ac_file" : 'X\(//\)$' \| \ 34051 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 34052 $as_echo X"$ac_file" | 34053 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 34054 s//\1/ 34055 q 34056 } 34057 /^X\(\/\/\)[^/].*/{ 34058 s//\1/ 34059 q 34060 } 34061 /^X\(\/\/\)$/{ 34062 s//\1/ 34063 q 34064 } 34065 /^X\(\/\).*/{ 34066 s//\1/ 34067 q 34068 } 34069 s/.*/./; q'` 34070 as_dir="$ac_dir"; as_fn_mkdir_p 34071 ac_builddir=. 34072 34073 case "$ac_dir" in 34074 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 34075 *) 34076 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 34077 # A ".." for each directory in $ac_dir_suffix. 34078 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 34079 case $ac_top_builddir_sub in 34080 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 34081 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 34082 esac ;; 34083 esac 34084 ac_abs_top_builddir=$ac_pwd 34085 ac_abs_builddir=$ac_pwd$ac_dir_suffix 34086 # for backward compatibility: 34087 ac_top_builddir=$ac_top_build_prefix 34088 34089 case $srcdir in 34090 .) # We are building in place. 34091 ac_srcdir=. 34092 ac_top_srcdir=$ac_top_builddir_sub 34093 ac_abs_top_srcdir=$ac_pwd ;; 34094 [\\/]* | ?:[\\/]* ) # Absolute name. 34095 ac_srcdir=$srcdir$ac_dir_suffix; 34096 ac_top_srcdir=$srcdir 34097 ac_abs_top_srcdir=$srcdir ;; 34098 *) # Relative name. 34099 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 34100 ac_top_srcdir=$ac_top_build_prefix$srcdir 34101 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 34102 esac 34103 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 34104 34105 34106 case $ac_mode in 34107 :F) 34108 # 34109 # CONFIG_FILE 34110 # 34111 34112 _ACEOF 34113 34114 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34115 # If the template does not know about datarootdir, expand it. 34116 # FIXME: This hack should be removed a few years after 2.60. 34117 ac_datarootdir_hack=; ac_datarootdir_seen= 34118 ac_sed_dataroot=' 34119 /datarootdir/ { 34120 p 34121 q 34122 } 34123 /@datadir@/p 34124 /@docdir@/p 34125 /@infodir@/p 34126 /@localedir@/p 34127 /@mandir@/p' 34128 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 34129 *datarootdir*) ac_datarootdir_seen=yes;; 34130 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 34131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 34132 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 34133 _ACEOF 34134 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34135 ac_datarootdir_hack=' 34136 s&@datadir@&$datadir&g 34137 s&@docdir@&$docdir&g 34138 s&@infodir@&$infodir&g 34139 s&@localedir@&$localedir&g 34140 s&@mandir@&$mandir&g 34141 s&\\\${datarootdir}&$datarootdir&g' ;; 34142 esac 34143 _ACEOF 34144 34145 # Neutralize VPATH when `$srcdir' = `.'. 34146 # Shell code in configure.ac might set extrasub. 34147 # FIXME: do we really want to maintain this feature? 34148 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 34149 ac_sed_extra="$ac_vpsub 34150 $extrasub 34151 _ACEOF 34152 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 34153 :t 34154 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 34155 s|@configure_input@|$ac_sed_conf_input|;t t 34156 s&@top_builddir@&$ac_top_builddir_sub&;t t 34157 s&@top_build_prefix@&$ac_top_build_prefix&;t t 34158 s&@srcdir@&$ac_srcdir&;t t 34159 s&@abs_srcdir@&$ac_abs_srcdir&;t t 34160 s&@top_srcdir@&$ac_top_srcdir&;t t 34161 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 34162 s&@builddir@&$ac_builddir&;t t 34163 s&@abs_builddir@&$ac_abs_builddir&;t t 34164 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 34165 $ac_datarootdir_hack 34166 " 34167 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ 34168 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34169 34170 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 34171 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && 34172 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && 34173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 34174 which seems to be undefined. Please make sure it is defined" >&5 34175 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 34176 which seems to be undefined. Please make sure it is defined" >&2;} 34177 34178 rm -f "$tmp/stdin" 34179 case $ac_file in 34180 -) cat "$tmp/out" && rm -f "$tmp/out";; 34181 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; 34182 esac \ 34183 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34184 ;; 34185 :H) 34186 # 34187 # CONFIG_HEADER 34188 # 34189 if test x"$ac_file" != x-; then 34190 { 34191 $as_echo "/* $configure_input */" \ 34192 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" 34193 } >"$tmp/config.h" \ 34194 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34195 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then 34196 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 34197 $as_echo "$as_me: $ac_file is unchanged" >&6;} 34198 else 34199 rm -f "$ac_file" 34200 mv "$tmp/config.h" "$ac_file" \ 34201 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 34202 fi 34203 else 34204 $as_echo "/* $configure_input */" \ 34205 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ 34206 || as_fn_error $? "could not create -" "$LINENO" 5 34207 fi 34208 ;; 34209 34210 34211 esac 34212 34213 done # for ac_tag 34214 34215 34216 as_fn_exit 0 34217 _ACEOF 34218 ac_clean_files=$ac_clean_files_save 34219 34220 test $ac_write_fail = 0 || 34221 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 34222 34223 34224 # configure is writing to config.log, and then calls config.status. 34225 # config.status does its own redirection, appending to config.log. 34226 # Unfortunately, on DOS this fails, as config.log is still kept open 34227 # by configure, so config.status won't be able to write to it; its 34228 # output is simply discarded. So we exec the FD to /dev/null, 34229 # effectively closing config.log, so it can be properly (re)opened and 34230 # appended to by config.status. When coming back to configure, we 34231 # need to make the FD available again. 34232 if test "$no_create" != yes; then 34233 ac_cs_success=: 34234 ac_config_status_args= 34235 test "$silent" = yes && 34236 ac_config_status_args="$ac_config_status_args --quiet" 34237 exec 5>/dev/null 34238 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 34239 exec 5>>config.log 34240 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 34241 # would make configure fail if this is the last instruction. 34242 $ac_cs_success || as_fn_exit 1 34243 fi 34244 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 34245 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 34246 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 34247 fi 34248 34249 34250 # Make the compare script executable 34251 $CHMOD +x $OUTPUT_ROOT/compare.sh 34252 34253 # Finally output some useful information to the user 34254 34255 # Finally output some useful information to the user 34256 34257 if test "x$CCACHE_FOUND" != x; then 34258 if test "x$HAS_GOOD_CCACHE" = x; then 34259 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" 34260 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." 34261 else 34262 CCACHE_STATUS="installed and in use" 34263 fi 34264 else 34265 if test "x$GCC" = xyes; then 34266 CCACHE_STATUS="not installed (consider installing)" 34267 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." 34268 else 34269 CCACHE_STATUS="not available for your system" 34270 fi 34271 fi 34272 34273 printf "\n" 34274 printf "====================================================\n" 34275 printf "A new configuration has been successfully created in\n" 34276 printf "$OUTPUT_ROOT\n" 34277 if test "x$CONFIGURE_COMMAND_LINE" != x; then 34278 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" 34279 else 34280 printf "using default settings.\n" 34281 fi 34282 34283 printf "\n" 34284 printf "Configuration summary:\n" 34285 printf "* Debug level: $DEBUG_LEVEL\n" 34286 printf "* JDK variant: $JDK_VARIANT\n" 34287 printf "* JVM variants: $with_jvm_variants\n" 34288 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" 34289 34290 printf "\n" 34291 printf "Tools summary:\n" 34292 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 34293 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" 34294 fi 34295 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" 34296 printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" 34297 printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" 34298 34299 printf "\n" 34300 printf "Build performance summary:\n" 34301 printf "* Cores to use: $JOBS\n" 34302 printf "* Memory limit: $MEMORY_SIZE MB\n" 34303 printf "* ccache status: $CCACHE_STATUS\n" 34304 printf "\n" 34305 34306 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then 34307 printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" 34308 printf "$CCACHE_HELP_MSG\n" 34309 34310 # Print a helpful message on how to acquire the necessary build dependency. 34311 # ccache is the help tag: freetyp2, cups, pulse, alsa etc 34312 MISSING_DEPENDENCY=ccache 34313 PKGHANDLER_COMMAND= 34314 34315 case $PKGHANDLER in 34316 apt-get) 34317 apt_help $MISSING_DEPENDENCY ;; 34318 yum) 34319 yum_help $MISSING_DEPENDENCY ;; 34320 port) 34321 port_help $MISSING_DEPENDENCY ;; 34322 pkgutil) 34323 pkgutil_help $MISSING_DEPENDENCY ;; 34324 pkgadd) 34325 pkgadd_help $MISSING_DEPENDENCY ;; 34326 * ) 34327 break ;; 34328 esac 34329 34330 if test "x$PKGHANDLER_COMMAND" != x; then 34331 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 34332 fi 34333 34334 printf "$HELP_MSG\n" 34335 printf "\n" 34336 fi 34337 34338 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then 34339 printf "NOTE: You have requested to build more than one version of the JVM, which\n" 34340 printf "will result in longer build times.\n" 34341 printf "\n" 34342 fi 34343 34344 if test "x$FOUND_ALT_VARIABLES" != "x"; then 34345 printf "WARNING: You have old-style ALT_ environment variables set.\n" 34346 printf "These are not respected, and will be ignored. It is recommended\n" 34347 printf "that you clean your environment. The following variables are set:\n" 34348 printf "$FOUND_ALT_VARIABLES\n" 34349 printf "\n" 34350 fi 34351 34352 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then 34353 printf "WARNING: Your build output directory is not on a local disk.\n" 34354 printf "This will severely degrade build performance!\n" 34355 printf "It is recommended that you create an output directory on a local disk,\n" 34356 printf "and run the configure script again from that directory.\n" 34357 printf "\n" 34358 fi 34359 34360 if test "x$IS_RECONFIGURE" = "xyes"; then 34361 printf "WARNING: The result of this configuration has overridden an older\n" 34362 printf "configuration. You *should* run 'make clean' to make sure you get a\n" 34363 printf "proper build. Failure to do so might result in strange build problems.\n" 34364 printf "\n" 34365 fi 34366